]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PR: wpa_cli support for NEW_RANDOM_MAC_ADDRESS
authorPeddolla Harshavardhan Reddy <peddolla@qti.qualcomm.com>
Sat, 26 Apr 2025 21:53:47 +0000 (03:23 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 17 Oct 2025 10:22:52 +0000 (13:22 +0300)
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla@qti.qualcomm.com>
wpa_supplicant/wpa_cli.c

index 8d899c8d0d912a585619a7a0db9241cdc9fe4ce2..caa41704919e946eb788d61c98c8d7acf6030d35 100644 (file)
@@ -3391,6 +3391,13 @@ static int wpa_cli_cmd_nan_flush(struct wpa_ctrl *ctrl, int argc,
 #endif /* CONFIG_NAN_USD */
 
 
+static int wpa_cli_cmd_generate_new_mac(struct wpa_ctrl *ctrl, int argc,
+                                       char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "NEW_RANDOM_MAC_ADDRESS");
+}
+
+
 enum wpa_cli_cmd_flags {
        cli_cmd_flag_none               = 0x00,
        cli_cmd_flag_sensitive          = 0x01
@@ -4163,6 +4170,8 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
        { "nan_flush", wpa_cli_cmd_nan_flush, NULL,
          cli_cmd_flag_none, "= Flush all NAN USD services" },
 #endif /* CONFIG_NAN_USD */
+       { "new_random_mac_address", wpa_cli_cmd_generate_new_mac, NULL,
+         cli_cmd_flag_none, "= Generate new random MAC address" },
        { NULL, NULL, NULL, cli_cmd_flag_none, NULL }
 };