diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2016-01-02 09:41:40 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-01-07 10:21:14 +0100 |
commit | 6a98d64a27de16f88b97a493577a5fb9d18ec000 (patch) | |
tree | a60df656f4665e9c93f0d360fb0123828399c3cf /drivers/net/wireless/broadcom | |
parent | brcmfmac: obtain feature info using 'cap' firmware command (diff) | |
download | linux-6a98d64a27de16f88b97a493577a5fb9d18ec000.tar.xz linux-6a98d64a27de16f88b97a493577a5fb9d18ec000.zip |
brcmfmac: Fix warn trace on module unload while in ibss mode
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 |
1 files 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 05843b783d7f..dc14dd483779 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); |