aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-12-20 19:15:05 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-25 23:24:23 (GMT)
commit184e110caff3339643a303ab3a2f32642623a0c4 (patch)
tree1e2ca5a05fbdd026cb04869acdfeaaed75e0576e /wpa_supplicant/wpa_cli.c
parent7ef6947993d4b09dea6797b96f34dbcfed57d90e (diff)
downloadhostap-184e110caff3339643a303ab3a2f32642623a0c4.zip
hostap-184e110caff3339643a303ab3a2f32642623a0c4.tar.gz
hostap-184e110caff3339643a303ab3a2f32642623a0c4.tar.bz2
HS 2.0R2: Add Icon Request and Icon binary File ANQP elements
wpa_supplicant can request OSU icon data with "hs20_icon_request <BSSID> <icon filename>". This transmits an Icon Request ANQP element and processes the response in Icon Binary File ANQP elements. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 1871a28..fd7f92f 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -2298,6 +2298,24 @@ static int wpa_cli_cmd_get_nai_home_realm_list(struct wpa_ctrl *ctrl, int argc,
return wpa_ctrl_command(ctrl, cmd);
}
+
+static int wpa_cli_cmd_hs20_icon_request(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char cmd[512];
+
+ if (argc < 2) {
+ printf("Command needs two arguments (dst mac addr and "
+ "icon name)\n");
+ return -1;
+ }
+
+ if (write_cmd(cmd, sizeof(cmd), "HS20_ICON_REQUEST", argc, argv) < 0)
+ return -1;
+
+ return wpa_ctrl_command(ctrl, cmd);
+}
+
#endif /* CONFIG_HS20 */
@@ -2831,6 +2849,9 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
{ "nai_home_realm_list", wpa_cli_cmd_get_nai_home_realm_list,
wpa_cli_complete_bss, cli_cmd_flag_none,
"<addr> <home realm> = get HS20 nai home realm list" },
+ { "hs20_icon_request", wpa_cli_cmd_hs20_icon_request,
+ wpa_cli_complete_bss, cli_cmd_flag_none,
+ "<addr> <icon name> = get Hotspot 2.0 OSU icon" },
#endif /* CONFIG_HS20 */
{ "sta_autoconnect", wpa_cli_cmd_sta_autoconnect, NULL,
cli_cmd_flag_none,