summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index 8b09973309c9..430baa249465 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1224,11 +1224,12 @@ int brcmf_fws_init(struct brcmf_pub *drvr)
u32 tlv = 0;
int rc;
- /* enable rssi signals */
- if (drvr->fw_signals)
- tlv = BRCMF_FWS_FLAGS_RSSI_SIGNALS |
- BRCMF_FWS_FLAGS_XONXOFF_SIGNALS |
- BRCMF_FWS_FLAGS_CREDIT_STATUS_SIGNALS;
+ if (!drvr->fw_signals)
+ return 0;
+
+ tlv = BRCMF_FWS_FLAGS_RSSI_SIGNALS |
+ BRCMF_FWS_FLAGS_XONXOFF_SIGNALS |
+ BRCMF_FWS_FLAGS_CREDIT_STATUS_SIGNALS;
spin_lock_init(&drvr->fws_spinlock);
@@ -1277,6 +1278,9 @@ void brcmf_fws_deinit(struct brcmf_pub *drvr)
struct brcmf_fws_info *fws = drvr->fws;
ulong flags;
+ if (!fws)
+ return;
+
/* cleanup */
brcmf_fws_lock(drvr, flags);
brcmf_fws_cleanup(fws, -1);