wow.h 1.1 KB

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