aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-04-02 12:59:59 -0700
committerDmitry Shmidt <dimitrysh@google.com>2014-04-02 12:59:59 -0700
commitdf5a7e4c5c64890c2425bb47d665bbce4992b676 (patch)
tree84790cf1aabc02c4795347440e61eb3e2581ae12 /hostapd/hostapd_cli.c
parent15907098d1f67c24bb000e593e279af173cf57d7 (diff)
downloadandroid_external_wpa_supplicant_8-df5a7e4c5c64890c2425bb47d665bbce4992b676.tar.gz
android_external_wpa_supplicant_8-df5a7e4c5c64890c2425bb47d665bbce4992b676.tar.bz2
android_external_wpa_supplicant_8-df5a7e4c5c64890c2425bb47d665bbce4992b676.zip
Cumulative patch from commit 39a5800f7c2a9de743c673a78929ac46a099b1a4
39a5800 wpa_supplicant: Allow disabling LDPC 7230040 Interworking: Read IMSI if not read at supplicant start 62f736d Interworking: Init scard when a credential requires SIM access 729897a Interworking: Fix incorrect compile PCSC flag 21611ea edit: Increase buffer size to 4096 bytes 0b2c59e OSU server: Add example scripts for Hotspot 2.0 PKI 0f27c20 HS 2.0R2: Add example OSU SPP server implementation 1e03c6c XML: Remove forgotten, unused definition of debug_print_func 5cfc87b Make hs20_wan_metrics parser error print more helpful 4be20bf Fix validation of anqp_3gpp_cell_net configuration parameter 23587e3 Remove duplicated vht_capab parser entry 18a8e55 Notify STA of disconnection based on ACL change 8943cc9 RADIUS server: Add support for MAC ACL dc87541 Clean up debug print for PSK file search bbbacbf DFS: Print CAC info in ctrl_iface STATUS command ace0fbd P2P: Fix segfault when PBC overlap is detected cf15b15 Add writing of network block ocsp parameter 5c9da16 nl80211: Set all BSS interfaces down when tearing down AP in MBSS mode f1c4dbf wpa_supplicant: Remove pending sme-connect radio work 4f560cd wpa_supplicant: Override HT A-MPDU size if VHT A-MPDU was overridden 3ae8b7b hostapd: Add vendor command support 782e2f7 P2P: Do not initiate scan on P2P Device when enabled 74a1319 Fix issue with incorrect secondary_channel in HT40/HT80 96ecea5 Pass TDLS peer capability information in tdls_mgmt 78cd7e6 Sync with wireless-testing.git include/uapi/linux/nl80211.h b36935b nl80211: Fix EAPOL frames not being delivered 6997f8b nl80211: Set interface address even if using old interface 9b4d9c8 nl80211: Print if_indices list in debug log 762c41a eloop: Add assert() on negative fd when using select() code path 978c673 Add a note on using 'iw list' to determine multi-BSS support Change-Id: I89af7f8d92ed706c8909ed3cc9c49d6e1277a2b0 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 8caca4f6..c488b4fd 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -940,6 +940,27 @@ static int hostapd_cli_cmd_chan_switch(struct wpa_ctrl *ctrl,
}
+static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ char cmd[256];
+ int res;
+
+ if (argc < 2 || argc > 3) {
+ printf("Invalid vendor command\n"
+ "usage: <vendor id> <command id> [<hex formatted command argument>]\n");
+ return -1;
+ }
+
+ res = os_snprintf(cmd, sizeof(cmd), "VENDOR %s %s %s", argv[0], argv[1],
+ argc == 3 ? argv[2] : "");
+ if (res < 0 || (size_t) res >= sizeof(cmd) - 1) {
+ printf("Too long VENDOR command.\n");
+ return -1;
+ }
+ return wpa_ctrl_command(ctrl, cmd);
+}
+
+
struct hostapd_cli_cmd {
const char *cmd;
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
@@ -988,6 +1009,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "chan_switch", hostapd_cli_cmd_chan_switch },
{ "hs20_wnm_notif", hostapd_cli_cmd_hs20_wnm_notif },
{ "hs20_deauth_req", hostapd_cli_cmd_hs20_deauth_req },
+ { "vendor", hostapd_cli_cmd_vendor },
{ NULL, NULL }
};