[mac80211]: add add new firmware support and additional fixes for wl18xx
[15.05/openwrt.git] / package / kernel / mac80211 / patches / 915-wlcore-decrease-warning-verbosity-during-recovery.patch
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
4 logs.
5
6 Signed-off-by: Arik Nemtsov <arik@wizery.com>
7 Signed-off-by: Eliad Peller <eliad@wizery.com>
8
9 ---
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(-)
13
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
17         u16 status;
18         u16 poll_count = 0;
19  
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))
24                 return -EIO;
25  
26         cmd = buf;
27 --- a/drivers/net/wireless/ti/wlcore/main.c
28 +++ b/drivers/net/wireless/ti/wlcore/main.c
29 @@ -782,10 +782,11 @@ out:
30  
31  void wl12xx_queue_recovery_work(struct wl1271 *wl)
32  {
33 -       WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));
34 -
35         /* Avoid a recursive recovery */
36         if (wl->state == WLCORE_STATE_ON) {
37 +               WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY,
38 +                                 &wl->flags));
39 +
40                 wl->state = WLCORE_STATE_RESTARTING;
41                 set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
42                 wl1271_ps_elp_wakeup(wl);