Skip to content

Commit 50e98be

Browse files
gokulkumar-ifxgregkh
authored andcommitted
wifi: brcmfmac: fix P2P discovery failure in P2P peer due to missing P2P IE
[ Upstream commit 579bf80 ] After commit bd99a30 ("brcmfmac: move configuration of probe request IEs"), the probe request MGMT IE addition operation brcmf_vif_set_mgmt_ie() got moved from the brcmf_p2p_scan_prep() to the brcmf_cfg80211_scan(). Because of this, as part of the scan request handler for the P2P Discovery, vif struct used for adding the Probe Request P2P IE in firmware got changed from the P2PAPI_BSSCFG_DEVICE vif to P2PAPI_BSSCFG_PRIMARY vif incorrectly. So the firmware stopped adding P2P IE to the outgoing P2P Discovery probe requests frames and the other P2P peers were unable to discover this device causing a regression on the P2P feature. To fix this, while setting the P2P IE in firmware, properly use the vif of the P2P discovery wdev on which the driver received the P2P scan request. This is done by not changing the vif pointer, until brcmf_vif_set_mgmt_ie() is completed. Fixes: bd99a30 ("brcmfmac: move configuration of probe request IEs") Signed-off-by: Gokul Sivakumar <gokulkumar.sivakumar@infineon.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20250626050706.7271-1-gokulkumar.sivakumar@infineon.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 21e3174 commit 50e98be

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,10 +1541,6 @@ brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
15411541
return -EAGAIN;
15421542
}
15431543

1544-
/* If scan req comes for p2p0, send it over primary I/F */
1545-
if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif)
1546-
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
1547-
15481544
brcmf_dbg(SCAN, "START ESCAN\n");
15491545

15501546
cfg->scan_request = request;
@@ -1560,6 +1556,10 @@ brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
15601556
if (err)
15611557
goto scan_out;
15621558

1559+
/* If scan req comes for p2p0, send it over primary I/F */
1560+
if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif)
1561+
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
1562+
15631563
err = brcmf_do_escan(vif->ifp, request);
15641564
if (err)
15651565
goto scan_out;

0 commit comments

Comments
 (0)