1. 19 Apr, 2018 11 commits
  2. 10 Apr, 2018 11 commits
  3. 29 Mar, 2018 18 commits
    • Joe Perches's avatar
      ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr · a72c9262
      Joe Perches authored
      Remove the static array and use the generic routine to set the
      Ethernet broadcast address.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      a72c9262
    • Rajkumar Manoharan's avatar
      ath10k: fix vdev stats for 10.4 firmware · 1b3fdb50
      Rajkumar Manoharan authored
      Currently vdev stats displayed in fw_stats are applicable
      only for TLV based firmware and fix it for 10.4 firmware
      as of now. The vdev stats in 10.4 firmware is split into two
      parts (vdev_stats, vdev_stats_extended). The actual stats
      are captured only in extended vdev stats. In order to enable
      vdev stats, appropriate feature bit will be set on extended
      resource config. As FTM related counters are available only on
      newer 10.4 based firmware, these counters will be displayed
      only on valid data.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      1b3fdb50
    • Christian Lamparter's avatar
      ath10k: fix recent bandwidth conversion bug · 91493e8e
      Christian Lamparter authored
      The commit "cfg80211: make RATE_INFO_BW_20 the default" changed
      the index of RATE_INFO_BW_20, but the updates to ath10k missed
      the special bandwidth calculation case in
      ath10k_update_per_peer_tx_stats().
      
      This will fix below warning,
      
       WARNING: CPU: 0 PID: 609 at net/wireless/util.c:1254
       cfg80211_calculate_bitrate+0x174/0x220
       invalid rate bw=1, mcs=9, nss=2
      
       (unwind_backtrace) from
       (cfg80211_calculate_bitrate+0x174/0x220)
       (cfg80211_calculate_bitrate) from
       (nl80211_put_sta_rate+0x44/0x1dc)from
       (nl80211_put_sta_rate) from
       (nl80211_send_station+0x388/0xaf0)
       (nl80211_get_station+0xa8/0xec)
       [ end trace da8257d6a850e91a ]
      
      Fixes: 842be75c ("cfg80211: make RATE_INFO_BW_20 the default")
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      91493e8e
    • Anilkumar Kolli's avatar
      ath10k: advertize beacon_int_min_gcd · 8ebee73b
      Anilkumar Kolli authored
      This patch fixes regression caused by 0c317a02
      ("cfg80211: support virtual interfaces with different beacon intervals"),
      with this change cfg80211 expects the driver to advertize
      'beacon_int_min_gcd' to support different beacon intervals in multivap
      scenario. This support is added for, QCA988X/QCA99X0/QCA9984/QCA4019.
      
      Verifed AP + mesh bring up on QCA9984 with beacon interval 100msec and
      1000msec respectively.
      Frimware: firmware-5.bin_10.4-3.5.3-00053
      
      Fixes: 0c317a02 ("cfg80211: support virtual interfaces with different beacon intervals")
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      8ebee73b
    • Yingying Tang's avatar
      ath10k: fix TDLS peer TX data failure issue on encryped AP · 9cdd0057
      Yingying Tang authored
      For WPA encryption, QCA6174 firmware(version: WLAN.RM.4.4) will unblock
      data when M4 was sent successfully. For other encryption which didn't need
      4-way handshake firmware will unblock the data when peer authorized. Since
      TDLS is 3-way handshake host need send authorize cmd to firmware to unblock
      data.
      Signed-off-by: default avatarYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      9cdd0057
    • Yingying Tang's avatar
      ath10k: avoid to set WEP key for TDLS peer · c3816c9e
      Yingying Tang authored
      TDLS peer do not need WEP key. Setting WEP key will lead
      to TDLS setup failure. Add fix to avoid setting WEP key
      for TDLS peer.
      Signed-off-by: default avatarYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      c3816c9e
    • Yingying Tang's avatar
      ath10k: enable TDLS peer inactivity detection · 4c9f8d11
      Yingying Tang authored
      Enable TDLS peer inactivity detetion feature.
      QCA6174 firmware(version: WLAN.RM.4.4) support TDLS link inactivity detecting.
      Set related parameters in TDLS WMI command to enable this feature.
      Signed-off-by: default avatarYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      4c9f8d11
    • Yingying Tang's avatar
      ath10k: enable TDLS peer buffer STA feature · 802ca335
      Yingying Tang authored
      Enable TDLS peer buffer STA feature.
      QCA6174 firmware(version: WLAN.RM.4.4) support TDLS peer buffer STA,
      it reports this capability through wmi service map in wmi service ready
      event. Set related parameter in TDLS WMI command to enable this feature.
      Signed-off-by: default avatarYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      802ca335
    • Daniel Mack's avatar
      wcn36xx: dequeue all pending indicator messages · f276ba06
      Daniel Mack authored
      In case wcn36xx_smd_rsp_process() is called more than once before
      hal_ind_work was dispatched, the messages will end up in hal_ind_queue,
      but wcn36xx_ind_smd_work() will only look at the first message in that
      list.
      
      Fix this by dequeing the messages from the list in a loop, and only stop
      when it's empty.
      
      This issue was found during a review of the driver. In my tests, that
      race never actually occured.
      Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      f276ba06
    • Loic Poulain's avatar
      wcn36xx: Fix firmware crash due to corrupted buffer address · e5f99081
      Loic Poulain authored
      wcn36xx_start_tx function retrieves the buffer descriptor from the
      channel control queue to start filling tx buffer information. However,
      nothing prevents this same buffer to be concurrently accessed in a
      concurent tx call, leading to potential buffer coruption and firmware
      crash (observed during iperf test). The channel control queue should
      only be accessed and updated with the channel lock.
      
      Fix this issue by using a local buffer descriptor which will be copied
      in the thread-safe wcn36xx_dxe_tx_frame.
      
      Note that buffer descriptor size is few bytes so the introduced copy
      overhead is insignificant. Moreover, this allows to keep the locked
      section minimal.
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarRamon Fried <rfried@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e5f99081
    • Ramon Fried's avatar
      wcn36xx: turn off probe response offloading · ee35eecb
      Ramon Fried authored
      It appears that the WCN36xx firmware doesn't actually respond to
      probe requests. Until it's resolved, switch the probe response
      responsibility to the 802.11 layer to allow creation of
      hidden SSID AP's.
      Signed-off-by: default avatarRamon Fried <rfried@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      ee35eecb
    • Anilkumar Kolli's avatar
      ath10k: add memory dump support QCA9984 · 219cc084
      Anilkumar Kolli authored
      QCA9984/QCA99X0/QCA4019 chipsets have 8 memory regions, dump all of them to the
      firmware coredump file. Some of the regions need to be read using ioread() so
      add new region types for them.
      Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
      [kvalo: refactoring etc]
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      219cc084
    • Kalle Valo's avatar
      ath10k: refactor ath10k_pci_dump_memory() in preparation for QCA9984 support · 10c22884
      Kalle Valo authored
      As QCA9984 needs two region types refactor the code to make it easier add the
      new types. No functional changes.
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      10c22884
    • Sathishkumar Muruganandam's avatar
      ath10k: suppress "Unknown eventid: 36925" warnings · 606204bb
      Sathishkumar Muruganandam authored
      FW has Smart Logging feature enabled by default for detecting failures
      and processing FATAL_CONDITION_EVENTID (36925 - 0x903D) back to host.
      
      Since ath10k doesn't implement the Smart Logging and FATAL CONDITION
      EVENT processing yet, suppressing the unknown event ID warning by moving
      this under ATH10K_DBG_WMI.
      
      Simulated the same issue by having associated STA powered off when
      ping flood was running from AP backbone. This triggerd STA KICKOUT
      in AP followed by FATAL CONDITION event 36925.
      
      Issue was reproduced and verified in below DUT
      ------------------------------------------------
      AP mode of OpenWRT QCA9984 running 6.0.8 with FW ver 10.4-3.5.3-00053
      Signed-off-by: default avatarSathishkumar Muruganandam <murugana@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      606204bb
    • Ryan Hsu's avatar
      ath10k: add FW API 6 firmware image for QCA9377 · e3814bec
      Ryan Hsu authored
      Firmware WLAN.TF.2.1-00014-QCARMSWP-1 now supports reading the board ID
      information and also required 9 IRAM bank, which older ath10k version
      don't have the support will fail to be enabled, so in order to maintain
      the backward compatibility, we need to update the FW API to 6.
      Signed-off-by: default avatarRyan Hsu <ryanhsu@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e3814bec
    • Ryan Hsu's avatar
      ath10k: enable QCA6174/QCA9377 to read the chip temperature · e98199a8
      Ryan Hsu authored
      The firmware of QCA6174/QCA9377 already support the feature, just enable
      it to be able to handle the get_temperature command and process the event.
      
      You can read the temperature by using the hwmon interface,
      
      cat /sys/class/ieee80211/phy*/device/hwmon/hwmon2/temp1_input
      
      Verified with the following hardware and software combination,
      QCA6174, only firmware-4.bin doesn't support this, otherwise all support.
      QCA9377, all the firmwares upstreamed support this command
      Signed-off-by: default avatarRyan Hsu <ryanhsu@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e98199a8
    • Karthikeyan Periyasamy's avatar
      Revert "ath10k: send (re)assoc peer command when NSS changed" · 55cc11da
      Karthikeyan Periyasamy authored
      This reverts commit 55884c04.
      
      When Ath10k is in AP mode and an unassociated STA sends a VHT action frame
      (Operating Mode Notification for the NSS change) periodically to AP this causes
      ath10k to call ath10k_station_assoc() which sends WMI_PEER_ASSOC_CMDID during
      NSS update. Over the time (with a certain client it can happen within 15 mins
      when there are over 500 of these VHT action frames) continuous calls of
      WMI_PEER_ASSOC_CMDID cause firmware to assert due to resource exhaust.
      
      To my knowledge setting WMI_PEER_NSS peer param itself enough to handle NSS
      updates and no need to call ath10k_station_assoc(). So revert the original
      commit from 2014 as it's unclear why the change was really needed.
      Now the firmware assert doesn't happen anymore.
      
      Issue observed in QCA9984 platform with firmware version:10.4-3.5.3-00053.
      This Change tested in QCA9984 with firmware version: 10.4-3.5.3-00053 and
      QCA988x platform with firmware version: 10.2.4-1.0-00036.
      
      Firmware Assert log:
      
      ath10k_pci 0002:01:00.0: firmware crashed! (guid e61f1274-9acd-4c5b-bcca-e032ea6e723c)
      ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
      ath10k_pci 0002:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1
      ath10k_pci 0002:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 4c56a386
      ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:4 crc32 c2271344
      ath10k_pci 0002:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
      ath10k_pci 0002:01:00.0: firmware register dump:
      ath10k_pci 0002:01:00.0: [00]: 0x0000000A 0x000015B3 0x00981E5F 0x00975B31
      ath10k_pci 0002:01:00.0: [04]: 0x00981E5F 0x00060530 0x00000011 0x00446C60
      ath10k_pci 0002:01:00.0: [08]: 0x0042F1FC 0x00458080 0x00000017 0x00000000
      ath10k_pci 0002:01:00.0: [12]: 0x00000009 0x00000000 0x00973ABC 0x00973AD2
      ath10k_pci 0002:01:00.0: [16]: 0x00973AB0 0x00960E62 0x009606CA 0x00000000
      ath10k_pci 0002:01:00.0: [20]: 0x40981E5F 0x004066DC 0x00400000 0x00981E34
      ath10k_pci 0002:01:00.0: [24]: 0x80983B48 0x0040673C 0x000000C0 0xC0981E5F
      ath10k_pci 0002:01:00.0: [28]: 0x80993DEB 0x0040676C 0x00431AB8 0x0045D0C4
      ath10k_pci 0002:01:00.0: [32]: 0x80993E5C 0x004067AC 0x004303C0 0x0045D0C4
      ath10k_pci 0002:01:00.0: [36]: 0x80994AAB 0x004067DC 0x00000000 0x0045D0C4
      ath10k_pci 0002:01:00.0: [40]: 0x809971A0 0x0040681C 0x004303C0 0x00441B00
      ath10k_pci 0002:01:00.0: [44]: 0x80991904 0x0040688C 0x004303C0 0x0045D0C4
      ath10k_pci 0002:01:00.0: [48]: 0x80963AD3 0x00406A7C 0x004303C0 0x009918FC
      ath10k_pci 0002:01:00.0: [52]: 0x80960E80 0x00406A9C 0x0000001F 0x00400000
      ath10k_pci 0002:01:00.0: [56]: 0x80960E51 0x00406ACC 0x00400000 0x00000000
      ath10k_pci 0002:01:00.0: Copy Engine register dump:
      ath10k_pci 0002:01:00.0: index: addr: sr_wr_idx: sr_r_idx: dst_wr_idx: dst_r_idx:
      ath10k_pci 0002:01:00.0: [00]: 0x0004a000 15 15 3 3
      ath10k_pci 0002:01:00.0: [01]: 0x0004a400 17 17 212 213
      ath10k_pci 0002:01:00.0: [02]: 0x0004a800 21 21 20 21
      ath10k_pci 0002:01:00.0: [03]: 0x0004ac00 25 25 27 25
      ath10k_pci 0002:01:00.0: [04]: 0x0004b000 515 515 144 104
      ath10k_pci 0002:01:00.0: [05]: 0x0004b400 28 28 155 156
      ath10k_pci 0002:01:00.0: [06]: 0x0004b800 12 12 12 12
      ath10k_pci 0002:01:00.0: [07]: 0x0004bc00 1 1 1 1
      ath10k_pci 0002:01:00.0: [08]: 0x0004c000 0 0 127 0
      ath10k_pci 0002:01:00.0: [09]: 0x0004c400 1 1 1 1
      ath10k_pci 0002:01:00.0: [10]: 0x0004c800 0 0 0 0
      ath10k_pci 0002:01:00.0: [11]: 0x0004cc00 0 0 0 0
      ath10k_pci 0002:01:00.0: CE[1] write_index 212 sw_index 213 hw_index 0 nentries_mask 0x000001ff
      ath10k_pci 0002:01:00.0: CE[2] write_index 20 sw_index 21 hw_index 0 nentries_mask 0x0000007f
      ath10k_pci 0002:01:00.0: CE[5] write_index 155 sw_index 156 hw_index 0 nentries_mask 0x000001ff
      ath10k_pci 0002:01:00.0: DMA addr: nbytes: meta data: byte swap: gather:
      ath10k_pci 0002:01:00.0: [455]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [456]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [457]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [458]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [459]: 0x580c0a42 0 0 0 0
      ath10k_pci 0002:01:00.0: [460]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [461]: 0x580c0c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [462]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [463]: 0x580c0c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [464]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [465]: 0x580c0a42 0 0 0 0
      ath10k_pci 0002:01:00.0: [466]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [467]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [468]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [469]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [470]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [471]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [472]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [473]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [474]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [475]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [476]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [477]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [478]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [479]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [480]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [481]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [482]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [483]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [484]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [485]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [486]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [487]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [488]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [489]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [490]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [491]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [492]: 0x58174040 0 1 0 0
      ath10k_pci 0002:01:00.0: [493]: 0x5a946040 0 1 0 0
      ath10k_pci 0002:01:00.0: [494]: 0x59909040 0 1 0 0
      ath10k_pci 0002:01:00.0: [495]: 0x5ae5a040 0 1 0 0
      ath10k_pci 0002:01:00.0: [496]: 0x58096040 0 1 0 0
      ath10k_pci 0002:01:00.0: [497]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [498]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [499]: 0x5c1e0040 0 1 0 0
      ath10k_pci 0002:01:00.0: [500]: 0x58153040 0 1 0 0
      ath10k_pci 0002:01:00.0: [501]: 0x58129040 0 1 0 0
      ath10k_pci 0002:01:00.0: [502]: 0x5952f040 0 1 0 0
      ath10k_pci 0002:01:00.0: [503]: 0x59535040 0 1 0 0
      ath10k_pci 0002:01:00.0: [504]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [505]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [506]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [507]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [508]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [509]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [510]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [511]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [512]: 0x5adcc040 0 1 0 0
      ath10k_pci 0002:01:00.0: [513]: 0x5cf3d040 0 1 0 0
      ath10k_pci 0002:01:00.0: [514]: 0x5c1e9040 64 1 0 0
      ath10k_pci 0002:01:00.0: [515]: 0x00000000 0 0 0 0
      Signed-off-by: default avatarKarthikeyan Periyasamy <periyasa@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      55cc11da
    • Timothy Redaelli's avatar
      ath9k: fix DFS detector synchronization · 4415d58c
      Timothy Redaelli authored
      some userspace programs (e.g. hostapd) need to set the regulatory domain
      before selecting the operating channel. Synchronize DFS detector regardless of
      the value of ah->curchan, to avoid situations where wireless scan can't be done
      on some 5GHz sub-bands, because dfs_region is constantly UNSET.
      Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarTimothy Redaelli <tredaelli@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      4415d58c