aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2005-11-16 14:55:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-17 11:32:58 -0500
commitefb3442cf1c65747a858476e10f705612383eed1 (patch)
treea093915da40a7887a8c8a3f927177764a55d33d2 /drivers/net
parent0db169f9703115bab09eda5d89a8f6937a7bf98e (diff)
[PATCH] ipw2200: disallow direct scanning when device is down
The function ipw_request_direct_scan() should bail out when the device is down. This fixes a lockup caused by wpa_supplicant triggering ipw_request_direct_scan() while the driver was in a middle of a reset due to firmware errors. Thanks to Zilvinas Valinskas for reporting the bug and helping me debug it. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ipw2200.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index b0d195d1721a..374b682e4d6a 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -8926,6 +8926,10 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
8926 struct ipw_scan_request_ext scan; 8926 struct ipw_scan_request_ext scan;
8927 int err = 0, scan_type; 8927 int err = 0, scan_type;
8928 8928
8929 if (!(priv->status & STATUS_INIT) ||
8930 (priv->status & STATUS_EXIT_PENDING))
8931 return 0;
8932
8929 down(&priv->sem); 8933 down(&priv->sem);
8930 8934
8931 if (priv->status & STATUS_RF_KILL_MASK) { 8935 if (priv->status & STATUS_RF_KILL_MASK) {