mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-22 00:42:01 +02:00
wifi: mt76: mt7925: Cleanup MLO settings post-disconnection
Clean up MLO settings after disconnection.
Fixes: 86c051f2c4
("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-16-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
eb2a9a12c6
commit
816161051a
|
@ -1149,8 +1149,7 @@ static void mt7925_mac_link_sta_remove(struct mt76_dev *mdev,
|
||||||
struct mt792x_bss_conf *mconf;
|
struct mt792x_bss_conf *mconf;
|
||||||
|
|
||||||
mconf = mt792x_link_conf_to_mconf(link_conf);
|
mconf = mt792x_link_conf_to_mconf(link_conf);
|
||||||
mt7925_mcu_add_bss_info(&dev->phy, mconf->mt76.ctx, link_conf,
|
mt792x_mac_link_bss_remove(dev, mconf, mlink);
|
||||||
link_sta, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_bh(&mdev->sta_poll_lock);
|
spin_lock_bh(&mdev->sta_poll_lock);
|
||||||
|
@ -1208,12 +1207,46 @@ void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||||
{
|
{
|
||||||
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
|
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
|
||||||
struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
|
struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
|
||||||
|
struct {
|
||||||
|
struct {
|
||||||
|
u8 omac_idx;
|
||||||
|
u8 band_idx;
|
||||||
|
__le16 pad;
|
||||||
|
} __packed hdr;
|
||||||
|
struct req_tlv {
|
||||||
|
__le16 tag;
|
||||||
|
__le16 len;
|
||||||
|
u8 active;
|
||||||
|
u8 link_idx; /* hw link idx */
|
||||||
|
u8 omac_addr[ETH_ALEN];
|
||||||
|
} __packed tlv;
|
||||||
|
} dev_req = {
|
||||||
|
.hdr = {
|
||||||
|
.omac_idx = 0,
|
||||||
|
.band_idx = 0,
|
||||||
|
},
|
||||||
|
.tlv = {
|
||||||
|
.tag = cpu_to_le16(DEV_INFO_ACTIVE),
|
||||||
|
.len = cpu_to_le16(sizeof(struct req_tlv)),
|
||||||
|
.active = true,
|
||||||
|
},
|
||||||
|
};
|
||||||
unsigned long rem;
|
unsigned long rem;
|
||||||
|
|
||||||
rem = ieee80211_vif_is_mld(vif) ? msta->valid_links : BIT(0);
|
rem = ieee80211_vif_is_mld(vif) ? msta->valid_links : BIT(0);
|
||||||
|
|
||||||
mt7925_mac_sta_remove_links(dev, vif, sta, rem);
|
mt7925_mac_sta_remove_links(dev, vif, sta, rem);
|
||||||
|
|
||||||
|
if (ieee80211_vif_is_mld(vif)) {
|
||||||
|
mt7925_mcu_set_dbdc(&dev->mphy, false);
|
||||||
|
|
||||||
|
/* recovery omac address for the legacy interface */
|
||||||
|
memcpy(dev_req.tlv.omac_addr, vif->addr, ETH_ALEN);
|
||||||
|
mt76_mcu_send_msg(mdev, MCU_UNI_CMD(DEV_INFO_UPDATE),
|
||||||
|
&dev_req, sizeof(dev_req), true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (vif->type == NL80211_IFTYPE_STATION) {
|
if (vif->type == NL80211_IFTYPE_STATION) {
|
||||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||||
|
|
||||||
|
|
|
@ -2660,7 +2660,7 @@ int mt7925_mcu_add_bss_info(struct mt792x_phy *phy,
|
||||||
MCU_UNI_CMD(BSS_INFO_UPDATE), true);
|
MCU_UNI_CMD(BSS_INFO_UPDATE), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mt7925_mcu_set_dbdc(struct mt76_phy *phy)
|
int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable)
|
||||||
{
|
{
|
||||||
struct mt76_dev *mdev = phy->dev;
|
struct mt76_dev *mdev = phy->dev;
|
||||||
|
|
||||||
|
@ -2680,7 +2680,7 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy)
|
||||||
tlv = mt76_connac_mcu_add_tlv(skb, UNI_MBMC_SETTING, sizeof(*conf));
|
tlv = mt76_connac_mcu_add_tlv(skb, UNI_MBMC_SETTING, sizeof(*conf));
|
||||||
conf = (struct mbmc_conf_tlv *)tlv;
|
conf = (struct mbmc_conf_tlv *)tlv;
|
||||||
|
|
||||||
conf->mbmc_en = 1;
|
conf->mbmc_en = enable;
|
||||||
conf->band = 0; /* unused */
|
conf->band = 0; /* unused */
|
||||||
|
|
||||||
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SET_DBDC_PARMS),
|
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SET_DBDC_PARMS),
|
||||||
|
|
|
@ -616,7 +616,7 @@ mt7925_mcu_get_cipher(int cipher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int mt7925_mcu_set_dbdc(struct mt76_phy *phy);
|
int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable);
|
||||||
int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||||
struct ieee80211_scan_request *scan_req);
|
struct ieee80211_scan_request *scan_req);
|
||||||
int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user