If the p2p_group_add command does not specify the operating channel,
make sure the operating channel set in the configuration file meets
the P2P requirements in the same way as is done with the frequency
specified as the command parameter.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
if (wpas_p2p_init_go_params(wpa_s, ¶ms, freq))
return -1;
+ if (params.freq &&
+ !p2p_supported_freq(wpa_s->global->p2p, params.freq)) {
+ wpa_printf(MSG_DEBUG, "P2P: The selected channel for GO "
+ "(%u MHz) is not supported for P2P uses",
+ params.freq);
+ return -1;
+ }
p2p_go_params(wpa_s->global->p2p, ¶ms);
params.persistent_group = persistent_group;