On Sat, Jan 19, 2019 at 10:27:34AM +0800, Jimmy Chen wrote: > wpas_p2p_group_add could use pre-defined network name, but always generate > passphrase randomly. I would like to provide a way to use pre-defined > passphrase. I don't think there is support for setting SSID when starting an autonomous GO for a non-persistent group. The supported way of setting a specific SSID and passphrase for a group is by defining a network profile for a persistent group and then instantiating that particular persistent group. In other words, this proposed functionality is already available through that mechanism. That persistent group profile is like a normal network profile, but with disabled=2 (e.g., ssid="DIRECT-example", psk="12345678", mode=3, disabled=2 for a GO). > diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c > @@ -1797,7 +1797,13 @@ int p2p_go_params(struct p2p_data *p2p, struct p2p_go_neg_results *params) > } > p2p->ssid_set = 0; > > - p2p_random(params->passphrase, p2p->cfg->passphrase_len); > + if (p2p->passphrase_set) { > + os_memcpy(params->passphrase, p2p->passphrase, > + os_strlen(p2p->passphrase)); > + } else { > + p2p_random(params->passphrase, p2p->cfg->passphrase_len); > + } > + p2p->passphrase_set = 0; > return 0; > } This patch introduces that p2p->passphrase_set, but that is not set to 1 anywhere. What would use this functionality? -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap