Skip to content

Commit

Permalink
[PATCH] ipw2200: disallow direct scanning when device is down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pekka Enberg authored and Linus Torvalds committed Nov 17, 2005
1 parent 0db169f commit efb3442
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -8926,6 +8926,10 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
struct ipw_scan_request_ext scan;
int err = 0, scan_type;

if (!(priv->status & STATUS_INIT) ||
(priv->status & STATUS_EXIT_PENDING))
return 0;

down(&priv->sem);

if (priv->status & STATUS_RF_KILL_MASK) {
Expand Down

0 comments on commit efb3442

Please sign in to comment.