[PATCH] wifi: iwlwifi: mvm: fix VHT NSS reporting for legacy RX API

From: Sperrbert via B4 Relay

Date: Wed Sep 02 2026 - 00:56:40 EST


From: Sperrbert <sperrbert@xxxxxxxxx>

Commit 774302d2d3ad ("wifi: iwlwifi: mvm: clean up duplicated defines")
replaced the explicit legacy VHT NSS decoding with
RATE_MCS_NSS_MSK, which was equivalent at the time.

Commit dabc88cb3b78 ("wifi: iwlwifi: handle v3 rates") later changed
RATE_MCS_NSS_MSK for the v3 rate format, where NSS is encoded at a
different bit position. The legacy RX path, however, still handles
VHT rate_n_flags using the v1 format.

As a result, two-stream VHT RX rates on older devices can be reported
as NSS 1. Use RATE_VHT_MCS_NSS_MSK when decoding VHT NSS in the
legacy RX path.

On an Intel Wireless-AC 7260, an unmodified kernel reports VHT NSS 1
while receiving about 460 Mbit/s. With this change the same connection
is correctly reported as VHT NSS 2, with unchanged throughput.

Fixes: dabc88cb3b78 ("wifi: iwlwifi: handle v3 rates")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Sperrbert <sperrbert@xxxxxxxxx>
---
drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index ab1eb2eb0c3cd..124a5f52c53d1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -502,7 +502,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
RATE_MCS_STBC_POS;
rx_status->nss =
- FIELD_GET(RATE_MCS_NSS_MSK, rate_n_flags) + 1;
+ FIELD_GET(RATE_VHT_MCS_NSS_MSK, rate_n_flags) + 1;
rx_status->rate_idx = rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK;
rx_status->encoding = RX_ENC_VHT;
rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;

---
base-commit: 786262be6048deab760f68c8acc2c85607165894
change-id: 20260902-master-0acd0f74df39

Best regards,
--
Sperrbert <sperrbert@xxxxxxxxx>