]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: Rely on mt7996_vif_link in mt7996_mcu_twt_agrt_update signature
authorShayne Chen <shayne.chen@mediatek.com>
Tue, 11 Mar 2025 17:45:11 +0000 (18:45 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Mar 2025 13:47:05 +0000 (14:47 +0100)
This is a preliminary patch to enable MLO for MT7996 driver

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/20250311-mt7996-mlo-v2-12-31df6972519b@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h

index 456666eb7080c50493dcde61c5399adc6a987d2d..4a7f6fd9025297f0ffa8ea7e91efd34164a26196 100644 (file)
@@ -2672,7 +2672,8 @@ void mt7996_mac_add_twt_setup(struct ieee80211_hw *hw,
        }
        flow->tsf = le64_to_cpu(twt_agrt->twt);
 
-       if (mt7996_mcu_twt_agrt_update(dev, msta->vif, flow, MCU_TWT_AGRT_ADD))
+       if (mt7996_mcu_twt_agrt_update(dev, &msta->vif->deflink, flow,
+                                      MCU_TWT_AGRT_ADD))
                goto unlock;
 
        setup_cmd = TWT_SETUP_CMD_ACCEPT;
@@ -2705,7 +2706,7 @@ void mt7996_mac_twt_teardown_flow(struct mt7996_dev *dev,
                return;
 
        flow = &msta_link->twt.flow[flowid];
-       if (mt7996_mcu_twt_agrt_update(dev, msta->vif, flow,
+       if (mt7996_mcu_twt_agrt_update(dev, &msta->vif->deflink, flow,
                                       MCU_TWT_AGRT_DELETE))
                return;
 
index 43e85308132e5ed80d8199858014b31a29b2e3b5..e6ebb309a8257637c122702df2f2924649b7fabe 100644 (file)
@@ -4236,7 +4236,7 @@ int mt7996_mcu_update_bss_color(struct mt7996_dev *dev,
 #define TWT_AGRT_PROTECT       BIT(2)
 
 int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
-                              struct mt7996_vif *mvif,
+                              struct mt7996_vif_link *link,
                               struct mt7996_twt_flow *flow,
                               int cmd)
 {
@@ -4267,12 +4267,12 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
                .len = cpu_to_le16(sizeof(req) - 4),
                .tbl_idx = flow->table_id,
                .cmd = cmd,
-               .own_mac_idx = mvif->deflink.mt76.omac_idx,
+               .own_mac_idx = link->mt76.omac_idx,
                .flowid = flow->id,
                .peer_id = cpu_to_le16(flow->wcid),
                .duration = flow->duration,
-               .bss = mvif->deflink.mt76.idx,
-               .bss_idx = mvif->deflink.mt76.idx,
+               .bss = link->mt76.idx,
+               .bss_idx = link->mt76.idx,
                .start_tsf = cpu_to_le64(flow->tsf),
                .mantissa = flow->mantissa,
                .exponent = flow->exp,
index 0dd9d798541f95f82bf8606512052eca79115f5c..962022c7eec9fd82ebba8e0d5aa6b6eae769ee32 100644 (file)
@@ -563,7 +563,7 @@ int mt7996_run(struct mt7996_phy *phy);
 int mt7996_mcu_init(struct mt7996_dev *dev);
 int mt7996_mcu_init_firmware(struct mt7996_dev *dev);
 int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
-                              struct mt7996_vif *mvif,
+                              struct mt7996_vif_link *link,
                               struct mt7996_twt_flow *flow,
                               int cmd);
 int mt7996_mcu_add_dev_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,