aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-28 10:48:28 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-27 19:44:31 (GMT)
commit5cd4f66095fa39b198315947c56e97e9be615160 (patch)
treef5ac59233d3dfcc33a70485f4e7b7a21a7829e9b /wpa_supplicant/wps_supplicant.c
parentd2f18378e153d473d13c54f16a4e764b050852f3 (diff)
downloadhostap-5cd4f66095fa39b198315947c56e97e9be615160.zip
hostap-5cd4f66095fa39b198315947c56e97e9be615160.tar.gz
hostap-5cd4f66095fa39b198315947c56e97e9be615160.tar.bz2
WPS NFC: Use AP Channel information from credential container
This allows NFC Configuration Token to indicate the current AP operating channel, so that a single channel scan can be used to speed up the initial connection. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 1f6dd92..33a1d31 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -2210,6 +2210,12 @@ static int wpas_wps_use_cred(struct wpa_supplicant *wpa_s,
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
return 0;
+ if (!wpa_s->wps_ap_channel && attr->ap_channel) {
+ wpa_s->wps_ap_channel = WPA_GET_BE16(attr->ap_channel);
+ wpa_printf(MSG_DEBUG, "WPS: Credential container indicated AP Channel %d",
+ wpa_s->wps_ap_channel);
+ }
+
wpa_printf(MSG_DEBUG, "WPS: Request reconnection with new network "
"based on the received credential added");
wpa_s->normal_scans = 0;