[PATCH 1/7] p2p: Add a utility function to get the group configuration

Tomasz Bursztyka tomasz.bursztyka at linux.intel.com
Mon Jun 2 10:42:02 EDT 2014


This will be useful afterwards to get its ssid and thus to compare it
against other to retrieve the interface related to this group.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
---
 src/p2p/p2p.h       | 7 +++++++
 src/p2p/p2p_group.c | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index fa8031d..3c11a45 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -1793,6 +1793,13 @@ const u8 * p2p_group_get_dev_addr(struct p2p_group *group, const u8 *addr);
 int p2p_group_is_client_connected(struct p2p_group *group, const u8 *dev_addr);
 
 /**
+ * p2p_group_get_config - Get the group configuration
+ * @group: P2P group context from p2p_group_init()
+ * Returns: The group configuration pointer
+ */
+const struct p2p_group_config *p2p_group_get_config(struct p2p_group *group);
+
+/**
  * p2p_get_peer_found - Get P2P peer info structure of a found peer
  * @p2p: P2P module context from p2p_init()
  * @addr: P2P Device Address of the peer or %NULL to indicate the first peer
diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
index 395ca08..07ce655 100644
--- a/src/p2p/p2p_group.c
+++ b/src/p2p/p2p_group.c
@@ -1013,3 +1013,9 @@ int p2p_group_get_freq(struct p2p_group *group)
 {
 	return group->cfg->freq;
 }
+
+
+const struct p2p_group_config *p2p_group_get_config(struct p2p_group *group)
+{
+	return group->cfg;
+}
-- 
1.8.5.5



More information about the HostAP mailing list