Skip to content

Commit 10085a6

Browse files
kwan1996jeff-t-johnson
authored andcommitted
wifi: ath12k: fix incorrect HT/VHT/HE/EHT MCS reporting in monitor mode
In monitor mode, the driver incorrectly assigns the legacy rate to the rate_idx field of the radiotap header for HT/VHT/HE/EHT frames, ignoring the actual MCS value parsed from the hardware. This causes packet analyzers (like Wireshark) to display incorrect MCS values (e.g., legacy base rates instead of the true MCS). Fix this by assigning ppdu_info->mcs as the default rate_mcs in ath12k_dp_mon_fill_rx_rate(), and remove rate_idx assignments in ath12k_dp_mon_update_radiotap() to preserve the previously calculated MCS values (including the HT NSS offset). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ Fixes: 5393dcb ("wifi: ath12k: change the status update in the monitor Rx") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220864 Signed-off-by: Kwan Lai Chee Hou <laicheehou9@gmail.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260507015336.14636-1-laicheehou9@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent 2098874 commit 10085a6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/net/wireless/ath/ath12k/dp_mon.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ ath12k_dp_mon_fill_rx_rate(struct ath12k_pdev_dp *dp_pdev,
115115
bool is_cck;
116116

117117
pkt_type = ppdu_info->preamble_type;
118-
rate_mcs = ppdu_info->rate;
118+
rate_mcs = ppdu_info->mcs;
119119
nss = ppdu_info->nss;
120120
sgi = ppdu_info->gi;
121121

122122
switch (pkt_type) {
123123
case RX_MSDU_START_PKT_TYPE_11A:
124124
case RX_MSDU_START_PKT_TYPE_11B:
125+
rate_mcs = ppdu_info->rate;
125126
is_cck = (pkt_type == RX_MSDU_START_PKT_TYPE_11B);
126127
if (rx_status->band < NUM_NL80211_BANDS) {
127128
struct ath12k *ar = ath12k_pdev_dp_to_ar(dp_pdev);
@@ -471,13 +472,10 @@ void ath12k_dp_mon_update_radiotap(struct ath12k_pdev_dp *dp_pdev,
471472
rxs->encoding = RX_ENC_HE;
472473
ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he));
473474
ath12k_dp_mon_rx_update_radiotap_he(ppduinfo, ptr);
474-
rxs->rate_idx = ppduinfo->rate;
475475
} else if (ppduinfo->vht_flags) {
476476
rxs->encoding = RX_ENC_VHT;
477-
rxs->rate_idx = ppduinfo->rate;
478477
} else if (ppduinfo->ht_flags) {
479478
rxs->encoding = RX_ENC_HT;
480-
rxs->rate_idx = ppduinfo->rate;
481479
} else {
482480
struct ath12k *ar;
483481

0 commit comments

Comments
 (0)