P2PS: Do not remove pending interface on p2p_stop_find

The pending interface created during provision discovery should
not be removed on stopping p2p_find. This pending interface has
to be used after completing GO negotiation. Earlier the pending
interface is created just before GO negotiation so there was no
problem.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Krishna Vamsi 2014-12-30 17:57:38 +05:30 committed by Jouni Malinen
parent ae2dd835be
commit 93eca6155b
2 changed files with 6 additions and 1 deletions

View File

@ -748,6 +748,7 @@ grp_owner:
"P2P: Failed to allocate a new interface for the group");
return P2PS_SETUP_NONE;
}
wpa_s->global->pending_group_iface_for_p2ps = 1;
p2p_set_intended_addr(wpa_s->global->p2p,
wpa_s->pending_interface_addr);
}
@ -1943,6 +1944,7 @@ static void wpas_p2p_remove_pending_group_interface(
wpa_s->pending_interface_name);
os_memset(wpa_s->pending_interface_addr, 0, ETH_ALEN);
wpa_s->pending_interface_name[0] = '\0';
wpa_s->global->pending_group_iface_for_p2ps = 0;
}
@ -1988,6 +1990,7 @@ wpas_p2p_init_group_interface(struct wpa_supplicant *wpa_s, int go)
group_wpa_s->p2p_group_interface = go ? P2P_GROUP_INTERFACE_GO :
P2P_GROUP_INTERFACE_CLIENT;
wpa_s->global->p2p_group_formation = group_wpa_s;
wpa_s->global->pending_group_iface_for_p2ps = 0;
wpas_p2p_clone_config(group_wpa_s, wpa_s);
@ -7029,7 +7032,8 @@ static void wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
void wpas_p2p_stop_find(struct wpa_supplicant *wpa_s)
{
wpas_p2p_stop_find_oper(wpa_s);
wpas_p2p_remove_pending_group_interface(wpa_s);
if (!wpa_s->global->pending_group_iface_for_p2ps)
wpas_p2p_remove_pending_group_interface(wpa_s);
}

View File

@ -276,6 +276,7 @@ struct wpa_global {
unsigned int p2p_fail_on_wps_complete:1;
unsigned int p2p_24ghz_social_channels:1;
unsigned int pending_p2ps_group:1;
unsigned int pending_group_iface_for_p2ps:1;
#ifdef CONFIG_WIFI_DISPLAY
int wifi_display;