]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PR: Move DIK set and clear commands out of testing scope
authorPeddolla Harshavardhan Reddy <peddolla@qti.qualcomm.com>
Tue, 11 Nov 2025 08:53:02 +0000 (14:23 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 25 Nov 2025 13:31:12 +0000 (15:31 +0200)
The commands PR_SET_DIK_CONTEXT and PR_CLEAR_DIK_CONTEXT should not
be under CONFIG_TESTING_OPTIONS since their usage is not limited to
testing only.

Fixes: 7c262f94ff80 ("PR: Control interface support to set and clear PR device identity context")
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla@qti.qualcomm.com>
wpa_supplicant/ctrl_iface.c

index 050ed1624086b40015f86bc9e4fb955c921baa27..750b476b9acee8b2c8f0e8cf6571ba88fe2c73df 100644 (file)
@@ -11490,6 +11490,7 @@ static int wpas_ctrl_iface_pasn_deauthenticate(struct wpa_supplicant *wpa_s,
 
 
 #ifdef CONFIG_PR
+
 static int wpas_ctrl_iface_pr_pasn_start(struct wpa_supplicant *wpa_s,
                                         char *cmd)
 {
@@ -11540,12 +11541,8 @@ static int wpas_ctrl_iface_pr_pasn_start(struct wpa_supplicant *wpa_s,
        return wpas_pr_initiate_pasn_auth(wpa_s, addr, freq, auth_mode, role,
                                          ranging_type, forced_pr_freq);
 }
-#endif /* CONFIG_PR */
-
 
-#ifdef CONFIG_TESTING_OPTIONS
 
-#ifdef CONFIG_PR
 static int wpas_ctrl_iface_pr_set_dik_ctx(struct wpa_supplicant *wpa_s,
                                          char *cmd)
 {
@@ -11594,9 +11591,11 @@ fail:
        wpabuf_clear_free(pmk_buf);
        return ret;
 }
+
 #endif /* CONFIG_PR */
 
 
+#ifdef CONFIG_TESTING_OPTIONS
 static int wpas_ctrl_iface_pasn_driver(struct wpa_supplicant *wpa_s, char *cmd)
 {
        char *token, *context = NULL;
@@ -14198,15 +14197,13 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
        } else if (os_strncmp(buf, "PR_PASN_START ", 14) == 0) {
                if (wpas_ctrl_iface_pr_pasn_start(wpa_s, buf + 14) < 0)
                        reply_len = -1;
-#endif /* CONFIG_PR */
-#ifdef CONFIG_TESTING_OPTIONS
-#ifdef CONFIG_PR
        } else if (os_strncmp(buf, "PR_SET_DIK_CONTEXT ", 19) == 0) {
                if (wpas_ctrl_iface_pr_set_dik_ctx(wpa_s, buf + 19) < 0)
                        reply_len = -1;
        } else if (os_strcmp(buf, "PR_CLEAR_DIK_CONTEXT") == 0) {
                wpas_pr_clear_dev_iks(wpa_s);
 #endif /* CONFIG_PR */
+#ifdef CONFIG_TESTING_OPTIONS
        } else if (os_strncmp(buf, "PASN_DRIVER ", 12) == 0) {
                if (wpas_ctrl_iface_pasn_driver(wpa_s, buf + 12) < 0)
                        reply_len = -1;