diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-21 06:23:32 +0200 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 12:30:05 +0300 |
commit | 78abd3207438b20e099b41cbed58d640cbd237a6 (patch) | |
tree | f09eacf311e167b8d219eda3af52975e985df7c3 /drivers/net/wireless/wl12xx/wl1271_scan.h | |
parent | 52b0e7a61fd4b67fe8efe295297d8549f052f786 (diff) |
wl1271: Add handling for failing hardware scan command
Currently, the driver does not handle a failing hardware command to scan in
any way - effectively, the scan machine will jam until the driver is shut down,
and future scan requests will just return -EBUSY to user space, resulting in
a type of busy-loop. The same problem occurs if the firmware fails to deliver
the scan completion event - add timeout for this.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_scan.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_scan.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.h b/drivers/net/wireless/wl12xx/wl1271_scan.h index 1404e00dc963..bb7af2a102fa 100644 --- a/drivers/net/wireless/wl12xx/wl1271_scan.h +++ b/drivers/net/wireless/wl12xx/wl1271_scan.h @@ -46,6 +46,8 @@ void wl1271_scan_complete_work(struct work_struct *work); #define WL1271_SCAN_BAND_5_GHZ 1 #define WL1271_SCAN_PROBE_REQS 3 +#define WL1271_SCAN_TIMEOUT 10000 /* msec */ + enum { WL1271_SCAN_STATE_IDLE, WL1271_SCAN_STATE_2GHZ_ACTIVE, |