aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-08-12 18:41:18 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-12 19:26:45 +0300
commit37c980204f9e4f6134e6ff66a394e3353c24d99b (patch)
treee62a3f75591fa1459cdc9488db134e6fc5d9024c
parenta89c9c9c76167b69fdee3b050db75063e18b2119 (diff)
downloadexternal_wpa_supplicant_8_ti-37c980204f9e4f6134e6ff66a394e3353c24d99b.zip
external_wpa_supplicant_8_ti-37c980204f9e4f6134e6ff66a394e3353c24d99b.tar.gz
external_wpa_supplicant_8_ti-37c980204f9e4f6134e6ff66a394e3353c24d99b.tar.bz2
Fix adding extra ies in sched scan (UPSTREAM)
Refactoring done in commit 46ee04 IEEE 802.11u: Allow Interworking and HESSID to be configured broke adding extra ies in sched scan. Fix it and remove unused params arg in wpa_supplicant_extra_ies. Signed-off-by: Eyal Shapira <eyal@wizery.com>
-rw-r--r--wpa_supplicant/scan.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index ca7af57..2b468fb 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -369,8 +369,7 @@ static void wpas_add_interworking_elements(struct wpa_supplicant *wpa_s,
static struct wpabuf *
-wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s,
- struct wpa_driver_scan_params *params)
+wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s)
{
struct wpabuf *extra_ie = NULL;
#ifdef CONFIG_WPS
@@ -690,7 +689,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
ssid_list_set:
wpa_supplicant_optimize_freqs(wpa_s, &params);
- extra_ie = wpa_supplicant_extra_ies(wpa_s, &params);
+ extra_ie = wpa_supplicant_extra_ies(wpa_s);
#ifdef CONFIG_HS20
if (wpa_s->conf->hs20 && wpabuf_resize(&extra_ie, 6) == 0)
@@ -828,7 +827,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
struct wpa_driver_scan_params params;
struct wpa_driver_scan_params *scan_params;
struct wpa_ssid *ssid = NULL;
- struct wpabuf *wps_ie = NULL;
+ struct wpabuf *extra_ie = NULL;
int ret, prio = 0;
unsigned int max_sched_scan_ssids;
int wildcard = 0;
@@ -962,8 +961,11 @@ start_scan:
if (!params.num_ssids)
params.num_ssids++;
- if (wpa_s->wps)
- wps_ie = wpa_supplicant_extra_ies(wpa_s, &params);
+ extra_ie = wpa_supplicant_extra_ies(wpa_s);
+ if (extra_ie) {
+ params.extra_ies = wpabuf_head(extra_ie);
+ params.extra_ies_len = wpabuf_len(extra_ie);
+ }
scan_params = &params;
@@ -992,7 +994,7 @@ scan:
}
- wpabuf_free(wps_ie);
+ wpabuf_free(extra_ie);
if (params.filter_ssids)
os_free(params.filter_ssids);