|
@@ -2611,7 +2611,8 @@ static int wpas_p2p_start_go_neg(struct wpa_supplicant *wpa_s,
|
|
|
return p2p_connect(wpa_s->global->p2p, peer_addr, wps_method,
|
|
|
go_intent, own_interface_addr, force_freq,
|
|
|
persistent_group, ssid ? ssid->ssid : NULL,
|
|
|
- ssid ? ssid->ssid_len : 0);
|
|
|
+ ssid ? ssid->ssid_len : 0,
|
|
|
+ wpa_s->p2p_pd_before_go_neg);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2791,7 +2792,8 @@ static void wpas_p2p_scan_res_join(struct wpa_supplicant *wpa_s,
|
|
|
wpa_s->p2p_persistent_group, 0, 0, 0,
|
|
|
wpa_s->p2p_go_intent,
|
|
|
wpa_s->p2p_connect_freq,
|
|
|
- wpa_s->p2p_persistent_id);
|
|
|
+ wpa_s->p2p_persistent_id,
|
|
|
+ wpa_s->p2p_pd_before_go_neg);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -3064,6 +3066,8 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s)
|
|
|
* @freq: Frequency for the group or 0 for auto-selection
|
|
|
* @persistent_id: Persistent group credentials to use for forcing GO
|
|
|
* parameters or -1 to generate new values (SSID/passphrase)
|
|
|
+ * @pd: Whether to send Provision Discovery prior to GO Negotiation as an
|
|
|
+ * interoperability workaround when initiating group formation
|
|
|
* Returns: 0 or new PIN (if pin was %NULL) on success, -1 on unspecified
|
|
|
* failure, -2 on failure due to channel not currently available,
|
|
|
* -3 if forced channel is not supported
|
|
@@ -3071,7 +3075,7 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s)
|
|
|
int wpas_p2p_connect(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
|
|
|
const char *pin, enum p2p_wps_method wps_method,
|
|
|
int persistent_group, int auto_join, int join, int auth,
|
|
|
- int go_intent, int freq, int persistent_id)
|
|
|
+ int go_intent, int freq, int persistent_id, int pd)
|
|
|
{
|
|
|
int force_freq = 0, oper_freq = 0;
|
|
|
u8 bssid[ETH_ALEN];
|
|
@@ -3102,6 +3106,7 @@ int wpas_p2p_connect(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
|
|
|
wpa_s->p2p_go_intent = go_intent;
|
|
|
wpa_s->p2p_connect_freq = freq;
|
|
|
wpa_s->p2p_fallback_to_go_neg = 0;
|
|
|
+ wpa_s->p2p_pd_before_go_neg = !!pd;
|
|
|
|
|
|
if (pin)
|
|
|
os_strlcpy(wpa_s->p2p_pin, pin, sizeof(wpa_s->p2p_pin));
|
|
@@ -4845,7 +4850,8 @@ static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
|
|
|
wpas_p2p_connect(wpa_s, wpa_s->pending_join_dev_addr, wpa_s->p2p_pin,
|
|
|
wpa_s->p2p_wps_method, wpa_s->p2p_persistent_group, 0,
|
|
|
0, 0, wpa_s->p2p_go_intent, wpa_s->p2p_connect_freq,
|
|
|
- wpa_s->p2p_persistent_id);
|
|
|
+ wpa_s->p2p_persistent_id,
|
|
|
+ wpa_s->p2p_pd_before_go_neg);
|
|
|
}
|
|
|
|
|
|
|