• Wen Gong's avatar
    ath10k: correct tx bitrate of iw for SDIO · 4cc02c7c
    Wen Gong authored
    For legacy mode, tx bitrate not show correct sometimes, for example:
    iw wlan0 link
    Connected to 8c:21:0a:b3:5a:64 (on wlan0)
            SSID: tplinkgw
            freq: 2462
            RX: 19672 bytes (184 packets)
            TX: 9851 bytes (87 packets)
            signal: -51 dBm
            rx bitrate: 54.0 MBit/s
            tx bitrate: 2.8 MBit/s
    
    This patch use the tx bitrate info from WMI_TLV_PEER_STATS_INFO_EVENTID
    report from firmware, and tx bitrate show correct.
    
    iw wlan0 link
    Connected to 8c:21:0a:b3:5a:64 (on wlan0)
            SSID: tplinkgw
            freq: 2462
            RX: 13973 bytes (120 packets)
            TX: 6737 bytes (57 packets)
            signal: -52 dBm
            rx bitrate: 54.0 MBit/s
            tx bitrate: 54.0 MBit/s
    
    This patch only effect SDIO chip, ath10k_mac_sta_get_peer_stats_info
    has check for bitrate_statistics of hw_params, it is enabled only for
    "qca6174 hw3.2 sdio".
    
    Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00042.
    Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20200427080416.8265-5-wgong@codeaurora.org
    4cc02c7c
wmi-tlv.c 133 KB