wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
PATCH 1/1 wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
When reporting tx completion using ieee80211_tx_status_xxx() familly of functions, the status part of the struct ieee80211_tx_info nested in the skb is used to report things like transmit rates & retry count to mac80211
On the TX data path, this is correctly memset to 0 before calling ieee80211_tx_status_ext(), but on the tx mgmt path this was not done.
This leads to mac80211 treating garbage values as valid transmit counters (like tx retries for example) and accounting them as real statistics that makes their way to userland via station dump.
The same issue was resolved in ath12k by commit 9903c0986f78 ("wifi:
ath12k: Add memset and update default rate value in wmi tx completion")
Tested-on: QCN9074 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/wmi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath11k/wmi.c +3 -0
@@ -5967,6 +5967,9 @@ static int wmi_process_mgmt_tx_comp(struct ath11k *ar,dma_unmap_single (ar->ab->dev, skb_cb->paddr, msdu->len,DMA_TO_DEVICE ); info =IEEE80211_SKB_CB (msdu); +memset (&info->status,0 ,sizeof (info->status)); + info->status.rates[0 ].idx =-1 ; +if ((!(info->flags &IEEE80211_TX_CTL_NO_ACK )) && !tx_compl_param->status) { info->flags |=IEEE80211_TX_STAT_ACK ;
Signature · 1 line
2.51.2
Quoted 1 line · Nicolas Escande
When reporting tx completion using
ieee80211_tx_status_xxx()familly of
nit: s/familly/family
Quoted 10 lines
functions, the status part of the struct
ieee80211_tx_infonested in the skb is used to report things like transmit rates & retry count to mac80211On the TX data path, this is correctly memset to 0 before calling
ieee80211_tx_status_ext(), but on the tx mgmt path this was not done.This leads to mac80211 treating garbage values as valid transmit counters (like tx retries for example) and accounting them as real statistics that makes their way to userland via station dump.
Quoted 7 lines
The same issue was resolved in ath12k by commit
9903c0986f78("wifi:
ath12k: Add memset and update default rate value in wmi tx completion")Tested-on: QCN9074 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")Signed-off-by Nicolas Escande <[email protected]>
Quoted 6 lines · Vasanthakumar Thiagarajan
Quoted 1 line · Nicolas Escande
When reporting tx completion using
ieee80211_tx_status_xxx()familly ofnit: s/familly/family
I'll fix this in 'pending'
Quoted 27 lines · Nicolas Escande
When reporting tx completion using
ieee80211_tx_status_xxx()familly of functions, the status part of the structieee80211_tx_infonested in the skb is used to report things like transmit rates & retry count to mac80211On the TX data path, this is correctly memset to 0 before calling
ieee80211_tx_status_ext(), but on the tx mgmt path this was not done.This leads to mac80211 treating garbage values as valid transmit counters (like tx retries for example) and accounting them as real statistics that makes their way to userland via station dump.
The same issue was resolved in ath12k by commit
9903c0986f78("wifi:
ath12k: Add memset and update default rate value in wmi tx completion")Tested-on: QCN9074 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")Signed-off-by Nicolas Escande <[email protected]>--- drivers/net/wireless/ath/ath11k/wmi.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/wireless/ath/ath11k/wmi.c +0
-0
drivers/net/wireless/ath/ath11k/wmi.c static int wmi_process_mgmt_tx_comp(struct ath11k *ar, · line 5975
Quoted 9 lines
drivers/net/wireless/ath/ath11k/wmi.c +3
-0@@ -5967,6 +5967,9 @@ static int wmi_process_mgmt_tx_comp(struct ath11k *ar,dma_unmap_single (ar->ab->dev, skb_cb->paddr, msdu->len,DMA_TO_DEVICE ); info =IEEE80211_SKB_CB (msdu); +memset (&info->status,0 ,sizeof (info->status)); + info->status.rates[0 ].idx =-1 ; +if ((!(info->flags &IEEE80211_TX_CTL_NO_ACK )) && !tx_compl_param->status) { info->flags |=IEEE80211_TX_STAT_ACK ;
Jeff Johnson
AppliedQuoted 8 lines · Nicolas Escande
When reporting tx completion using
ieee80211_tx_status_xxx()familly of functions, the status part of the structieee80211_tx_infonested in the skb is used to report things like transmit rates & retry count to mac80211On the TX data path, this is correctly memset to 0 before calling
ieee80211_tx_status_ext(), but on the tx mgmt path this was not done.[...]
Applied, thanks!
[1/1] wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
commit: 9065b968752334f972e0d48e50c4463a172fc2a7
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>