[PATCH] Android: Fix bgscan-start / bgscan-stop call

Dmitry Shmidt dimitrysh
Mon Nov 28 17:07:26 PST 2011


Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 wpa_supplicant/ctrl_iface.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 8a6d00c..38538c9 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -85,6 +85,7 @@ static int pno_start(struct wpa_supplicant *wpa_s)
 	if (params.filter_ssids == NULL)
 		return -1;
 	i = 0;
+	ssid = wpa_s->conf->ssid;
 	while (ssid) {
 		if (!ssid->disabled) {
 			params.ssids[i].ssid = ssid->ssid;
@@ -3377,10 +3378,12 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
 
 #ifdef ANDROID
 	if (os_strcasecmp(cmd, "BGSCAN-START") == 0)
-		return pno_start(wpa_s);
+		ret = pno_start(wpa_s);
+
+	else if (os_strcasecmp(cmd, "BGSCAN-STOP") == 0)
+		ret = pno_stop(wpa_s);
 
-	if (os_strcasecmp(cmd, "BGSCAN-STOP") == 0)
-		return pno_stop(wpa_s);
+	else
 #endif /* ANDROID */
 
 	ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen);
-- 
1.7.3.1




More information about the Hostap mailing list