aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorSrinivas Dasari <dasaris@qti.qualcomm.com>2015-08-17 13:19:14 +0530
committerSrinivas Dasari <dasaris@codeaurora.org>2015-10-27 15:26:42 +0530
commitdf108644a680552f7acf1e356632dc1fac3752e5 (patch)
treebd0eb12b9d92fa752e203fabe208b8cee0a31a64 /hostapd/hostapd_cli.c
parentbe10fca4de6ea6516c95c5aa0909cdbb67e15fbe (diff)
downloadandroid_external_wpa_supplicant_8-df108644a680552f7acf1e356632dc1fac3752e5.tar.gz
android_external_wpa_supplicant_8-df108644a680552f7acf1e356632dc1fac3752e5.tar.bz2
android_external_wpa_supplicant_8-df108644a680552f7acf1e356632dc1fac3752e5.zip
hostapd: Add support to configure debug log level at runtime
Add support to read/configure log_level using hostapd control interface LOG_LEVEL command similarly to what was already supported in wpa_supplicant CRs-Fixed: 891515 Git-repo: git://w1.fi/srv/git/hostap.git Git-commit: 5c4f0511a20c316f2ac24396377b09a50a34fe04 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Change-Id: I95fc3957870f5a2f6d1dfa3270fa7e1c821ddd4e
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 6b1ecba9..392fcb31 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1041,6 +1041,23 @@ static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
return wpa_ctrl_command(ctrl, cmd);
}
+static int hostapd_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char cmd[256];
+ int res;
+
+ res = os_snprintf(cmd, sizeof(cmd), "LOG_LEVEL%s%s%s%s",
+ argc >= 1 ? " " : "",
+ argc >= 1 ? argv[0] : "",
+ argc == 2 ? " " : "",
+ argc == 2 ? argv[1] : "");
+ if (os_snprintf_error(sizeof(cmd), res)) {
+ printf("Too long option\n");
+ return -1;
+ }
+ return wpa_ctrl_command(ctrl, cmd);
+}
static int hostapd_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc,
char *argv[])
@@ -1106,6 +1123,7 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "reload", hostapd_cli_cmd_reload },
{ "disable", hostapd_cli_cmd_disable },
{ "erp_flush", hostapd_cli_cmd_erp_flush },
+ { "log_level", hostapd_cli_cmd_log_level },
{ NULL, NULL }
};