Skip to contentSkip to conversation

ath10k: Fix per station tx bit rate reporting

PATCH In review Mohammed Shafi Shajakhan 2 participants 2 messages Jan 13, 2017 – Jan 19, 2017 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Fix per station tx bit rate reporting

From: Mohammed Shafi Shajakhan <[email protected]>

Not clearing the previous tx bit rate status results in a ambigous tx bit rate reporting to mac80211/cfg80211, for example the previous bit rate status would have been marked as legacy rate , while the current rate would have been an HT/VHT rate with the tx bit rate flags set and this results in exporting tx bitrate as legacy rate but with HT/VHT rate flags set, fix this by clearing the tx bitrate status for each event. This also fixes the below warning when we do:

iw dev wlan#N station dump

WARNING: net/wireless/util.c:1222 cfg80211

[<c022f104>] (warn_slowpath_null) from [<bf3b9adc>] (cfg80211_calculate_bitrate+0x110/0x1f4 [cfg80211]) [<bf3b9adc>] (cfg80211_calculate_bitrate [cfg80211]) from [<bf3dcd54>] (nl80211_put_sta_rate+0x44/0x1dc [cfg80211]) [<bf3dcd54>] (nl80211_put_sta_rate [cfg80211]) from [<bf3cbc34>] (nl80211_set_interface+0x724/0xd70 [cfg80211]) [<bf3cbc34>] (nl80211_set_interface [cfg80211]) from [<bf3d0a18>] (nl80211_dump_station+0xdc/0x100 [cfg80211]) [<bf3d0a18>] (nl80211_dump_station [cfg80211])

Fixes cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4")
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -0
index 0bc7fe8..74b66e5 100644
@@ -2231,6 +2231,8 @@ static inline bool is_valid_legacy_rate(u8 rate)
 		return;
 	}
 
+	memset(&arsta->txrate, 0, sizeof(arsta->txrate));
+
 	if (txrate.flags == WMI_RATE_PREAMBLE_CCK ||
 	    txrate.flags == WMI_RATE_PREAMBLE_OFDM) {
 		rate = ATH10K_HW_LEGACY_RATE(peer_stats->ratecode);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 27 lines · Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <[email protected]>

Not clearing the previous tx bit rate status results in a ambigous tx bit rate reporting to mac80211/cfg80211, for example the previous bit rate status would have been marked as legacy rate , while the current rate would have been an HT/VHT rate with the tx bit rate flags set and this results in exporting tx bitrate as legacy rate but with HT/VHT rate flags set, fix this by clearing the tx bitrate status for each event. This also fixes the below warning when we do:

iw dev wlan#N station dump

WARNING: net/wireless/util.c:1222 cfg80211

[<c022f104>] (warn_slowpath_null) from [<bf3b9adc>] (cfg80211_calculate_bitrate+0x110/0x1f4 [cfg80211]) [<bf3b9adc>] (cfg80211_calculate_bitrate [cfg80211]) from [<bf3dcd54>] (nl80211_put_sta_rate+0x44/0x1dc [cfg80211]) [<bf3dcd54>] (nl80211_put_sta_rate [cfg80211]) from [<bf3cbc34>] (nl80211_set_interface+0x724/0xd70 [cfg80211]) [<bf3cbc34>] (nl80211_set_interface [cfg80211]) from [<bf3d0a18>] (nl80211_dump_station+0xdc/0x100 [cfg80211]) [<bf3d0a18>] (nl80211_dump_station [cfg80211])

Quoted 2 lines
Fixes cec17c382140 ("ath10k: add per peer htt tx stats support for 10.4")

Patch applied to ath-next branch of ath.git, thanks.

0f8a2b7772f7 ath10k: fix per station tx bit rate reporting

Signature · 6 lines
https://patchwork.kernel.org/patch/9514989/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches