aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p/p2p_i.h
diff options
context:
space:
mode:
authorJayant Sane <jayant.sane@intel.com>2011-06-12 21:20:39 (GMT)
committerJouni Malinen <j@w1.fi>2011-06-12 21:20:39 (GMT)
commit6b56cc2d97fe9efd1feea8d418714b4658b056f1 (patch)
treef76a6322dc87674808eafc9e7375ef960d5907ef /src/p2p/p2p_i.h
parent6b98a33c86159812a324e7c6cb3c237c4dae3293 (diff)
downloadhostap-6b56cc2d97fe9efd1feea8d418714b4658b056f1.zip
hostap-6b56cc2d97fe9efd1feea8d418714b4658b056f1.tar.gz
hostap-6b56cc2d97fe9efd1feea8d418714b4658b056f1.tar.bz2
P2P: Retry provision discovery requests in IDLE state
Since the peer may not be in Listen state when the provision discovery request is sent, try to send the request again number of times when in IDLE state. This was already done when p2p_find is in progress, but this commit adds retries to the case where no other P2P operations are in progress. Signed-off-by: Jayant Sane <jayant.sane@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'src/p2p/p2p_i.h')
-rw-r--r--src/p2p/p2p_i.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index 68b1194..ef90f0a 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -393,6 +393,23 @@ struct p2p_data {
* wps_vendor_ext - WPS Vendor Extensions to add
*/
struct wpabuf *wps_vendor_ext[P2P_MAX_WPS_VENDOR_EXT];
+
+ /*
+ * user_initiated_pd - Whether a PD request is user initiated or not.
+ */
+ u8 user_initiated_pd;
+
+ /*
+ * Keep track of which peer a given PD request was sent to.
+ * Used to raise a timeout alert in case there is no response.
+ */
+ u8 pending_pd_devaddr[ETH_ALEN];
+
+ /*
+ * Retry counter for provision discovery requests when issued
+ * in IDLE state.
+ */
+ int pd_retries;
};
/**
@@ -586,6 +603,7 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
const u8 *data, size_t len);
int p2p_send_prov_disc_req(struct p2p_data *p2p, struct p2p_device *dev,
int join);
+void p2p_reset_pending_pd(struct p2p_data *p2p);
/* p2p_invitation.c */
void p2p_process_invitation_req(struct p2p_data *p2p, const u8 *sa,