Linux Audio

Check our new training course

In-person Linux kernel drivers training

Jun 16-20, 2025
Register
Loading...
Note: File does not exist in 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, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
 5 */
 6
 7#ifndef ATH12K_WOW_H
 8#define ATH12K_WOW_H
 9
10#define ATH12K_WOW_RETRY_NUM		10
11#define ATH12K_WOW_RETRY_WAIT_MS	200
12#define ATH12K_WOW_PATTERNS		22
13
14struct ath12k_wow {
15	u32 max_num_patterns;
16	struct completion wakeup_completed;
17	struct wiphy_wowlan_support wowlan_support;
18};
19
20struct ath12k_pkt_pattern {
21	u8 pattern[WOW_MAX_PATTERN_SIZE];
22	u8 bytemask[WOW_MAX_PATTERN_SIZE];
23	int pattern_len;
24	int pkt_offset;
25};
26
27struct rfc1042_hdr {
28	u8 llc_dsap;
29	u8 llc_ssap;
30	u8 llc_ctrl;
31	u8 snap_oui[3];
32	__be16 eth_type;
33} __packed;
34
35#ifdef CONFIG_PM
36
37int ath12k_wow_init(struct ath12k *ar);
38int ath12k_wow_op_suspend(struct ieee80211_hw *hw,
39			  struct cfg80211_wowlan *wowlan);
40int ath12k_wow_op_resume(struct ieee80211_hw *hw);
41void ath12k_wow_op_set_wakeup(struct ieee80211_hw *hw, bool enabled);
42int ath12k_wow_enable(struct ath12k *ar);
43int ath12k_wow_wakeup(struct ath12k *ar);
44
45#else
46
47static inline int ath12k_wow_init(struct ath12k *ar)
48{
49	return 0;
50}
51
52static inline int ath12k_wow_enable(struct ath12k *ar)
53{
54	return 0;
55}
56
57static inline int ath12k_wow_wakeup(struct ath12k *ar)
58{
59	return 0;
60}
61#endif /* CONFIG_PM */
62#endif /* ATH12K_WOW_H */