diff options
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c index b3ae0aaea62a..4606b539190f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c @@ -8,15 +8,12 @@ static int mt7603_init_tx_queue(struct mt7603_dev *dev, struct mt76_queue *q, int idx, int n_desc) { - int ret; - - q->hw_idx = idx; - q->regs = dev->mt76.mmio.regs + MT_TX_RING_BASE + idx * MT_RING_SIZE; - q->ndesc = n_desc; + int err; - ret = mt76_queue_alloc(dev, q); - if (ret) - return ret; + err = mt76_queue_alloc(dev, q, idx, n_desc, 0, + MT_TX_RING_BASE); + if (err < 0) + return err; mt7603_irq_enable(dev, MT_INT_TX_DONE(idx)); @@ -119,15 +116,12 @@ static int mt7603_init_rx_queue(struct mt7603_dev *dev, struct mt76_queue *q, int idx, int n_desc, int bufsize) { - int ret; - - q->regs = dev->mt76.mmio.regs + MT_RX_RING_BASE + idx * MT_RING_SIZE; - q->ndesc = n_desc; - q->buf_size = bufsize; + int err; - ret = mt76_queue_alloc(dev, q); - if (ret) - return ret; + err = mt76_queue_alloc(dev, q, idx, n_desc, bufsize, + MT_RX_RING_BASE); + if (err < 0) + return err; mt7603_irq_enable(dev, MT_INT_RX_DONE(idx)); |