brcmfmac: change the order of things in brcmf_detach()
authorArend van Spriel <arend.vanspriel@broadcom.com>
Thu, 11 Jul 2019 09:05:07 +0000 (11:05 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:51:22 +0000 (14:51 +0300)
commit14fcfd1cc0c05ea58f47dd693fdd13f25dfe995e
treeaef3b468353e4a50284273691f8874037a097945
parenta84a60ccdd65278485fb495f468a5ab91a75c649
brcmfmac: change the order of things in brcmf_detach()

When brcmf_detach() from the bus layer upon rmmod we can no longer
communicate. Hence we will set the bus state to DOWN and cleanup
the event and protocol layer. The network interfaces need to be
deleted before brcmf_cfg80211_detach() because the latter does the
wiphy_unregister() which issues a warning if there are still network
devices linked to the wiphy instance.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c