Fix p2p on DFS channel issue: p2p_dfs_chan_enable is NOT enabled on p2p interface am: e2fad41387
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/23063502 Change-Id: Ic016215066fb1f2cdd8dac504284ab3549387395 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2960,6 +2960,14 @@ bool is_p2p_6ghz_disabled(struct p2p_data *p2p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool is_p2p_dfs_chan_enabled(struct p2p_data *p2p)
|
||||||
|
{
|
||||||
|
if (p2p)
|
||||||
|
return p2p->cfg->p2p_dfs_chan_enable;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct p2p_data * p2p_init(const struct p2p_config *cfg)
|
struct p2p_data * p2p_init(const struct p2p_config *cfg)
|
||||||
{
|
{
|
||||||
struct p2p_data *p2p;
|
struct p2p_data *p2p;
|
||||||
|
|||||||
@@ -507,6 +507,11 @@ struct p2p_config {
|
|||||||
*/
|
*/
|
||||||
bool p2p_6ghz_disable;
|
bool p2p_6ghz_disable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* p2p_dfs_chan_enable - Enable p2p Go to operate on dfs channel
|
||||||
|
*/
|
||||||
|
bool p2p_dfs_chan_enable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pri_dev_type - Primary Device Type (see WPS)
|
* pri_dev_type - Primary Device Type (see WPS)
|
||||||
*/
|
*/
|
||||||
@@ -2114,6 +2119,7 @@ void p2p_update_channel_list(struct p2p_data *p2p,
|
|||||||
const struct p2p_channels *cli_chan);
|
const struct p2p_channels *cli_chan);
|
||||||
|
|
||||||
bool is_p2p_6ghz_disabled(struct p2p_data *p2p);
|
bool is_p2p_6ghz_disabled(struct p2p_data *p2p);
|
||||||
|
bool is_p2p_dfs_chan_enabled(struct p2p_data *p2p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* p2p_set_best_channels - Update best channel information
|
* p2p_set_best_channels - Update best channel information
|
||||||
|
|||||||
@@ -3993,7 +3993,7 @@ static int wpas_p2p_setup_channels(struct wpa_supplicant *wpa_s,
|
|||||||
const struct oper_class_map *o = &global_op_class[op];
|
const struct oper_class_map *o = &global_op_class[op];
|
||||||
unsigned int ch;
|
unsigned int ch;
|
||||||
struct p2p_reg_class *reg = NULL, *cli_reg = NULL;
|
struct p2p_reg_class *reg = NULL, *cli_reg = NULL;
|
||||||
bool check_dfs_supported = (wpa_s->conf->p2p_dfs_chan_enable
|
bool check_dfs_supported = (is_p2p_dfs_chan_enabled(wpa_s->global->p2p)
|
||||||
&& is_dfs_global_op_class(o->op_class));
|
&& is_dfs_global_op_class(o->op_class));
|
||||||
|
|
||||||
if ((!check_dfs_supported && o->p2p == NO_P2P_SUPP) ||
|
if ((!check_dfs_supported && o->p2p == NO_P2P_SUPP) ||
|
||||||
@@ -4971,6 +4971,7 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
|
|||||||
p2p.p2ps_group_capability = p2ps_group_capability;
|
p2p.p2ps_group_capability = p2ps_group_capability;
|
||||||
p2p.get_pref_freq_list = wpas_p2p_get_pref_freq_list;
|
p2p.get_pref_freq_list = wpas_p2p_get_pref_freq_list;
|
||||||
p2p.p2p_6ghz_disable = wpa_s->conf->p2p_6ghz_disable;
|
p2p.p2p_6ghz_disable = wpa_s->conf->p2p_6ghz_disable;
|
||||||
|
p2p.p2p_dfs_chan_enable = wpa_s->conf->p2p_dfs_chan_enable;
|
||||||
|
|
||||||
os_memcpy(wpa_s->global->p2p_dev_addr, wpa_s->own_addr, ETH_ALEN);
|
os_memcpy(wpa_s->global->p2p_dev_addr, wpa_s->own_addr, ETH_ALEN);
|
||||||
os_memcpy(p2p.dev_addr, wpa_s->global->p2p_dev_addr, ETH_ALEN);
|
os_memcpy(p2p.dev_addr, wpa_s->global->p2p_dev_addr, ETH_ALEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user