diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-21 06:23:30 +0200 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 12:30:04 +0300 |
commit | 52a2a37550b604b3c3c7a044ff72d85b60165659 (patch) | |
tree | d248ea1d162a78372881cde5f2c22c9eb5b9ee67 /drivers/net/wireless/wl12xx/wl1271_scan.c | |
parent | 8c7f4f3166e16bb350bfc53955ea6cf9bfd34aab (diff) | |
download | lwn-52a2a37550b604b3c3c7a044ff72d85b60165659.tar.gz lwn-52a2a37550b604b3c3c7a044ff72d85b60165659.zip |
wl1271: Separate interface removal to another function
Do this so the interface removal can be triggered from an upcoming hardware
failure recovery mechanism.
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.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_scan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c index 9f1da82ed8d6..20caceba435e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_scan.c +++ b/drivers/net/wireless/wl12xx/wl1271_scan.c @@ -36,6 +36,12 @@ void wl1271_scan_complete_work(struct work_struct *work) wl1271_debug(DEBUG_SCAN, "Scanning complete"); mutex_lock(&wl->mutex); + + if (wl->scan.state == WL1271_SCAN_STATE_IDLE) { + mutex_unlock(&wl->mutex); + return; + } + wl->scan.state = WL1271_SCAN_STATE_IDLE; kfree(wl->scan.scanned_ch); wl->scan.scanned_ch = NULL; |