]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: mvm/mld: report non-HT frames as 20 MHz
authorJohannes Berg <johannes.berg@intel.com>
Sun, 19 Oct 2025 08:45:10 +0000 (11:45 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 28 Oct 2025 14:17:27 +0000 (16:17 +0200)
Non-HT frames can only be encoded in 20 MHz, however, they
could be duplicated on all/some of the subchannels (mostly
used for RTS/CTS), in which case the firmware will report
and estimate of the overall used bandwidth based on energy
detected. This could be confusing so don't report it that
way, always use 20 MHz for non-HT/legacy frames instead.

Note that currently the value doesn't appear to be used by
mac80211, it never checks the bandwidth field for legacy
encodings.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251019114304.23e6695039ca.I3da7c542bde6de4362755f200248dbcc12aa246e@changeid
drivers/net/wireless/intel/iwlwifi/mld/rx.c
drivers/net/wireless/intel/iwlwifi/mvm/rx.c

index 19e78d2fbf9b5d6167e477f4c79bf467dc021615..6a76e3fcb581c008b59ae75fb8f3a76b3a5e3d98 100644 (file)
@@ -1309,6 +1309,9 @@ static void iwl_mld_set_rx_rate(struct iwl_mld *mld,
                    iwl_mld_legacy_hw_idx_to_mac80211_idx(rate_n_flags,
                                                          rx_status->band);
 
+               /* override BW - it could be DUP and indicate the wrong BW */
+               rx_status->bw = RATE_INFO_BW_20;
+
                /* valid rate */
                if (rate >= 0 && rate <= 0xFF) {
                        rx_status->rate_idx = rate;
index 8c1bb3a7ffcaa70e830cfb8ce31c4f9ac6d95b3b..d0c0faae01221c69abec4e491cb0d18e2d41e6f1 100644 (file)
@@ -519,6 +519,8 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
                        return;
                }
                rx_status->rate_idx = rate;
+               /* override BW - it could be DUP and indicate the wrong BW */
+               rx_status->bw = RATE_INFO_BW_20;
        }
 
 #ifdef CONFIG_IWLWIFI_DEBUGFS