319-v4.12-0004-brcmfmac-Handle-status-BRCMF_E_STATUS_ABORT-in-cfg80.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From b9472a2e3e452c414634b3ccb1ef6c4098878686 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Wed, 8 Mar 2017 14:50:17 +0100
  4. Subject: [PATCH] brcmfmac: Handle status == BRCMF_E_STATUS_ABORT in
  5. cfg80211_escan_handler
  6. If a scan gets aborted BRCMF_SCAN_STATUS_BUSY gets cleared in
  7. cfg->scan_status and when we receive an abort event from the firmware
  8. the BRCMF_SCAN_STATUS_BUSY check in the cfg80211_escan_handler will
  9. trigger resulting in multiple errors getting logged.
  10. Check for a status of BRCMF_E_STATUS_ABORT and in this case simply
  11. cleanly exit the cfg80211_escan_handler. This also avoids a
  12. BRCMF_E_STATUS_ABORT event arriving after a new scan has been started
  13. causing the new scan to complete prematurely without any data.
  14. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  15. Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  16. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  17. ---
  18. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
  19. 1 file changed, 3 insertions(+)
  20. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  21. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  22. @@ -3097,6 +3097,9 @@ brcmf_cfg80211_escan_handler(struct brcm
  23. status = e->status;
  24. + if (status == BRCMF_E_STATUS_ABORT)
  25. + goto exit;
  26. +
  27. if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
  28. brcmf_err("scan not ready, bsscfgidx=%d\n", ifp->bsscfgidx);
  29. return -EPERM;