diff options
author | Arend van Spriel <arend@broadcom.com> | 2015-06-11 00:12:21 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-06-15 12:55:23 +0300 |
commit | f37d69a4babc4609045b96521736bf2772b711af (patch) | |
tree | e1f21f7f4eb6413ca54b3f2166acfe5287e184a4 /drivers/net/wireless | |
parent | 5768f31e4e75e38d9101252aabe8ec7dc826da25 (diff) | |
download | op-kernel-dev-f37d69a4babc4609045b96521736bf2772b711af.zip op-kernel-dev-f37d69a4babc4609045b96521736bf2772b711af.tar.gz |
brcmfmac: free ifp for non-netdev interface in p2p module
Making it more clear by freeing the ifp in same place where the
vif object is freed.
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/core.c b/drivers/net/wireless/brcm80211/brcmfmac/core.c index f8f47dc..8cf4a1e 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c @@ -867,8 +867,6 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bssidx) } /* unregister will take care of freeing it */ unregister_netdev(ifp->ndev); - } else { - kfree(ifp); } } diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index 710fbe5..abcaa77 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c @@ -2238,6 +2238,7 @@ static void brcmf_p2p_delete_p2pdev(struct brcmf_p2p_info *p2p, { cfg80211_unregister_wdev(&vif->wdev); p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif = NULL; + kfree(vif->ifp); brcmf_free_vif(vif); } @@ -2364,6 +2365,8 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev) break; case NL80211_IFTYPE_P2P_DEVICE: + brcmf_p2p_cancel_remain_on_channel(vif->ifp); + brcmf_p2p_deinit_discovery(p2p); brcmf_p2p_delete_p2pdev(p2p, vif); return 0; default: |