rtw89: pci: reclaim TX BD only if it really need
authorPing-Ke Shih <pkshih@realtek.com>
Thu, 21 Apr 2022 12:08:52 +0000 (20:08 +0800)
committerKalle Valo <kvalo@kernel.org>
Sun, 24 Apr 2022 11:30:34 +0000 (14:30 +0300)
commit837202684657c2829bcdc057c1d25db751a6587b
tree8888d1bc357af3276e4a440697ae94df2ea78ffc
parente1757e80450164ede118993a889979e65ead591b
rtw89: pci: reclaim TX BD only if it really need

To reclaim TX BD, we need to read hardware reading index to determine if
any DMA is complete. Since this IO spends time, do this thing only if we
really need it when TX BD has no free buffer corresponding to target skb.

The experimental result shows that reading counter decreases from 26,000
to 130 per second.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220421120903.73715-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c