diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-03-04 19:05:12 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-04 19:05:12 +0100 |
commit | f3b6a488a670f1be2666ab97e31dcfc0b1648884 (patch) | |
tree | d8d2431f21d4371c907dec075926e86840e86d1e /net/wireless/reg.c | |
parent | wil6210: fix smatch warning in wil_cfg80211_get_station() (diff) | |
parent | mwifiex: do not advertise usb autosuspend support (diff) | |
download | linux-f3b6a488a670f1be2666ab97e31dcfc0b1648884.tar.xz linux-f3b6a488a670f1be2666ab97e31dcfc0b1648884.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/mwifiex/pcie.c
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 6b6f33ad78f2..90b82e08ae69 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1798,7 +1798,7 @@ static void reg_process_hint(struct regulatory_request *reg_request) return; case NL80211_REGDOM_SET_BY_USER: treatment = reg_process_hint_user(reg_request); - if (treatment == REG_REQ_OK || + if (treatment == REG_REQ_IGNORE || treatment == REG_REQ_ALREADY_SET) return; queue_delayed_work(system_power_efficient_wq, @@ -2492,6 +2492,7 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd, int set_regdom(const struct ieee80211_regdomain *rd) { struct regulatory_request *lr; + bool user_reset = false; int r; if (!reg_is_valid_request(rd->alpha2)) { @@ -2508,6 +2509,7 @@ int set_regdom(const struct ieee80211_regdomain *rd) break; case NL80211_REGDOM_SET_BY_USER: r = reg_set_rd_user(rd, lr); + user_reset = true; break; case NL80211_REGDOM_SET_BY_DRIVER: r = reg_set_rd_driver(rd, lr); @@ -2521,8 +2523,14 @@ int set_regdom(const struct ieee80211_regdomain *rd) } if (r) { - if (r == -EALREADY) + switch (r) { + case -EALREADY: reg_set_request_processed(); + break; + default: + /* Back to world regulatory in case of errors */ + restore_regulatory_settings(user_reset); + } kfree(rd); return r; |