From 952f1192429a94c99177c58dc79b0cf81f2e49d8 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <jouni.malinen@atheros.com>
Date: Tue, 29 Jun 2010 16:29:14 -0700
Subject: [PATCH] P2P: Add Device Info attribute to Invitation Request

This was added as a mandatory attribute in one of the recent spec
updates.
---
 src/p2p/p2p_invitation.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c
index 89662b28f..4a00d8f4b 100644
--- a/src/p2p/p2p_invitation.c
+++ b/src/p2p/p2p_invitation.c
@@ -43,6 +43,8 @@ static struct wpabuf * p2p_build_invitation_req(struct p2p_data *p2p,
 		p2p_buf_add_config_timeout(buf, 0, 0);
 	else
 		p2p_buf_add_config_timeout(buf, 100, 20);
+	p2p_buf_add_invitation_flags(buf, p2p->inv_persistent ?
+				     P2P_INVITATION_FLAGS_TYPE : 0);
 	p2p_buf_add_operating_channel(buf, p2p->cfg->country,
 				      p2p->op_reg_class, p2p->op_channel);
 	if (p2p->inv_bssid_set)
@@ -55,8 +57,7 @@ static struct wpabuf * p2p_build_invitation_req(struct p2p_data *p2p,
 	else
 		dev_addr = p2p->cfg->dev_addr;
 	p2p_buf_add_group_id(buf, dev_addr, p2p->inv_ssid, p2p->inv_ssid_len);
-	p2p_buf_add_invitation_flags(buf, p2p->inv_persistent ?
-				     P2P_INVITATION_FLAGS_TYPE : 0);
+	p2p_buf_add_device_info(buf, p2p, peer);
 	p2p_buf_update_ie_hdr(buf, len);
 
 	return buf;