From 2400dfe23fa91612c18c6c8d8a5b8164ff98836c Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 29 Aug 2023 12:17:44 +0200 Subject: 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 --- net/mac80211/cfg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'net/mac80211/cfg.c') diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index de8f76a7637b..4f30e80192e7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -810,15 +810,11 @@ void sta_set_rate_info_tx(struct sta_info *sta, rinfo->nss = ieee80211_rate_get_vht_nss(rate); } else { struct ieee80211_supported_band *sband; - int shift = ieee80211_vif_get_shift(&sta->sdata->vif); - u16 brate; sband = ieee80211_get_sband(sta->sdata); WARN_ON_ONCE(sband && !sband->bitrates); - if (sband && sband->bitrates) { - brate = sband->bitrates[rate->idx].bitrate; - rinfo->legacy = DIV_ROUND_UP(brate, 1 << shift); - } + if (sband && sband->bitrates) + rinfo->legacy = sband->bitrates[rate->idx].bitrate; } if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) rinfo->bw = RATE_INFO_BW_40; -- cgit v1.2.3