Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d834a41c authored by Olaf Kirch's avatar Olaf Kirch Committed by John W. Linville
Browse files

[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: default avatarOlaf Kirch <okir@suse.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0b8d3256
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -8936,15 +8936,13 @@ 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");
		/* 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));

	if (priv->config & CFG_SPEED_SCAN)