diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-11-11 14:47:23 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-04 14:31:14 +0100 |
commit | b671da33d1c5973f90f098ff66a91953691df582 (patch) | |
tree | a7fdfec1ca73586d5c1ab8f423cfe2b04633e435 /drivers/net/wireless/mediatek/mt76/mt7603 | |
parent | 3d51a3e993803f1180f1a31ff763b040667ba7c5 (diff) | |
download | lwn-b671da33d1c5973f90f098ff66a91953691df582.tar.gz lwn-b671da33d1c5973f90f098ff66a91953691df582.zip |
mt76: move mt76_init_tx_queue in common code
Move mt76_init_tx_queue in mac80211.c since it is shared by all
drivers.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c index d60d00f6f6a0..05a5801646d7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c @@ -7,19 +7,13 @@ static int mt7603_init_tx_queue(struct mt7603_dev *dev, int qid, int idx, int n_desc) { - struct mt76_queue *hwq; int err; - hwq = devm_kzalloc(dev->mt76.dev, sizeof(*hwq), GFP_KERNEL); - if (!hwq) - return -ENOMEM; - - err = mt76_queue_alloc(dev, hwq, idx, n_desc, 0, MT_TX_RING_BASE); + err = mt76_init_tx_queue(&dev->mt76, qid, idx, n_desc, + MT_TX_RING_BASE); if (err < 0) return err; - dev->mt76.q_tx[qid] = hwq; - mt7603_irq_enable(dev, MT_INT_TX_DONE(idx)); return 0; |