mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7921: fix sta_state incorrect implementation
When .sta_state is implemented, mac80211 assumes that the station entry is
usable after the NOTEXIST->NONE transition.
So we should create the sta entry as early as possible in order that
mac80211 pass assoc/auth frames to mt76 with the newly created sta entry,
and add .sta_assoc to mt76 core to refresh the sta entry again when sta is
being associated.
Fixes: 8aa5a9b7361c ("mt76: mt7921: enable deep sleep at runtime")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+5
-3
@@ -1028,9 +1028,10 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
if (IS_ERR(sskb))
|
||||
return PTR_ERR(sskb);
|
||||
|
||||
mt76_connac_mcu_sta_basic_tlv(sskb, vif, sta, enable);
|
||||
mt76_connac_mcu_sta_basic_tlv(sskb, vif, sta, enable, true);
|
||||
if (enable && sta)
|
||||
mt76_connac_mcu_sta_tlv(phy->mt76, sskb, sta, vif, 0);
|
||||
mt76_connac_mcu_sta_tlv(phy->mt76, sskb, sta, vif, 0,
|
||||
MT76_STA_INFO_STATE_ASSOC);
|
||||
|
||||
wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid,
|
||||
WTBL_RESET_AND_SET, NULL,
|
||||
@@ -1157,11 +1158,12 @@ __mt7615_mcu_add_sta(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
.vif = vif,
|
||||
.offload_fw = offload_fw,
|
||||
.enable = enable,
|
||||
.newly = true,
|
||||
.cmd = cmd,
|
||||
};
|
||||
|
||||
info.wcid = sta ? (struct mt76_wcid *)sta->drv_priv : &mvif->sta.wcid;
|
||||
return mt76_connac_mcu_add_sta_cmd(phy, &info);
|
||||
return mt76_connac_mcu_sta_cmd(phy, &info);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user