From: Ping-Ke Shih <pkshih@realtek.com>
To: Martin Kaiser <martin@kaiser.cx>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] wifi: rtw88: remove rtw_txq_dequeue
Date: Wed, 6 May 2026 08:44:55 +0000 [thread overview]
Message-ID: <8b2e123e70db41a0b6e0e06159a879d1@realtek.com> (raw)
In-Reply-To: <20260502131641.141136-1-martin@kaiser.cx>
Martin Kaiser <martin@kaiser.cx> wrote:
> Remove the rtw_txq_dequeue helper. It's a wrapper around
> ieee80211_tx_dequeue with just one caller.
>
> Call ieee80211_tx_dequeue directly in rtw_txq_push. There's no need to
> fetch txq for every frame, we can do this once outside of the rcu lock.
>
> Make the loop variable i unsigned long, it should have the same type as
> frames.
>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
> drivers/net/wireless/realtek/rtw88/tx.c | 18 +++---------------
> 1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> index 3106edb84fb4..ea2dc9bda1b6 100644
> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> @@ -619,31 +619,19 @@ static int rtw_txq_push_skb(struct rtw_dev *rtwdev,
> return 0;
> }
>
> -static struct sk_buff *rtw_txq_dequeue(struct rtw_dev *rtwdev,
> - struct rtw_txq *rtwtxq)
> -{
> - struct ieee80211_txq *txq = rtwtxq_to_txq(rtwtxq);
> - struct sk_buff *skb;
> -
> - skb = ieee80211_tx_dequeue(rtwdev->hw, txq);
> - if (!skb)
> - return NULL;
> -
> - return skb;
> -}
> -
> static void rtw_txq_push(struct rtw_dev *rtwdev,
> struct rtw_txq *rtwtxq,
> unsigned long frames)
> {
> + struct ieee80211_txq *txq = rtwtxq_to_txq(rtwtxq);
> struct sk_buff *skb;
> int ret;
> - int i;
> + unsigned long i;
In reverse X'mas order.
>
> rcu_read_lock();
>
> for (i = 0; i < frames; i++) {
> - skb = rtw_txq_dequeue(rtwdev, rtwtxq);
> + skb = ieee80211_tx_dequeue(rtwdev->hw, txq);
> if (!skb)
> break;
>
> --
> 2.43.7
>
prev parent reply other threads:[~2026-05-06 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 13:15 [PATCH] wifi: rtw88: remove rtw_txq_dequeue Martin Kaiser
2026-05-06 8:44 ` 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=8b2e123e70db41a0b6e0e06159a879d1@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=martin@kaiser.cx \
--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