wifi: rtl8xxxu: Select correct queue for beacon frames
authorMartin Kaistra <martin.kaistra@linutronix.de>
Fri, 28 Apr 2023 15:08:17 +0000 (17:08 +0200)
committerKalle Valo <kvalo@kernel.org>
Fri, 5 May 2023 07:30:11 +0000 (10:30 +0300)
Use the special beacon queue for beacon frames instead of the management
frame queue. They will be put in a special area called reserved page and
send out periodically when in AP mode.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230428150833.218605-3-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index b8fcf911c072efad37e05f5be097828f5ce01653..9dc6f3ec7a305876cd00c336ac123fa361058219 100644 (file)
@@ -5010,7 +5010,9 @@ static u32 rtl8xxxu_queue_select(struct ieee80211_hdr *hdr, struct sk_buff *skb)
 {
        u32 queue;
 
-       if (ieee80211_is_mgmt(hdr->frame_control))
+       if (unlikely(ieee80211_is_beacon(hdr->frame_control)))
+               queue = TXDESC_QUEUE_BEACON;
+       else if (ieee80211_is_mgmt(hdr->frame_control))
                queue = TXDESC_QUEUE_MGNT;
        else
                queue = rtl8xxxu_80211_to_rtl_queue(skb_get_queue_mapping(skb));