projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2916b7a
)
mac80211: correct legacy rates check in ieee80211_calc_rx_airtime
author
MeiChia Chiu
<MeiChia.Chiu@mediatek.com>
Tue, 8 Mar 2022 02:16:45 +0000
(10:16 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 11 Mar 2022 10:45:36 +0000
(11:45 +0100)
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>
net/mac80211/airtime.c
patch
|
blob
|
history
diff --git
a/net/mac80211/airtime.c
b/net/mac80211/airtime.c
index 64e8ce9760b90b33f769c5c77dd2a6ae0f67dfb3..2619e12c8bdac13194d8a1a04b0bd017a44200d5 100644
(file)
--- a/
net/mac80211/airtime.c
+++ b/
net/mac80211/airtime.c
@@
-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];