Commit fb9829e9 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

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: default avatarSteven Ting <steventing@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 78aa6012
...@@ -747,7 +747,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -747,7 +747,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
u8 tmp_one; u8 tmp_one;
bool unicast = false; bool unicast = false;
u8 hw_queue = 0; u8 hw_queue = 0;
unsigned int rx_remained_cnt; unsigned int rx_remained_cnt = 0;
struct rtl_stats stats = { struct rtl_stats stats = {
.signal = 0, .signal = 0,
.rate = 0, .rate = 0,
...@@ -768,6 +768,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -768,6 +768,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
struct sk_buff *new_skb; struct sk_buff *new_skb;
if (rtlpriv->use_new_trx_flow) { if (rtlpriv->use_new_trx_flow) {
if (rx_remained_cnt == 0)
rx_remained_cnt = rx_remained_cnt =
rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw, rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw,
hw_queue); hw_queue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment