Skip to content

Commit 14cdf11

Browse files
mcgrofjmberg-intel
authored andcommitted
cfg80211: remove regulatory_update()
regulatory_update() just calls wiphy_update_regulatory(). wiphy_update_regulatory() assumes you already have the reg_mutex held so just move the call within locking context and kill the superfluous regulatory_update(). Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent f8a1c77 commit 14cdf11

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

net/wireless/reg.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,14 +1232,6 @@ static void wiphy_update_regulatory(struct wiphy *wiphy,
12321232
wiphy->reg_notifier(wiphy, last_request);
12331233
}
12341234

1235-
static void regulatory_update(struct wiphy *wiphy,
1236-
enum nl80211_reg_initiator setby)
1237-
{
1238-
mutex_lock(&reg_mutex);
1239-
wiphy_update_regulatory(wiphy, setby);
1240-
mutex_unlock(&reg_mutex);
1241-
}
1242-
12431235
static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
12441236
{
12451237
struct cfg80211_registered_device *rdev;
@@ -2387,9 +2379,9 @@ void wiphy_regulatory_register(struct wiphy *wiphy)
23872379
if (!reg_dev_ignore_cell_hint(wiphy))
23882380
reg_num_devs_support_basehint++;
23892381

2390-
mutex_unlock(&reg_mutex);
2382+
wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
23912383

2392-
regulatory_update(wiphy, NL80211_REGDOM_SET_BY_CORE);
2384+
mutex_unlock(&reg_mutex);
23932385
}
23942386

23952387
/* Caller must hold cfg80211_mutex */

0 commit comments

Comments
 (0)