From: Chih-Kang Chang gary.chang@realtek.com
[ Upstream commit 4e79a5cc01c5e1f1ba393ed3b44b0c3611eaadf1 ]
The IE length of RTW89_PHYSTS_IE09_FTR_0 is dynamic, need to calculate more to get it. This IE is not necessary now, disable it to avoid get wrong IE length to let the parse function check failed.
Signed-off-by: Chih-Kang Chang gary.chang@realtek.com Signed-off-by: Ping-Ke Shih pkshih@realtek.com Link: https://patch.msgid.link/20250915065213.38659-4-pkshih@realtek.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
YES – Removing the request for the optional FTR_0 PHY-status IE keeps PPDU parsing from failing when the hardware emits that variable-length block.
- **Bug impact**: Before this change, `__rtw89_physts_parsing_init()` set `RTW89_PHYSTS_IE09_FTR_0` for every PPDU page (`drivers/net/wireless/realtek/rtw89/phy.c:6290`). The parser still assumes IE09 has a fixed 8‑byte length via `rtw89_core_get_phy_status_ie_len()` (`drivers/net/wireless/realtek/rtw89/core.c:1816`), so when the hardware sends a longer instance the loop in `rtw89_core_rx_parse_phy_sts()` overruns and returns `-EINVAL` (`drivers/net/wireless/realtek/rtw89/core.c:1959`), leaving `phy_ppdu->valid` false and blocking follow-up processing such as per- chain RSSI conversion and antenna-diversity updates.
- **Fix rationale**: The patch stops setting `BIT(RTW89_PHYSTS_IE09_FTR_0)` in that PPDU initialization block (`drivers/net/wireless/realtek/rtw89/phy.c:6290`), so the firmware no longer emits the problematic IE. Because no driver code consumes IE09 today, nothing functional is lost while the parser again succeeds and the PHY statistics remain usable.
- **Risk assessment**: Change is tiny, localized to bitmap setup, and merely disables an unused, optional report. No API changes, no new dependencies. It only matters on kernels that already picked up commit 28bb3d842e8f1e (“add EHT physts…”), which introduced the IE09 enablement; older stable trees without that commit aren’t affected.
Given it fixes real PPDU-status breakage with minimal regression risk, it’s a good stable backport candidate.
drivers/net/wireless/realtek/rtw89/phy.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c index 01a03d2de3ffb..59cb32720fb7b 100644 --- a/drivers/net/wireless/realtek/rtw89/phy.c +++ b/drivers/net/wireless/realtek/rtw89/phy.c @@ -5929,8 +5929,6 @@ static void __rtw89_physts_parsing_init(struct rtw89_dev *rtwdev, val |= BIT(RTW89_PHYSTS_IE13_DL_MU_DEF) | BIT(RTW89_PHYSTS_IE01_CMN_OFDM); } else if (i >= RTW89_CCK_PKT) { - val |= BIT(RTW89_PHYSTS_IE09_FTR_0); - val &= ~(GENMASK(RTW89_PHYSTS_IE07_CMN_EXT_PATH_D, RTW89_PHYSTS_IE04_CMN_EXT_PATH_A));