]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Remove P2P_SET setting of pairing_setup and pairing_cache
authorShivani Baranwal <shivani.baranwal@oss.qualcomm.com>
Wed, 11 Jun 2025 05:09:46 +0000 (10:39 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 24 Jun 2025 08:33:07 +0000 (11:33 +0300)
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 <shivani.baranwal@oss.qualcomm.com>
src/p2p/p2p.c
src/p2p/p2p.h
wpa_supplicant/ctrl_iface.c

index bd113ee20bfefc4ad117207a256a9a8d3698b2b3..630d3e1cc3c69def77b42beb86ee994557af1a4e 100644 (file)
@@ -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);
index 6f509d7703da82ef8627b9ca5b7be6b0f7e04d62..1d3545442ae5667aee7c0011602c715baf323fba 100644 (file)
@@ -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);
index ab6871c09ae841f7207264b1c18baa518381ae8b..51b7c0a65be1cdce5d177c973d50cb51d583b986 100644 (file)
@@ -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;