move queue spinlock/list init to common code

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2015-12-06 22:59:17 +01:00
parent 85e4dbfa00
commit 52038d1690
2 changed files with 3 additions and 7 deletions
+3
View File
@@ -21,6 +21,9 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q)
int size;
int i;
spin_lock_init(&q->lock);
INIT_LIST_HEAD(&q->swq);
size = q->ndesc * sizeof(struct mt76_desc);
q->desc = dmam_alloc_coherent(dev->dev, size, &q->desc_dma, GFP_KERNEL);
if (!q->desc)
-7
View File
@@ -441,13 +441,6 @@ int mt76x2_dma_init(struct mt76x2_dev *dev)
init_waitqueue_head(&dev->mcu.wait);
skb_queue_head_init(&dev->mcu.res_q);
spin_lock_init(&dev->q_rx.lock);
spin_lock_init(&dev->mcu.q_rx.lock);
for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) {
spin_lock_init(&dev->q_tx[i].lock);
INIT_LIST_HEAD(&dev->q_tx[i].swq);
}
init_dummy_netdev(&dev->napi_dev);
netif_napi_add(&dev->napi_dev, &dev->napi, mt76x2_dma_rx_poll, 64);