From patchwork Tue Nov 12 20:40:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 290773 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 A35762C00AB for ; Wed, 13 Nov 2013 07:44:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BFC639C137; Tue, 12 Nov 2013 15:44:08 -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 GeARum17OloZ; Tue, 12 Nov 2013 15:44:08 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A624B9C105; Tue, 12 Nov 2013 15:44:01 -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 50FA69C105 for ; Tue, 12 Nov 2013 15:44:00 -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 9+byuTMUPpYn for ; Tue, 12 Nov 2013 15:43:54 -0500 (EST) Received: from mail-oa0-f74.google.com (mail-oa0-f74.google.com [209.85.219.74]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 0BC0E9C0B0 for ; Tue, 12 Nov 2013 15:43:52 -0500 (EST) Received: by mail-oa0-f74.google.com with SMTP id m1so352623oag.1 for ; Tue, 12 Nov 2013 12:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:date:subject:to:message-id; bh=eXtsSVVbP+6hFdSLEHc2l9D60RmEWhFbujGh75pccWo=; b=QAMQcEoBB/zggyVxkt2YgQwwxpuQkn4nIpWOsLb8UUeChvrHNzUKtvlzMC+z2SnB+j y2H3ScwfUMdGhyQQd7HQgV2gS7SftAxQjUcygUVsl4XZBDiabKVDp9jm71WoqQPCIY9J nVHkMAC6IkXYV6R8R3f2Bv7edbYOnRJrUST/k6FLH15xUeveL/wDdi+bZaQGYvmBiKPI PyTte+PxPTOOCIKnbnA/XAWHuw+bAwg4eLV9rHAuA4ig78cva43J2GRTub1lPbiToko3 JW0wssiD7chL2sQfByvzBmNnAJ8xM9cY6/y5JY3G9IB4iTLTPSZ0akumoKh0SLiZrQAH QXQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:subject:to:message-id; bh=eXtsSVVbP+6hFdSLEHc2l9D60RmEWhFbujGh75pccWo=; b=OuTtmgam0Fico4e4X81iQJtLxbFq2A68dDDZ/dXzOMl+dsjU1oPYFujTYxBDokzFK7 HSf2VqPM806v1xvwIIZyboaniUHpwDzwidSfFTtzdbyQZu+XdSE6aBgGHD2s+pAWfSPx ND3MMdEXMyx7SU2+LDEGdUuxzY0eLe53nwVWrVRy+IdGSUVx8ZDSFg2zjebPHUoDkUzn Q7FZQkXnm/XP6lA4MfGA0WOuOt491bGlVMQMGKR6Ax/QHHaVRGqGe/N+RftYRkCvnLNO l289LISsBHyDCPLKua4hYiWEklM4qRwMjWjsPQ/9nrJqJCdnYdYZaQxlqvuXpCuwjjxW Rp8g== X-Gm-Message-State: ALoCoQmZpeokAaNmFyMgJJm+3szpBPDqSVkMzfUEbAOP53aE+FQWFf2VmQegVqDSj9xHwJZPvXdXKUbLhv3VxEgB2lL7MauwohtiZBEEIX5SIS+74Kf6hTAaSV1LbsfnIoPK8FOCSHTFHAJWCWHbDMzEHlYMU6HvVNhHA4+NGk/qPbKNwIPw0tlK0uOVpXY12xxLtOKuZJsrRYSWZ3r0I/N3z15gPjZIM3d6K1t6dtvzK2gaHHQgoJQ= X-Received: by 10.50.61.242 with SMTP id t18mr8249593igr.3.1384289032169; Tue, 12 Nov 2013 12:43:52 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id t42si348996yhm.3.2013.11.12.12.43.52 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Nov 2013 12:43:52 -0800 (PST) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.120.113]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id EEC5C31C1D0 for ; Tue, 12 Nov 2013 12:43:51 -0800 (PST) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 8C23213FECA; Tue, 12 Nov 2013 12:43:51 -0800 (PST) From: Dmitry Shmidt Date: Tue, 12 Nov 2013 12:40:04 -0800 Subject: [PATCH 1/2] Skip scan if already scanning To: hostap@lists.shmoo.com Message-Id: <20131112204351.8C23213FECA@ushik.mtv.corp.google.com> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 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/scan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 019b86c..96c127b 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -567,6 +567,11 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) return; } + if (wpa_s->scanning) { + wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - already scanning"); + return; + } + if (!wpa_supplicant_enabled_networks(wpa_s) && wpa_s->scan_req == NORMAL_SCAN_REQ) { wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");