Linux Audio

Check our new training course

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