aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/reg.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1ad04e54014..0ba3328dcc9 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2193,7 +2193,6 @@ static void print_regdomain_info(const struct ieee80211_regdomain *rd)
2193static int __set_regdom(const struct ieee80211_regdomain *rd) 2193static int __set_regdom(const struct ieee80211_regdomain *rd)
2194{ 2194{
2195 const struct ieee80211_regdomain *intersected_rd = NULL; 2195 const struct ieee80211_regdomain *intersected_rd = NULL;
2196 struct cfg80211_registered_device *rdev = NULL;
2197 struct wiphy *request_wiphy; 2196 struct wiphy *request_wiphy;
2198 /* Some basic sanity checks first */ 2197 /* Some basic sanity checks first */
2199 2198
@@ -2305,24 +2304,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2305 return 0; 2304 return 0;
2306 } 2305 }
2307 2306
2308 if (!intersected_rd) 2307 return -EINVAL;
2309 return -EINVAL;
2310
2311 rdev = wiphy_to_dev(request_wiphy);
2312
2313 rdev->country_ie_alpha2[0] = rd->alpha2[0];
2314 rdev->country_ie_alpha2[1] = rd->alpha2[1];
2315 rdev->env = last_request->country_ie_env;
2316
2317 BUG_ON(intersected_rd == rd);
2318
2319 kfree(rd);
2320 rd = NULL;
2321
2322 reset_regdomains(false);
2323 cfg80211_regdomain = intersected_rd;
2324
2325 return 0;
2326} 2308}
2327 2309
2328 2310