blob: 3e9214a5e360f2698ed92d145a8deda62f6f4bd5 [file] [log] [blame]
From 69271a55f60c797513cb9f925416aac13422ad7b Mon Sep 17 00:00:00 2001
From: mtk23510 <rudra.shahi@mediatek.com>
Date: Fri, 26 May 2023 14:52:35 +0800
Subject: [PATCH] mtk: hostapd: Add support for gtk rekeying in hostapd cli
Signed-off-by: mtk23510 <rudra.shahi@mediatek.com>
---
hostapd/hostapd_cli.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index a99df88..1b8a071 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1250,6 +1250,15 @@ static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
}
+#ifdef CONFIG_TESTING_OPTIONS
+static int hostapd_cli_cmd_rekey_gtk(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "REKEY_GTK");
+}
+#endif
+
+
static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
char cmd[256];
@@ -1760,6 +1769,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"= disable hostapd on current BSS" },
{ "update_beacon", hostapd_cli_cmd_update_beacon, NULL,
"= update Beacon frame contents\n"},
+#ifdef CONFIG_TESTING_OPTIONS
+ { "rekey_gtk", hostapd_cli_cmd_rekey_gtk, NULL,
+ "= rekey gtk\n"},
+#endif
{ "erp_flush", hostapd_cli_cmd_erp_flush, NULL,
"= drop all ERP keys"},
{ "log_level", hostapd_cli_cmd_log_level, NULL,
--
2.25.1