mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
[PATCH] ipw2200: do not sleep in ipw_request_direct_scan
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>
This commit is contained in:
parent
0b8d3256a0
commit
d834a41c96
1 changed files with 6 additions and 8 deletions
|
@ -8936,14 +8936,12 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
|
||||||
IPW_DEBUG_HC("starting request direct scan!\n");
|
IPW_DEBUG_HC("starting request direct scan!\n");
|
||||||
|
|
||||||
if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
|
if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
|
||||||
err = wait_event_interruptible(priv->wait_state,
|
/* We should not sleep here; otherwise we will block most
|
||||||
!(priv->
|
* of the system (for instance, we hold rtnl_lock when we
|
||||||
status & (STATUS_SCANNING |
|
* get here).
|
||||||
STATUS_SCAN_ABORTING)));
|
*/
|
||||||
if (err) {
|
err = -EAGAIN;
|
||||||
IPW_DEBUG_HC("aborting direct scan");
|
goto done;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
memset(&scan, 0, sizeof(scan));
|
memset(&scan, 0, sizeof(scan));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue