[PATCH 06/16] wpa_cli: Add missing pr_ranging_abort command

Peddolla Harshavardhan Reddy peddolla.reddy at oss.qualcomm.com
Sun Jul 12 23:29:54 PDT 2026


Currently the PR_RANGING_ABORT control interface command is handled
in ctrl_iface.c but has no corresponding wpa_cli front-end, making
it impossible to invoke the command from wpa_cli.

Add wpa_cli_cmd_pr_ranging_abort() and register it in the command
table under CONFIG_PR to expose the command to wpa_cli users.

Fixes: 7085d2405bc8 ("PR: Allow ranging session to be aborted")
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
 wpa_supplicant/wpa_cli.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 7959ab735..70dce01c8 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -3310,6 +3310,13 @@ static int wpa_cli_cmd_pr_clear_dik_context(struct wpa_ctrl *ctrl, int argc,
 	return wpa_ctrl_command(ctrl, "PR_CLEAR_DIK_CONTEXT");
 }
 
+
+static int wpa_cli_cmd_pr_ranging_abort(struct wpa_ctrl *ctrl, int argc,
+					char *argv[])
+{
+	return wpa_ctrl_command(ctrl, "PR_RANGING_ABORT");
+}
+
 #endif /* CONFIG_PR */
 
 #endif /* CONFIG_PASN */
@@ -4234,6 +4241,8 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
 	  "self dik=<own_dik/peerdik> password=<global_pw/unique_pw> pmk=<pmk>" },
 	{ "pr_clear_dik_context", wpa_cli_cmd_pr_clear_dik_context, NULL,
 	  cli_cmd_flag_none, "= Clear all DIK contexts" },
+	{ "pr_ranging_abort", wpa_cli_cmd_pr_ranging_abort, NULL,
+	  cli_cmd_flag_none, "= Abort an ongoing proximity ranging session" },
 #endif /* CONFIG_PR */
 #endif /* CONFIG_PASN */
 	{ "mscs", wpa_cli_cmd_mscs, NULL,
-- 
2.34.1




More information about the Hostap mailing list