nl80211: disallow user requests prior to regulatory_init()
commit80778f18c09673df2712c7da28aa920469adcae2
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 21 Feb 2009 05:04:22 +0000 (21 00:04 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:52:55 +0000 (27 14:52 -0500)
tree06bdfa7cc48aefb68e6ec9e0f03777c574372c08
parenta1794390f1afc3631ac056e0f1677b7ab6f7ee74
nl80211: disallow user requests prior to regulatory_init()

If cfg80211 is built into the kernel there is perhaps a small
time window betwen nl80211_init() and regulatory_init() where
cfg80211_regdomain hasn't yet been initialized to let the
wireless core do its work. During that rare case and time
frame (if its even possible) we don't allow user regulatory
changes as cfg80211 is working on enabling its first regulatory
domain.

To check for cfg80211_regdomain we now contend the entire operation
using the cfg80211_mutex.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/nl80211.c