brcmfmac: move brcmf_fws_deinit to bcdc layer
authorFranky Lin <franky.lin@broadcom.com>
Tue, 28 Mar 2017 10:43:25 +0000 (11:43 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 5 Apr 2017 12:41:16 +0000 (15:41 +0300)
Move brcmf_fws_deinit into brcmf_proto_bcdc_detach since it is a bcdc
exclusive feature.

Signed-off-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c

index a07c49fa745a8ad7314566efdcea2a039f24af15..24da6276d29d95c3bdb4956bc72761b7785bbff8 100644 (file)
@@ -464,6 +464,7 @@ fail:
 
 void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr)
 {
+       brcmf_fws_deinit(drvr);
        kfree(drvr->proto->pd);
        drvr->proto->pd = NULL;
 }
index 0c05365278399f2780e176089719fc3006b88ef8..c2e98e77ca82c9e569c1ae8967cd476d72546565 100644 (file)
@@ -32,7 +32,6 @@
 #include "p2p.h"
 #include "cfg80211.h"
 #include "fwil.h"
-#include "fwsignal.h"
 #include "feature.h"
 #include "proto.h"
 #include "pcie.h"
@@ -1034,10 +1033,6 @@ fail:
                brcmf_cfg80211_detach(drvr->config);
                drvr->config = NULL;
        }
-       if (drvr->fws) {
-               brcmf_proto_del_if(ifp->drvr, ifp);
-               brcmf_fws_deinit(drvr);
-       }
        brcmf_net_detach(ifp->ndev, false);
        if (p2p_ifp)
                brcmf_net_detach(p2p_ifp->ndev, false);
@@ -1103,8 +1098,6 @@ void brcmf_detach(struct device *dev)
 
        brcmf_cfg80211_detach(drvr->config);
 
-       brcmf_fws_deinit(drvr);
-
        brcmf_bus_stop(drvr->bus_if);
 
        brcmf_proto_detach(drvr);