Skip to contentSkip to conversation

ath10k: fix not registering airtime of 11a station with WMM disable

PATCH In review Yibo Zhao 3 participants 4 messages Feb 20, 2020 – Mar 11, 2020 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Yibo Zhao

author
#0 lore raw

PATCH 1/1 ath10k: fix not registering airtime of 11a station with WMM disable

The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system.

Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range.

Hardwares tested : QCA9984
Firmwares tested : 10.4-3.10-00047

---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -1
index 38a5814..f883f2a 100644
@@ -2744,7 +2744,8 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
 			continue;
 		}
 
-		tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0);
+		tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0) &
+						IEEE80211_QOS_CTL_TID_MASK;
 		tx_duration = __le32_to_cpu(ppdu_dur->tx_duration);
 
 		ieee80211_sta_register_airtime(peer->sta, tid, tx_duration, 0);
Signature · 6 lines
1.9.1

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#1 lore raw

ieee80211_sta_register_airtime uses ieee80211_ac_from_tid(tid) which already applies a mask, so should be returning IEEE80211_AC_BE = 2 already, there has been recent changes to some of this so maybe I'm looking at the wrong decision but I don't think this change makes a difference

Quoted 34 lines · Yibo Zhao

The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system.

Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range.

Hardwares tested : QCA9984
Firmwares tested : 10.4-3.10-00047

---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -2
index 38a5814..f883f2a 100644
@@ -2744,7 +2744,8 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
                        continue;
                }
 
-               tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0);
+               tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0) &
+                                               IEEE80211_QOS_CTL_TID_MASK;
                tx_duration = __le32_to_cpu(ppdu_dur->tx_duration);
 
                ieee80211_sta_register_airtime(peer->sta, tid, tx_duration, 0);
--

1.9.1

#2 lore raw
In reply to Yibo Zhao
Quoted 6 lines · Yibo Zhao

The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system.

Quoted 8 lines

Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range.

Hardwares tested : QCA9984
Firmwares tested : 10.4-3.10-00047

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

f9680c75d187 ath10k: fix not registering airtime of 11a station with WMM disable

Signature · 8 lines
https://patchwork.kernel.org/patch/11393223/

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

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#3 lore raw
In reply to Yibo Zhao
Quoted 6 lines · Yibo Zhao

The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system.

Quoted 8 lines

Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range.

Hardwares tested : QCA9984
Firmwares tested : 10.4-3.10-00047

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

f9680c75d187 ath10k: fix not registering airtime of 11a station with WMM disable

Signature · 3 lines
https://patchwork.kernel.org/patch/11393223/

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