mt76: mt7615: set spatial extension index
authorFelix Fietkau <nbd@nbd.name>
Mon, 27 Apr 2020 17:45:02 +0000 (19:45 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 12 May 2020 17:52:33 +0000 (19:52 +0200)
The vendor driver sets this in firmware rate control (which we don't use)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c

index e7a76032caff7fc572c99a38715104b473900a15..5c09787b0d761443261a38caebbcacd79bcbf14a 100644 (file)
@@ -639,7 +639,8 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
                txwi[3] |= cpu_to_le32(MT_TXD3_NO_ACK);
 
        txwi[7] = FIELD_PREP(MT_TXD7_TYPE, fc_type) |
-                 FIELD_PREP(MT_TXD7_SUB_TYPE, fc_stype);
+                 FIELD_PREP(MT_TXD7_SUB_TYPE, fc_stype) |
+                 FIELD_PREP(MT_TXD7_SPE_IDX, 0x18);
        if (is_usb)
                txwi[8] = FIELD_PREP(MT_TXD8_L_TYPE, fc_type) |
                          FIELD_PREP(MT_TXD8_L_SUB_TYPE, fc_stype);
index 5fd4a4ab51204f107667f6126e72668580320470..cbad854d7497335b9a2a24e37dc59440b26a2712 100644 (file)
@@ -887,6 +887,7 @@ mt7615_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
        struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
        struct wtbl_generic *generic;
        struct wtbl_rx *rx;
+       struct wtbl_spe *spe;
        struct tlv *tlv;
 
        tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_GENERIC, sizeof(*generic),
@@ -914,6 +915,11 @@ mt7615_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
        rx->rca1 = sta ? vif->type != NL80211_IFTYPE_AP : 1;
        rx->rca2 = 1;
        rx->rv = 1;
+
+       tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_SPE, sizeof(*spe),
+                                       wtbl_tlv, sta_wtbl);
+       spe = (struct wtbl_spe *)tlv;
+       spe->spe_idx = 24;
 }
 
 static void