P2P: Fix p2p_pref_chan setting from configuration file
Commit 21d996f775
added p2p_pref_chan as a
configuration file parameter, but included only the case of dynamically
setting this at runtime through the control interface SET command.
Complete this functionality by taking this value into use directly from
the configuration file, too.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
d7692b8d1c
commit
010b5f9bfc
1 changed files with 6 additions and 0 deletions
|
@ -3030,6 +3030,12 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
|
|||
wpa_printf(MSG_DEBUG, "P2P: Random operating channel: "
|
||||
"%d:%d", p2p.op_reg_class, p2p.op_channel);
|
||||
}
|
||||
|
||||
if (wpa_s->conf->p2p_pref_chan && wpa_s->conf->num_p2p_pref_chan) {
|
||||
p2p.pref_chan = wpa_s->conf->p2p_pref_chan;
|
||||
p2p.num_pref_chan = wpa_s->conf->num_p2p_pref_chan;
|
||||
}
|
||||
|
||||
if (wpa_s->conf->country[0] && wpa_s->conf->country[1]) {
|
||||
os_memcpy(p2p.country, wpa_s->conf->country, 2);
|
||||
p2p.country[2] = 0x04;
|
||||
|
|
Loading…
Reference in a new issue