提交 6512e1f8 编写于 作者: L Lorenzo Bianconi 提交者: Zheng Zengkai

mt76: mt7915: use proper aid value in mt7915_mcu_wtbl_generic_tlv in sta mode

stable inclusion
from stable-v5.10.110
commit 253cc4aafc219692749edc581efbd9d218d7d990
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=253cc4aafc219692749edc581efbd9d218d7d990

--------------------------------

[ Upstream commit a56b1b0f ]

mac80211 provides aid in vif->bss_conf.aid for sta mode and not in
sta->aid. Fix mt7915_mcu_wtbl_generic_tlv routine using proper value for
aid in sta mode.

Fixes: e57b7901 ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 cfbcfea0
...@@ -1259,8 +1259,11 @@ mt7915_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, ...@@ -1259,8 +1259,11 @@ mt7915_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
generic = (struct wtbl_generic *)tlv; generic = (struct wtbl_generic *)tlv;
if (sta) { 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); memcpy(generic->peer_addr, sta->addr, ETH_ALEN);
generic->partial_aid = cpu_to_le16(sta->aid);
generic->muar_idx = mvif->omac_idx; generic->muar_idx = mvif->omac_idx;
generic->qos = sta->wme; generic->qos = sta->wme;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册