From: Ping-Ke Shih <pkshih@realtek.com>
To: Shirong Zhao <shxzhaosr@163.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] wifi: rtw89: read the beacon header from the skb data
Date: Thu, 19 Nov 2026 05:40:24 +0000 [thread overview]
Message-ID: <56b22f76b86847d0a2cad93f27ec86c0@realtek.com> (raw)
In-Reply-To: <20261119130618.455918-1-shxzhaosr@163.com>
Shirong Zhao <shxzhaosr@163.com> wrote:
> (v2: reworded subject and commit message, added the two
> Fixes: tags and Ping-Ke's Tested-by/Acked-by)
This should be put after your s-o-b with --- delimiter.
I forgot to say that I will rephrase the commit message when committing.
>
> Point hdr at skb_beacon->data instead of the sk_buff pointer itself,
> to get the correct header length for the TIM offset passed to firmware.
>
> rtw89_fw_h2c_update_beacon() and rtw89_fw_h2c_update_beacon_be() cast
> the sk_buff itself to struct ieee80211_hdr:
>
> hdr = (struct ieee80211_hdr *)skb_beacon;
>
> The 802.11 header lives in the frame data returned by
> ieee80211_beacon_get_tim(), not at the start of struct sk_buff, so that
> cast reads sk_buff metadata instead of frame_control.
No need too much description which obscures the focus.
>
> Fortunately the original (wrong) header fc is 0x0000, so the header
> length is recognized as 24 bytes, which is almost the same as the AP
> mode application.
> The value is still wrong in principle and would
> break as soon as the sk_buff layout supplies a non-zero value there.
Yes. But "fortunately" it is zero for this case.
>
> Fixes: 69466b979a72 ("wifi: rtw89: use struct to fill H2C command to download beacon frame")
> Fixes: a880b9283009 ("wifi: rtw89: add H2C command to download beacon frame for WiFi 7 chips")
> Found by code inspection; not observed at runtime.
This is not standard tag. Should not here.
> Tested-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Shirong Zhao <shxzhaosr@163.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Anyway, I'll take v1 and modify commit message while committing.
prev parent reply other threads:[~2026-11-19 5:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 5:46 [PATCH] wifi: rtw89: read the beacon header from the frame data Shirong Zhao
2026-11-19 2:29 ` Ping-Ke Shih
2026-11-19 5:06 ` [PATCH v2] wifi: rtw89: read the beacon header from the skb data Shirong Zhao
2026-11-19 5:40 ` Ping-Ke Shih [this message]
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=56b22f76b86847d0a2cad93f27ec86c0@realtek.com \
--to=pkshih@realtek.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=shxzhaosr@163.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
all inboxes | Powered by JetHome®