ps.h 1.3 KB

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