[PATCH] [PATCH] Unexpected Pending Provision Discovery Request sent in search phase
Jean-Michel Bachot
jean-michelx.bachot
Tue Aug 16 01:15:41 PDT 2011
From: Jean-Michel.Bachot <jean-michelx.bachot at intel.com>
A Pending Provision Discovery Request was sent in SEARCH phase after
a previous provision discovery timeout failure occurs.
Fix it by resetting the config method of p2p device in the pending pd
reset function.It avoids to send a Pending Provision Discovery Request
during the next p2p scan.
Change-Id: I7c55ebcfeb3b34790c408b67b8c634ba9f799e19
Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot at intel.com>
---
src/p2p/p2p_pd.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 348b338..9ff7a91 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -388,6 +388,19 @@ 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;
--
1.7.0.4
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Hostap
mailing list