diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-11-13 12:39:33 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-12-07 16:14:50 +0300 |
commit | fb9829e90dcd5365c45478629e45075560ea8644 (patch) | |
tree | 69ec3931179a3405adfb5396e98cb719a1758355 /drivers/net/wireless/realtek/rtlwifi/pci.c | |
parent | 78aa6012033f366627562c92ca8511b113730885 (diff) | |
download | linux-fb9829e90dcd5365c45478629e45075560ea8644.tar.xz |
rtlwifi: Reduce IO in RX interrupt to boost throughput
Check remaining count of RX packets cost a lot of CPU time, so only update
when the counter decreases to zero. In old flow, the counter was updated
once a RX packet is received.
Signed-off-by: Steven Ting <steventing@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/pci.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index ed6e4a5b99de..b28e6e35c6db 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -747,7 +747,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) u8 tmp_one; bool unicast = false; u8 hw_queue = 0; - unsigned int rx_remained_cnt; + unsigned int rx_remained_cnt = 0; struct rtl_stats stats = { .signal = 0, .rate = 0, @@ -768,7 +768,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) struct sk_buff *new_skb; if (rtlpriv->use_new_trx_flow) { - rx_remained_cnt = + if (rx_remained_cnt == 0) + rx_remained_cnt = rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw, hw_queue); if (rx_remained_cnt == 0) |