aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/404-ath_regd_optional.patch
blob: eb6743152ddae2031232159ba6911e46264feb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -19,6 +19,9 @@
 #include <net/cfg80211.h>
 #include <net/mac80211.h>
 #include "regd.h"
+
+#ifndef ATH_USER_REGD
+
 #include "regd_common.h"
 
 /*
@@ -588,3 +591,5 @@ u32 ath_regd_get_band_ctl(struct ath_reg
 	}
 }
 EXPORT_SYMBOL(ath_regd_get_band_ctl);
+
+#endif
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -236,6 +236,41 @@ enum CountryCode {
 	CTRY_BELGIUM2 = 5002
 };
 
+#ifdef ATH_USER_REGD
+
+static inline bool
+ath_is_world_regd(struct ath_regulatory *reg)
+{
+	return true;
+}
+
+static inline int
+ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
+	      int (*reg_notifier)(struct wiphy *wiphy,
+	      struct regulatory_request *request))
+{
+	return 0;
+}
+
+
+static inline u32
+ath_regd_get_band_ctl(struct ath_regulatory *reg,
+		      enum ieee80211_band band)
+{
+	return SD_NO_CTL;
+}
+
+static inline int
+ath_reg_notifier_apply(struct wiphy *wiphy,
+		       struct regulatory_request *request,
+		       struct ath_regulatory *reg)
+{
+	return 0;
+}
+
+
+#else
+
 bool ath_is_world_regd(struct ath_regulatory *reg);
 int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
 		  int (*reg_notifier)(struct wiphy *wiphy,
@@ -247,3 +282,5 @@ int ath_reg_notifier_apply(struct wiphy 
 			   struct ath_regulatory *reg);
 
 #endif
+
+#endif