Johannes Berg c1f9a764cf mac80211: check interface is down before type change
For some strange reason the netif_running() check
ended up after the actual type change instead of
before, potentially causing all kinds of problems
if the interface is up while changing the type;
one of the problems manifests itself as a warning:

WARNING: at net/mac80211/iface.c:651 ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]()
Hardware name: Aspire one
Pid: 2596, comm: wpa_supplicant Tainted: G        W  2.6.31-10-generic #32-Ubuntu
Call Trace:
 [] warn_slowpath_common+0x6d/0xa0
 [] warn_slowpath_null+0x15/0x20
 [] ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]
 [] ieee80211_if_change_type+0x4a/0xc0 [mac80211]
 [] ieee80211_change_iface+0x61/0xa0 [mac80211]
 [] cfg80211_wext_siwmode+0xc7/0x120 [cfg80211]
 [] ioctl_standard_call+0x58/0xf0

(http://www.kerneloops.org/searchweek.php?search=ieee80211_teardown_sdata)

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-02 15:14:07 -05:00
..
2009-09-23 22:26:32 +09:30
2009-05-25 01:53:53 -07:00
2009-10-19 19:36:49 -07:00
2009-10-24 06:55:20 -07:00
2009-09-26 20:16:15 -07:00
2009-05-25 01:53:53 -07:00
2009-10-19 21:34:20 -07:00
2009-09-02 01:03:53 -07:00
2009-09-30 16:41:34 -07:00
2009-08-04 16:44:23 -04:00
2009-10-11 23:03:47 -07:00
2009-09-24 15:39:14 -07:00
2009-07-12 12:22:34 -07:00
2009-11-02 15:14:07 -05:00
2009-09-02 01:03:53 -07:00