xref: /linux/drivers/net/wireless/ath/ath11k/reg.h (revision d642ef71)
1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
2 /*
3  * Copyright (c) 2019 The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef ATH11K_REG_H
7 #define ATH11K_REG_H
8 
9 #include <linux/kernel.h>
10 #include <net/regulatory.h>
11 
12 struct ath11k_base;
13 struct ath11k;
14 
15 /* DFS regdomains supported by Firmware */
16 enum ath11k_dfs_region {
17 	ATH11K_DFS_REG_UNSET,
18 	ATH11K_DFS_REG_FCC,
19 	ATH11K_DFS_REG_ETSI,
20 	ATH11K_DFS_REG_MKK,
21 	ATH11K_DFS_REG_CN,
22 	ATH11K_DFS_REG_KR,
23 	ATH11K_DFS_REG_MKK_N,
24 	ATH11K_DFS_REG_UNDEF,
25 };
26 
27 /* Phy bitmaps */
28 #define ATH11K_REG_PHY_BITMAP_NO11AX	BIT(5)
29 
30 /* ATH11K Regulatory API's */
31 void ath11k_reg_init(struct ath11k *ar);
32 void ath11k_reg_free(struct ath11k_base *ab);
33 void ath11k_regd_update_work(struct work_struct *work);
34 struct ieee80211_regdomain *
35 ath11k_reg_build_regd(struct ath11k_base *ab,
36 		      struct cur_regulatory_info *reg_info, bool intersect);
37 int ath11k_regd_update(struct ath11k *ar);
38 int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait);
39 #endif
40