]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw88: remove rtw_txq_dequeue
authorMartin Kaiser <martin@kaiser.cx>
Thu, 7 May 2026 08:22:12 +0000 (10:22 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 13 May 2026 03:55:06 +0000 (11:55 +0800)
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>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260507082238.889656-1-martin@kaiser.cx
drivers/net/wireless/realtek/rtw88/tx.c

index 3106edb84fb4773dd44ea2e49af7ae2e67c2a98f..bea78971141e72aabbac95345df028e29b33574b 100644 (file)
@@ -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;
+       unsigned long i;
        int ret;
-       int i;
 
        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;