Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e44df929 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

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: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21795094
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -334,10 +334,17 @@ 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.
	 */