diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-10 22:50:04 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:19 -0500 |
commit | e44df9296a8ab9d9160e230d68a1b01015c94e93 (patch) | |
tree | 5a9d6a617b61bc8cef0085062c926d1958495be1 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 21795094e2b71b4b11bfb468321046c1336cef69 (diff) |
rt2x00: Fix scheduling while atomic errors in usb drivers
Call rt2x00_config_intf() outside of the spinlock context since
the call will sleep for USB drivers. By using the ieee80211_if_conf
values as arguments we make keep access tp rt2x00_intf thread safe
even without the lock.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 8c24d3b36d2..91b62ddbf9f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -334,11 +334,18 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw, */ if (conf->type != IEEE80211_IF_TYPE_AP) memcpy(&intf->bssid, conf->bssid, ETH_ALEN); - rt2x00lib_config_intf(rt2x00dev, intf, conf->type, NULL, intf->bssid); spin_unlock(&intf->lock); /* + * Call rt2x00_config_intf() outside of the spinlock context since + * the call will sleep for USB drivers. By using the ieee80211_if_conf + * values as arguments we make keep access to rt2x00_intf thread safe + * even without the lock. + */ + rt2x00lib_config_intf(rt2x00dev, intf, conf->type, NULL, conf->bssid); + + /* * We only need to initialize the beacon when master mode is enabled. */ if (conf->type != IEEE80211_IF_TYPE_AP || !conf->beacon) |