From: Jouni Malinen Date: Wed, 15 Feb 2012 18:39:54 +0000 (+0200) Subject: WPS: Do not use sched_scan for provisioning step X-Git-Tag: hostap_2_0~892 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa283ddd976aaac5e35fccdd116602c727d30798;p=thirdparty%2Fhostap.git WPS: Do not use sched_scan for provisioning step Normal scan is more reliable and faster for WPS operations and since these are for short periods of time, the benefit of trying to use sched_scan would be limited. This can fix WPS connectivity issues with some drivers. Signed-hostap: Jouni Malinen intended-for: hostap-1 --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 2cb4e323e..7fddb74a9 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -752,6 +752,20 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s) wildcard = 1; } else if (!ssid->disabled && ssid->ssid_len) need_ssids++; + +#ifdef CONFIG_WPS + if (!ssid->disabled && ssid->key_mgmt == WPA_KEY_MGMT_WPS) { + /* + * Normal scan is more reliable and faster for WPS + * operations and since these are for short periods of + * time, the benefit of trying to use sched_scan would + * be limited. + */ + wpa_dbg(wpa_s, MSG_DEBUG, "Use normal scan instead of " + "sched_scan for WPS"); + return -1; + } +#endif /* CONFIG_WPS */ } if (wildcard) need_ssids++;