1. 25 11月, 2019 12 次提交
    • W
      ath10k: report rssi of each chain to mac80211 for sdio · 7005eafc
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      7005eafc
    • J
      ath10k: Handle "invalid" BDFs for msm8998 devices · 319c2b71
      Jeffrey Hugo 提交于
      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: NJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      319c2b71
    • J
      ath10k: Fix qmi init error handling · f8a595a8
      Jeffrey Hugo 提交于
      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: NJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      f8a595a8
    • W
      ath10k: add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO · 23b5156a
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      23b5156a
    • J
      ath10k: Handle when FW doesn't support QMI_WLFW_HOST_CAP_REQ_V01 · 501d4152
      Jeffrey Hugo 提交于
      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: NJeffrey Hugo <jeffrey.l.hugo@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      501d4152
    • W
      ath10k: add large size for BMI download data for SDIO · d58f466a
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d58f466a
    • W
      ath10k: correct the tlv len of ath10k_wmi_tlv_op_gen_config_pno_start · e01cc82c
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e01cc82c
    • K
      ath10k: sdio: remove struct ath10k_sdio_rx_data::status · 2246c215
      Kalle Valo 提交于
      It seems to be unused.
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      2246c215
    • K
      ath10k: sdio: cosmetic cleanup · efd2f4c5
      Kalle Valo 提交于
      Do some cosmetic cleanup while reviewing the files. No functional changes.
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      efd2f4c5
    • W
      ath10k: add workqueue for RX path of sdio · 67654b26
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      67654b26
    • W
      ath10k: change max RX bundle size from 8 to 32 for sdio · 22477652
      Wen Gong 提交于
      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: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      22477652
    • A
      ath10k: enable RX bundle receive for sdio · 8d985555
      Alagu Sankar 提交于
      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: NAlagu Sankar <alagusankar@silex-india.com>
      Signed-off-by: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      8d985555
  2. 15 11月, 2019 3 次提交
  3. 08 11月, 2019 3 次提交
  4. 07 11月, 2019 9 次提交
    • Y
      rtw88: fix potential NULL pointer access for firmware · f530c196
      Yan-Hsuan Chuang 提交于
      Driver could access a NULL firmware pointer if we don't
      return here.
      
      Fixes: 5195b904 ("rtw88: avoid FW info flood")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NYan-Hsuan Chuang <yhchuang@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      f530c196
    • P
      rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt() · 5174f1e4
      Ping-Ke Shih 提交于
      This leak was found by testing the EDIMAX EW-7612 on Raspberry Pi 3B+ with
      Linux 5.4-rc5 (multi_v7_defconfig + rtlwifi + kmemleak) and noticed a
      single memory leak during probe:
      
      unreferenced object 0xec13ee40 (size 176):
        comm "kworker/u8:1", pid 36, jiffies 4294939321 (age 5580.790s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<fc1bbb3e>] __netdev_alloc_skb+0x9c/0x164
          [<863dfa6e>] rtl92c_set_fw_rsvdpagepkt+0x254/0x340 [rtl8192c_common]
          [<9572be0d>] rtl92cu_set_hw_reg+0xf48/0xfa4 [rtl8192cu]
          [<116df4d8>] rtl_op_bss_info_changed+0x234/0x96c [rtlwifi]
          [<8933575f>] ieee80211_bss_info_change_notify+0xb8/0x264 [mac80211]
          [<d4061e86>] ieee80211_assoc_success+0x934/0x1798 [mac80211]
          [<e55adb56>] ieee80211_rx_mgmt_assoc_resp+0x174/0x314 [mac80211]
          [<5974629e>] ieee80211_sta_rx_queued_mgmt+0x3f4/0x7f0 [mac80211]
          [<d91091c6>] ieee80211_iface_work+0x208/0x318 [mac80211]
          [<ac5fcae4>] process_one_work+0x22c/0x564
          [<f5e6d3b6>] worker_thread+0x44/0x5d8
          [<82c7b073>] kthread+0x150/0x154
          [<b43e1b7d>] ret_from_fork+0x14/0x2c
          [<794dff30>] 0x0
      
      It is because 8192cu doesn't implement usb_cmd_send_packet(), and this
      patch just frees the skb within the function to resolve memleak problem
      by now. Since 8192cu doesn't turn on fwctrl_lps that needs to download
      command packet for firmware via the function, applying this patch doesn't
      affect driver behavior.
      Reported-by: NStefan Wahren <wahrenst@gmx.net>
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      5174f1e4
    • D
      rt2800: remove errornous duplicate condition · a1f7c2ca
      Daniel Golle 提交于
      On 2019-10-28 06:07, wbob wrote:
      > Hello Roman,
      >
      > while reading around drivers/net/wireless/ralink/rt2x00/rt2800lib.c
      > I stumbled on what I think is an edit of yours made in error in march
      > 2017:
      >
      > https://github.com/torvalds/linux/commit/41977e86#diff-dae5dc10da180f3b055809a48118e18aR5281
      >
      > RT6352 in line 5281 should not have been introduced as the "else if"
      > below line 5291 can then not take effect for a RT6352 device. Another
      > possibility is for line 5291 to be not for RT6352, but this seems
      > very unlikely. Are you able to clarify still after this substantial time?
      >
      > 5277: static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
      > ...
      > 5279:  } else if (rt2x00_rt(rt2x00dev, RT5390) ||
      > 5280:         rt2x00_rt(rt2x00dev, RT5392) ||
      > 5281:         rt2x00_rt(rt2x00dev, RT6352)) {
      > ...
      > 5291:  } else if (rt2x00_rt(rt2x00dev, RT6352)) {
      > ...
      
      Hence remove errornous line 5281 to make the driver actually
      execute the correct initialization routine for MT7620 chips.
      
      As it was requested by Stanislaw Gruszka remove setting values of
      MIMO_PS_CFG and TX_PIN_CFG. MIMO_PS_CFG is responsible for MIMO
      power-safe mode (which is disabled), hence we can drop setting it.
      TX_PIN_CFG is set correctly in other functions, and as setting this
      value breaks some devices, rather don't set it here during init, but
      only modify it later on.
      
      Fixes: 41977e86 ("rt2x00: add support for MT7620")
      Reported-by: Nwbob <wbob@jify.de>
      Reported-by: NRoman Yeryomin <roman@advem.lv>
      Signed-off-by: NDaniel Golle <daniel@makrotopia.org>
      Acked-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      a1f7c2ca
    • Y
      rtlwifi: rtl8225se: remove some unused const variables · a3a03716
      YueHaibing 提交于
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:83:17: warning: 'rtl8225sez2_tx_power_cck' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:79:17: warning: 'rtl8225sez2_tx_power_cck_A' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:75:17: warning: 'rtl8225sez2_tx_power_cck_B' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:71:17: warning: 'rtl8225sez2_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:62:17: warning: 'rtl8225se_tx_power_ofdm' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:53:17: warning: 'rtl8225se_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:44:17: warning: 'rtl8225se_tx_power_cck' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:40:17: warning: 'rtl8225se_tx_gain_cck_ofdm' defined but not used [-Wunused-const-variable=]
      
      They are never used, so can be removed.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      a3a03716
    • Y
      brcmsmac: remove set but not used variables · 55653311
      YueHaibing 提交于
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:841:7: warning: variable free_pdu set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:30: warning: variable tx_rts_count set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:6: warning: variable tx_rts set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:843:7: warning: variable totlen set but not used [-Wunused-but-set-variable]
      
      They are never used, so can be removed.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      55653311
    • Y
      rtw88: raise LPS threshold to 50, for less power consumption · bf9840cc
      Yan-Hsuan Chuang 提交于
      The LPS threshold was set to 2, means driver will leave LPS
      mode if there is more than 2 frames TX/RX for every 2 seconds.
      This makes driver enter/leave LPS frequently even if we just
      "ping -i1" to the others.
      
      Apparently we do not want to leave LPS mode if there is only
      some background traffics or web surfing. By experiment, set
      this to 50 is a more reasonable value to lower the over all
      power consumption.
      Signed-off-by: NYan-Hsuan Chuang <yhchuang@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      bf9840cc
    • Z
      iwlegacy: Remove redundant variable "ret" · ea7ad5f1
      zhong jiang 提交于
      local variable "ret" is not used. hence it is safe to remove and
      just return 0.
      Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      ea7ad5f1
    • Z
      ipw2x00: Remove redundant variable "rc" · e3108132
      zhong jiang 提交于
      local variable "rc" is not used. It is safe to remove and
      There is only one caller of libipw_qos_convert_ac_to_parameters().
      hence make it void
      Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e3108132
    • K
      Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git · 83e3a672
      Kalle Valo 提交于
      ath.git patches for 5.5. Major changes:
      
      wil6210
      
      * add SPDX license identifiers
      83e3a672
  5. 06 11月, 2019 13 次提交