Commit 16d6dac0 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt76u: take into account different queue mapping for 7663

7663u devices rely on a different endpoint mapping. Take it into account
in mt76u_alloc_tx routine
Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1e816c65
...@@ -964,6 +964,14 @@ static void mt76u_tx_kick(struct mt76_dev *dev, struct mt76_queue *q) ...@@ -964,6 +964,14 @@ static void mt76u_tx_kick(struct mt76_dev *dev, struct mt76_queue *q)
} }
} }
static u8 mt76u_ac_to_hwq(struct mt76_dev *dev, u8 ac)
{
if (mt76_chip(dev) == 0x7663)
return ac ^ 0x3;
return mt76_ac_to_hwq(ac);
}
static int mt76u_alloc_tx(struct mt76_dev *dev) static int mt76u_alloc_tx(struct mt76_dev *dev)
{ {
struct mt76_queue *q; struct mt76_queue *q;
...@@ -982,7 +990,7 @@ static int mt76u_alloc_tx(struct mt76_dev *dev) ...@@ -982,7 +990,7 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
return -ENOMEM; return -ENOMEM;
spin_lock_init(&q->lock); spin_lock_init(&q->lock);
q->hw_idx = mt76_ac_to_hwq(i); q->hw_idx = mt76u_ac_to_hwq(dev, i);
dev->q_tx[i].q = q; dev->q_tx[i].q = q;
q->entry = devm_kcalloc(dev->dev, q->entry = devm_kcalloc(dev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment