From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH mt76-next 17/20] wifi: mt76: mt7925: remove mt7925_mcu_del_dev()
Date: Thu, 19 Nov 2026 13:43:49 +0100 [thread overview]
Message-ID: <20261119124352.1842164-17-nbd@nbd.name> (raw)
In-Reply-To: <20261119124352.1842164-1-nbd@nbd.name>
At the removal of a station of an MLD interface, mt7925_mcu_del_dev()
activates the BSS of the default link again, with the connection type
and the station and broadcast indexes at 0, and sets the interface
address on its omac. For the AP station of an MLO connection, the
firmware holds no BSS or DEV entry of any link at that point, and it
refuses the BSS update at each disconnection. For a TDLS peer and for a
client of an AP MLD, the command rewrites the BSS and the DEV entry of
the default link, which the interface still uses.
Remove mt7925_mcu_del_dev(). Since commit 8f9e5807671e ("wifi: mt76:
mt7925: restore the legacy BSS after MLO teardown"),
mt7925_change_vif_links() adds the legacy BSS with the interface
address when mac80211 removes the last link, after the AP station.
Fixes: 0ebb60da8416 ("wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
.../net/wireless/mediatek/mt76/mt7925/main.c | 6 +-
.../net/wireless/mediatek/mt76/mt7925/mcu.c | 56 -------------------
.../net/wireless/mediatek/mt76/mt7925/mcu.h | 2 -
3 files changed, 2 insertions(+), 62 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 0e26bfa75143..d7b359930b3c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1640,13 +1640,11 @@ void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
rcu_read_unlock();
}
- if (ieee80211_vif_is_mld(vif)) {
+ if (ieee80211_vif_is_mld(vif))
mt7925_mac_sta_remove_links(dev, vif, sta, msta->valid_links);
- mt7925_mcu_del_dev(mdev, vif);
- } else {
+ else
mt7925_mac_link_sta_remove(mdev, vif, &sta->deflink,
&msta->deflink);
- }
if (vif->type == NL80211_IFTYPE_STATION) {
mvif->wep_sta = NULL;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index cc7a020c14ab..2bf68476408b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -3210,62 +3210,6 @@ int mt7925_mcu_set_timing(struct mt792x_phy *phy,
MCU_UNI_CMD(BSS_INFO_UPDATE), true);
}
-void mt7925_mcu_del_dev(struct mt76_dev *mdev,
- struct ieee80211_vif *vif)
-{
- struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->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 = {
- .tlv = {
- .tag = cpu_to_le16(DEV_INFO_ACTIVE),
- .len = cpu_to_le16(sizeof(struct req_tlv)),
- .active = true,
- },
- };
- struct {
- struct {
- u8 bss_idx;
- u8 pad[3];
- } __packed hdr;
- struct mt76_connac_bss_basic_tlv basic;
- } basic_req = {
- .basic = {
- .tag = cpu_to_le16(UNI_BSS_INFO_BASIC),
- .len = cpu_to_le16(sizeof(struct mt76_connac_bss_basic_tlv)),
- .active = true,
- .conn_state = 1,
- },
- };
-
- dev_req.hdr.omac_idx = mvif->omac_idx;
- dev_req.hdr.band_idx = mvif->band_idx;
-
- basic_req.hdr.bss_idx = mvif->idx;
- basic_req.basic.omac_idx = mvif->omac_idx;
- basic_req.basic.band_idx = mvif->band_idx;
- basic_req.basic.link_idx = mvif->link_idx;
-
- mt76_mcu_send_msg(mdev, MCU_UNI_CMD(BSS_INFO_UPDATE),
- &basic_req, sizeof(basic_req), true);
-
- /* 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);
-}
-
int mt7925_mcu_add_bss_info_sta(struct mt792x_phy *phy,
struct ieee80211_chanctx_conf *ctx,
struct ieee80211_bss_conf *link_conf,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h
index 212c8caadd0c..fe40873e6107 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h
@@ -741,8 +741,6 @@ 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,
--
2.47.3
next prev parent reply other threads:[~2026-11-19 12:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 12:43 [PATCH mt76-next 01/20] wifi: mt76: mt7921: skip the ND offload update of a vif not in the driver Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 02/20] wifi: mt76: mt7925: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 03/20] wifi: mt76: take the remaining wcids off the phy tx_list at reset Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 04/20] wifi: mt76: take the remaining wcids off sta_poll_list " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 05/20] wifi: mt76: mt7915: take the remaining stations off sta_rc_list " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 06/20] wifi: mt76: mt7996: list only published links on sta_rc_list Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 07/20] wifi: mt76: mt7996: take the remaining links off sta_rc_list at reset Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 08/20] wifi: mt76: mt7915: take the TWT flows of a removed station off twt_list Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 09/20] wifi: mt76: mt7996: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 10/20] wifi: mt76: mt7915: drop the TWT agreements at a full reset Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 11/20] wifi: mt76: mt7996: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 12/20] wifi: mt76: mt7915: read twt_list under the mutex in twt_stats Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 13/20] wifi: mt76: mt7996: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 14/20] wifi: mt76: mt7915: publish the global wcid again after a full reset Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 15/20] wifi: mt76: mt7996: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 16/20] wifi: mt76: mt7925: keep the antenna mask across a firmware reload Felix Fietkau
2026-11-19 12:43 ` Felix Fietkau [this message]
2026-11-19 12:43 ` [PATCH mt76-next 18/20] wifi: mt76: mt7921: " Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 19/20] wifi: mt76: mt792x: flush frames that still wait for the TX worker Felix Fietkau
2026-11-19 12:43 ` [PATCH mt76-next 20/20] wifi: mt76: mt7925: send the deauth of an MLD station on its AC queue Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119124352.1842164-17-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).