p2p: support using pre-defined passphrase for adding a new P2P group
wpas_p2p_group_add could use pre-defined network, but always generate
passphrase randomly. Provide a way to use pre-defined passphrase.
Bug: 64695709
Test: Group creation
* create a group with a configuration.
* join it as new Group Client.
* join it as new Group Client.
Change-Id: I08fbfd6542a5c1e76335c3a5911ba09ea6d9ca78
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index 6a4d751..a73d99e 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -11,6 +11,7 @@
#include "utils/list.h"
#include "p2p.h"
+#include "ap/ap_config.h"
#define P2P_GO_NEG_CNF_MAX_RETRY_COUNT 1
@@ -358,6 +359,16 @@
int ssid_set;
/**
+ * passphrase - WPA2-Personal passphrase for GO Negotiation (if local end will be GO)
+ */
+ char passphrase[MAX_PASSPHRASE_LEN + 1];
+
+ /**
+ * passphrase_set - Whether passphrase is already set for GO Negotiation
+ */
+ int passphrase_set;
+
+ /**
* Regulatory class for own operational channel
*/
u8 op_reg_class;