Skip to content

Commit 0cbcc0e

Browse files
nscndpull[bot]
authored andcommitted
wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
When reporting tx completion using ieee80211_tx_status_xxx() family 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 9903c09 ("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: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Nicolas Escande <nico.escande@gmail.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20251104083957.717825-1-nico.escande@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent f761f22 commit 0cbcc0e

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+3
-0
lines changed

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5961,6 +5961,9 @@ static int wmi_process_mgmt_tx_comp(struct ath11k *ar,
59615961
dma_unmap_single(ar->ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
59625962

59635963
info = IEEE80211_SKB_CB(msdu);
5964+
memset(&info->status, 0, sizeof(info->status));
5965+
info->status.rates[0].idx = -1;
5966+
59645967
if ((!(info->flags & IEEE80211_TX_CTL_NO_ACK)) &&
59655968
!tx_compl_param->status) {
59665969
info->flags |= IEEE80211_TX_STAT_ACK;

0 commit comments

Comments
 (0)