mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt792x: add tx_done ring to common DMA queue allocation
Add a tx_done field to mt792x_dma_layout and extend mt792x_dma_alloc_queues() to allocate the MT_RXQ_MCU_WA queue when tx_done.ring_base is configured. This is a preparation patch before enabling MT7928 PCIe support. Signed-off-by: Emery Hsin <[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
7c195dd525
commit
60a17dfaa3
@@ -217,6 +217,7 @@ struct mt792x_dma_layout {
|
||||
struct mt792x_dma_ring tx_data0;
|
||||
struct mt792x_dma_ring tx_mcu;
|
||||
struct mt792x_dma_ring tx_fwdl;
|
||||
struct mt792x_dma_ring tx_done;
|
||||
struct mt792x_dma_ring rx_data;
|
||||
struct mt792x_dma_ring rx_mcu;
|
||||
};
|
||||
|
||||
@@ -122,6 +122,17 @@ int mt792x_dma_alloc_queues(struct mt792x_dev *dev,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* tx done */
|
||||
if (layout->tx_done.ring_base) {
|
||||
ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA],
|
||||
layout->tx_done.qid,
|
||||
layout->tx_done.n_desc,
|
||||
MT_RX_BUF_SIZE,
|
||||
layout->tx_done.ring_base);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* rx event */
|
||||
ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU],
|
||||
layout->rx_mcu.qid,
|
||||
|
||||
Reference in New Issue
Block a user