diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-29 13:17:44 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-13 12:22:16 +0300 |
commit | 2400dfe23fa91612c18c6c8d8a5b8164ff98836c (patch) | |
tree | e8e628ff3c03c99127f2a4dd325ed2355f185eeb /net/mac80211/airtime.c | |
parent | 5add321c329b1746589b51359259666ca3dbe219 (diff) | |
download | linux-2400dfe23fa91612c18c6c8d8a5b8164ff98836c.tar.xz |
wifi: mac80211: remove shifted rate support
We really cannot even get into this as we can't have
a BSS with a 5/10 MHz (scan) width, and therefore all
the code handling shifted rates cannot happen. Remove
it all, since it's broken anyway, at least with MLO.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/airtime.c')
-rw-r--r-- | net/mac80211/airtime.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/airtime.c b/net/mac80211/airtime.c index e8ebd343e2bf..14be7b526f1d 100644 --- a/net/mac80211/airtime.c +++ b/net/mac80211/airtime.c @@ -632,7 +632,7 @@ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw, { struct ieee80211_supported_band *sband; struct ieee80211_chanctx_conf *conf; - int rateidx, shift = 0; + int rateidx; bool cck, short_pream; u32 basic_rates; u8 band = 0; @@ -641,10 +641,8 @@ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw, len += 38; /* Ethernet header length */ conf = rcu_dereference(vif->bss_conf.chanctx_conf); - if (conf) { + if (conf) band = conf->def.chan->band; - shift = ieee80211_chandef_get_shift(&conf->def); - } if (pubsta) { struct sta_info *sta = container_of(pubsta, struct sta_info, @@ -704,7 +702,7 @@ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw, short_pream = vif->bss_conf.use_short_preamble; rateidx = basic_rates ? ffs(basic_rates) - 1 : 0; - rate = sband->bitrates[rateidx].bitrate << shift; + rate = sband->bitrates[rateidx].bitrate; cck = sband->bitrates[rateidx].flags & IEEE80211_RATE_MANDATORY_B; return ieee80211_calc_legacy_rate_duration(rate, short_pream, cck, len); |