aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-01-05 19:50:34 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-07 08:45:12 (GMT)
commitf0cbb986ff2490d398e12c478d15b870100265a5 (patch)
treedf4206823ec7013240b5b169462515cebb7691ce /hostapd
parentfa0ddb1484b4a13f390ecc4f655b65801d1d258a (diff)
downloadhostap-f0cbb986ff2490d398e12c478d15b870100265a5.zip
hostap-f0cbb986ff2490d398e12c478d15b870100265a5.tar.gz
hostap-f0cbb986ff2490d398e12c478d15b870100265a5.tar.bz2
Add DRIVER-STATUS command for hostapd
This is just like the same command in wpa_supplicant, i.e., "hostapd_cli status driver" can be used to fetch information about the driver status and capabilities. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/ctrl_iface.c4
-rw-r--r--hostapd/hostapd_cli.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index bd251f7..72faeae 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1,6 +1,6 @@
/*
* hostapd / UNIX domain socket -based control interface
- * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2014, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -1140,6 +1140,8 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
} else if (os_strcmp(buf, "STATUS") == 0) {
reply_len = hostapd_ctrl_iface_status(hapd, reply,
reply_size);
+ } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
+ reply_len = hostapd_drv_status(hapd, reply, reply_size);
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
if (reply_len >= 0) {
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 2706412..4719e2b 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1,6 +1,6 @@
/*
* hostapd - command line interface for hostapd daemon
- * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2014, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -218,6 +218,8 @@ static int hostapd_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
static int hostapd_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
+ if (argc > 0 && os_strcmp(argv[0], "driver") == 0)
+ return wpa_ctrl_command(ctrl, "STATUS-DRIVER");
return wpa_ctrl_command(ctrl, "STATUS");
}