Commit 022143d0 authored by MeiChia Chiu's avatar MeiChia Chiu Committed by Johannes Berg

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: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarMeiChia Chiu <MeiChia.Chiu@mediatek.com>
Link: https://lore.kernel.org/r/20220308021645.16272-1-MeiChia.Chiu@mediatek.com
[Ghz ->  GHz]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 2916b7a9
...@@ -472,7 +472,9 @@ u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw, ...@@ -472,7 +472,9 @@ u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw,
bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE; bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE;
bool cck; 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; return 0;
sband = hw->wiphy->bands[status->band]; sband = hw->wiphy->bands[status->band];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment