Message ID | 0c91ac77-a652-4ab4-b911-e0a2386fb863@gmail.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Ping-Ke Shih |
Headers | show |
Series | wifi: rtlwifi: pci: Fix condition to wake the queues | expand |
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote: > The TX queues should be woken when there are at least 4 available > entries, not when there are at most 4. > > Tested with RTL8821AE. > > Fixes: d0311314d002 ("rtlwifi: rtl8192ee: Fix handling of new style descriptors") I agree your change looks more reasonable. Did you really meet the case and this patch solves it? By the changes of d0311314d002, I can't really understand why the initial version and the commit do. Considering the commit "fix" some situations, I don't know if this patch would break them again. Could you look into rtlwifi PCI flow deeper and share your ideas?
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 0eafc4d125f9..9614a9e752b9 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -520,7 +520,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio) rtl_tx_ackqueue(hw, skb); } - if ((ring->entries - skb_queue_len(&ring->queue)) <= 4) { + if ((ring->entries - skb_queue_len(&ring->queue)) >= 4) { rtl_dbg(rtlpriv, COMP_ERR, DBG_DMESG, "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%x\n", prio, ring->idx,
The TX queues should be woken when there are at least 4 available entries, not when there are at most 4. Tested with RTL8821AE. Fixes: d0311314d002 ("rtlwifi: rtl8192ee: Fix handling of new style descriptors") Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)