提交 d834a41c 编写于 作者: O Olaf Kirch 提交者: John W. Linville

[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: NOlaf Kirch <okir@suse.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0b8d3256
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册