P2P NFC: Report handover select from tag for static handover
WPS_NFC_TAG_READ can be used to report static connection handover where the connection handover select message was read from an NFC tag. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
db6ae69e6b
commit
dd37a93884
3 changed files with 20 additions and 0 deletions
|
@ -7265,6 +7265,16 @@ static int wpas_p2p_nfc_connection_handover(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int wpas_p2p_nfc_tag_process(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpabuf *data)
|
||||||
|
{
|
||||||
|
if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return wpas_p2p_nfc_connection_handover(wpa_s, data, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int wpas_p2p_nfc_report_handover(struct wpa_supplicant *wpa_s, int init,
|
int wpas_p2p_nfc_report_handover(struct wpa_supplicant *wpa_s, int init,
|
||||||
const struct wpabuf *req,
|
const struct wpabuf *req,
|
||||||
const struct wpabuf *sel)
|
const struct wpabuf *sel)
|
||||||
|
|
|
@ -152,6 +152,8 @@ struct wpabuf * wpas_p2p_nfc_handover_req(struct wpa_supplicant *wpa_s,
|
||||||
int ndef);
|
int ndef);
|
||||||
struct wpabuf * wpas_p2p_nfc_handover_sel(struct wpa_supplicant *wpa_s,
|
struct wpabuf * wpas_p2p_nfc_handover_sel(struct wpa_supplicant *wpa_s,
|
||||||
int ndef, int tag);
|
int ndef, int tag);
|
||||||
|
int wpas_p2p_nfc_tag_process(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpabuf *data);
|
||||||
int wpas_p2p_nfc_report_handover(struct wpa_supplicant *wpa_s, int init,
|
int wpas_p2p_nfc_report_handover(struct wpa_supplicant *wpa_s, int init,
|
||||||
const struct wpabuf *req,
|
const struct wpabuf *req,
|
||||||
const struct wpabuf *sel);
|
const struct wpabuf *sel);
|
||||||
|
|
|
@ -2281,6 +2281,14 @@ int wpas_wps_nfc_tag_read(struct wpa_supplicant *wpa_s,
|
||||||
/* Assume this contains full NDEF record */
|
/* Assume this contains full NDEF record */
|
||||||
tmp = ndef_parse_wifi(data);
|
tmp = ndef_parse_wifi(data);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
|
#ifdef CONFIG_P2P
|
||||||
|
tmp = ndef_parse_p2p(data);
|
||||||
|
if (tmp) {
|
||||||
|
ret = wpas_p2p_nfc_tag_process(wpa_s, tmp);
|
||||||
|
wpabuf_free(tmp);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_P2P */
|
||||||
wpa_printf(MSG_DEBUG, "WPS: Could not parse NDEF");
|
wpa_printf(MSG_DEBUG, "WPS: Could not parse NDEF");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue