]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: Differentiate between RRO data and RRO MSDU queues
authorRex Lu <rex.lu@mediatek.com>
Tue, 9 Sep 2025 09:45:11 +0000 (11:45 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 15 Sep 2025 07:47:40 +0000 (09:47 +0200)
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.

Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Rex Lu <rex.lu@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-3-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c
drivers/net/wireless/mediatek/mt76/mt76.h

index 18c2a2de59897d038392a00ed5fb5a0de188ac95..68b1dd1dbbe0e2b4850e02ee70253b5e248c69bf 100644 (file)
@@ -477,7 +477,7 @@ mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
        if (!q->queued)
                return NULL;
 
-       if (mt76_queue_is_wed_rro_data(q))
+       if (mt76_queue_is_wed_rro_data(q) || mt76_queue_is_wed_rro_msdu_pg(q))
                return NULL;
 
        if (!mt76_queue_is_wed_rro_ind(q)) {
index c2fe9a9315e289a9e21242c8694db79cbcca9c9c..0c54ae47923f8f18492b0605921358240b6bc6df 100644 (file)
@@ -1786,8 +1786,14 @@ static inline bool mt76_queue_is_wed_rro_ind(struct mt76_queue *q)
 static inline bool mt76_queue_is_wed_rro_data(struct mt76_queue *q)
 {
        return mt76_queue_is_wed_rro(q) &&
-              (FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_RRO_Q_DATA ||
-               FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_RRO_Q_MSDU_PG);
+              FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_RRO_Q_DATA;
+}
+
+static inline bool mt76_queue_is_wed_rro_msdu_pg(struct mt76_queue *q)
+{
+       return mt76_queue_is_wed_rro(q) &&
+              FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) ==
+              MT76_WED_RRO_Q_MSDU_PG;
 }
 
 static inline bool mt76_queue_is_wed_rx(struct mt76_queue *q)
@@ -1796,7 +1802,8 @@ static inline bool mt76_queue_is_wed_rx(struct mt76_queue *q)
                return false;
 
        return FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_Q_RX ||
-              mt76_queue_is_wed_rro_ind(q) || mt76_queue_is_wed_rro_data(q);
+              mt76_queue_is_wed_rro_ind(q) || mt76_queue_is_wed_rro_data(q) ||
+              mt76_queue_is_wed_rro_msdu_pg(q);
 
 }