1. 25 Nov, 2019 14 commits
    • Colin Ian King's avatar
      wil6210: fix break that is never reached because of zero'ing of a retry counter · 5b1413f0
      Colin Ian King authored
      There is a check on the retry counter invalid_buf_id_retry that is always
      false because invalid_buf_id_retry is initialized to zero on each iteration
      of a while-loop.  Fix this by initializing the retry counter before the
      while-loop starts.
      
      Addresses-Coverity: ("Logically dead code")
      Fixes: b4a967b7 ("wil6210: reset buff id in status message after completion")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarMaya Erez <merez@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      5b1413f0
    • Linus Lüssing's avatar
      ath10k: fix RX of frames with broken FCS in monitor mode · ea0c3e2a
      Linus Lüssing authored
      So far, frames were forwarded regardless of the FCS correctness leading
      to userspace applications listening on the monitor mode interface to
      receive potentially broken frames, even with the "fcsfail" flag unset.
      
      By default, with the "fcsfail" flag of a monitor mode interface
      unset, frames with FCS errors should be dropped. With this patch, the
      fcsfail flag is taken into account correctly.
      
      Tested-on: QCA4019 firmware-5-ct-full-community-12.bin-lede.011
      
      Cc: Simon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarLinus Lüssing <ll@simonwunderlich.de>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      ea0c3e2a
    • Wen Gong's avatar
      ath10k: report rssi of each chain to mac80211 for sdio · 7005eafc
      Wen Gong authored
      iw command only show rssi without each chain's rssi on sdio
      iw wlan0 station dump
      Station a0:40:a0:93:3e:de (on wlan0)
      signal:         -82 dBm
      signal avg:     -82 dBm
      
      after this patch, it will show each chain's rssi on sdio
      Station a0:40:a0:93:3e:de (on wlan0)
      signal:         -82 [-84, -88] dBm
      signal avg:     -82 [-84, -87] dBm
      
      For QCA6174 PCIe, the ppdu have the correct rssi of each chain, it
      indicate rssi of rx data by ath10k_htt_rx_h_signal. For sdio chip, the
      rssi of each chain stored in rx management reported by firmware, the
      ath10k_wmi_tlv_op_pull_mgmt_rx_ev which used for tlv wmi will get the
      rssi of each chain and stored them in wmi_mgmt_rx_ev_arg, then indicate
      them to mac80211. For non-tlv wmi chip, it will not get the rssi of each
      chain and not indicate to mac80211, for non-tlv wmi chip, this patch will
      not have impact. For tlv wmi chip, if the rssi of chain in mgmt is valid,
      it will be indicate to mac80211, tested with QCA6174 PCIe/SDIO, the rssi
      of 2 chain in mgmt is valid.
      
      rssi of chains in mgmt of QCA6174 SDIO:
      92096.652780: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[0]:70
      92096.657324: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[1]:68
      92096.662009: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[2]:128
      92096.666647: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[3]:128
      
      rssi of chains in mgmt of QCA6174 PCIe:
      [ 1581.049816] ath10k_pci 0000:02:00.0: mgmt rssi[0]:17
      [ 1581.049818] ath10k_pci 0000:02:00.0: mgmt rssi[1]:22
      [ 1581.049821] ath10k_pci 0000:02:00.0: mgmt rssi[2]:128
      [ 1581.049823] ath10k_pci 0000:02:00.0: mgmt rssi[3]:128
      
      after apply this patch, the iw's rssi of PCIe do not changed, result is
      same with before.
      
      iw wlan0 station dump of QCA6174 PCIe:
      Station 6c:e8:73:b8:92:dc (on wlan0)
              signal:         -70 [-77, -72] dBm
              signal avg:     -69 [-78, -72] dBm
      
      iw wlan-5000mhz station dump of QCA9984 PCIe
      connected with 2 client which has 2 chain:
      Station 70:48:0f:1f:1a:b2 (on wlan-5000mhz)
              signal:         -47 [-55, -48, -87, -88] dBm
              signal avg:     -42 [-50, -43, -83, -86] dBm
      Station ac:c1:ee:39:e3:83 (on wlan-5000mhz)
              signal:         -43 [-46, -45, -79, -84] dBm
              signal avg:     -43 [-46, -46, -82, -83] dBm
      
      Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1.
      Tested with QCA6174 PCIe with firmware WLAN.RM.4.4.1-00110-QCARMSWP-1.
      Tested with QCA9984 PCIe with firmware 10.4-3.9.0.2-00040.
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      7005eafc
    • Jeffrey Hugo's avatar
      ath10k: Handle "invalid" BDFs for msm8998 devices · 319c2b71
      Jeffrey Hugo authored
      When the BDF download QMI message has the end field set to 1, it signals
      the end of the transfer, and triggers the firmware to do a CRC check.  The
      BDFs for msm8998 devices fail this check, yet the firmware is happy to
      still use the BDF.  It appears that this error is not caught by the
      downstream drive by concidence, therefore there are production devices
      in the field where this issue needs to be handled otherwise we cannot
      support wifi on them.  So, attempt to detect this scenario as best we can
      and treat it as non-fatal.
      Signed-off-by: default avatarJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      319c2b71
    • Jeffrey Hugo's avatar
      ath10k: Fix qmi init error handling · f8a595a8
      Jeffrey Hugo authored
      When ath10k_qmi_init() fails, the error handling does not free the irq
      resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
      (re-)register irqs which are already registered.
      
      Fix this by doing a power off since we just powered on the hardware, and
      freeing the irqs as error handling.
      
      Fixes: ba94c753 ("ath10k: add QMI message handshake for wcn3990 client")
      Signed-off-by: default avatarJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      f8a595a8
    • Wen Gong's avatar
      ath10k: add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO · 23b5156a
      Wen Gong authored
      Add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO will enable the random
      mac address for netdetect case.
      iw command:
      iw phy0 wowlan enable net-detect net-detect
      randomize=AA:7B:A1:AC:B2:41/FF:FF:FF:FF:FF:FF interval 5000 delay 30
      freqs 2412 matches ssid foo.
      After suspend, DUT will send probe request with mac AA:7B:A1:AC:B2:41.
      
      WCN3990, QCA9377, QCA6174 PCI also support this feature.
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00029.
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      23b5156a
    • Jeffrey Hugo's avatar
      ath10k: Handle when FW doesn't support QMI_WLFW_HOST_CAP_REQ_V01 · 501d4152
      Jeffrey Hugo authored
      Firmware with the build id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0.2-XXXX does
      not support the QMI_WLFW_HOST_CAP_REQ_V01 message and will return the
      QMI not supported error to the ath10k driver.  Since not supporting this
      message is not fatal to the firmware nor the ath10k driver, lets catch
      this particular scenario and ignore it so that we can still bring up
      wifi services successfully.
      Signed-off-by: default avatarJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      501d4152
    • Wen Gong's avatar
      ath10k: add large size for BMI download data for SDIO · d58f466a
      Wen Gong authored
      Download firmware time cost of SDIO is too long, it is about 480ms,
      add large size 2048 bytes for BMI download for SDIO chip, its time
      cost will reduced to 240ms.
      
      This will optimize the download firmware time cost.
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00017-QCARMSWP-1.
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      d58f466a
    • Wen Gong's avatar
      ath10k: correct the tlv len of ath10k_wmi_tlv_op_gen_config_pno_start · e01cc82c
      Wen Gong authored
      the tlv len is set to the total len of the wmi cmd, it will trigger
      firmware crash, correct the tlv len.
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00017-QCARMSWP-1 and QCA6174
      PCIE with firmware WLAN.RM.4.4.1-00110-QCARMSWPZ-1.
      
      Fixes: ce834e28 ("ath10k: support NET_DETECT WoWLAN feature")
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e01cc82c
    • Kalle Valo's avatar
      ath10k: sdio: remove struct ath10k_sdio_rx_data::status · 2246c215
      Kalle Valo authored
      It seems to be unused.
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      2246c215
    • Kalle Valo's avatar
      ath10k: sdio: cosmetic cleanup · efd2f4c5
      Kalle Valo authored
      Do some cosmetic cleanup while reviewing the files. No functional changes.
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      efd2f4c5
    • Wen Gong's avatar
      ath10k: add workqueue for RX path of sdio · 67654b26
      Wen Gong authored
      For RX, it has two parts, one is to read data from sdio, another
      is to indicate the packets to upper stack. Recently it has only
      one thread to do all RX things, it results that it is sequential
      for RX and low throughout, change RX to parallel for the two parts
      will increase throughout.
      
      This patch move the indication to a workqueue, it results in
      significant performance improvement on RX path.
      
      Udp rx throughout is 200Mbps without this patch, and it arrives
      400Mbps with this patch.
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00017-QCARMSWPZ-1
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      67654b26
    • Wen Gong's avatar
      ath10k: change max RX bundle size from 8 to 32 for sdio · 22477652
      Wen Gong authored
      The max bundle size support by firmware is 32, change it from 8 to 32
      will help performance. This results in significant performance
      improvement on RX path.
      
      The real max rx bundle is decided in ath10k_htc_wait_target(),
      it is the min value of HTC_HOST_MAX_MSG_PER_RX_BUNDLE and the value reported
      from firmware. So this change shouldn't cause any regressions with other
      hardware supported by ath10k.
      
      Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWPZ-1.
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      22477652
    • Alagu Sankar's avatar
      ath10k: enable RX bundle receive for sdio · 8d985555
      Alagu Sankar authored
      The existing implementation of initiating multiple sdio transfers for
      receive bundling is slowing down the receive speed. Combining the
      transfers using a bundle method would be ideal.
      
      The transmission utilization ratio for sdio bus for small packet is
      slow, because the space and time cost for sdio bus is same for large
      length packet and small length packet. So the speed of data for large
      length packet is higher than small length.
      
      Test result of different length of data:
      data packet(byte)   cost time(us)   calculated rate(Mbps)
            256               28                73
            512               33               124
           1024               35               234
           1792               45               318
          14336              168               682
          28672              333               688
          57344              660               695
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00017-QCARMSWPZ-1
      Signed-off-by: default avatarAlagu Sankar <alagusankar@silex-india.com>
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      8d985555
  2. 15 Nov, 2019 3 commits
  3. 08 Nov, 2019 3 commits
  4. 06 Nov, 2019 20 commits