diff options
author | Brian Henriquez <brian.henriquez@cypress.com> | 2022-10-24 10:52:13 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-11-08 08:38:23 +0100 |
commit | c7caaa6f727871ff00b49c3bb7260137a05491bf (patch) | |
tree | 4e459f281b56d4ad86b715c3a911d6a03083b7e4 | |
parent | wifi: rtl8xxxu: Use dev_* instead of pr_info (diff) | |
download | linux-c7caaa6f727871ff00b49c3bb7260137a05491bf.tar.xz linux-c7caaa6f727871ff00b49c3bb7260137a05491bf.zip |
wifi: brcmfmac: correctly remove all p2p vif
When deleting a P2P AGO interface we should make sure that
relevant entry in bss_idx[] array is removed. We were always
removing only 'vif' at P2PAPI_BSSCFG_CONNECTION before,
regardless of the number of created P2P AGO interfaces.
brcmfmac: correctly remove all p2p vif
Signed-off-by: Brian Henriquez <brian.henriquez@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@infineon.com>
Signed-off-by: Ian Lin <ian.lin@infineon.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221024085215.27616-2-ian.lin@infineon.com
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index 10d9d9c63b28..af8843507f3d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -2424,8 +2424,12 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev) brcmf_remove_interface(vif->ifp, true); brcmf_cfg80211_arm_vif_event(cfg, NULL); - if (iftype != NL80211_IFTYPE_P2P_DEVICE) - p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL; + if (iftype != NL80211_IFTYPE_P2P_DEVICE) { + if (vif == p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif) + p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL; + if (vif == p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION2].vif) + p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION2].vif = NULL; + } return err; } |