brcmfmac: de-init driver layers in correct order.
authorHante Meuleman <meuleman@broadcom.com>
Tue, 25 Feb 2014 19:30:30 +0000 (20:30 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:33:20 +0000 (14:33 -0500)
First clean up fw signalling, before cleaning up the bus and
proto layer. Old order can cause oops in some circumstances.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

index d4d966beb840b832ecc079a9317d6a3b8baa22d8..7d28cd3850925a7af0a4b9f34c2888afa83e0d03 100644 (file)
@@ -1040,12 +1040,12 @@ void brcmf_detach(struct device *dev)
 
        brcmf_cfg80211_detach(drvr->config);
 
+       brcmf_fws_deinit(drvr);
+
        brcmf_bus_detach(drvr);
 
        brcmf_proto_detach(drvr);
 
-       brcmf_fws_deinit(drvr);
-
        brcmf_debugfs_detach(drvr);
        bus_if->drvr = NULL;
        kfree(drvr);