From 7db53bb8c500d758f9638ac13fe2e9f8a3bb8163 Mon Sep 17 00:00:00 2001 From: Arik Nemtsov Date: Sun, 28 Dec 2014 22:35:21 -0500 Subject: [PATCH] wpa_cli: Implement TDLS start/cancel channel switching commands For the start operation, this includes appropriate parameters for specifying channel and peer information. The cancel operation includes peer information. Signed-off-by: Arik Nemtsov --- wpa_supplicant/wpa_cli.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 87071fa65..673da5999 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -2426,6 +2426,20 @@ static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc, } +static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc, + char *argv[]) +{ + return wpa_cli_cmd(ctrl, "TDLS_CHAN_SWITCH", 2, argc, argv); +} + + +static int wpa_cli_cmd_tdls_cancel_chan_switch(struct wpa_ctrl *ctrl, int argc, + char *argv[]) +{ + return wpa_cli_cmd(ctrl, "TDLS_CANCEL_CHAN_SWITCH", 1, argc, argv); +} + + static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc, char *argv[]) { @@ -3002,6 +3016,14 @@ static struct wpa_cli_cmd wpa_cli_commands[] = { { "wmm_ac_status", wpa_cli_cmd_wmm_ac_status, NULL, cli_cmd_flag_none, "= show status for Wireless Multi-Media Admission-Control" }, + { "tdls_chan_switch", wpa_cli_cmd_tdls_chan_switch, NULL, + cli_cmd_flag_none, + " [sec_channel_offset=] [center_freq1=] " + "[center_freq2=] [bandwidth=] [ht|vht] = enable channel switching " + "with TDLS peer" }, + { "tdls_cancel_chan_switch", wpa_cli_cmd_tdls_cancel_chan_switch, NULL, + cli_cmd_flag_none, + " = disable channel switching with TDLS peer " }, { "signal_poll", wpa_cli_cmd_signal_poll, NULL, cli_cmd_flag_none, "= get signal parameters" },