diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-05-11 16:25:47 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-05-11 16:25:47 +0300 |
commit | 3bc462cb88e0ffa2fe5b891b7539eb39757a5315 (patch) | |
tree | 8df810190c15168725eb29c20cf9e612daa8a3aa /src/p2p/p2p_go_neg.c | |
parent | 1cbe86e2d6d2b5a7d072093ce1a94082b4b3f472 (diff) | |
download | external_wpa_supplicant_8_ti-3bc462cb88e0ffa2fe5b891b7539eb39757a5315.zip external_wpa_supplicant_8_ti-3bc462cb88e0ffa2fe5b891b7539eb39757a5315.tar.gz external_wpa_supplicant_8_ti-3bc462cb88e0ffa2fe5b891b7539eb39757a5315.tar.bz2 |
P2P: Add option for Provision Discovery before GO Negotiation
This is a workaround for interoperability issues with some deployed P2P
implementations that require a Provision Discovery exchange to be used
before GO Negotiation. The new provdisc parameter for the p2p_connect
command can be used to request this behavior without having to run a
separate p2p_prov_disc command.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 230948d..2bf48b3 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -184,6 +184,23 @@ int p2p_connect_send(struct p2p_data *p2p, struct p2p_device *dev) struct wpabuf *req; int freq; + if (dev->flags & P2P_DEV_PD_BEFORE_GO_NEG) { + u16 config_method; + wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, + "P2P: Use PD-before-GO-Neg workaround for " MACSTR, + MAC2STR(dev->info.p2p_device_addr)); + if (dev->wps_method == WPS_PIN_DISPLAY) + config_method = WPS_CONFIG_KEYPAD; + else if (dev->wps_method == WPS_PIN_KEYPAD) + config_method = WPS_CONFIG_DISPLAY; + else if (dev->wps_method == WPS_PBC) + config_method = WPS_CONFIG_PUSHBUTTON; + else + return -1; + return p2p_prov_disc_req(p2p, dev->info.p2p_device_addr, + config_method, 0, 0); + } + freq = dev->listen_freq > 0 ? dev->listen_freq : dev->oper_freq; if (freq <= 0) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, |