From: Johannes Berg 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 Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/rx.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/rx.c b/drivers/net/wireless/intel/iwlwifi/mld/rx.c index 19e78d2fbf9b..6a76e3fcb581 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/rx.c @@ -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; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 8c1bb3a7ffca..d0c0faae0122 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c @@ -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 -- 2.34.1