wow.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: BSD-3-Clause-Clear */
  2. /*
  3. * Copyright (c) 2020 The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef _WOW_H_
  7. #define _WOW_H_
  8. struct ath11k_wow {
  9. u32 max_num_patterns;
  10. struct completion wakeup_completed;
  11. struct wiphy_wowlan_support wowlan_support;
  12. };
  13. struct rfc1042_hdr {
  14. u8 llc_dsap;
  15. u8 llc_ssap;
  16. u8 llc_ctrl;
  17. u8 snap_oui[3];
  18. __be16 snap_type;
  19. } __packed;
  20. #define ATH11K_WOW_RETRY_NUM 3
  21. #define ATH11K_WOW_RETRY_WAIT_MS 200
  22. #define ATH11K_WOW_PATTERNS 22
  23. #ifdef CONFIG_PM
  24. int ath11k_wow_init(struct ath11k *ar);
  25. int ath11k_wow_op_suspend(struct ieee80211_hw *hw,
  26. struct cfg80211_wowlan *wowlan);
  27. int ath11k_wow_op_resume(struct ieee80211_hw *hw);
  28. void ath11k_wow_op_set_wakeup(struct ieee80211_hw *hw, bool enabled);
  29. int ath11k_wow_enable(struct ath11k_base *ab);
  30. int ath11k_wow_wakeup(struct ath11k_base *ab);
  31. #else
  32. static inline int ath11k_wow_init(struct ath11k *ar)
  33. {
  34. return 0;
  35. }
  36. static inline int ath11k_wow_enable(struct ath11k_base *ab)
  37. {
  38. return 0;
  39. }
  40. static inline int ath11k_wow_wakeup(struct ath11k_base *ab)
  41. {
  42. return 0;
  43. }
  44. #endif /* CONFIG_PM */
  45. #endif /* _WOW_H_ */