mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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 <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
b9a50da503
commit
c79d18723d
+2
-8
@@ -105,19 +105,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;
|
||||
|
||||
Reference in New Issue
Block a user