summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7921/main.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2021-01-28 03:33:52 +0800
committerFelix Fietkau <nbd@nbd.name>2021-01-29 18:10:00 +0100
commit022159b0e13fba711aabe549e6b3631b1d33dc66 (patch)
treee65cd9f278da58164cd851a657db22733d36e4f8 /drivers/net/wireless/mediatek/mt76/mt7921/main.c
parent80fc1e37c0eb0115c980a5bbc011724fa41bfdb3 (diff)
mt76: mt7921: rely on mt76_connac_mcu module for suspend and WoW support
Rely on mt76_connac_mcu module for suspend and WoW support and remove duplicated code Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/main.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index bff00be537f7..288f0bb9f55e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -994,9 +994,10 @@ static int mt7921_suspend(struct ieee80211_hw *hw,
set_bit(MT76_STATE_SUSPEND, &phy->mt76->state);
ieee80211_iterate_active_interfaces(hw,
IEEE80211_IFACE_ITER_RESUME_ALL,
- mt7921_mcu_set_suspend_iter, phy);
+ mt76_connac_mcu_set_suspend_iter,
+ &dev->mphy);
- err = mt7921_mcu_set_hif_suspend(dev, true);
+ err = mt76_connac_mcu_set_hif_suspend(&dev->mt76, true);
mutex_unlock(&dev->mt76.mutex);
@@ -1011,7 +1012,7 @@ static int mt7921_resume(struct ieee80211_hw *hw)
mutex_lock(&dev->mt76.mutex);
- err = mt7921_mcu_set_hif_suspend(dev, false);
+ err = mt76_connac_mcu_set_hif_suspend(&dev->mt76, false);
if (err < 0)
goto out;
@@ -1019,7 +1020,8 @@ static int mt7921_resume(struct ieee80211_hw *hw)
clear_bit(MT76_STATE_SUSPEND, &phy->mt76->state);
ieee80211_iterate_active_interfaces(hw,
IEEE80211_IFACE_ITER_RESUME_ALL,
- mt7921_mcu_set_suspend_iter, phy);
+ mt76_connac_mcu_set_suspend_iter,
+ &dev->mphy);
ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work,
MT7921_WATCHDOG_TIME);
@@ -1044,7 +1046,7 @@ static void mt7921_set_rekey_data(struct ieee80211_hw *hw,
struct mt7921_dev *dev = mt7921_hw_dev(hw);
mutex_lock(&dev->mt76.mutex);
- mt7921_mcu_update_gtk_rekey(hw, vif, data);
+ mt76_connac_mcu_update_gtk_rekey(hw, vif, data);
mutex_unlock(&dev->mt76.mutex);
}
#endif /* CONFIG_PM */