armbian_build/patch/kernel/archive/sunxi-6.0/patches.megous/wifi-rtw89-parse-PHY-status-only-when-PPDU-is-to_self.patch
The-going 58b77e1cfd
Sunxi 6.0: update megous patches, switch to v6.0.8 (#4425)
* sunxi-6.0: update upstream megous patches to tag orange-pi-6.0-20221105-1830

* sunxi-6.0: rebase to v6.0.8

* sunxi-6.0: switch to v6.0.8
2022-11-12 10:54:18 +03:00

34 lines
1.1 KiB
Diff

From c1a230f8359ea5899676cf6e244dd08c0a518379 Mon Sep 17 00:00:00 2001
From: Eric Huang <echuang@realtek.com>
Date: Wed, 5 Oct 2022 16:32:08 +0800
Subject: [PATCH 488/492] wifi: rtw89: parse PHY status only when PPDU is
to_self
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@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.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 8d2cce450241..6b0b54593f46 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -1247,6 +1247,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.35.3