From: Hans de Goede <hdegoede@redhat.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Kalle Valo <kvalo@codeaurora.org>
Cc: Hans de Goede <hdegoede@redhat.com>, Takashi Iwai <tiwai@suse.de>,
linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com
Subject: [PATCH v2 4/4] brcmfmac: Handle status == BRCMF_E_STATUS_ABORT in cfg80211_escan_handler
Date: Mon, 27 Feb 2017 22:45:39 +0100 [thread overview]
Message-ID: <20170227214539.16422-4-hdegoede@redhat.com> (raw)
In-Reply-To: <20170227214539.16422-1-hdegoede@redhat.com>
If a scan gets aborted BRCMF_SCAN_STATUS_BUSY gets cleared in
cfg->scan_status and when we receive an abort event from the firmware
the BRCMF_SCAN_STATUS_BUSY check in the cfg80211_escan_handler will
trigger resulting in multiple errors getting logged.
Check for a status of BRCMF_E_STATUS_ABORT and in this case simply
cleanly exit the cfg80211_escan_handler. This also avoids a
BRCMF_E_STATUS_ABORT event arriving after a new scan has been started
causing the new scan to complete prematurely without any data.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index c0b7f69..4c740b74 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -3105,6 +3105,9 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
status = e->status;
+ if (status == BRCMF_E_STATUS_ABORT)
+ goto exit;
+
if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
brcmf_err("scan not ready, bsscfgidx=%d\n", ifp->bsscfgidx);
return -EPERM;
--
2.9.3
next prev parent reply other threads:[~2017-02-28 0:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 21:45 [PATCH v2 1/4] brcmfmac: Do not print the firmware version as an error Hans de Goede
2017-02-27 21:45 ` [PATCH v2 2/4] brcmfmac: p2p and normal ap access are not always possible at the same time Hans de Goede
2017-03-07 10:03 ` Arend Van Spriel
2017-03-08 8:24 ` Hans de Goede
2017-03-08 9:26 ` Arend Van Spriel
2017-03-08 10:15 ` Arend Van Spriel
2017-03-08 11:16 ` Hans de Goede
2017-03-10 8:08 ` Hans de Goede
2017-03-10 9:35 ` Arend Van Spriel
2017-03-16 11:51 ` Hans de Goede
2017-02-27 21:45 ` [PATCH v2 3/4] brcmfmac: Do not complain about country code "00" Hans de Goede
2017-03-07 10:04 ` Arend Van Spriel
2017-02-27 21:45 ` Hans de Goede [this message]
2017-03-07 10:06 ` [PATCH v2 4/4] brcmfmac: Handle status == BRCMF_E_STATUS_ABORT in cfg80211_escan_handler Arend Van Spriel
2017-03-07 9:59 ` [PATCH v2 1/4] brcmfmac: Do not print the firmware version as an error Arend Van Spriel
2017-03-08 8:23 ` Hans de Goede
2017-03-08 9:28 ` Arend Van Spriel
2017-03-08 9:57 ` Kalle Valo
2017-03-08 10:08 ` Hans de Goede
2017-03-08 10:13 ` Arend Van Spriel
2017-03-08 10:14 ` Kalle Valo
2017-03-07 14:30 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170227214539.16422-4-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox