diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ac048a158d85..6327e1617acb 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1420,16 +1420,6 @@ new_request: | |||
1420 | return r; | 1420 | return r; |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | /* | ||
1424 | * Note: When CONFIG_WIRELESS_OLD_REGULATORY is enabled | ||
1425 | * AND if CRDA is NOT present nothing will happen, if someone | ||
1426 | * wants to bother with 11d with OLD_REG you can add a timer. | ||
1427 | * If after x amount of time nothing happens you can call: | ||
1428 | * | ||
1429 | * return set_regdom(country_ie_regdomain); | ||
1430 | * | ||
1431 | * to intersect with the static rd | ||
1432 | */ | ||
1433 | return call_crda(last_request->alpha2); | 1423 | return call_crda(last_request->alpha2); |
1434 | } | 1424 | } |
1435 | 1425 | ||
@@ -2033,28 +2023,21 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) | |||
2033 | */ | 2023 | */ |
2034 | 2024 | ||
2035 | BUG_ON(!country_ie_regdomain); | 2025 | BUG_ON(!country_ie_regdomain); |
2026 | BUG_ON(rd == country_ie_regdomain); | ||
2036 | 2027 | ||
2037 | if (rd != country_ie_regdomain) { | 2028 | /* |
2038 | /* | 2029 | * Intersect what CRDA returned and our what we |
2039 | * Intersect what CRDA returned and our what we | 2030 | * had built from the Country IE received |
2040 | * had built from the Country IE received | 2031 | */ |
2041 | */ | ||
2042 | 2032 | ||
2043 | intersected_rd = regdom_intersect(rd, country_ie_regdomain); | 2033 | intersected_rd = regdom_intersect(rd, country_ie_regdomain); |
2044 | 2034 | ||
2045 | reg_country_ie_process_debug(rd, country_ie_regdomain, | 2035 | reg_country_ie_process_debug(rd, |
2046 | intersected_rd); | 2036 | country_ie_regdomain, |
2037 | intersected_rd); | ||
2047 | 2038 | ||
2048 | kfree(country_ie_regdomain); | 2039 | kfree(country_ie_regdomain); |
2049 | country_ie_regdomain = NULL; | 2040 | country_ie_regdomain = NULL; |
2050 | } else { | ||
2051 | /* | ||
2052 | * This would happen when CRDA was not present and | ||
2053 | * OLD_REGULATORY was enabled. We intersect our Country | ||
2054 | * IE rd and what was set on cfg80211 originally | ||
2055 | */ | ||
2056 | intersected_rd = regdom_intersect(rd, cfg80211_regdomain); | ||
2057 | } | ||
2058 | 2041 | ||
2059 | if (!intersected_rd) | 2042 | if (!intersected_rd) |
2060 | return -EINVAL; | 2043 | return -EINVAL; |