diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-08-23 13:43:19 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 19:10:16 +0300 |
commit | 16254fc51f7df622bd870f70cf6ae84d2d4c08a3 (patch) | |
tree | 8a667d3f3adb97cd1b01800420b8f76db7975745 /drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c | |
parent | 95f61e17eff3d9e205ec613f85e054c5e0985f91 (diff) | |
download | linux-16254fc51f7df622bd870f70cf6ae84d2d4c08a3.tar.xz |
mt76: sdio: fix use of q->head and q->tail
Their use is reversed compared to DMA. The order for DMA makes more sense,
so let's use that
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c b/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c index 79e02157da4d..8863c3a230d1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c @@ -97,7 +97,7 @@ static int mt7663s_rx_run_queue(struct mt76_dev *dev, enum mt76_rxq_id qid, } for (i = 0; i < intr->rx.num[qid]; i++) { - int index = (q->tail + i) % q->ndesc; + int index = (q->head + i) % q->ndesc; struct mt76_queue_entry *e = &q->entry[index]; len = intr->rx.len[qid][i]; @@ -112,7 +112,7 @@ static int mt7663s_rx_run_queue(struct mt76_dev *dev, enum mt76_rxq_id qid, __free_pages(page, order); spin_lock_bh(&q->lock); - q->tail = (q->tail + i) % q->ndesc; + q->head = (q->head + i) % q->ndesc; q->queued += i; spin_unlock_bh(&q->lock); @@ -166,7 +166,7 @@ static int mt7663s_tx_run_queue(struct mt76_dev *dev, struct mt76_queue *q) struct mt76_sdio *sdio = &dev->sdio; int nframes = 0; - while (q->first != q->tail) { + while (q->first != q->head) { struct mt76_queue_entry *e = &q->entry[q->first]; int err, len = e->skb->len; |