Skip to content

Commit

Permalink
mt76: mt76u: rely on mt7622 queue scheme for mt7663u
Browse files Browse the repository at this point in the history
Rely on the mt7622 endpoint definitions for mt7663u

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Lorenzo Bianconi authored and Felix Fietkau committed May 12, 2020
1 parent d506017 commit 3a18805
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/net/wireless/mediatek/mt76/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,19 @@ 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;
if (mt76_chip(dev) == 0x7663) {
static const u8 wmm_queue_map[] = {
[IEEE80211_AC_VO] = 0,
[IEEE80211_AC_VI] = 1,
[IEEE80211_AC_BE] = 2,
[IEEE80211_AC_BK] = 4,
};

if (WARN_ON(ac >= ARRAY_SIZE(wmm_queue_map)))
return 2; /* BE */

return wmm_queue_map[ac];
}

return mt76_ac_to_hwq(ac);
}
Expand Down

0 comments on commit 3a18805

Please sign in to comment.