Patchwork WPS: Skip rescanning after provisioning

login
register
mail settings
Submitter Masashi Honma
Date Feb. 26, 2013, 1:26 a.m.
Message ID <CAFk-A4=jLuHGOpwimNG2-8Me=b+Xm-nQcrL8H2UxRexYv6-hgQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/223101/
State Superseded
Headers show

Comments

Masashi Honma - Feb. 26, 2013, 1:26 a.m.
This patch uses existing scan results for fast connection after
provisioning.

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>


Regards,
Masashi Honma.
Jouni Malinen - Feb. 26, 2013, 9:35 a.m.
On Tue, Feb 26, 2013 at 10:26:19AM +0900, Masashi Honma wrote:
> This patch uses existing scan results for fast connection after
> provisioning.

I have been thinking of doing this. However, it needs to be kept in mind
that the provisioning step can result in the AP changing its
configuration. This happens whenever the AP is in WPS unconfigured
state. As such, I would not do this optimization without first verifying
that WPS state was configured.

Patch

diff --git a/wpa_supplicant/wps_supplicant.c
b/wpa_supplicant/wps_supplicant.c
index 509a7c0..6fa6027 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -98,7 +98,8 @@  int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
         wpa_s->wps_freq = freq;
         wpa_s->normal_scans = 0;
         wpa_s->reassociate = 1;
-        wpa_supplicant_req_scan(wpa_s, 0, 0);
+        if (wpa_supplicant_fast_associate(wpa_s) != 1)
+            wpa_supplicant_req_scan(wpa_s, 0, 0);
         return 1;
     }