1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* Copyright(c) 2019-2020 Realtek Corporation 3 */ 4 5 #ifndef __RTW89_PS_H_ 6 #define __RTW89_PS_H_ 7 8 void rtw89_enter_lps(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif, 9 bool ps_mode); 10 void rtw89_leave_lps(struct rtw89_dev *rtwdev); 11 void __rtw89_leave_ps_mode(struct rtw89_dev *rtwdev); 12 void __rtw89_enter_ps_mode(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif); 13 void rtw89_leave_ps_mode(struct rtw89_dev *rtwdev); 14 void rtw89_enter_ips(struct rtw89_dev *rtwdev); 15 void rtw89_leave_ips(struct rtw89_dev *rtwdev); 16 void rtw89_set_coex_ctrl_lps(struct rtw89_dev *rtwdev, bool btc_ctrl); 17 void rtw89_process_p2p_ps(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif); 18 19 static inline void rtw89_leave_ips_by_hwflags(struct rtw89_dev *rtwdev) 20 { 21 struct ieee80211_hw *hw = rtwdev->hw; 22 23 if (hw->conf.flags & IEEE80211_CONF_IDLE) 24 rtw89_leave_ips(rtwdev); 25 } 26 27 static inline void rtw89_enter_ips_by_hwflags(struct rtw89_dev *rtwdev) 28 { 29 struct ieee80211_hw *hw = rtwdev->hw; 30 31 if (hw->conf.flags & IEEE80211_CONF_IDLE) 32 rtw89_enter_ips(rtwdev); 33 } 34 35 #endif 36