From: Arend van Spriel <arend@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Hante Meuleman <meuleman@broadcom.com>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 5/7] brcmfmac: Fix warn trace on module unload while in ibss mode
Date: Mon, 14 Dec 2015 14:39:52 +0100 [thread overview]
Message-ID: <1450100394-17414-6-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1450100394-17414-1-git-send-email-arend@broadcom.com>
From: Hante Meuleman <meuleman@broadcom.com>
When the driver is being unloaded a situation can occur where the
wirelesss core (cfg80211) wants to remove the ibss, but the state
of brcmfmac has already been set to down. When an error is
returned in that situation then that will result in a stack
trace on removal of the wiphy object. This is avoided by
returning 0 when device is down on a leave_ibss call.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 5964763..6632e46 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -1448,8 +1448,13 @@ brcmf_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *ndev)
struct brcmf_if *ifp = netdev_priv(ndev);
brcmf_dbg(TRACE, "Enter\n");
- if (!check_vif_up(ifp->vif))
- return -EIO;
+ if (!check_vif_up(ifp->vif)) {
+ /* When driver is being unloaded, it can end up here. If an
+ * error is returned then later on a debug trace in the wireless
+ * core module will be printed. To avoid this 0 is returned.
+ */
+ return 0;
+ }
brcmf_link_down(ifp->vif, WLAN_REASON_DEAUTH_LEAVING);
--
1.9.1
next prev parent reply other threads:[~2015-12-14 13:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 13:39 [PATCH 0/7] brcmfmac: IBSS fixes and random mac scheduled scan Arend van Spriel
2015-12-14 13:39 ` [PATCH 1/7] brcmfmac: add arp offload ip address table configuration support Arend van Spriel
2015-12-14 13:39 ` [PATCH 2/7] brcmfmac: Add get_station support for IBSS Arend van Spriel
2015-12-14 13:39 ` [PATCH 3/7] brcmfmac: Add support for scheduled scan mac randomization Arend van Spriel
2015-12-29 20:47 ` Mathy Vanhoef
2015-12-31 21:50 ` Arend van Spriel
2016-01-01 10:39 ` Kalle Valo
2016-01-02 8:28 ` Arend van Spriel
2015-12-14 13:39 ` [PATCH 4/7] brcmfmac: obtain feature info using 'cap' firmware command Arend van Spriel
2015-12-29 20:58 ` Mathy Vanhoef
2015-12-31 21:55 ` Arend van Spriel
2016-01-01 7:05 ` Arend van Spriel
2016-01-02 20:21 ` Mathy Vanhoef
2015-12-14 13:39 ` Arend van Spriel [this message]
2015-12-14 13:39 ` [PATCH 6/7] brcmfmac: Move all module parameters to one place Arend van Spriel
2015-12-14 13:39 ` [PATCH 7/7] brcmfmac: introduce module parameter to force successful probe Arend van Spriel
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=1450100394-17414-6-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
/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;
as well as URLs for NNTP newsgroup(s).