ath11k: fix uninitialized rate_idx in ath11k_dp_tx_update_txcompl()
authorWen Gong <quic_wgong@quicinc.com>
Wed, 9 Feb 2022 06:08:16 +0000 (01:08 -0500)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 14 Feb 2022 17:45:29 +0000 (19:45 +0200)
The rate_idx which passed to ath11k_debugfs_sta_add_tx_stats() by
ath11k_dp_tx_update_txcompl() is not initialized, add initialization
for it.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2

Fixes: 1b8bb94c0612 ("ath11k: report tx bitrate for iw wlan station dump")
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220209060816.423-1-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath11k/dp_tx.c

index 91d6244b65435964f46c407d7462c300a6b9919f..8402961c668877b73faa39cb7b89a0cf10823ef3 100644 (file)
@@ -426,7 +426,7 @@ void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
        struct ath11k_sta *arsta;
        struct ieee80211_sta *sta;
        u16 rate, ru_tones;
-       u8 mcs, rate_idx, ofdma;
+       u8 mcs, rate_idx = 0, ofdma;
        int ret;
 
        spin_lock_bh(&ab->base_lock);