aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJean-Michel.Bachot <jean-michelx.bachot@intel.com>2011-12-11 15:43:17 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-11 15:43:17 (GMT)
commit5aff6fc6978c3c6337adf97a5dd795425d9de810 (patch)
tree0fc38debea011a6ba99143741e2c2dbcf4238c0f /src
parente3a0706b47a7dc67079d1f5409b834720df3e439 (diff)
downloadhostap-5aff6fc6978c3c6337adf97a5dd795425d9de810.zip
hostap-5aff6fc6978c3c6337adf97a5dd795425d9de810.tar.gz
hostap-5aff6fc6978c3c6337adf97a5dd795425d9de810.tar.bz2
P2P: Remove unexpected pending Provision Discovery Request in Search
A Pending Provision Discovery Request was sent in SEARCH phase after a previous provision discovery timeout. Fix this by resetting the config method of P2P device in the pending PD reset function. This avoids the sending of a pending Provision Discovery Request during the next P2P search. Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p_pd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 759d108..6409454 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -391,6 +391,20 @@ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr,
void p2p_reset_pending_pd(struct p2p_data *p2p)
{
+ struct p2p_device *dev;
+
+ dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) {
+ if (os_memcmp(p2p->pending_pd_devaddr,
+ dev->info.p2p_device_addr, ETH_ALEN))
+ continue;
+ if (!dev->req_config_methods)
+ continue;
+ if (dev->flags & P2P_DEV_PD_FOR_JOIN)
+ continue;
+ /* Reset the config methods of the device */
+ dev->req_config_methods = 0;
+ }
+
p2p->user_initiated_pd = 0;
os_memset(p2p->pending_pd_devaddr, 0, ETH_ALEN);
p2p->pd_retries = 0;