]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mt76: mt7615: fix aid configuration in mt7615_mcu_wtbl_generic_tlv
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 21 Apr 2020 14:31:40 +0000 (16:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:21 +0000 (09:32 +0200)
[ Upstream commit fdf433121f82766ff508a6f06665d2aca3e258d5 ]

If the vif is running in station mode the aid will be passed by mac80211
using bss_conf.aid. Fix aid configuration in mt7615_mcu_wtbl_generic_tlv

Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c

index 610cfa918c7b7195db7b2516406091730f41dc3e..a19fb0cb7794e49069cd4f0892d1e70446831061 100644 (file)
@@ -823,8 +823,11 @@ mt7615_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
        generic = (struct wtbl_generic *)tlv;
 
        if (sta) {
+               if (vif->type == NL80211_IFTYPE_STATION)
+                       generic->partial_aid = cpu_to_le16(vif->bss_conf.aid);
+               else
+                       generic->partial_aid = cpu_to_le16(sta->aid);
                memcpy(generic->peer_addr, sta->addr, ETH_ALEN);
-               generic->partial_aid = cpu_to_le16(sta->aid);
                generic->muar_idx = mvif->omac_idx;
                generic->qos = sta->wme;
        } else {