P2P: Set global->p2p_group_formation in wpas_p2p_join_start() for p2pdev
When a dedicated P2P device interface is used, the global->p2p_group_formation was not set in wpas_p2p_join_start() if no separate group interface is used. This would cause that in case of a failure in group formation, the cleaning of p2p_in_provisioning is done on the wrong interface. Furthermore, P2P_CANCEL command could not be used to stop such a group-join operation. Fix this by setting the global->p2p_group_formation correctly in case that the group interface is reusing wpa_s->parent. Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
This commit is contained in:
parent
7f90a850ff
commit
dc9b7d217c
1 changed files with 10 additions and 9 deletions
|
@ -5107,7 +5107,8 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s, int freq,
|
||||||
os_memcpy(group->p2p_pin, wpa_s->p2p_pin,
|
os_memcpy(group->p2p_pin, wpa_s->p2p_pin,
|
||||||
sizeof(group->p2p_pin));
|
sizeof(group->p2p_pin));
|
||||||
group->p2p_wps_method = wpa_s->p2p_wps_method;
|
group->p2p_wps_method = wpa_s->p2p_wps_method;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need to mark the current interface for p2p_group_formation
|
* Need to mark the current interface for p2p_group_formation
|
||||||
* when a separate group interface is not used. This is needed
|
* when a separate group interface is not used. This is needed
|
||||||
|
@ -5115,8 +5116,8 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s, int freq,
|
||||||
* wpas_p2p_init_group_interface() addresses this for the case
|
* wpas_p2p_init_group_interface() addresses this for the case
|
||||||
* where a separate group interface is used.
|
* where a separate group interface is used.
|
||||||
*/
|
*/
|
||||||
wpa_s->global->p2p_group_formation = wpa_s;
|
if (group == wpa_s->parent)
|
||||||
}
|
wpa_s->global->p2p_group_formation = group;
|
||||||
|
|
||||||
group->p2p_in_provisioning = 1;
|
group->p2p_in_provisioning = 1;
|
||||||
group->p2p_fallback_to_go_neg = wpa_s->p2p_fallback_to_go_neg;
|
group->p2p_fallback_to_go_neg = wpa_s->p2p_fallback_to_go_neg;
|
||||||
|
|
Loading…
Reference in a new issue