blob: d4bdd514e5fe05045e3157f84eda05cb586c110b [file] [log] [blame]
developer1d9da7d2023-04-15 12:45:34 +08001From 86cc94d1060840b23fc5ca362b72917cd8541a2e 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
developered7222c2023-04-14 07:19:52 +08004Subject: [PATCH 04/17] 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--
developered7222c2023-04-14 07:19:52 +0800312.18.0
developer031d9072022-04-18 14:06:54 +080032