]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
authorNicolas Escande <nico.escande@gmail.com>
Tue, 4 Nov 2025 08:39:57 +0000 (09:39 +0100)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 6 Nov 2025 15:26:21 +0000 (07:26 -0800)
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 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 <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>
drivers/net/wireless/ath/ath11k/wmi.c

index 0491e3fd6b5e16d464bd3e3c3933b9102641204b..e3b444333deed17849042c11bb4cdd71e27042e7 100644 (file)
@@ -5961,6 +5961,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;