1. 21 3月, 2018 2 次提交
  2. 20 3月, 2018 1 次提交
  3. 19 3月, 2018 5 次提交
    • A
      iwlwifi: mvm: Move unused phy's to a default channel · 9f4ef1d7
      Andrei Otcheretianski 提交于
      When immediate quiet bit is set in CSA, the entire channel is blocked
      by the firmware. It is expected that all the MACs will evacuate the
      channel and the phy will be eventually either moved or removed.
      
      Currently, the phy context is just unreferenced and thus, the quiet
      bit is kept set and it will be impossible to TX on this phy, if we
      will need to reuse it in the future.  This can be seen when doing a
      channel switch with mode=1 (quiet) twice from channel X to Y and then
      back to channel X.
      
      Fix that, by moving the phy context to a default channel when not
      referenced anymore.
      Signed-off-by: NAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      9f4ef1d7
    • A
      iwlwifi: mvm: fix array out of bounds reference · 4a6d2e52
      Avraham Stern 提交于
      When starting aggregation, the code checks the status of the queue
      allocated to the aggregation tid, which might not yet be allocated
      and thus the queue index may be invalid.
      Fix this by reserving a new queue in case the queue id is invalid.
      
      While at it, clean up some unreachable code (a condition that is
      already handled earlier) and remove all the non-DQA comments since
      non-DQA mode is no longer supported.
      
      Fixes: cf961e16 ("iwlwifi: mvm: support dqa-mode agg on non-shared queue")
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      4a6d2e52
    • A
      iwlwifi: mvm: make sure internal station has a valid id · df65c8d1
      Avraham Stern 提交于
      If the driver failed to resume from D3, it is possible that it has
      no valid aux station. In such case, fw restart will end up in sending
      station related commands with an invalid station id, which will
      result in an assert.
      
      Fix this by allocating a new station id for the aux station if it
      does not have a valid id even in the case of fw restart.
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      df65c8d1
    • A
      iwlwifi: mvm: clear tx queue id when unreserving aggregation queue · 4b387906
      Avraham Stern 提交于
      When a queue is reserved for aggregation, the queue id is assigned
      to the tid_data. This is fine since iwl_mvm_sta_tx_agg_oper()
      takes care of allocating the queue before actual tx starts.
      When the reservation is cancelled (e.g. when the AP declined the
      aggregation request) the tid_data is not cleared. As a result,
      following tx for this tid was trying to use an unallocated queue.
      
      Fix this by setting the txq_id for the tid to invalid when unreserving
      the queue.
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      4b387906
    • A
      iwlwifi: mvm: Increase session protection time after CS · 19125cb0
      Andrei Otcheretianski 提交于
      After switching to a new channel, driver schedules session protection
      time event in order to hear the beacon on the new channel.
      The duration of the protection is two beacon intervals.
      However, since we start to switch slightly before beacon with count 1, in
      case we don't hear (or AP doesn't transmit) the very first beacon on the
      new channel the protection ends without hearing any beacon at all.
      At this stage the switch is not complete, the queues are closed and the
      interface doesn't have quota yet or TBTT events. As the result, we are
      stuck forever waiting for iwl_mvm_post_channel_switch() to be called.
      
      Fix this by increasing the protection time to be 3 beacon intervals and
      in addition drop the connection if the time event ends before we got any
      beacon.
      Signed-off-by: NAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      19125cb0
  4. 16 3月, 2018 5 次提交
    • R
      brcmfmac: drop Inter-Access Point Protocol packets by default · 12590551
      Rafał Miłecki 提交于
      Testing brcmfmac with more recent firmwares resulted in AP interfaces
      not working in some specific setups. Debugging resulted in discovering
      support for IAPP in Broadcom's firmwares.
      
      Older firmwares were only generating 802.11f frames. Newer ones like:
      1) 10.10 (TOB) (r663589)
      2) 10.10.122.20 (r683106)
      for 4366b1 and 4366c0 respectively seem to also /respect/ 802.11f frames
      in the Tx path by performing a STA disassociation.
      
      This obsoleted standard and its implementation is something that:
      1) Most people don't need / want to use
      2) Can allow local DoS attacks
      3) Breaks AP interfaces in some specific bridge setups
      
      To solve issues it can cause this commit modifies brcmfmac to drop IAPP
      packets. If affects:
      1) Rx path: driver won't be sending these unwanted packets up.
      2) Tx path: driver will reject packets that would trigger STA
         disassociation perfromed by a firmware (possible local DoS attack).
      
      It appears there are some Broadcom's clients/users who care about this
      feature despite the drawbacks. They can switch it on using a new module
      param.
      
      This change results in only two more comparisons (check for module param
      and check for Ethernet packet length) for 99.9% of packets. Its overhead
      should be very minimal.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Acked-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      12590551
    • L
      iwlwifi: add shared clock PHY config flag for some devices · 86a2b204
      Luca Coelho 提交于
      Some devices use a shared clock which is very sensitive to variations
      and cause trouble in some situations.  We need to set a bit in the phy
      configuration to indicate that to the FW.  To make this generic, add a
      extra_phy_config_flags element to the device configuration and OR it
      into the phy_cfg before sending it to the firmware.  And also create a
      set of configurations for devices that use shared clocks and need this
      extra bit to be set.
      
      Fixes: c62446d2 ("iwlwifi: add new 9460 series PCI IDs")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      86a2b204
    • J
      iwlwifi: mvm: fix error checking for multi/broadcast sta · 75fd4fec
      Johannes Berg 提交于
      The earlier patch called the station add functions but didn't
      assign their return value to the ret variable, so that the
      checks for it were meaningless. Fix that.
      
      Found by smatch:
      
      .../mac80211.c:2560 iwl_mvm_start_ap_ibss() warn: we tested 'ret' before and it was 'false'
      .../mac80211.c:2563 iwl_mvm_start_ap_ibss() warn: we tested 'ret' before and it was 'false'
      
      Fixes: 3a89411cd31c ("iwlwifi: mvm: fix assert 0x2B00 on older FWs")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      75fd4fec
    • B
      iwlwifi: mvm: Correctly set IGTK for AP · e829b17c
      Beni Lev 提交于
      Currently when an IGTK is set for an AP, it is set as a regular key.
      Since the cipher is set to CMAC, the STA_KEY_FLG_EXT flag is added to
      the host command, which causes assert 0x253D on NICs that do not support
      this.
      
      Fixes: 85aeb58c ("iwlwifi: mvm: Enable security on new TX API")
      Signed-off-by: NBeni Lev <beni.lev@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      e829b17c
    • E
      iwlwifi: mvm: set the correct tid when we flush the MCAST sta · 334167de
      Emmanuel Grumbach 提交于
      The tid being used for the queue (cab_queue) for the MCAST
      station has been changed recently to be 0 (for BE).
      The flush path still flushed only the special tid (15)
      which means that the firmware wasn't flushing the right
      queue and we could get a firmware crash upon remove
      station if we had an MCAST packet on the ring.
      
      The current code that flushes queues for a station only
      differentiates between internal stations (stations that
      aren't instantiated in mac80211, like the MCAST station)
      and the non-internal ones.
      Internal stations can be either: BCAST (beacons), MCAST
      (for cab_queue), GENERAL_PURPOSE (p2p dev, and sniffer
      injection). The internal stations can use different tids.
      
      To make the code simpler, just flush all the tids always
      and add the special internal tid (15) for internal
      stations. The firmware will know how to handle this even
      if we hadn't any queue mapped that that tid.
      
      Fixes: e340c1a6ef4b ("iwlwifi: mvm: Correctly set the tid for mcast queue")
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      334167de
  5. 07 3月, 2018 2 次提交
  6. 02 3月, 2018 9 次提交
  7. 25 2月, 2018 1 次提交
  8. 19 2月, 2018 1 次提交
    • J
      mac80211_hwsim: don't use WQ_MEM_RECLAIM · ce162bfb
      Johannes Berg 提交于
      We're obviously not part of a memory reclaim path, so don't set the flag.
      
      This also causes a warning in check_flush_dependency() since we end up
      in a code path that flushes a non-reclaim workqueue, and we shouldn't do
      that if we were really part of reclaim.
      
      Reported-by: syzbot+41cdaf4232c50e658934@syzkaller.appspotmail.com
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ce162bfb
  9. 16 2月, 2018 5 次提交
  10. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  11. 08 2月, 2018 1 次提交
    • R
      Revert "ath10k: add sanity check to ie_len before parsing fw/board ie" · 9ce8b24a
      Ryan Hsu 提交于
      This reverts commit 9ed4f916.
      
      The commit introduced a regression that over read the ie with
      the padding.
      
      - the expected IE information
      
      ath10k_pci 0000:03:00.0: found firmware features ie (1 B)
      ath10k_pci 0000:03:00.0: Enabling feature bit: 6
      ath10k_pci 0000:03:00.0: Enabling feature bit: 7
      ath10k_pci 0000:03:00.0: features
      ath10k_pci 0000:03:00.0: 00000000: c0 00 00 00 00 00 00 00
      
      - the wrong IE with padding is read (0x77)
      
      ath10k_pci 0000:03:00.0: found firmware features ie (4 B)
      ath10k_pci 0000:03:00.0: Enabling feature bit: 6
      ath10k_pci 0000:03:00.0: Enabling feature bit: 7
      ath10k_pci 0000:03:00.0: Enabling feature bit: 8
      ath10k_pci 0000:03:00.0: Enabling feature bit: 9
      ath10k_pci 0000:03:00.0: Enabling feature bit: 10
      ath10k_pci 0000:03:00.0: Enabling feature bit: 12
      ath10k_pci 0000:03:00.0: Enabling feature bit: 13
      ath10k_pci 0000:03:00.0: Enabling feature bit: 14
      ath10k_pci 0000:03:00.0: Enabling feature bit: 16
      ath10k_pci 0000:03:00.0: Enabling feature bit: 17
      ath10k_pci 0000:03:00.0: Enabling feature bit: 18
      ath10k_pci 0000:03:00.0: features
      ath10k_pci 0000:03:00.0: 00000000: c0 77 07 00 00 00 00 00
      Tested-by: NMike Lothian <mike@fireburn.co.uk>
      Signed-off-by: NRyan Hsu <ryanhsu@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      9ce8b24a
  12. 07 2月, 2018 6 次提交
    • O
    • Y
      ath10k: fix kernel panic issue during pci probe · 50e79e25
      Yu Wang 提交于
      If device gone during chip reset, ar->normal_mode_fw.board is not
      initialized, but ath10k_debug_print_hwfw_info() will try to access its
      member, which will cause 'kernel NULL pointer' issue. This was found
      using a faulty device (pci link went down sometimes) in a random
      insmod/rmmod/other-op test.
      To fix it, check ar->normal_mode_fw.board before accessing the member.
      
      pci 0000:02:00.0: BAR 0: assigned [mem 0xf7400000-0xf75fffff 64bit]
      ath10k_pci 0000:02:00.0: enabling device (0000 -> 0002)
      ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
      ath10k_pci 0000:02:00.0: failed to read device register, device is gone
      ath10k_pci 0000:02:00.0: failed to wait for target init: -5
      ath10k_pci 0000:02:00.0: failed to warm reset: -5
      ath10k_pci 0000:02:00.0: firmware crashed during chip reset
      ath10k_pci 0000:02:00.0: firmware crashed! (uuid 5d018951-b8e1-404a-8fde-923078b4423a)
      ath10k_pci 0000:02:00.0: (null) target 0x00000000 chip_id 0x00340aff sub 0000:0000
      ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
      ath10k_pci 0000:02:00.0: firmware ver  api 0 features  crc32 00000000
      ...
      BUG: unable to handle kernel NULL pointer dereference at 00000004
      ...
      Call Trace:
       [<fb4e7882>] ath10k_print_driver_info+0x12/0x20 [ath10k_core]
       [<fb62b7dd>] ath10k_pci_fw_crashed_dump+0x6d/0x4d0 [ath10k_pci]
       [<fb629f07>] ? ath10k_pci_sleep.part.19+0x57/0xc0 [ath10k_pci]
       [<fb62c8ee>] ath10k_pci_hif_power_up+0x14e/0x1b0 [ath10k_pci]
       [<c10477fb>] ? do_page_fault+0xb/0x10
       [<fb4eb934>] ath10k_core_register_work+0x24/0x840 [ath10k_core]
       [<c18a00d8>] ? netlbl_unlhsh_remove+0x178/0x410
       [<c10477f0>] ? __do_page_fault+0x480/0x480
       [<c1068e44>] process_one_work+0x114/0x3e0
       [<c1069d07>] worker_thread+0x37/0x4a0
       [<c106e294>] kthread+0xa4/0xc0
       [<c1069cd0>] ? create_worker+0x180/0x180
       [<c106e1f0>] ? kthread_park+0x50/0x50
       [<c18ab4f7>] ret_from_fork+0x1b/0x28
       Code: 78 80 b8 50 09 00 00 00 75 5d 8d 75 94 c7 44 24 08 aa d7 52 fb c7 44 24 04 64 00 00 00
       89 34 24 e8 82 52 e2 c5 8b 83 dc 08 00 00 <8b> 50 04 8b 08 31 c0 e8 20 57 e3 c5 89 44 24 10 8b 83 58 09 00
       EIP: [<fb4e7754>]-
       ath10k_debug_print_board_info+0x34/0xb0 [ath10k_core]
       SS:ESP 0068:f4921d90
       CR2: 0000000000000004
      Signed-off-by: NYu Wang <yyuwang@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      50e79e25
    • W
      ath9k: Fix get channel default noise floor · b9607de6
      Wojciech Dubowik 提交于
      Commit 8da58553 ("ath9k: Use calibrated noise floor value
      when available") introduced regression in ath9k_hw_getchan_noise
      where per chain nominal noise floor has been taken instead default
      for channel.
      Revert to original default channel noise floor.
      
      Fixes: 8da58553 ("ath9k: Use calibrated noise floor value when available")
      Reported-by: NSebastian Gottschall <s.gottschall@dd-wrt.com>
      Signed-off-by: NWojciech Dubowik <Wojciech.Dubowik@neratec.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b9607de6
    • T
      ath10k: add support for Ubiquiti rebranded QCA988X v2 · 34f1cb33
      Tobias Schramm 提交于
      Some modern Ubiquiti devices contain a rebranded QCA988X rev2 with
      a custom Ubiquiti vendor and device id. This patch adds support for
      those devices, treating them as a QCA988X v2.
      Signed-off-by: NTobias Schramm <tobleminer@gmail.com>
      [kvalo@codeaurora.org: rebase, add missing fields in hw_params, fix a long line in pci.c:61]
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      34f1cb33
    • Y
      ath10k: correct the length of DRAM dump for QCA6174 hw3.x/QCA9377 hw1.1 · 0a7fe718
      Yu Wang 提交于
      The length of DRAM dump for QCA6174 hw3.0/hw3.2 and QCA9377 hw1.1
      are less than the actual value, some coredump contents are missed.
      To fix it, change the length from 0x90000 to 0xa8000.
      
      Fixes: 703f261d ("ath10k: add memory dump support for QCA6174/QCA9377")
      Signed-off-by: NYu Wang <yyuwang@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      0a7fe718
    • L
      rtlwifi: rtl8821ae: Fix connection lost problem correctly · c713fb07
      Larry Finger 提交于
      There has been a coding error in rtl8821ae since it was first introduced,
      namely that an 8-bit register was read using a 16-bit read in
      _rtl8821ae_dbi_read(). This error was fixed with commit 40b368af
      ("rtlwifi: Fix alignment issues"); however, this change led to
      instability in the connection. To restore stability, this change
      was reverted in commit b8b8b163 ("rtlwifi: rtl8821ae: Fix connection
      lost problem").
      
      Unfortunately, the unaligned access causes machine checks in ARM
      architecture, and we were finally forced to find the actual cause of the
      problem on x86 platforms. Following a suggestion from Pkshih
      <pkshih@realtek.com>, it was found that increasing the ASPM L1
      latency from 0 to 7 fixed the instability. This parameter was varied to
      see if a smaller value would work; however, it appears that 7 is the
      safest value. A new symbol is defined for this quantity, thus it can be
      easily changed if necessary.
      
      Fixes: b8b8b163 ("rtlwifi: rtl8821ae: Fix connection lost problem")
      Cc: Stable <stable@vger.kernel.org> # 4.14+
      Fix-suggested-by: NPkshih <pkshih@realtek.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Tested-by: James Cameron <quozl@laptop.org>  # x86_64 OLPC NL3
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      c713fb07
  13. 01 2月, 2018 1 次提交