From: Chung-Hsien Hsu <chung-hsien.hsu@xxxxxxxxxxxx> Commit 2de64ca7c9fa ("brcmfmac: p2p: Deal with set but unused variables") removed the setting of vif for p2p device discovery in brcmf_p2p_scan_prep(), causing the discovery failure. Add back the setting to brcmf_p2p_scan_prep() to fix this. Fixes: 2de64ca7c9fa ("brcmfmac: p2p: Deal with set but unused variables") Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu@xxxxxxxxxxxx> Signed-off-by: Ian Lin <ian.lin@xxxxxxxxxxxx> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index b3d706a2e68c..068f8fe0e0c4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -912,6 +912,8 @@ int brcmf_p2p_scan_prep(struct wiphy *wiphy, if (err) return err; + vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; + /* override .run_escan() callback. */ cfg->escan_info.run = brcmf_p2p_run_escan; } -- 2.25.0