The SGI is updated wrongly in tx stats table in debugfs per sta
entry. To know whether the packets/bytes are sent with SHORT GI,
test whether the SGI bit(ATH10K_RATE_INFO_FLAGS_SGI_BIT) is set or
not in the txrate flags.
Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
Fixes: a904417fc876 ("ath10k: add extended per sta tx statistics support")
Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
        struct rate_info *txrate = &arsta->txrate;
        struct ath10k_htt_tx_stats *tx_stats;
        int idx, ht_idx, gi, mcs, bw, nss;
+       unsigned long flags;
 
        if (!arsta->tx_stats)
                return;
 
        tx_stats = arsta->tx_stats;
-       gi = (arsta->txrate.flags & RATE_INFO_FLAGS_SHORT_GI);
+       flags = txrate->flags;
+       gi = test_bit(ATH10K_RATE_INFO_FLAGS_SGI_BIT, &flags);
        ht_idx = txrate->mcs + txrate->nss * 8;
        mcs = txrate->mcs;
        bw = txrate->bw;
 
 #define ATH10K_GI_NUM          2
 #define ATH10K_HT_MCS_NUM      32
 #define ATH10K_RATE_TABLE_NUM  320
+#define ATH10K_RATE_INFO_FLAGS_SGI_BIT 2
 
 /* Value to disable fixed rate setting */
 #define WMI_FIXED_RATE_NONE    (0xff)