From: Ping-Ke Shih Date: Wed, 6 May 2026 13:09:58 +0000 (+0800) Subject: wifi: rtw89: phy: skip trailing 8-byte zeros of PHY status IE for RTL8922D X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48402f736f93e6377ee47984d9dd2aa1b6815604;p=thirdparty%2Fkernel%2Flinux.git wifi: rtw89: phy: skip trailing 8-byte zeros of PHY status IE for RTL8922D Hardware reports a list of PHY status IE. In monitor mode, IE-09 of PHY status is enabled, and the report contains trailing 8-byte zeros, causing failed to parse and drop all IE information. The 8 zeros are recognize as IE type 0, but length of type 0 must be not 8 (reference to rtw89_phy_gen_def::physt_ie_len[0]). Check and skip them. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260506131000.1706298-13-pkshih@realtek.com --- diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 7e1182a499427..fddb0c822c28d 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -2275,6 +2275,13 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev, while (pos < end) { const struct rtw89_phy_sts_iehdr *iehdr = pos; + /* + * RTL8922D might reports 8 bytes zeros at end if IE09 presents. + * Check and ignore the zeros. + */ + if (unlikely(phy_ppdu->ie09 && end - pos == 8 && iehdr->w0 == 0)) + break; + ie_len = rtw89_core_get_phy_status_ie_len(rtwdev, iehdr); pos += ie_len; if (pos > end || ie_len == 0) {