brcmfmac: fix lockup when removing P2P interface after event timeout
authorRafał Miłecki <zajec5@gmail.com>
Fri, 17 Jun 2016 10:29:21 +0000 (12:29 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 29 Jun 2016 15:57:19 +0000 (18:57 +0300)
commitb50ddfa8530e9b5f52e873fdd6ff04f327a88799
treee43ca01f704921d0a23df1236f2dd6eea7852a8a
parent6f07e0f12a577a5820dd6b57c3f3b0f7f4a3c52c
brcmfmac: fix lockup when removing P2P interface after event timeout

Removing P2P interface is handled by sending a proper request to the
firmware. On success firmware triggers an event and driver's handler
removes a matching interface.

However on event timeout we remove interface directly from the cfg80211
callback. Current code doesn't handle this case correctly as it always
assumes rtnl to be unlocked.

Fix it by adding an extra rtnl_locked parameter to functions and calling
unregister_netdevice when needed.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c