blob: d64a09b43c673a023933e5ea69723f9c4c882612 [file] [log] [blame]
developerbf24a8a2022-11-30 14:52:20 +08001From 82549ae647667d825f49e67b8f21fa39db67ec13 Mon Sep 17 00:00:00 2001
developer031d9072022-04-18 14:06:54 +08002From: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
3Date: Mon, 7 Mar 2022 15:18:00 +0800
developerbf24a8a2022-11-30 14:52:20 +08004Subject: [PATCH 903/911] mac80211: mtk: correct legacy rates check in
developer031d9072022-04-18 14:06:54 +08005 ieee80211_calc_rx_airtime
6
7There are no legacy rates on 60GHz or sub-1Ghz band, so modify the check.
8
9Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
10Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
11---
12 net/mac80211/airtime.c | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15diff --git a/net/mac80211/airtime.c b/net/mac80211/airtime.c
developer3e4199d2022-10-19 14:18:06 +080016index 26d2f8b..c0e58eb 100644
developer031d9072022-04-18 14:06:54 +080017--- a/net/mac80211/airtime.c
18+++ b/net/mac80211/airtime.c
19@@ -477,7 +477,9 @@ u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw,
20 bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE;
21 bool cck;
22
23- if (WARN_ON_ONCE(status->band > NL80211_BAND_5GHZ))
24+ /* on 60GHz or sub-1Ghz band, there are no legacy rates */
25+ if (WARN_ON_ONCE(status->band == NL80211_BAND_60GHZ ||
26+ status->band == NL80211_BAND_S1GHZ))
27 return 0;
28
29 sband = hw->wiphy->bands[status->band];
30--
developera09ec1d2022-11-26 11:00:33 +0800312.36.1
developer031d9072022-04-18 14:06:54 +080032