Message ID | 1541648845-194984-4-git-send-email-chi-hsien.lin@cypress.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | brcmfmac: p2p/miracast/apsta fixes | expand |
+ Jouni On 11/8/2018 4:48 AM, Chi-Hsien Lin wrote: > From: Madhan Mohan R <MadhanMohan.R@cypress.com> > > Send p2p presence response from the p2p interface address instead > of the p2p device address. This is needed for p2p cert 6.1.9 to pass. I am not really into the P2P spec, but if this is indeed a requirement (@Jouni: can you confirm?) I would expect wpa_supplicant to send the action frame over the correct netdevice (although there is no netdev for P2P_DEVICE interface so expect primary interface will be used). So instead of looking at the action frame subtype it seems to be more appropriate to determine and pass the appropriate vif in brcmf_p2p_send_action_frame(). Regards, Arend > Signed-off-by: Madhan Mohan R <MadhanMohan.R@cypress.com> > Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index 456a1bf008b3..dfdd30b19c42 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -1493,6 +1493,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, struct brcmf_fil_af_params_le *af_params) { struct brcmf_cfg80211_vif *vif; + struct brcmf_p2p_action_frame *p2p_af; s32 err = 0; s32 timeout = 0; @@ -1502,7 +1503,13 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); - vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; + /* check if it is a p2p_presence response */ + p2p_af = (struct brcmf_p2p_action_frame *)af_params->action_frame.data; + if (p2p_af->subtype == P2P_AF_PRESENCE_RSP) + vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif; + else + vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; + err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe", af_params, sizeof(*af_params)); if (err) {