mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Use proper link info in mt7996_mcu_add_group
Do not always use default link in mt7996_mcu_add_group routine. Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
51a1c0a086
commit
435e596914
+5
-11
@@ -2325,13 +2325,10 @@ error_unlock:
|
||||
}
|
||||
|
||||
static int
|
||||
mt7996_mcu_add_group(struct mt7996_dev *dev, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
mt7996_mcu_add_group(struct mt7996_dev *dev, struct mt7996_vif_link *link,
|
||||
struct mt76_wcid *wcid)
|
||||
{
|
||||
#define MT_STA_BSS_GROUP 1
|
||||
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
|
||||
struct mt7996_sta_link *msta_link;
|
||||
struct mt7996_sta *msta;
|
||||
struct {
|
||||
u8 __rsv1[4];
|
||||
|
||||
@@ -2346,13 +2343,10 @@ mt7996_mcu_add_group(struct mt7996_dev *dev, struct ieee80211_vif *vif,
|
||||
.tag = cpu_to_le16(UNI_VOW_DRR_CTRL),
|
||||
.len = cpu_to_le16(sizeof(req) - 4),
|
||||
.action = cpu_to_le32(MT_STA_BSS_GROUP),
|
||||
.val = cpu_to_le32(mvif->deflink.mt76.idx % 16),
|
||||
.val = cpu_to_le32(link->mt76.idx % 16),
|
||||
.wlan_idx = cpu_to_le16(wcid->idx),
|
||||
};
|
||||
|
||||
msta = sta ? (struct mt7996_sta *)sta->drv_priv : NULL;
|
||||
msta_link = msta ? &msta->deflink : &mvif->deflink.msta_link;
|
||||
req.wlan_idx = cpu_to_le16(msta_link->wcid.idx);
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_WM_UNI_CMD(VOW), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
@@ -2492,7 +2486,7 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev,
|
||||
}
|
||||
}
|
||||
|
||||
ret = mt7996_mcu_add_group(dev, link_conf->vif, sta);
|
||||
ret = mt7996_mcu_add_group(dev, link, wcid);
|
||||
if (ret) {
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user