mt7603: fix txd q_idx field value

Use 802.11e ACI values - the vendor driver does the same

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-01-16 19:56:18 +01:00
parent 9d11596ec6
commit 4bcb2f9fe2
+7 -1
View File
@@ -829,6 +829,12 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
u8 vif_idx = 0;
u32 val;
u8 bw;
int q_idx;
/* Use 802.11e ACI (BE/BK are swapped relative to hw queue index) */
q_idx = dev->mt76.q_tx[skb_get_queue_mapping(skb)].hw_idx;
if (q_idx < 2)
q_idx ^= 1;
if (vif) {
mvif = (struct mt7603_vif *)vif->drv_priv;
@@ -852,7 +858,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
frame_subtype = (fc & IEEE80211_FCTL_STYPE) >> 4;
val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + MT_TXD_SIZE) |
FIELD_PREP(MT_TXD0_Q_IDX, q->hw_idx);
FIELD_PREP(MT_TXD0_Q_IDX, q_idx);
txwi[0] = cpu_to_le32(val);
val = MT_TXD1_LONG_FORMAT |