From: Barak Bercovitz Date: Mon, 9 Sep 2013 09:24:40 +0000 (+0300) Subject: wlcore: Allow stopping fw log in recovery X-Git-Tag: upstream/snapshot3+hdmi~3572^2~3^2^2~306^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2e6424259f69234c1a6022cd25ebf06040c4846;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git wlcore: Allow stopping fw log in recovery 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 Signed-off-by: Eliad Peller Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index e65cdfc..34d9dff 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c @@ -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;