From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH] wifi: rtlwifi: pci: Fix condition to wake the queues
Date: Wed, 26 Feb 2025 01:47:07 +0000 [thread overview]
Message-ID: <cc99f85cd4864077b2a53a27611e81bf@realtek.com> (raw)
In-Reply-To: <0c91ac77-a652-4ab4-b911-e0a2386fb863@gmail.com>
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> 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,
Reading the code about calling ieee80211_stop_queue() and
ieee80211_wake_queue() again. It looks like
In TX path (rtl_pci_tx):
if (remaining < 2)
ieee80211_stop_queue();
In TX completion path (_rtl_pci_tx_isr):
if (remaining <= 4)
ieee80211_wake_queue();
I guess it uses "<= 4" in TX completion path because origin patch doesn't
want to call ieee80211_wake_queue() redundantly, but looks not so reasonable.
The better way may use ieee80211_queue_stopped() instead.
prev parent reply other threads:[~2025-02-26 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 21:42 [PATCH] wifi: rtlwifi: pci: Fix condition to wake the queues Bitterblue Smith
2025-02-19 6:20 ` Ping-Ke Shih
2025-02-26 22:50 ` Bitterblue Smith
2025-02-27 0:49 ` Ping-Ke Shih
2025-02-26 1:47 ` Ping-Ke Shih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc99f85cd4864077b2a53a27611e81bf@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rtl8821cerfe2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox