From 8dcb59dc332fce9e4b3d8366bb03abed918775c5 Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Wed, 11 Jun 2025 10:39:46 +0530 Subject: [PATCH] P2P2: Remove P2P_SET setting of pairing_setup and pairing_cache Pairing setup and cache are now derived from driver capabilities. Remove the control iface P2P_SET commands to set P2P pairing_setup and pairing_cache. Signed-off-by: Shivani Baranwal --- src/p2p/p2p.c | 34 ---------------------------------- src/p2p/p2p.h | 2 -- wpa_supplicant/ctrl_iface.c | 10 ---------- 3 files changed, 46 deletions(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index bd113ee20..630d3e1cc 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -4964,40 +4964,6 @@ void p2p_set_managed_oper(struct p2p_data *p2p, int enabled) #ifdef CONFIG_TESTING_OPTIONS -void p2p_set_pairing_setup(struct p2p_data *p2p, int pairing_setup) -{ - p2p_dbg(p2p, "Pairing Setup %s", - pairing_setup ? "Enabled" : "Disabled"); - if (pairing_setup) { - p2p->cfg->pairing_config.pairing_capable = true; - p2p->cfg->pairing_config.enable_pairing_setup = true; - if (p2p->pairing_info) - p2p->pairing_info->enable_pairing_setup = true; - } else { - p2p->cfg->pairing_config.pairing_capable = false; - p2p->cfg->pairing_config.enable_pairing_setup = false; - if (p2p->pairing_info) - p2p->pairing_info->enable_pairing_setup = false; - } -} - - -void p2p_set_pairing_cache(struct p2p_data *p2p, int pairing_cache) -{ - p2p_dbg(p2p, "Pairing Cache %s", - pairing_cache ? "Enabled" : "Disabled"); - if (pairing_cache) { - p2p->cfg->pairing_config.enable_pairing_cache = true; - if (p2p->pairing_info) - p2p->pairing_info->enable_pairing_cache = true; - } else { - p2p->cfg->pairing_config.enable_pairing_cache = false; - if (p2p->pairing_info) - p2p->pairing_info->enable_pairing_cache = false; - } -} - - void p2p_set_bootstrapmethods(struct p2p_data *p2p, int bootstrap_methods) { p2p_dbg(p2p, "Bootstraping methods: 0x%x", bootstrap_methods); diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h index 6f509d770..1d3545442 100644 --- a/src/p2p/p2p.h +++ b/src/p2p/p2p.h @@ -2786,8 +2786,6 @@ void p2p_process_usd_elems(struct p2p_data *p2p, const u8 *ies, u16 ies_len, const u8 *peer_addr, unsigned int freq); int p2p_get_dik_id(struct p2p_data *p2p, const u8 *peer); -void p2p_set_pairing_setup(struct p2p_data *p2p, int pairing_setup); -void p2p_set_pairing_cache(struct p2p_data *p2p, int pairing_cache); void p2p_set_bootstrapmethods(struct p2p_data *p2p, int bootstrap_methods); void p2p_set_pasn_type(struct p2p_data *p2p, u8 pasn_type); void p2p_set_comeback_after(struct p2p_data *p2p, int comeback_after); diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index ab6871c09..51b7c0a65 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -7844,16 +7844,6 @@ static int p2p_ctrl_set(struct wpa_supplicant *wpa_s, char *cmd) } #ifdef CONFIG_TESTING_OPTIONS - if (os_strcmp(cmd, "pairing_setup") == 0) { - p2p_set_pairing_setup(wpa_s->global->p2p, atoi(param)); - return 0; - } - - if (os_strcmp(cmd, "pairing_cache") == 0) { - p2p_set_pairing_cache(wpa_s->global->p2p, atoi(param)); - return 0; - } - if (os_strcmp(cmd, "supported_bootstrapmethods") == 0) { p2p_set_bootstrapmethods(wpa_s->global->p2p, atoi(param)); return 0; -- 2.47.2