Commit 47829f4f authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: only allocate firmware-signalling resources if required

Bail out of brcmf_fws_init() when no firmware-signalling is asked
for. Need to take this into account in brcmf_fws_deinit() as well.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d9337414
...@@ -982,7 +982,6 @@ void brcmf_detach(struct device *dev) ...@@ -982,7 +982,6 @@ void brcmf_detach(struct device *dev)
if (drvr->prot) if (drvr->prot)
brcmf_proto_detach(drvr); brcmf_proto_detach(drvr);
if (drvr->fws)
brcmf_fws_deinit(drvr); brcmf_fws_deinit(drvr);
brcmf_debugfs_detach(drvr); brcmf_debugfs_detach(drvr);
......
...@@ -1224,8 +1224,9 @@ int brcmf_fws_init(struct brcmf_pub *drvr) ...@@ -1224,8 +1224,9 @@ int brcmf_fws_init(struct brcmf_pub *drvr)
u32 tlv = 0; u32 tlv = 0;
int rc; int rc;
/* enable rssi signals */ if (!drvr->fw_signals)
if (drvr->fw_signals) return 0;
tlv = BRCMF_FWS_FLAGS_RSSI_SIGNALS | tlv = BRCMF_FWS_FLAGS_RSSI_SIGNALS |
BRCMF_FWS_FLAGS_XONXOFF_SIGNALS | BRCMF_FWS_FLAGS_XONXOFF_SIGNALS |
BRCMF_FWS_FLAGS_CREDIT_STATUS_SIGNALS; BRCMF_FWS_FLAGS_CREDIT_STATUS_SIGNALS;
...@@ -1277,6 +1278,9 @@ void brcmf_fws_deinit(struct brcmf_pub *drvr) ...@@ -1277,6 +1278,9 @@ void brcmf_fws_deinit(struct brcmf_pub *drvr)
struct brcmf_fws_info *fws = drvr->fws; struct brcmf_fws_info *fws = drvr->fws;
ulong flags; ulong flags;
if (!fws)
return;
/* cleanup */ /* cleanup */
brcmf_fws_lock(drvr, flags); brcmf_fws_lock(drvr, flags);
brcmf_fws_cleanup(fws, -1); brcmf_fws_cleanup(fws, -1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment