1. 18 Aug, 2020 4 commits
  2. 17 Aug, 2020 34 commits
  3. 15 Aug, 2020 2 commits
    • Wen Gong's avatar
      ath10k: correct the array index from mcs index for HT mode for QCA6174 · db04b755
      Wen Gong authored
      The mcs index of HT mode is 0 to 31, please refer http://mcsindex.com/.
      Its spatial stream(Nss) number is from 1 to 4, mcs index is 0~7 for
      Nss=1, 8~15 for Nss=2, 16~23 for Nss=3 and 24~31 is for Nss=4.
      
      The mcs is reported from firmware in wmi_tlv_peer_stats_info of
      event WMI_TLV_PEER_STATS_INFO_EVENTID, its range is from 0~15 for
      QCA6174 SDIO and PCIe. It is for both Nss=1 and Nss=2, and it has 2
      rate table supported_ht_mcs_rate_nss1 and supported_ht_mcs_rate_nss2
      in ath10k, they are for Nss=1 and Nss=2, each table has 8 rates.
      
      It need to find the matched row number with the mcs index, for example,
      mcs index is 2, it is <=7, so it is Nss=1, and match row 2 in table of
      Nss=1. If mcs index is 12, it is >= 8 and <= 15, so it is Nss=2, it
      match row 4(12-8) in table of Nss=2. If mcs index is >=16, it is for
      Nss=3/4, it need to add rate table, so it is not support in current
      ath10k.
      
      This patch is to find the row number in rate table of Nss=1 or Nss=2
      with the mcs index reported from firmware.
      
      This patch only effect the chips which supports_peer_stats_info of its
      hw_params is true, it is true only for QCA6174 currently.
      
      Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00048
      Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/1597392294-13124-1-git-send-email-wgong@codeaurora.org
      db04b755
    • Wen Gong's avatar
      ath10k: enable supports_peer_stats_info for QCA6174 PCI devices · cbcbabb9
      Wen Gong authored
      When using QCA6174 PCI devices working in station mode, after connected
      to AP, tx bitrate is always '1.0 MBit/s' in output of command 'iw wlan0
      station dump'. (QCA6174 SDIO devices are working fine.)
      
      After this patch, it show correct bitrate:
      
      Station c4:04:15:5d:97:22 (on wls1)
              inactive time:  312 ms
              rx bytes:       31496
              rx packets:     173
              tx bytes:       8625
              tx packets:     46
              tx retries:     0
              tx failed:      0
              signal:         -76 [-88, -80] dBm
              signal avg:     -75 [-82, -77] dBm
              tx bitrate:     39.0 MBit/s MCS 4
              rx bitrate:     26.0 MBit/s MCS 3
      
      Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
      Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/1597312029-32348-4-git-send-email-wgong@codeaurora.org
      cbcbabb9