summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-01-09 17:00:37 +0100
committerJohn W. Linville <linville@tuxdriver.com>2006-01-16 16:51:53 -0500
commitd834a41c966c6a20368fadb59248740935e6fbae (patch)
tree53163530c274c0f9b7eeed35e0fd9564f48a7192 /drivers/net/wireless
parent0b8d3256a0c1d75bbe8ef5b0de64843e3fc9f47b (diff)
downloadtalos-obmc-linux-d834a41c966c6a20368fadb59248740935e6fbae.tar.gz
talos-obmc-linux-d834a41c966c6a20368fadb59248740935e6fbae.zip
[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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ipw2200.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 819be2b6b7df..4c28e332ecc3 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -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));
OpenPOWER on IntegriCloud