]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: rtw88: usb: Update the RX stats after every frame
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Wed, 7 Aug 2024 22:20:36 +0000 (01:20 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Fri, 9 Aug 2024 01:12:37 +0000 (09:12 +0800)
Update the number of received unicast data frames and bytes every time
a frame is received. This is what the PCI and SDIO drivers do.

This has an influence on the power saving, bluetooth coexistence, and
(in a future patch) the use of RX aggregation.

Tested with RTL8822CU, RTL8811CU, and RTL8723DU.

Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/75a2ca52-8f01-45c5-926f-d3a68ae3b284@gmail.com
drivers/net/wireless/realtek/rtw88/usb.c

index 1c40d46a7eb4ed1bfbefed2aa1c5263c256f2bd1..10f1d724370e778b8d2ee98d9bfbac0e993a9910 100644 (file)
@@ -581,6 +581,7 @@ static void rtw_usb_rx_handler(struct work_struct *work)
                skb_reserve(skb, pkt_offset);
 
                rtw_update_rx_freq_for_invalid(rtwdev, skb, &rx_status, &pkt_stat);
+               rtw_rx_stats(rtwdev, pkt_stat.vif, skb);
                memcpy(skb->cb, &rx_status, sizeof(rx_status));
                ieee80211_rx_irqsafe(rtwdev->hw, skb);
        }