diff options
author | Jithu Jance <jithu@broadcom.com> | 2011-10-26 01:28:51 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-26 01:28:51 +0300 |
commit | 2d4f15d6835bfc51ef00ded9ca0389c6c89d746c (patch) | |
tree | d546afb13c72d0df91e8b009681a11415e0373a9 | |
parent | 62f05ce9c54d6cbbfe57d69a5bf126fd96ee5265 (diff) | |
download | external_wpa_supplicant_8_ti-2d4f15d6835bfc51ef00ded9ca0389c6c89d746c.zip external_wpa_supplicant_8_ti-2d4f15d6835bfc51ef00ded9ca0389c6c89d746c.tar.gz external_wpa_supplicant_8_ti-2d4f15d6835bfc51ef00ded9ca0389c6c89d746c.tar.bz2 |
P2P: Stop any on-going "p2p_find" on creating an Autonomous GO
This patch stops any on-going "p2p_find" on creating an Autonomous GO.
This is already taken care in case of invoking a persistent GO. GO as
such will be advertising via the beacons for other devices to discover.
So normally the GO doesn't need to do a p2p_find until and unless it
wants to invite a P2P Client. In case of Invite scenario, logically it
is better to do a explicit discover [via user intervention] after the GO
is created. This patch will help to reduce battery wastage [due to
p2p_find operations] in scenarios where user creates a GO and doesn't
initiate a connection.
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 55e84a1..edae2da 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3014,6 +3014,10 @@ int wpas_p2p_group_add(struct wpa_supplicant *wpa_s, int persistent_group, if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL) return -1; + /* Make sure we are not running find during connection establishment */ + wpa_printf(MSG_DEBUG, "P2P: Stop any on-going P2P FIND"); + wpas_p2p_stop_find(wpa_s); + if (freq == 2) { wpa_printf(MSG_DEBUG, "P2P: Request to start GO on 2.4 GHz " "band"); |