1 Silently ignore repetitive scheduling of recovery work and commands
2 being passed to the bus when the HW is not available. This can happen
3 many times during recovery and slow it down. It also spams the kernel
6 Signed-off-by: Arik Nemtsov <arik@wizery.com>
7 Signed-off-by: Eliad Peller <eliad@wizery.com>
10 drivers/net/wireless/ti/wlcore/cmd.c | 4 ++--
11 drivers/net/wireless/ti/wlcore/main.c | 5 +++--
12 2 files changed, 5 insertions(+), 4 deletions(-)
14 --- a/drivers/net/wireless/ti/wlcore/cmd.c
15 +++ b/drivers/net/wireless/ti/wlcore/cmd.c
16 @@ -60,8 +60,8 @@ static int __wlcore_cmd_send(struct wl12
20 - if (WARN_ON(wl->state == WLCORE_STATE_RESTARTING &&
21 - id != CMD_STOP_FWLOGGER))
22 + if (unlikely(wl->state == WLCORE_STATE_RESTARTING &&
23 + id != CMD_STOP_FWLOGGER))
27 --- a/drivers/net/wireless/ti/wlcore/main.c
28 +++ b/drivers/net/wireless/ti/wlcore/main.c
29 @@ -782,10 +782,11 @@ out:
31 void wl12xx_queue_recovery_work(struct wl1271 *wl)
33 - WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));
35 /* Avoid a recursive recovery */
36 if (wl->state == WLCORE_STATE_ON) {
37 + WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY,
40 wl->state = WLCORE_STATE_RESTARTING;
41 set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
42 wl1271_ps_elp_wakeup(wl);