[PATCH 12/40] [SRU][Lunar/OEM-6.1] wifi: rtw89: parse PHY status only when PPDU is to_self
Koba Ko
koba.ko at canonical.com
Thu Jan 12 06:36:51 UTC 2023
From: Eric Huang <echuang at realtek.com>
BugLink: https://bugs.launchpad.net/bugs/2002601
Without this fix, some non-self packets are used to count CFO (center
frequency offset), and average CFO has unstable variation. Then, it causes
unexpected performance.
Signed-off-by: Eric Huang <echuang at realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih at realtek.com>
Signed-off-by: Kalle Valo <kvalo at kernel.org>
Link: https://lore.kernel.org/r/20221005083212.45683-3-pkshih@realtek.com
(cherry picked from commit 0935bb1527d711b1af8e89d4ba200c302fb5ab2b)
Signed-off-by: Koba Ko <koba.ko at canonical.com>
---
drivers/net/wireless/realtek/rtw89/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index bc2994865372b..a0fa9639b5097 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -1255,6 +1255,9 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev,
if (phy_ppdu->ie < RTW89_CCK_PKT)
return -EINVAL;
+ if (!phy_ppdu->to_self)
+ return 0;
+
pos = (u8 *)phy_ppdu->buf + PHY_STS_HDR_LEN;
end = (u8 *)phy_ppdu->buf + phy_ppdu->len;
while (pos < end) {
--
2.34.1
More information about the kernel-team
mailing list