wifi: rtw88: sdio: copy RX status after updating the frequency
PATCH 1/1 wifi: rtw88: sdio: copy RX status after updating the frequency
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.
---
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(-)
drivers/net/wireless/realtek/rtw88/sdio.c +1 -2
@@ -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
Signature · 1 line
2.43.0
Quoted 43 lines · Hungyu Lin
rtw_sdio_rx_skb()copiesrx_statusto the skb before callingrtw_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 <[email protected]>---
Built the rtw88 directory on arm64 with GCC 13.3.0 and W=1, withRTW88_8723BS,RTW88_SDIO,RTW88_PCIandRTW88_USBenabled.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(-)drivers/net/wireless/realtek/rtw88/sdio.c +1
-2@@ -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); }
Quoted 4 lines
base-commit:
83de3a16c7b37064a59305040ba9b0f93b832794Signature · 1 line
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,
Best regards,
Luka Gejak
Quoted 10 lines · Hungyu Lin
Sent: Friday, October 9, 2026 9:50 AM
rtw_sdio_rx_skb()copiesrx_statusto the skb before callingrtw_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 <[email protected]>
Ping-Ke Shih
maintainerQuoted 11 lines · Hungyu Lin
rtw_sdio_rx_skb()copiesrx_statusto the skb before callingrtw_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 <[email protected]>Reviewed-by Luka Gejak <[email protected]>Acked-by Ping-Ke Shih <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
c76f73c36343 wifi: rtw88: sdio: copy RX status after updating the frequency