Commit efb3442c authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds

[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: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0db169f9
...@@ -8926,6 +8926,10 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid, ...@@ -8926,6 +8926,10 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
struct ipw_scan_request_ext scan; struct ipw_scan_request_ext scan;
int err = 0, scan_type; int err = 0, scan_type;
if (!(priv->status & STATUS_INIT) ||
(priv->status & STATUS_EXIT_PENDING))
return 0;
down(&priv->sem); down(&priv->sem);
if (priv->status & STATUS_RF_KILL_MASK) { if (priv->status & STATUS_RF_KILL_MASK) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment