summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-03-01 12:27:26 +0200
committerLuciano Coelho <coelho@ti.com>2011-03-03 16:20:25 +0200
commit24225b37bd78d3e2edaa1a39316c54786adaa465 (patch)
tree81870a5f482b2d672f25b04d6edc0d31efebcde0 /drivers/net/wireless/wl12xx/cmd.c
parentb16d4b6864e5bd7e5a6e5987f896003175235bca (diff)
downloadlinux-24225b37bd78d3e2edaa1a39316c54786adaa465.tar.bz2
wl12xx: wakeup chip from ELP during scan
Commands are sometimes sent to FW on scan completion. Make sure the chip is awake to receive them. Sending commands while the chip is in ELP can cause SDIO read errors and/or crash the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 97ffd7aa57a8..f0aa7ab97bf7 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -63,6 +63,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
cmd->status = 0;
WARN_ON(len % 4 != 0);
+ WARN_ON(test_bit(WL1271_FLAG_IN_ELP, &wl->flags));
wl1271_write(wl, wl->cmd_box_addr, buf, len, false);