Skip to content

Commit

Permalink
[PATCH] ipw2200: do not sleep in ipw_request_direct_scan
Browse files Browse the repository at this point in the history
Drivers should not sleep for very long inside an ioctl -
so return EAGAIN and let wpa_supplicant handle the problem.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Olaf Kirch authored and John W. Linville committed Jan 16, 2006
1 parent 0b8d325 commit d834a41
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -8936,14 +8936,12 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
IPW_DEBUG_HC("starting request direct scan!\n");

if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
err = wait_event_interruptible(priv->wait_state,
!(priv->
status & (STATUS_SCANNING |
STATUS_SCAN_ABORTING)));
if (err) {
IPW_DEBUG_HC("aborting direct scan");
goto done;
}
/* We should not sleep here; otherwise we will block most
* of the system (for instance, we hold rtnl_lock when we
* get here).
*/
err = -EAGAIN;
goto done;
}
memset(&scan, 0, sizeof(scan));

Expand Down

0 comments on commit d834a41

Please sign in to comment.