aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@chromium.org>2014-03-06 18:06:04 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-11 17:38:01 (GMT)
commit0f44ec8eba8a2b01e9c443308a72a2fd3208f7cf (patch)
tree01c8e43b268df62440813a8c6f243094d289ab51 /wpa_supplicant/wpa_cli.c
parentcfc393a645f6885117fe321e1679031482c12edf (diff)
downloadhostap-0f44ec8eba8a2b01e9c443308a72a2fd3208f7cf.zip
hostap-0f44ec8eba8a2b01e9c443308a72a2fd3208f7cf.tar.gz
hostap-0f44ec8eba8a2b01e9c443308a72a2fd3208f7cf.tar.bz2
Add a reattach command for fast reassociate-back-to-same-BSS
Add "reattach" command to perform single-channel single-ssid scan instead of full scan when trying to reconnect to the currently "connected" network (assuming old scan results are not current enough to skip the scan completely). This allows the scan result to come back in much faster time. In ath9k, the scan took around 12 seconds with full background scan, and only 0.1 second with the single-channel single-ssid scan. Thus, take much less time for the client to re-establish connection with the currently "connected" network. Signed-hostap: Peter Qiu <zqiu@chromium.org>
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 63ea1df..2a9ab7f 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -676,6 +676,12 @@ static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc,
}
+static int wpa_cli_cmd_reattach(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "REATTACH");
+}
+
+
static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
@@ -2510,6 +2516,9 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
{ "reassociate", wpa_cli_cmd_reassociate, NULL,
cli_cmd_flag_none,
"= force reassociation" },
+ { "reattach", wpa_cli_cmd_reattach, NULL,
+ cli_cmd_flag_none,
+ "= force reassociation back to the same BSS" },
{ "preauthenticate", wpa_cli_cmd_preauthenticate, wpa_cli_complete_bss,
cli_cmd_flag_none,
"<BSSID> = force preauthentication" },