[PATCH] hostapd_cli: add update_beacon command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alona Solntseva <alona.solntseva@xxxxxxxxxxx>

add ability to use update_beacon with hostapd_cli
the option has been exposed in ctrl_iface already

Signed-off-by: Alona Solntseva <alona.solntseva@xxxxxxxxxxx>
Signed-off-by: Simon Dinkin <simon.dinkin@xxxxxxxxxxx>
---
 hostapd/hostapd_cli.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index b9f3c6748..03f889e00 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1317,6 +1317,22 @@ static int hostapd_cli_cmd_reconf(struct wpa_ctrl *ctrl, int argc,
 }
 
 
+static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
+				      char *argv[])
+{
+	char cmd[256];
+
+	if (argc == 0) {
+		os_snprintf(cmd, sizeof(cmd), "UPDATE_BEACON");
+	} else {
+		printf("Invalid update beacon command: needs no arguments\n");
+		return -1;
+	}
+
+	return wpa_ctrl_command(ctrl, cmd);
+}
+
+
 static int hostapd_cli_cmd_disable(struct wpa_ctrl *ctrl, int argc,
 				      char *argv[])
 {
@@ -2570,6 +2586,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
 	  "are unaffected)\n"
 	  "  if BSS name is given, that BSS will be reloaded (main BSS isn't "
 	  "supported)" },
+	{ "update_beacon", hostapd_cli_cmd_update_beacon, NULL,
+	  "update beacon\n"},
 	{ "disable", hostapd_cli_cmd_disable, NULL,
 	  "= disable hostapd on current interface" },
 	{ "erp_flush", hostapd_cli_cmd_erp_flush, NULL,
-- 
2.11.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux