From 2ce815cc7c05ced42e671a1b31eac2055672ec32 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Thu, 3 May 2018 10:59:06 -0700 Subject: Initial commit --- regdom-hack-4.16.6.patch | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 regdom-hack-4.16.6.patch (limited to 'regdom-hack-4.16.6.patch') diff --git a/regdom-hack-4.16.6.patch b/regdom-hack-4.16.6.patch new file mode 100644 index 0000000..76a8db5 --- /dev/null +++ b/regdom-hack-4.16.6.patch @@ -0,0 +1,63 @@ +--- a/drivers/net/wireless/ath/Kconfig ++++ b/drivers/net/wireless/ath/Kconfig +@@ -22,6 +22,13 @@ + + if WLAN_VENDOR_ATH + ++config ATH_USER_REGD ++ bool "Do not enforce EEPROM regulatory restrictions" ++ ---help--- ++ Say Y, if you want to ignore the EEPROM regulatory restrictions ++ in order to change the wireless region from userspace. ++ ++ + config ATH_DEBUG + bool "Atheros wireless debugging" + ---help--- +--- a/drivers/net/wireless/ath/regd.c ++++ b/drivers/net/wireless/ath/regd.c +@@ -345,6 +345,10 @@ + struct ieee80211_channel *ch; + unsigned int i; + ++#ifdef CONFIG_ATH_USER_REGD ++ return; ++#endif ++ + for (band = 0; band < NUM_NL80211_BANDS; band++) { + if (!wiphy->bands[band]) + continue; +@@ -378,6 +382,10 @@ + { + struct ieee80211_supported_band *sband; + ++#ifdef CONFIG_ATH_USER_REGD ++ return; ++#endif ++ + sband = wiphy->bands[NL80211_BAND_2GHZ]; + if (!sband) + return; +@@ -407,6 +415,10 @@ + struct ieee80211_channel *ch; + unsigned int i; + ++#ifdef CONFIG_ATH_USER_REGD ++ return; ++#endif ++ + if (!wiphy->bands[NL80211_BAND_5GHZ]) + return; + +@@ -639,6 +651,11 @@ + const struct ieee80211_regdomain *regd; + + wiphy->reg_notifier = reg_notifier; ++ ++#ifdef CONFIG_ATH_USER_REGD ++ return 0; ++#endif ++ + wiphy->regulatory_flags |= REGULATORY_STRICT_REG | + REGULATORY_CUSTOM_REG; + -- cgit v1.2.1