mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: always enable RRO queues for non-MT7992 chipset
MT7990 NPU binary requires to initialize NPU desc_base after configuring ring_size. This is a preliminary patch to enable NPU offload for MT7996 (Eagle) chipset. Tested-by: Kang Yang <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
86a0bf3441
commit
5c67ef5088
@@ -6,6 +6,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include "mt76.h"
|
||||
#include "dma.h"
|
||||
#include "mt76_connac.h"
|
||||
|
||||
static struct mt76_txwi_cache *
|
||||
mt76_alloc_txwi(struct mt76_dev *dev)
|
||||
@@ -188,16 +189,18 @@ mt76_dma_queue_magic_cnt_init(struct mt76_dev *dev, struct mt76_queue *q)
|
||||
static void
|
||||
mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q)
|
||||
{
|
||||
Q_WRITE(q, desc_base, q->desc_dma);
|
||||
if ((q->flags & MT_QFLAG_WED_RRO_EN) && !mt76_npu_device_active(dev))
|
||||
if ((q->flags & MT_QFLAG_WED_RRO_EN) &&
|
||||
(!is_mt7992(dev) || !mt76_npu_device_active(dev)))
|
||||
Q_WRITE(q, ring_size, MT_DMA_RRO_EN | q->ndesc);
|
||||
else
|
||||
Q_WRITE(q, ring_size, q->ndesc);
|
||||
|
||||
if (mt76_queue_is_npu_tx(q)) {
|
||||
writel(q->desc_dma, &q->regs->desc_base);
|
||||
writel(q->ndesc, &q->regs->ring_size);
|
||||
writel(q->desc_dma, &q->regs->desc_base);
|
||||
}
|
||||
|
||||
Q_WRITE(q, desc_base, q->desc_dma);
|
||||
q->head = Q_READ(q, dma_idx);
|
||||
q->tail = q->head;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user