]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7996: rework mt7996_mcu_add_obss_spr to support MLO
authorShayne Chen <shayne.chen@mediatek.com>
Wed, 12 Mar 2025 11:14:00 +0000 (12:14 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Mar 2025 13:47:07 +0000 (14:47 +0100)
Rework mt7996_mcu_add_obss_spr routine in order to support multi-link
setup.

Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-16-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 4a33979ee8535303fa3d09ec4500546d26f700eb..eeb856984298c1e07396c0338e0858afbdb21501 100644 (file)
@@ -807,7 +807,7 @@ mt7996_link_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                mt7996_mcu_set_tx(dev, vif, info);
 
        if (changed & BSS_CHANGED_HE_OBSS_PD)
-               mt7996_mcu_add_obss_spr(phy, vif, &info->he_obss_pd);
+               mt7996_mcu_add_obss_spr(phy, link, &info->he_obss_pd);
 
        if (changed & BSS_CHANGED_HE_BSS_COLOR) {
                if ((vif->type == NL80211_IFTYPE_AP &&
@@ -1254,6 +1254,7 @@ mt7996_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        mtxq = (struct mt76_txq *)txq->drv_priv;
 
        mutex_lock(&dev->mt76.mutex);
+
        switch (action) {
        case IEEE80211_AMPDU_RX_START:
                mt76_rx_aggr_start(&dev->mt76, &msta_link->wcid, tid, ssn,
index 2404569018a0370c967be2b074fa1b1938f33bfb..dd8cabe6552ae9da76396a301fb1b064f03cb6f1 100644 (file)
@@ -4193,12 +4193,12 @@ mt7996_mcu_set_obss_spr_pd(struct mt7996_phy *phy,
 }
 
 static int
-mt7996_mcu_set_obss_spr_siga(struct mt7996_phy *phy, struct ieee80211_vif *vif,
+mt7996_mcu_set_obss_spr_siga(struct mt7996_phy *phy,
+                            struct mt7996_vif_link *link,
                             struct ieee80211_he_obss_pd *he_obss_pd)
 {
-       struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
        struct mt7996_dev *dev = phy->dev;
-       u8 omac = mvif->deflink.mt76.omac_idx;
+       u8 omac = link->mt76.omac_idx;
        struct {
                u8 band_idx;
                u8 __rsv[3];
@@ -4270,7 +4270,8 @@ mt7996_mcu_set_obss_spr_bitmap(struct mt7996_phy *phy,
                                 sizeof(req), true);
 }
 
-int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy, struct ieee80211_vif *vif,
+int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy,
+                           struct mt7996_vif_link *link,
                            struct ieee80211_he_obss_pd *he_obss_pd)
 {
        int ret;
@@ -4304,7 +4305,7 @@ int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy, struct ieee80211_vif *vif,
                return ret;
 
        /* Set SR prohibit */
-       ret = mt7996_mcu_set_obss_spr_siga(phy, vif, he_obss_pd);
+       ret = mt7996_mcu_set_obss_spr_siga(phy, link, he_obss_pd);
        if (ret)
                return ret;
 
index 8a347dd8e648a43250e7dd717cb65f77cb4a61dd..45280f8f34fc4a56dddb3944232c17fdf4b61f69 100644 (file)
@@ -595,7 +595,8 @@ int mt7996_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                          struct ieee80211_bss_conf *link_conf);
 int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
                                    struct ieee80211_vif *vif, u32 changed);
-int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy, struct ieee80211_vif *vif,
+int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy,
+                           struct mt7996_vif_link *link,
                            struct ieee80211_he_obss_pd *he_obss_pd);
 int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev,
                             struct ieee80211_vif *vif,