]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: disallow user requests prior to regulatory_init()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 21 Feb 2009 05:04:22 +0000 (00:04 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:52:55 +0000 (14:52 -0500)
commitfd3f1a56b7c51bf7f863171da496749cb5333fd7
tree06bdfa7cc48aefb68e6ec9e0f03777c574372c08
parent6992b1be53357aae4f157ed6bd95df5b1e79601b
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