diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-12-03 18:19:24 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 07:01:27 -0500 |
commit | 540f6f2cc545da9ae2baa9faa3152fc550bedb57 (patch) | |
tree | 025838203fff0b4282adb554a02ff6dcd5237988 /net/wireless/reg.c | |
parent | e8da2bb4fe9ecb888f44714e2624c7d4268ac09d (diff) |
regulatory: remove locking from wiphy_apply_custom_regulatory
wiphy_apply_custom_regulatory() doesn't have to hold
the regulatory mutex as it only modifies the given
wiphy with the given regulatory domain, it doesn't
access any global regulatory data.
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 603a01911a50..752729ecd701 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1225,8 +1225,6 @@ static void handle_channel_custom(struct wiphy *wiphy, | |||
1225 | const struct ieee80211_power_rule *power_rule = NULL; | 1225 | const struct ieee80211_power_rule *power_rule = NULL; |
1226 | const struct ieee80211_freq_range *freq_range = NULL; | 1226 | const struct ieee80211_freq_range *freq_range = NULL; |
1227 | 1227 | ||
1228 | assert_reg_lock(); | ||
1229 | |||
1230 | r = freq_reg_info_regd(wiphy, MHZ_TO_KHZ(chan->center_freq), | 1228 | r = freq_reg_info_regd(wiphy, MHZ_TO_KHZ(chan->center_freq), |
1231 | desired_bw_khz, ®_rule, regd); | 1229 | desired_bw_khz, ®_rule, regd); |
1232 | 1230 | ||
@@ -1271,14 +1269,12 @@ void wiphy_apply_custom_regulatory(struct wiphy *wiphy, | |||
1271 | enum ieee80211_band band; | 1269 | enum ieee80211_band band; |
1272 | unsigned int bands_set = 0; | 1270 | unsigned int bands_set = 0; |
1273 | 1271 | ||
1274 | mutex_lock(®_mutex); | ||
1275 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 1272 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { |
1276 | if (!wiphy->bands[band]) | 1273 | if (!wiphy->bands[band]) |
1277 | continue; | 1274 | continue; |
1278 | handle_band_custom(wiphy, wiphy->bands[band], regd); | 1275 | handle_band_custom(wiphy, wiphy->bands[band], regd); |
1279 | bands_set++; | 1276 | bands_set++; |
1280 | } | 1277 | } |
1281 | mutex_unlock(®_mutex); | ||
1282 | 1278 | ||
1283 | /* | 1279 | /* |
1284 | * no point in calling this if it won't have any effect | 1280 | * no point in calling this if it won't have any effect |