From patchwork Tue Nov 29 01:07:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 128191 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 43F54B6F89 for ; Tue, 29 Nov 2011 12:09:56 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B48859C14B; Mon, 28 Nov 2011 20:09:52 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aIK4W4nPrJPw; Mon, 28 Nov 2011 20:09:52 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4D7479C144; Mon, 28 Nov 2011 20:09:48 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8224C9C144 for ; Mon, 28 Nov 2011 20:09:46 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2LW5QH4johSV for ; Mon, 28 Nov 2011 20:09:42 -0500 (EST) Received: from mail-ee0-f74.google.com (mail-ee0-f74.google.com [74.125.83.74]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 9F07D9C143 for ; Mon, 28 Nov 2011 20:09:42 -0500 (EST) Received: by eeuu44 with SMTP id u44so75916eeu.5 for ; Mon, 28 Nov 2011 17:09:41 -0800 (PST) Received: by 10.14.17.137 with SMTP id j9mr2045978eej.10.1322528981486; Mon, 28 Nov 2011 17:09:41 -0800 (PST) Received: by 10.14.17.137 with SMTP id j9mr2045973eej.10.1322528981382; Mon, 28 Nov 2011 17:09:41 -0800 (PST) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id n13si23087867eef.2.2011.11.28.17.09.41 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 28 Nov 2011 17:09:41 -0800 (PST) Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by hpza9.eem.corp.google.com (Postfix) with ESMTPS id 1EBC05C0050 for ; Mon, 28 Nov 2011 17:09:41 -0800 (PST) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.102.96]) by wpaz5.hot.corp.google.com with ESMTP id pAT19dnI021777 for ; Mon, 28 Nov 2011 17:09:39 -0800 Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id E3CF93835E; Mon, 28 Nov 2011 17:09:38 -0800 (PST) From: Dmitry Shmidt Date: Mon, 28 Nov 2011 17:07:26 -0800 Subject: [PATCH] Android: Fix bgscan-start / bgscan-stop call To: hostap@lists.shmoo.com Message-Id: <20111129010938.E3CF93835E@ushik.mtv.corp.google.com> X-System-Of-Record: true X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Signed-off-by: Dmitry Shmidt --- 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);