wlan-ap-Telecominfraproject/feeds/mediatek-sdk/mac80211/patches/subsys/mtk-0004-mac80211-mtk-correct-legacy-rates-check-in-ieee80211.patch
John Crispin 1e7cf483a4 mediatek-sdk: update to latest SDK kernel
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00

33 lines
1.1 KiB
Diff

From 6ebe31fadb5008b7b9591e1d2d1761aaf8e2885d Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
Date: Mon, 7 Mar 2022 15:18:00 +0800
Subject: [PATCH 04/19] mac80211: mtk: 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>
---
net/mac80211/airtime.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/airtime.c b/net/mac80211/airtime.c
index 26d2f8b..c0e58eb 100644
--- a/net/mac80211/airtime.c
+++ b/net/mac80211/airtime.c
@@ -477,7 +477,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];
--
2.18.0