aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-11-05 12:18:17 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-11-25 14:51:38 -0500
commit01992406d3be60bbd6e19797385ac452bdc8ecc8 (patch)
tree1de787aac11f5e16ed9e461cf70cd1d5da0d6b8d /net
parentf5fe3247809815153e9fe88a989c251bd17059b9 (diff)
cfg80211: rename __set_regdom() to reg_set_rd_country_ie()
This reflects that case is now completely separated. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/reg.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index b622ab0be552..a75c5eddd25f 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2291,9 +2291,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd,
2291 return 0; 2291 return 0;
2292} 2292}
2293 2293
2294/* Takes ownership of rd only if it doesn't fail */ 2294static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
2295static int __set_regdom(const struct ieee80211_regdomain *rd, 2295 struct regulatory_request *country_ie_request)
2296 struct regulatory_request *lr)
2297{ 2296{
2298 struct wiphy *request_wiphy; 2297 struct wiphy *request_wiphy;
2299 2298
@@ -2313,13 +2312,13 @@ static int __set_regdom(const struct ieee80211_regdomain *rd,
2313 return -EINVAL; 2312 return -EINVAL;
2314 } 2313 }
2315 2314
2316 request_wiphy = wiphy_idx_to_wiphy(lr->wiphy_idx); 2315 request_wiphy = wiphy_idx_to_wiphy(country_ie_request->wiphy_idx);
2317 if (!request_wiphy) { 2316 if (!request_wiphy) {
2318 schedule_delayed_work(&reg_timeout, 0); 2317 schedule_delayed_work(&reg_timeout, 0);
2319 return -ENODEV; 2318 return -ENODEV;
2320 } 2319 }
2321 2320
2322 if (lr->intersect) 2321 if (country_ie_request->intersect)
2323 return -EINVAL; 2322 return -EINVAL;
2324 2323
2325 reset_regdomains(false, rd); 2324 reset_regdomains(false, rd);
@@ -2355,7 +2354,7 @@ int set_regdom(const struct ieee80211_regdomain *rd)
2355 r = reg_set_rd_driver(rd, lr); 2354 r = reg_set_rd_driver(rd, lr);
2356 break; 2355 break;
2357 case NL80211_REGDOM_SET_BY_COUNTRY_IE: 2356 case NL80211_REGDOM_SET_BY_COUNTRY_IE:
2358 r = __set_regdom(rd, lr); 2357 r = reg_set_rd_country_ie(rd, lr);
2359 break; 2358 break;
2360 default: 2359 default:
2361 WARN(1, "invalid initiator %d\n", lr->initiator); 2360 WARN(1, "invalid initiator %d\n", lr->initiator);