Skip to content

Commit e3d63ba

Browse files
Ming Yen Hsiehgregkh
authored andcommitted
wifi: mt76: mt7925: skip EHT MLD TLV on non-MLD and pass conn_state for sta_cmd
commit dd6e89c upstream. Return early in mt7925_mcu_sta_eht_mld_tlv() for non-MLD vifs to avoid bogus MLD TLVs, and pass the proper connection state to sta_basic TLV. Cc: stable@vger.kernel.org Fixes: cb1353e ("wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd") Reported-by: Tal Inbar <inbartdev@gmail.com> Tested-by: Tal Inbar <inbartdev@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250818030201.997940-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c754394 commit e3d63ba

File tree

1 file changed

+8
-4
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7925

1 file changed

+8
-4
lines changed

drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,13 +1834,13 @@ mt7925_mcu_sta_eht_mld_tlv(struct sk_buff *skb,
18341834
struct tlv *tlv;
18351835
u16 eml_cap;
18361836

1837+
if (!ieee80211_vif_is_mld(vif))
1838+
return;
1839+
18371840
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_EHT_MLD, sizeof(*eht_mld));
18381841
eht_mld = (struct sta_rec_eht_mld *)tlv;
18391842
eht_mld->mld_type = 0xff;
18401843

1841-
if (!ieee80211_vif_is_mld(vif))
1842-
return;
1843-
18441844
ext_capa = cfg80211_get_iftype_ext_capa(wiphy,
18451845
ieee80211_vif_type_p2p(vif));
18461846
if (!ext_capa)
@@ -1912,6 +1912,7 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
19121912
struct mt76_dev *dev = phy->dev;
19131913
struct mt792x_bss_conf *mconf;
19141914
struct sk_buff *skb;
1915+
int conn_state;
19151916

19161917
mconf = mt792x_vif_to_link(mvif, info->wcid->link_id);
19171918

@@ -1920,10 +1921,13 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
19201921
if (IS_ERR(skb))
19211922
return PTR_ERR(skb);
19221923

1924+
conn_state = info->enable ? CONN_STATE_PORT_SECURE :
1925+
CONN_STATE_DISCONNECT;
1926+
19231927
if (info->enable && info->link_sta) {
19241928
mt76_connac_mcu_sta_basic_tlv(dev, skb, info->link_conf,
19251929
info->link_sta,
1926-
info->enable, info->newly);
1930+
conn_state, info->newly);
19271931
mt7925_mcu_sta_phy_tlv(skb, info->vif, info->link_sta);
19281932
mt7925_mcu_sta_ht_tlv(skb, info->link_sta);
19291933
mt7925_mcu_sta_vht_tlv(skb, info->link_sta);

0 commit comments

Comments
 (0)