Commit c7caaa6f authored by Brian Henriquez's avatar Brian Henriquez Committed by Kalle Valo

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: default avatarBrian Henriquez <brian.henriquez@cypress.com>
Signed-off-by: default avatarChi-hsien Lin <chi-hsien.lin@infineon.com>
Signed-off-by: default avatarIan Lin <ian.lin@infineon.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221024085215.27616-2-ian.lin@infineon.com
parent bd954a7e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment