Add a new config item p2p_dfs_chan_enable for WFD GO
The item can be overwritten by p2p_supplicant_overlay.conf
Bug: 272298287
Test: Manually verified it working from logs.
Change-Id: I3de7ee1523ceae4116830afd7a4bae4794f81274
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a5fdc9a..5cf6730 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3993,8 +3993,10 @@
const struct oper_class_map *o = &global_op_class[op];
unsigned int ch;
struct p2p_reg_class *reg = NULL, *cli_reg = NULL;
+ bool check_dfs_supported = (wpa_s->conf->p2p_dfs_chan_enable
+ && is_dfs_global_op_class(o->op_class));
- if (o->p2p == NO_P2P_SUPP ||
+ if ((!check_dfs_supported && o->p2p == NO_P2P_SUPP) ||
(is_6ghz_op_class(o->op_class) && p2p_disable_6ghz))
continue;