summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/scan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 668ff46a682..f37e5a39197 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -505,6 +505,12 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl)
wl1271_debug(DEBUG_CMD, "cmd periodic scan start");
+ if (wl->bss_type != BSS_TYPE_STA_BSS)
+ return -EOPNOTSUPP;
+
+ if (!test_bit(WL1271_FLAG_IDLE, &wl->flags))
+ return -EBUSY;
+
start = kzalloc(sizeof(*start), GFP_KERNEL);
if (!start)
return -ENOMEM;