mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
mac80211: correct legacy rates check in ieee80211_calc_rx_airtime
There are no legacy rates on 60GHz or sub-1GHz band, so modify the check. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com> Link: https://lore.kernel.org/r/20220308021645.16272-1-MeiChia.Chiu@mediatek.com [Ghz -> GHz] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2916b7a9c7
commit
022143d0c5
1 changed files with 3 additions and 1 deletions
|
@ -472,7 +472,9 @@ u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw,
|
|||
bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE;
|
||||
bool cck;
|
||||
|
||||
if (WARN_ON_ONCE(status->band > NL80211_BAND_5GHZ))
|
||||
/* on 60GHz or sub-1GHz band, there are no legacy rates */
|
||||
if (WARN_ON_ONCE(status->band == NL80211_BAND_60GHZ ||
|
||||
status->band == NL80211_BAND_S1GHZ))
|
||||
return 0;
|
||||
|
||||
sband = hw->wiphy->bands[status->band];
|
||||
|
|
Loading…
Reference in a new issue