From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Hungyu Lin" <dennylin0707@gmail.com>, pkshih@realtek.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
phhuang@realtek.com, rtl8821cerfe2@gmail.com,
johannes.berg@intel.com, u.kleine-koenig@baylibre.com
Subject: Re: [PATCH] wifi: rtw88: sdio: copy RX status after updating the frequency
Date: Fri, 09 Oct 2026 05:25:08 +0000 [thread overview]
Message-ID: <dd752e68eeb275bd2f7c616d9ddb08bd76d81ef7@linux.dev> (raw)
In-Reply-To: <20261009014941.29137-1-dennylin0707@gmail.com>
October 9, 2026 at 3:49 AM, "Hungyu Lin" <dennylin0707@gmail.com> wrote:
>
> rtw_sdio_rx_skb() copies rx_status to the skb before calling
> rtw_update_rx_freq_for_invalid(). If the frequency is corrected, the skb
> still carries the old value when it is passed to mac80211.
>
> Move the copy after the frequency update, as the PCI and USB RX paths
> already do.
>
> Fixes: 53ed4b25a79a ("wifi: rtw88: 8822c: Parse channel from IE to correct invalid hardware reports")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> Built the rtw88 directory on arm64 with GCC 13.3.0 and W=1, with
> RTW88_8723BS, RTW88_SDIO, RTW88_PCI and RTW88_USB enabled.
>
> A userspace test of the old and new receive function, with helper calls
> stubbed, confirmed that the corrected frequency reaches skb->cb.
> No hardware testing.
>
> drivers/net/wireless/realtek/rtw88/sdio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
> index dc2fd0f8f9ff..7c22f0ba5329 100644
> --- a/drivers/net/wireless/realtek/rtw88/sdio.c
> +++ b/drivers/net/wireless/realtek/rtw88/sdio.c
> @@ -1332,8 +1332,6 @@ static void rtw_sdio_rx_skb(struct rtw_dev *rtwdev, struct sk_buff *skb,
> u32 pkt_offset, struct rtw_rx_pkt_stat *pkt_stat,
> struct ieee80211_rx_status *rx_status)
> {
> - *IEEE80211_SKB_RXCB(skb) = *rx_status;
> -
> if (pkt_stat->is_c2h) {
> skb_put(skb, pkt_stat->pkt_len + pkt_offset);
> rtw_fw_c2h_cmd_rx_irqsafe(rtwdev, pkt_offset, skb);
> @@ -1346,6 +1344,7 @@ static void rtw_sdio_rx_skb(struct rtw_dev *rtwdev, struct sk_buff *skb,
> rtw_update_rx_freq_for_invalid(rtwdev, skb, rx_status, pkt_stat);
> rtw_rx_stats(rtwdev, pkt_stat->vif, skb);
>
> + *IEEE80211_SKB_RXCB(skb) = *rx_status;
> ieee80211_rx_irqsafe(rtwdev->hw, skb);
> }
>
>
> base-commit: 83de3a16c7b37064a59305040ba9b0f93b832794
> --
> 2.43.0
>
Looks good to me, I also found a preexisting issue while reviewing so
I'm sending a patch for that today.
Either way,
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-10-09 5:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 1:49 [PATCH] wifi: rtw88: sdio: copy RX status after updating the frequency Hungyu Lin
2026-10-09 5:25 ` Luka Gejak [this message]
2026-10-12 1:13 ` 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=dd752e68eeb275bd2f7c616d9ddb08bd76d81ef7@linux.dev \
--to=luka.gejak@linux.dev \
--cc=dennylin0707@gmail.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=phhuang@realtek.com \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.