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/mt76x02_mmio.c | |
parent | 3d51a3e993803f1180f1a31ff763b040667ba7c5 (diff) |
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/mt76x02_mmio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c index 67911c021633..82f65fa1a39d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c @@ -106,19 +106,13 @@ EXPORT_SYMBOL_GPL(mt76x02e_init_beacon_config); static int mt76x02_init_tx_queue(struct mt76x02_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; - mt76x02_irq_enable(dev, MT_INT_TX_DONE(idx)); return 0; |