mt76: mt7915: use proper aid value in mt7915_mcu_sta_basic_tlv
[ Upstream commit abdb8bc94be4cf68aa71c9a8ee0bad9b3e6f52d3 ]
Similar to mt7915_mcu_wtbl_generic_tlv, rely on vif->bss_conf.aid for
aid in sta mode and not on sta->aid.
Fixes: e57b790146
("mt76: add mac80211 driver for MT7915 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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
253cc4aafc
commit
232c1cc986
@@ -1317,12 +1317,15 @@ mt7915_mcu_sta_basic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
|||||||
case NL80211_IFTYPE_MESH_POINT:
|
case NL80211_IFTYPE_MESH_POINT:
|
||||||
case NL80211_IFTYPE_AP:
|
case NL80211_IFTYPE_AP:
|
||||||
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_STA);
|
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_STA);
|
||||||
|
basic->aid = cpu_to_le16(sta->aid);
|
||||||
break;
|
break;
|
||||||
case NL80211_IFTYPE_STATION:
|
case NL80211_IFTYPE_STATION:
|
||||||
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_AP);
|
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_AP);
|
||||||
|
basic->aid = cpu_to_le16(vif->bss_conf.aid);
|
||||||
break;
|
break;
|
||||||
case NL80211_IFTYPE_ADHOC:
|
case NL80211_IFTYPE_ADHOC:
|
||||||
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
||||||
|
basic->aid = cpu_to_le16(sta->aid);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
@@ -1330,7 +1333,6 @@ mt7915_mcu_sta_basic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(basic->peer_addr, sta->addr, ETH_ALEN);
|
memcpy(basic->peer_addr, sta->addr, ETH_ALEN);
|
||||||
basic->aid = cpu_to_le16(sta->aid);
|
|
||||||
basic->qos = sta->wme;
|
basic->qos = sta->wme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user