aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorBeni Lev <beni.lev@intel.com>2014-03-03 11:09:50 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-04 20:24:20 (GMT)
commitadef89480d7fa3c5d18f4d680f665e3d42de9886 (patch)
tree0afd1bc474be49adf9dded9d2bba86466f4c66c0 /wpa_supplicant/wpa_cli.c
parentd0595b25b467a841586a3492f4e10e9f58bc5da0 (diff)
downloadhostap-adef89480d7fa3c5d18f4d680f665e3d42de9886.zip
hostap-adef89480d7fa3c5d18f4d680f665e3d42de9886.tar.gz
hostap-adef89480d7fa3c5d18f4d680f665e3d42de9886.tar.bz2
nl80211: Add vendor command support
Add a callback to the driver interface that allows vendor specific commands to be sent. In addition, a control interface command is added to expose this new interface outside wpa_supplicant: Vendor command's format: VENDOR <vendor id> <sub command id> [<hex formatted data>] The 3rd argument will be converted to binary data and then passed as argument to the sub command. This interface is driver independent, but for now, this is only implemented for the nl80211 driver interface using the cfg80211 vendor commands. Signed-off-by: Beni Lev <beni.lev@intel.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 0691183..63ea1df 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -2426,6 +2426,12 @@ static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
#endif /* ANDROID */
+static int wpa_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ return wpa_cli_cmd(ctrl, "VENDOR", 1, argc, argv);
+}
+
+
static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
return wpa_ctrl_command(ctrl, "FLUSH");
@@ -2912,6 +2918,9 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
#endif /* ANDROID */
{ "radio_work", wpa_cli_cmd_radio_work, NULL, cli_cmd_flag_none,
"= radio_work <show/add/done>" },
+ { "vendor", wpa_cli_cmd_vendor, NULL, cli_cmd_flag_none,
+ "<vendor id> <command id> [<hex formatted command argument>] = Send vendor command"
+ },
{ NULL, NULL, NULL, cli_cmd_flag_none, NULL }
};