diff options
author | Sven Neumann <s.neumann@raumfeld.com> | 2011-08-30 23:38:53 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:26:39 -0400 |
commit | eac03e381957a05f3842ceb8de987a1025966ecf (patch) | |
tree | 5dfbfa366c63e481eb92b7f61dbabdd4f82b6ad3 /net/wireless/reg.h | |
parent | 56e6786e59cba2c714091ed53deffa6001a32841 (diff) |
cfg80211: hold reg_mutex when updating regulatory
The function wiphy_update_regulatory() uses the static variable
last_request and thus needs to be called with reg_mutex held.
This is the case for all users in reg.c, but the function was
exported for use by wiphy_register(), from where it is called
without the lock being held.
Fix this by making wiphy_update_regulatory() private and introducing
regulatory_update() as a wrapper that acquires and holds the lock.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.h')
-rw-r--r-- | net/wireless/reg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/reg.h b/net/wireless/reg.h index b67d1c3a2fb..4a56799d868 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h @@ -16,6 +16,8 @@ void regulatory_exit(void); int set_regdom(const struct ieee80211_regdomain *rd); +void regulatory_update(struct wiphy *wiphy, enum nl80211_reg_initiator setby); + /** * regulatory_hint_found_beacon - hints a beacon was found on a channel * @wiphy: the wireless device where the beacon was found on |