Skip to contentSkip to conversation

ath11k: create new header file for regulatory

PATCH In review Sriram R 2 participants 2 messages Jun 13, 2019 – Jun 18, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Sriram R

author
#0 lore raw

PATCH 1/1 ath11k: create new header file for regulatory

Move regulatory related definitions from 'core.h'
to a new file 'reg.h'

---
 drivers/net/wireless/ath/ath11k/core.h | 20 +------------------
 drivers/net/wireless/ath/ath11k/reg.h  | 35 ++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 19 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath11k/reg.h
drivers/net/wireless/ath/ath11k/core.h +1 -19
index 038f905..4d42ab40 100644
@@ -19,6 +19,7 @@
 #include "mac.h"
 #include "hw.h"
 #include "hal_rx.h"
+#include "reg.h"
 
 #define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
 
@@ -302,16 +303,6 @@ enum ath11k_stats_type {
 	ATH11K_STATS_TYPE_MAX,
 };
 
-enum ath11k_dfs_region {
-	ATH11K_DFS_REG_UNSET,
-	ATH11K_DFS_REG_FCC,
-	ATH11K_DFS_REG_ETSI,
-	ATH11K_DFS_REG_MKK,
-	ATH11K_DFS_REG_CN,
-	ATH11K_DFS_REG_KR,
-	ATH11K_DFS_REG_UNDEF,
-};
-
 struct ath11k_htt_data_stats {
 	u64 legacy[ATH11K_COUNTER_TYPE_MAX][ATH11K_LEGACY_NUM];
 	u64 ht[ATH11K_COUNTER_TYPE_MAX][ATH11K_HT_MCS_NUM];
@@ -817,15 +808,6 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ath11k,
 			  struct ath11k_board_data *bd);
 void ath11k_core_free_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd);
 
-/* ATH11K Regulatory API's */
-void ath11k_reg_init(struct ath11k *ar);
-void ath11k_reg_free(struct ath11k_base *ab);
-void ath11k_regd_update_work(struct work_struct *work);
-struct ieee80211_regdomain *
-ath11k_reg_build_regd(struct ath11k_base *ab,
-		      struct cur_regulatory_info *reg_info, bool intersect);
-int ath11k_regd_update(struct ath11k *ar, bool init);
-int ath11k_reg_update_chan_list(struct ath11k *ar);
 void ath11k_core_halt(struct ath11k *ar);
 u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx);
 
drivers/net/wireless/ath/ath11k/reg.h new file +35 -0
new file mode 100644
index 0000000..d0fc246
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: ISC */
+/*
+ * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ */
+
+#ifndef ATH11K_REG_H
+#define ATH11K_REG_H
+
+#include <linux/kernel.h>
+#include <net/regulatory.h>
+
+struct ath11k_base;
+struct ath11k;
+
+/* DFS regdomains supported by Firmware */
+enum ath11k_dfs_region {
+	ATH11K_DFS_REG_UNSET,
+	ATH11K_DFS_REG_FCC,
+	ATH11K_DFS_REG_ETSI,
+	ATH11K_DFS_REG_MKK,
+	ATH11K_DFS_REG_CN,
+	ATH11K_DFS_REG_KR,
+	ATH11K_DFS_REG_UNDEF,
+};
+
+/* ATH11K Regulatory API's */
+void ath11k_reg_init(struct ath11k *ar);
+void ath11k_reg_free(struct ath11k_base *ab);
+void ath11k_regd_update_work(struct work_struct *work);
+struct ieee80211_regdomain *
+ath11k_reg_build_regd(struct ath11k_base *ab,
+		      struct cur_regulatory_info *reg_info, bool intersect);
+int ath11k_regd_update(struct ath11k *ar, bool init);
+int ath11k_reg_update_chan_list(struct ath11k *ar);
+#endif
Signature · 7 lines
2.7.4


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 5 lines · Sriram R

Move regulatory related definitions from 'core.h'
to a new file 'reg.h'

Patch applied to ath11k-bringup branch of ath.git, thanks.

54b2db645a5f ath11k: create new header file for regulatory

Signature · 9 lines
https://patchwork.kernel.org/patch/10991019/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k