public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <timlee@realtek.com>, <echuang@realtek.com>,
	<damon.chen@realtek.com>, <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 3/6] wifi: rtw89: correct length for IE18/19 PHY report and IE parser
Date: Wed, 18 Jun 2025 20:46:46 +0800	[thread overview]
Message-ID: <20250618124649.11436-4-pkshih@realtek.com> (raw)
In-Reply-To: <20250618124649.11436-1-pkshih@realtek.com>

From: Eric Huang <echuang@realtek.com>

Correct the length when parsing with 2nd IE header and the length
of IE18/19 PHY status report. These two IE contain PHY OFDM signal
information and can be used for debug.

Signed-off-by: Eric Huang <echuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 4026cda04ef6..d0d2ca31b376 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -1723,7 +1723,7 @@ static u16 rtw89_core_get_phy_status_ie_len(struct rtw89_dev *rtwdev,
 		},
 		[RTW89_CHIP_BE] = {
 			32, 40, 24, 24, 8, 8, 8, 8, VAR_LEN, 8, VAR_LEN, 176, VAR_LEN,
-			VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 16, 24, VAR_LEN,
+			VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 88, 56, VAR_LEN,
 			VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32
 		},
 	};
@@ -1918,6 +1918,8 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev,
 		return -EINVAL;
 
 	pos = phy_ppdu->buf + PHY_STS_HDR_LEN;
+	if (phy_ppdu->hdr_2_en)
+		pos += PHY_STS_HDR_LEN;
 	end = phy_ppdu->buf + phy_ppdu->len;
 	while (pos < end) {
 		const struct rtw89_phy_sts_iehdr *iehdr = pos;
-- 
2.25.1


  parent reply	other threads:[~2025-06-18 12:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 12:46 [PATCH rtw-next 0/6] wifi: rtw89: update debug stuffs and enter PS mode aggressively Ping-Ke Shih
2025-06-18 12:46 ` [PATCH rtw-next 1/6] wifi: rtw89: mac: differentiate mem_page_size by chip generation Ping-Ke Shih
2025-06-24  6:47   ` Ping-Ke Shih
2025-06-18 12:46 ` [PATCH rtw-next 2/6] wifi: rtw89: update EDCCA report for subband 40M/80M/sub-20M Ping-Ke Shih
2025-06-18 12:46 ` Ping-Ke Shih [this message]
2025-06-18 12:46 ` [PATCH rtw-next 4/6] wifi: rtw89: avoid NULL dereference when RX problematic packet on unsupported 6 GHz band Ping-Ke Shih
2025-06-18 12:46 ` [PATCH rtw-next 5/6] wifi: rtw89: report boottime of receiving beacon and probe response Ping-Ke Shih
2025-06-18 12:46 ` [PATCH rtw-next 6/6] wifi: rtw89: enter power save mode aggressively Ping-Ke Shih
2025-06-24  6:55   ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250618124649.11436-4-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=damon.chen@realtek.com \
    --cc=echuang@realtek.com \
    --cc=kevin_yang@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=timlee@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox