Skip to content

Commit

Permalink
wlcore: decrease warning verbosity during recovery
Browse files Browse the repository at this point in the history
Silently ignore repetitive scheduling of recovery work and commands
being passed to the bus when the HW is not available. This can happen
many times during recovery and slow it down. It also spams the kernel
logs.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
  • Loading branch information
ariknem committed Oct 7, 2013
1 parent b6755c7 commit 2adee22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wlcore/cmd.c
Expand Up @@ -60,8 +60,8 @@ static int __wlcore_cmd_send(struct wl1271 *wl, u16 id, void *buf,
u16 status;
u16 poll_count = 0;

if (WARN_ON(wl->state == WLCORE_STATE_RESTARTING &&
id != CMD_STOP_FWLOGGER))
if (unlikely(wl->state == WLCORE_STATE_RESTARTING) &&
id != CMD_STOP_FWLOGGER)
return -EIO;

cmd = buf;
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/ti/wlcore/main.c
Expand Up @@ -796,10 +796,11 @@ static int wl12xx_fetch_firmware(struct wl1271 *wl, bool plt)

void wl12xx_queue_recovery_work(struct wl1271 *wl)
{
WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));

/* Avoid a recursive recovery */
if (wl->state == WLCORE_STATE_ON) {
WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY,
&wl->flags));

wl->state = WLCORE_STATE_RESTARTING;
set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
wl1271_ps_elp_wakeup(wl);
Expand Down

0 comments on commit 2adee22

Please sign in to comment.