]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature
authorLorenzo Bianconi <lorenzo@kernel.org>
Wed, 12 Mar 2025 11:13:52 +0000 (12:13 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Mar 2025 13:47:06 +0000 (14:47 +0100)
This is a preliminary patch to introduce MLO support for MT996 driver.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-8-015b3d6fd928@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/main.c
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h

index f7703e00712cd1a59484ceddfad5bd00b8814250..4abbe761b732f1ea7791ba1f86c2c87db1eea91d 100644 (file)
@@ -195,7 +195,8 @@ mt7996_set_hw_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
        if (cmd == SET_KEY && !sta && !mlink->mt76.cipher) {
                mlink->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher);
-               mt7996_mcu_add_bss_info(phy, vif, &vif->bss_conf, &mlink->mt76, true);
+               mt7996_mcu_add_bss_info(phy, vif, &vif->bss_conf, &mlink->mt76,
+                                       &mlink->msta_link, true);
        }
 
        if (cmd == SET_KEY) {
@@ -288,7 +289,7 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 
        mt7996_init_bitrate_mask(vif, link);
 
-       mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, true);
+       mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, msta_link, true);
        /* defer the first STA_REC of BMC entry to BSS_CHANGED_BSSID for STA
         * interface, since firmware only records BSSID when the entry is new
         */
@@ -314,7 +315,7 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 
        mt7996_mcu_add_sta(dev, link_conf, NULL, link, NULL,
                           CONN_STATE_DISCONNECT, false);
-       mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, false);
+       mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, msta_link, false);
 
        mt7996_mcu_add_dev_info(phy, vif, link_conf, mlink, false);
 
@@ -704,7 +705,8 @@ mt7996_vif_cfg_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                                continue;
 
                        mt7996_mcu_add_bss_info(link->phy, vif, link_conf,
-                                               &link->mt76, true);
+                                               &link->mt76, &link->msta_link,
+                                               true);
                        mt7996_mcu_add_sta(dev, link_conf, NULL, link, NULL,
                                           CONN_STATE_PORT_SECURE,
                                           !!(changed & BSS_CHANGED_BSSID));
@@ -740,7 +742,8 @@ mt7996_link_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
         */
        if ((changed & BSS_CHANGED_BSSID && !is_zero_ether_addr(info->bssid)) ||
            (changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon)) {
-               mt7996_mcu_add_bss_info(phy, vif, info, &link->mt76, true);
+               mt7996_mcu_add_bss_info(phy, vif, info, &link->mt76,
+                                       &link->msta_link, true);
                mt7996_mcu_add_sta(dev, info, NULL, link, NULL,
                                   CONN_STATE_PORT_SECURE,
                                   !!(changed & BSS_CHANGED_BSSID));
index 263eb1f552f0095899e9e5cf2e69be8c9aaf9f03..2520feba1607db1b2a87864b4d8e7b8508ac246c 100644 (file)
@@ -1064,7 +1064,8 @@ __mt7996_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif_link *mvif, int
 
 int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
                            struct ieee80211_bss_conf *link_conf,
-                           struct mt76_vif_link *mlink, int enable)
+                           struct mt76_vif_link *mlink,
+                           struct mt7996_sta_link *msta_link, int enable)
 {
        struct mt7996_dev *dev = phy->dev;
        struct sk_buff *skb;
@@ -1081,7 +1082,7 @@ int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
 
        /* bss_basic must be first */
        mt7996_mcu_bss_basic_tlv(skb, vif, link_conf, mlink, phy->mt76,
-                                mlink->wcid->idx, enable);
+                                msta_link->wcid.idx, enable);
        mt7996_mcu_bss_sec_tlv(skb, mlink);
 
        if (vif->type == NL80211_IFTYPE_MONITOR)
index f226090bcd02ea478113e4bccea0492cfa34477d..4d5ab3f4b78ee6fc584370372fe34b44292e4594 100644 (file)
@@ -571,7 +571,8 @@ int mt7996_mcu_add_dev_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
                            struct mt76_vif_link *mlink, bool enable);
 int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
                            struct ieee80211_bss_conf *link_conf,
-                           struct mt76_vif_link *mlink, int enable);
+                           struct mt76_vif_link *mlink,
+                           struct mt7996_sta_link *msta_link, int enable);
 int mt7996_mcu_add_sta(struct mt7996_dev *dev,
                       struct ieee80211_bss_conf *link_conf,
                       struct ieee80211_link_sta *link_sta,