1 From 38ea04a79ad0f8cc30bb5e9ad98d665e4ae5060c Mon Sep 17 00:00:00 2001
2 From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
3 Date: Thu, 8 Aug 2024 01:20:36 +0300
4 Subject: [PATCH] wifi: rtw88: usb: Update the RX stats after every frame
6 Update the number of received unicast data frames and bytes every time
7 a frame is received. This is what the PCI and SDIO drivers do.
9 This has an influence on the power saving, bluetooth coexistence, and
10 (in a future patch) the use of RX aggregation.
12 Tested with RTL8822CU, RTL8811CU, and RTL8723DU.
14 Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
15 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
16 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
17 Link: https://patch.msgid.link/75a2ca52-8f01-45c5-926f-d3a68ae3b284@gmail.com
19 drivers/net/wireless/realtek/rtw88/usb.c | 1 +
20 1 file changed, 1 insertion(+)
22 --- a/drivers/net/wireless/realtek/rtw88/usb.c
23 +++ b/drivers/net/wireless/realtek/rtw88/usb.c
24 @@ -581,6 +581,7 @@ static void rtw_usb_rx_handler(struct wo
25 skb_reserve(skb, pkt_offset);
27 rtw_update_rx_freq_for_invalid(rtwdev, skb, &rx_status, &pkt_stat);
28 + rtw_rx_stats(rtwdev, pkt_stat.vif, skb);
29 memcpy(skb->cb, &rx_status, sizeof(rx_status));
30 ieee80211_rx_irqsafe(rtwdev->hw, skb);