brcmfmac: assure p2pdev is unregistered upon driver unload
authorArend van Spriel <arend@broadcom.com>
Wed, 10 Jun 2015 22:12:23 +0000 (00:12 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 15 Jun 2015 09:55:25 +0000 (12:55 +0300)
commitf7a40873d2fa04d7e87bd829074da9b0f32a33ed
tree2203d0fff27a0c9fe2a561d7b5909dfb7e0143c5
parent55479df8840d8de3dfa8c4950965704e1ea2254e
brcmfmac: assure p2pdev is unregistered upon driver unload

When unloading the driver with a p2pdev interface it resulted in
a warning upon calling wiphy_unregister() and subsequently a crash
in the driver. This patch assures the p2pdev is unregistered calling
unregister_wdev() before doing the wiphy_unregister().

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/brcm80211/brcmfmac/core.c
drivers/net/wireless/brcm80211/brcmfmac/p2p.c