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.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.c')
-rw-r--r-- | src/p2p/p2p.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 2b084e7..deccfc0 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1173,16 +1173,17 @@ int p2p_connect(struct p2p_data *p2p, const u8 *peer_addr, enum p2p_wps_method wps_method, int go_intent, const u8 *own_interface_addr, unsigned int force_freq, int persistent_group, - const u8 *force_ssid, size_t force_ssid_len) + const u8 *force_ssid, size_t force_ssid_len, + int pd_before_go_neg) { struct p2p_device *dev; wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Request to start group negotiation - peer=" MACSTR " GO Intent=%d Intended Interface Address=" MACSTR - " wps_method=%d persistent_group=%d", + " wps_method=%d persistent_group=%d pd_before_go_neg=%d", MAC2STR(peer_addr), go_intent, MAC2STR(own_interface_addr), - wps_method, persistent_group); + wps_method, persistent_group, pd_before_go_neg); if (p2p_prepare_channel(p2p, force_freq) < 0) return -1; @@ -1232,6 +1233,10 @@ int p2p_connect(struct p2p_data *p2p, const u8 *peer_addr, dev->flags &= ~P2P_DEV_USER_REJECTED; dev->flags &= ~P2P_DEV_WAIT_GO_NEG_RESPONSE; dev->flags &= ~P2P_DEV_WAIT_GO_NEG_CONFIRM; + if (pd_before_go_neg) + dev->flags |= P2P_DEV_PD_BEFORE_GO_NEG; + else + dev->flags &= ~P2P_DEV_PD_BEFORE_GO_NEG; dev->connect_reqs = 0; dev->go_neg_req_sent = 0; dev->go_state = UNKNOWN_GO; |