915-wlcore-decrease-warning-verbosity-during-recovery.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. Signed-off-by: Arik Nemtsov <[email protected]>
  6. Signed-off-by: Eliad Peller <[email protected]>
  7. ---
  8. drivers/net/wireless/ti/wlcore/cmd.c | 4 ++--
  9. drivers/net/wireless/ti/wlcore/main.c | 5 +++--
  10. 2 files changed, 5 insertions(+), 4 deletions(-)
  11. --- a/drivers/net/wireless/ti/wlcore/cmd.c
  12. +++ b/drivers/net/wireless/ti/wlcore/cmd.c
  13. @@ -60,8 +60,8 @@ static int __wlcore_cmd_send(struct wl12
  14. u16 status;
  15. u16 poll_count = 0;
  16. - if (WARN_ON(wl->state == WLCORE_STATE_RESTARTING &&
  17. - id != CMD_STOP_FWLOGGER))
  18. + if (unlikely(wl->state == WLCORE_STATE_RESTARTING &&
  19. + id != CMD_STOP_FWLOGGER))
  20. return -EIO;
  21. cmd = buf;
  22. --- a/drivers/net/wireless/ti/wlcore/main.c
  23. +++ b/drivers/net/wireless/ti/wlcore/main.c
  24. @@ -782,10 +782,11 @@ out:
  25. void wl12xx_queue_recovery_work(struct wl1271 *wl)
  26. {
  27. - WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));
  28. -
  29. /* Avoid a recursive recovery */
  30. if (wl->state == WLCORE_STATE_ON) {
  31. + WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY,
  32. + &wl->flags));
  33. +
  34. wl->state = WLCORE_STATE_RESTARTING;
  35. set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
  36. wl1271_ps_elp_wakeup(wl);