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>
This commit is contained in:
parent
e8da2bb4fe
commit
540f6f2cc5
@ -1225,8 +1225,6 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
|||||||
const struct ieee80211_power_rule *power_rule = NULL;
|
const struct ieee80211_power_rule *power_rule = NULL;
|
||||||
const struct ieee80211_freq_range *freq_range = NULL;
|
const struct ieee80211_freq_range *freq_range = NULL;
|
||||||
|
|
||||||
assert_reg_lock();
|
|
||||||
|
|
||||||
r = freq_reg_info_regd(wiphy, MHZ_TO_KHZ(chan->center_freq),
|
r = freq_reg_info_regd(wiphy, MHZ_TO_KHZ(chan->center_freq),
|
||||||
desired_bw_khz, ®_rule, regd);
|
desired_bw_khz, ®_rule, regd);
|
||||||
|
|
||||||
@ -1271,14 +1269,12 @@ void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
|
|||||||
enum ieee80211_band band;
|
enum ieee80211_band band;
|
||||||
unsigned int bands_set = 0;
|
unsigned int bands_set = 0;
|
||||||
|
|
||||||
mutex_lock(®_mutex);
|
|
||||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||||
if (!wiphy->bands[band])
|
if (!wiphy->bands[band])
|
||||||
continue;
|
continue;
|
||||||
handle_band_custom(wiphy, wiphy->bands[band], regd);
|
handle_band_custom(wiphy, wiphy->bands[band], regd);
|
||||||
bands_set++;
|
bands_set++;
|
||||||
}
|
}
|
||||||
mutex_unlock(®_mutex);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* no point in calling this if it won't have any effect
|
* no point in calling this if it won't have any effect
|
||||||
|
Loading…
Reference in New Issue
Block a user