P2P: Add support for preferred channel list
p2p_pref_chan configuration parameter can now be used to set the list of preferred channel for P2P GO Negotiation. This will be used in the priority order if the peer does not support the channel we are trying to use as the GO (configured operating channel or the best 2.4 GHz/5 GHz channel) for the case where a forced channel is not used. p2p_pref_chan=<op class:channel>,... For example: p2p_pref_chan=81:1,81:2,81:3,81:4,81:5,81:6 This would configure 2.4 GHz channels 1-6 as the preferred ones with channel 1 the most preferred option. These configuration parameters can be set in wpa_supplicant.conf and dynamically updated with "wpa_cli set <param> <value>". Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
564865e1d4
commit
21d996f775
7 changed files with 148 additions and 0 deletions
|
@ -4151,6 +4151,14 @@ void wpas_p2p_update_config(struct wpa_supplicant *wpa_s)
|
|||
wpa_printf(MSG_ERROR, "P2P: Own oper channel update "
|
||||
"failed: %d", ret);
|
||||
}
|
||||
|
||||
if (wpa_s->conf->changed_parameters & CFG_CHANGED_P2P_PREF_CHAN) {
|
||||
if (p2p_set_pref_chan(p2p, wpa_s->conf->num_p2p_pref_chan,
|
||||
wpa_s->conf->p2p_pref_chan) < 0) {
|
||||
wpa_printf(MSG_ERROR, "P2P: Preferred channel list "
|
||||
"update failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue