Source

vabs / var / vabs / kernel-3.10 / src / patches / 404-ath_regd_optional.patch

Full commit
diff -Naur a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
--- a/drivers/net/wireless/ath/ath.h	2012-02-03 13:39:51.000000000 -0700
+++ b/drivers/net/wireless/ath/ath.h	2012-02-06 12:12:13.974765579 -0700
@@ -17,6 +17,7 @@
 #ifndef ATH_H
 #define ATH_H
 
+#define ATH_USER_REGD		1
 #include <linux/skbuff.h>
 #include <linux/if_ether.h>
 #include <linux/spinlock.h>
diff -Naur a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
--- a/drivers/net/wireless/ath/regd.c	2012-02-03 13:39:51.000000000 -0700
+++ b/drivers/net/wireless/ath/regd.c	2012-02-06 11:47:14.823639186 -0700
@@ -194,6 +194,10 @@
 	u32 bandwidth = 0;
 	int r;
 
+#ifdef ATH_USER_REGD
+	return;
+#endif
+
 	for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 
 		if (!wiphy->bands[band])
@@ -253,6 +257,10 @@
 	u32 bandwidth = 0;
 	int r;
 
+#ifdef ATH_USER_REGD
+	return;
+#endif
+
 	sband = wiphy->bands[IEEE80211_BAND_2GHZ];
 	if (!sband)
 		return;
@@ -302,6 +310,10 @@
 	struct ieee80211_channel *ch;
 	unsigned int i;
 
+#ifdef ATH_USER_REGD
+	return;
+#endif
+
 	if (!wiphy->bands[IEEE80211_BAND_5GHZ])
 		return;
 
@@ -469,6 +481,10 @@
 {
 	const struct ieee80211_regdomain *regd;
 
+#ifdef ATH_USER_REGD
+	return 0;
+#endif
+
 	wiphy->reg_notifier = reg_notifier;
 	wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;