wlcore: Allow stopping fw log in recovery
authorBarak Bercovitz <barak@wizery.com>
Mon, 9 Sep 2013 09:24:40 +0000 (12:24 +0300)
committerLuciano Coelho <luciano.coelho@intel.com>
Wed, 23 Oct 2013 06:47:43 +0000 (09:47 +0300)
The FW panic log is read during recovery work.
It has to be stopped properly before reading. otherwise,
inconsistent data might be read which cause the driver
to freeze.

__wlcore_cmd_send has to work for the special case of
CMD_STOP_FWLOGGER, while in recovery, in order to stop
the fw log before it is read.

Signed-off-by: Barak Bercovitz <barak@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
drivers/net/wireless/ti/wlcore/cmd.c

index e65cdfced9b274c0ed8dcb7c8fc84158bfe2c115..34d9dfff2ad39ead03d3da275cd3e4443385a220 100644 (file)
@@ -60,7 +60,8 @@ static int __wlcore_cmd_send(struct wl1271 *wl, u16 id, void *buf,
        u16 status;
        u16 poll_count = 0;
 
-       if (WARN_ON(unlikely(wl->state == WLCORE_STATE_RESTARTING)))
+       if (WARN_ON(wl->state == WLCORE_STATE_RESTARTING &&
+                   id != CMD_STOP_FWLOGGER))
                return -EIO;
 
        cmd = buf;