FAILED: patch "[PATCH] wifi: mt76: mt7925: adjust rm BSS flow to prevent next" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 0ebb60da8416c1d8e84c7e511a5687ce76a9467a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025041743-unwoven-sizzle-ba8b@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0ebb60da8416c1d8e84c7e511a5687ce76a9467a Mon Sep 17 00:00:00 2001
From: Ming Yen Hsieh <[email protected]>
Date: Tue, 4 Mar 2025 16:08:49 -0800
Subject: [PATCH] wifi: mt76: mt7925: adjust rm BSS flow to prevent next
connection failure
Removing BSS without removing STAREC first will cause firmware abnormal and next connection fail.
drivers/net/wireless/mediatek/mt76/mt7925/main.c +33 -33
@@ -1155,7 +1155,12 @@ static void mt7925_mac_link_sta_remove(struct mt76_dev *mdev,struct mt792x_bss_conf *mconf; mconf =mt792x_link_conf_to_mconf (link_conf); -mt792x_mac_link_bss_remove (dev, mconf, mlink); + +if (ieee80211_vif_is_mld (vif)) +mt792x_mac_link_bss_remove (dev, mconf, mlink); +else +mt7925_mcu_add_bss_info (&dev->phy, mconf->mt76.ctx, link_conf, + link_sta, false); }spin_lock_bh (&mdev->sta_poll_lock);
@@ -1175,6 +1180,31 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,struct mt76_wcid *wcid;unsigned int link_id; +/* clean up bss before starec */ +for_each_set_bit (link_id, &old_links,IEEE80211_MLD_MAX_NUM_LINKS ) { +struct ieee80211_link_sta *link_sta; +struct ieee80211_bss_conf *link_conf; +struct mt792x_bss_conf *mconf; +struct mt792x_link_sta *mlink; + + link_sta =mt792x_sta_to_link_sta (vif, sta, link_id); +if (!link_sta) +continue ; + + mlink =mt792x_sta_to_link (msta, link_id); +if (!mlink) +continue ; + + link_conf =mt792x_vif_to_bss_conf (vif, link_id); +if (!link_conf) +continue ; + + mconf =mt792x_link_conf_to_mconf (link_conf); + +mt7925_mcu_add_bss_info (&dev->phy, mconf->mt76.ctx, link_conf, + link_sta, false); + } +for_each_set_bit (link_id, &old_links,IEEE80211_MLD_MAX_NUM_LINKS ) {struct ieee80211_link_sta *link_sta;struct mt792x_link_sta *mlink;
@@ -1212,44 +1242,14 @@ 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_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; rem =ieee80211_vif_is_mld (vif) ? msta->valid_links :BIT (0 );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 (ieee80211_vif_is_mld (vif)) +mt7925_mcu_del_dev (mdev, vif);if (vif->type ==NL80211_IFTYPE_STATION ) {struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +56 -0
62 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7925/mcu.h +2 -0
@@ -627,6 +627,8 @@ int mt7925_mcu_sched_scan_req(struct mt76_phy *phy,int mt7925_mcu_sched_scan_enable (struct mt76_phy *phy,struct ieee80211_vif *vif,bool enable); +void mt7925_mcu_del_dev (struct mt76_dev *mdev, +struct ieee80211_vif *vif); int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, struct ieee80211_chanctx_conf *ctx, struct ieee80211_bss_conf *link_conf,
Sasha Levin
maintainerPATCH 1/1 wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure
From: Ming Yen Hsieh <[email protected]>
[ Upstream commit 0ebb60da8416c1d8e84c7e511a5687ce76a9467a ]
Removing BSS without removing STAREC first will cause firmware abnormal and next connection fail.
--- .../net/wireless/mediatek/mt76/mt7925/main.c | 66 +++++++++---------- .../net/wireless/mediatek/mt76/mt7925/mcu.c | 56 ++++++++++++++++ .../net/wireless/mediatek/mt76/mt7925/mcu.h | 2 + 3 files changed, 91 insertions(+), 33 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/main.c +33 -33
@@ -1155,7 +1155,12 @@ static void mt7925_mac_link_sta_remove(struct mt76_dev *mdev,struct mt792x_bss_conf *mconf; mconf =mt792x_link_conf_to_mconf (link_conf); -mt792x_mac_link_bss_remove (dev, mconf, mlink); + +if (ieee80211_vif_is_mld (vif)) +mt792x_mac_link_bss_remove (dev, mconf, mlink); +else +mt7925_mcu_add_bss_info (&dev->phy, mconf->mt76.ctx, link_conf, + link_sta, false); }spin_lock_bh (&mdev->sta_poll_lock);
@@ -1175,6 +1180,31 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,struct mt76_wcid *wcid;unsigned int link_id; +/* clean up bss before starec */ +for_each_set_bit (link_id, &old_links,IEEE80211_MLD_MAX_NUM_LINKS ) { +struct ieee80211_link_sta *link_sta; +struct ieee80211_bss_conf *link_conf; +struct mt792x_bss_conf *mconf; +struct mt792x_link_sta *mlink; + + link_sta =mt792x_sta_to_link_sta (vif, sta, link_id); +if (!link_sta) +continue ; + + mlink =mt792x_sta_to_link (msta, link_id); +if (!mlink) +continue ; + + link_conf =mt792x_vif_to_bss_conf (vif, link_id); +if (!link_conf) +continue ; + + mconf =mt792x_link_conf_to_mconf (link_conf); + +mt7925_mcu_add_bss_info (&dev->phy, mconf->mt76.ctx, link_conf, + link_sta, false); + } +for_each_set_bit (link_id, &old_links,IEEE80211_MLD_MAX_NUM_LINKS ) {struct ieee80211_link_sta *link_sta;struct mt792x_link_sta *mlink;
@@ -1213,44 +1243,14 @@ 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_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; rem =ieee80211_vif_is_mld (vif) ? msta->valid_links :BIT (0 );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 (ieee80211_vif_is_mld (vif)) +mt7925_mcu_del_dev (mdev, vif);if (vif->type ==NL80211_IFTYPE_STATION ) {struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +56 -0
62 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7925/mcu.h +2 -0
@@ -627,6 +627,8 @@ int mt7925_mcu_sched_scan_req(struct mt76_phy *phy,int mt7925_mcu_sched_scan_enable (struct mt76_phy *phy,struct ieee80211_vif *vif,bool enable); +void mt7925_mcu_del_dev (struct mt76_dev *mdev, +struct ieee80211_vif *vif); int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, struct ieee80211_chanctx_conf *ctx, struct ieee80211_bss_conf *link_conf,
Signature · 1 line
2.39.5