]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: add EHT support for TX rate
authorSarika Sharma <quic_sarishar@quicinc.com>
Tue, 1 Jul 2025 10:59:25 +0000 (16:29 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 7 Jul 2025 22:34:48 +0000 (15:34 -0700)
Currently, TX rates are not supported for EHT. Hence, add EHT
handling for TX rates and update the EHT-specific fields in arsta
accordingly.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250701105927.803342-4-quic_sarishar@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp_rx.c

index f0cfe03d74b6628aabf910a31d7f5b11a1fcb8f0..0f5edc81fc5d77ffb4135c88b079a4c8991334af 100644 (file)
@@ -1535,6 +1535,16 @@ ath12k_update_per_peer_tx_stats(struct ath12k *ar,
                v = ath12k_he_ru_tones_to_nl80211_he_ru_alloc(tones);
                arsta->txrate.he_ru_alloc = v;
                break;
+       case WMI_RATE_PREAMBLE_EHT:
+               arsta->txrate.mcs = mcs;
+               arsta->txrate.flags = RATE_INFO_FLAGS_EHT_MCS;
+               arsta->txrate.he_dcm = dcm;
+               arsta->txrate.eht_gi = ath12k_mac_eht_gi_to_nl80211_eht_gi(sgi);
+               tones = le16_to_cpu(user_rate->ru_end) -
+                       le16_to_cpu(user_rate->ru_start) + 1;
+               v = ath12k_mac_eht_ru_tones_to_nl80211_eht_ru_alloc(tones);
+               arsta->txrate.eht_ru_alloc = v;
+               break;
        }
 
        arsta->txrate.nss = nss;