Linux wireless drivers development
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: kwan1996 <laicheehou9@gmail.com>,
	ath12k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3] wifi: ath12k: fix incorrect HT/VHT/HE/EHT MCS reporting in monitor mode
Date: Mon, 1 Jun 2026 13:44:11 +0800	[thread overview]
Message-ID: <35f9b62e-cbe5-4b3b-b68d-2f4ddfd9ac23@oss.qualcomm.com> (raw)
In-Reply-To: <20260507015336.14636-1-laicheehou9@gmail.com>



On 5/7/2026 9:53 AM, kwan1996 wrote:
> From: Kwan Lai Chee Hou <laicheehou9@gmail.com>
> 
> 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).
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=220864
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ
> 

Fixes: 5393dcb45209 ("wifi: ath12k: change the status update in the monitor Rx") ?

> Signed-off-by: Kwan Lai Chee Hou <laicheehou9@gmail.com>
> 
> ---
> v3: 
>  - Simplify rate_mcs assignment logic in ath12k_dp_mon_fill_rx_rate.
>  - remove rate_idx assignments in ath12k_dp_mon_update_radiotap to avoid overwriting the HT (802.11n) MCS calculated earlier.
>  
> v2: Fix indentation and formatting issues in v1.
> ---
>  drivers/net/wireless/ath/ath12k/dp_mon.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
> index 39d1967..79347c3 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_mon.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
> @@ -1910,13 +1910,14 @@ ath12k_dp_mon_fill_rx_rate(struct ath12k *ar,
>  	bool is_cck;
>  
>  	pkt_type = ppdu_info->preamble_type;
> -	rate_mcs = ppdu_info->rate;
> +	rate_mcs = ppdu_info->mcs;
>  	nss = ppdu_info->nss;
>  	sgi = ppdu_info->gi;
>  
>  	switch (pkt_type) {
>  	case RX_MSDU_START_PKT_TYPE_11A:
>  	case RX_MSDU_START_PKT_TYPE_11B:
> +		rate_mcs = ppdu_info->rate;
>  		is_cck = (pkt_type == RX_MSDU_START_PKT_TYPE_11B);
>  		if (rx_status->band < NUM_NL80211_BANDS) {
>  			sband = &ar->mac.sbands[rx_status->band];
> @@ -2259,13 +2260,10 @@ static void ath12k_dp_mon_update_radiotap(struct ath12k *ar,
>  		rxs->encoding = RX_ENC_HE;
>  		ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he));
>  		ath12k_dp_mon_rx_update_radiotap_he(ppduinfo, ptr);
> -		rxs->rate_idx = ppduinfo->rate;
>  	} else if (ppduinfo->vht_flags) {
>  		rxs->encoding = RX_ENC_VHT;
> -		rxs->rate_idx = ppduinfo->rate;
>  	} else if (ppduinfo->ht_flags) {
>  		rxs->encoding = RX_ENC_HT;
> -		rxs->rate_idx = ppduinfo->rate;
>  	} else {
>  		rxs->encoding = RX_ENC_LEGACY;
>  		sband = &ar->mac.sbands[rxs->band];

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>

  reply	other threads:[~2026-06-01  5:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  1:53 [PATCH v3] wifi: ath12k: fix incorrect HT/VHT/HE/EHT MCS reporting in monitor mode kwan1996
2026-06-01  5:44 ` Baochen Qiang [this message]
2026-06-01 12:27 ` Rameshkumar Sundaram
2026-06-01 17:00 ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35f9b62e-cbe5-4b3b-b68d-2f4ddfd9ac23@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=laicheehou9@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox