Skip to content
Snippets Groups Projects
Commit 9974c871 authored by Hayden Kroepfl's avatar Hayden Kroepfl
Browse files

Added updated ath user regd patches, and enabled CONFIG_ATH_USER_REGD

parent e292b265
No related branches found
No related tags found
No related merge requests found
Pipeline #315 failed
......@@ -2041,6 +2041,7 @@ CONFIG_WLAN=y
# CONFIG_WLAN_VENDOR_ADMTEK is not set
CONFIG_ATH_COMMON=y
CONFIG_WLAN_VENDOR_ATH=y
CONFIG_ATH_USER_REGD=y
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH_REG_DYNAMIC_USER_REG_HINTS is not set
CONFIG_ATH5K=y
......
diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig
index d88edbf1b..18b66eaf8 100644
--- a/drivers/net/wireless/ath/Kconfig
+++ b/drivers/net/wireless/ath/Kconfig
@@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH
if WLAN_VENDOR_ATH
+config ATH_USER_REGD
+ bool "Do not enforce EEPROM regulatory restrictions."
+
config ATH_DEBUG
bool "Atheros wireless debugging"
help
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index b2400e241..28ad1c9eb 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -344,7 +344,9 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
struct ieee80211_supported_band *sband;
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,7 +380,9 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator)
{
struct ieee80211_supported_band *sband;
-
+#ifdef CONFIG_ATH_USER_REGD
+ return;
+#endif
sband = wiphy->bands[NL80211_BAND_2GHZ];
if (!sband)
return;
@@ -407,7 +411,9 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy,
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
unsigned int i;
-
+#ifdef CONFIG_ATH_USER_REGDS
+ return;
+#endif
if (!wiphy->bands[NL80211_BAND_5GHZ])
return;
@@ -640,6 +646,9 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
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;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c2d0ff7f0..8d21af58d 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -3291,6 +3291,8 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
char alpha2[2];
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
+
+ return;
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
@@ -3543,6 +3545,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
void regulatory_hint_disconnect(void)
{
+ return;
/* Restore of regulatory settings is not required when wiphy(s)
* ignore IE from connected access point but clearance of beacon hints
* is required when wiphy(s) supports beacon hints.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment