diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-01-26 14:13:56 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-01-29 17:18:26 +0300 |
commit | 1755f6ad0fe0f04a958039b05f8fb38c5217f01b (patch) | |
tree | d88c893b5f016c26a9cb1cfa425062089f5e7ed9 /drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | |
parent | b7dd3c2e58e674b03c7fd820024bc228e383c56e (diff) | |
download | linux-1755f6ad0fe0f04a958039b05f8fb38c5217f01b.tar.xz |
mt76: mt76_connac: move pm utility routines in mt76_connac_lib module
Move power_save common code shared between mt7663 and mt7921 in
mt76_connac module
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h index 35fa2104a91f..1bd79dae0171 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h @@ -382,8 +382,6 @@ void mt7615_mac_set_rates(struct mt7615_phy *phy, struct mt7615_sta *sta, struct ieee80211_tx_rate *probe_rate, struct ieee80211_tx_rate *rates); void mt7615_pm_wake_work(struct work_struct *work); -int mt7615_pm_wake(struct mt7615_dev *dev); -void mt7615_pm_power_save_sched(struct mt7615_dev *dev); void mt7615_pm_power_save_work(struct work_struct *work); int mt7615_mcu_del_wtbl_all(struct mt7615_dev *dev); int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd); @@ -439,19 +437,10 @@ static inline u16 mt7615_wtbl_size(struct mt7615_dev *dev) return MT7615_WTBL_SIZE; } -static inline void mt7615_mutex_acquire(struct mt7615_dev *dev) - __acquires(&dev->mt76.mutex) -{ - mutex_lock(&dev->mt76.mutex); - mt7615_pm_wake(dev); -} - -static inline void mt7615_mutex_release(struct mt7615_dev *dev) - __releases(&dev->mt76.mutex) -{ - mt7615_pm_power_save_sched(dev); - mutex_unlock(&dev->mt76.mutex); -} +#define mt7615_mutex_acquire(dev) \ + mt76_connac_mutex_acquire(&(dev)->mt76, &(dev)->pm) +#define mt7615_mutex_release(dev) \ + mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm) static inline u8 mt7615_lmac_mapping(struct mt7615_dev *dev, u8 ac) { |