Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
0002 /*
0003  * Copyright (c) 2020 The Linux Foundation. All rights reserved.
0004  */
0005 
0006 #ifndef _WOW_H_
0007 #define _WOW_H_
0008 
0009 struct ath11k_wow {
0010     u32 max_num_patterns;
0011     struct completion wakeup_completed;
0012     struct wiphy_wowlan_support wowlan_support;
0013 };
0014 
0015 struct rfc1042_hdr {
0016     u8 llc_dsap;
0017     u8 llc_ssap;
0018     u8 llc_ctrl;
0019     u8 snap_oui[3];
0020     __be16 snap_type;
0021 } __packed;
0022 
0023 #define ATH11K_WOW_RETRY_NUM        3
0024 #define ATH11K_WOW_RETRY_WAIT_MS    200
0025 #define ATH11K_WOW_PATTERNS     22
0026 
0027 #ifdef CONFIG_PM
0028 
0029 int ath11k_wow_init(struct ath11k *ar);
0030 int ath11k_wow_op_suspend(struct ieee80211_hw *hw,
0031               struct cfg80211_wowlan *wowlan);
0032 int ath11k_wow_op_resume(struct ieee80211_hw *hw);
0033 void ath11k_wow_op_set_wakeup(struct ieee80211_hw *hw, bool enabled);
0034 int ath11k_wow_enable(struct ath11k_base *ab);
0035 int ath11k_wow_wakeup(struct ath11k_base *ab);
0036 
0037 #else
0038 
0039 static inline int ath11k_wow_init(struct ath11k *ar)
0040 {
0041     return 0;
0042 }
0043 
0044 static inline int ath11k_wow_enable(struct ath11k_base *ab)
0045 {
0046     return 0;
0047 }
0048 
0049 static inline int ath11k_wow_wakeup(struct ath11k_base *ab)
0050 {
0051     return 0;
0052 }
0053 
0054 #endif /* CONFIG_PM */
0055 #endif /* _WOW_H_ */