From patchwork Tue Oct 8 12:21:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jithu Jance X-Patchwork-Id: 281432 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 2C80C2C00B3 for ; Tue, 8 Oct 2013 23:21:42 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 78F549C123; Tue, 8 Oct 2013 08:21:39 -0400 (EDT) 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 7NToWhvtE5Qx; Tue, 8 Oct 2013 08:21:39 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BF5D19C10E; Tue, 8 Oct 2013 08:21:34 -0400 (EDT) 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 49E8E9C10E for ; Tue, 8 Oct 2013 08:21:33 -0400 (EDT) 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 wjpnjr7bcaaf for ; Tue, 8 Oct 2013 08:21:28 -0400 (EDT) Received: from mms3.broadcom.com (mms3.broadcom.com [216.31.210.19]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 206C99C0C1 for ; Tue, 8 Oct 2013 08:21:28 -0400 (EDT) Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Tue, 08 Oct 2013 05:21:16 -0700 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 8 Oct 2013 05:21:21 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.438.0; Tue, 8 Oct 2013 05:21:21 -0700 Received: from jithu?broadcom.com (lbblr-jithu01.ban.broadcom.com [10.132.24.37]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D873B246A4 for ; Tue, 8 Oct 2013 05:21:20 -0700 (PDT) Date: Tue, 8 Oct 2013 17:51:18 +0530 From: "Jithu Jance" To: hostap@lists.shmoo.com Subject: [PATCH 1/1] WPS: Cancel scheduled scan before attempting a scan in WPS NFC Config token case Message-ID: <20131008122118.GA25891@jithu@broadcom.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-WSS-ID: 7E4D27362L892616649-01-01 Content-Disposition: inline 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: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com WPS: Cancel scheduled scan (if any) before attempting to scan for the newly received configuration/credential. Signed-hostap: Jithu Jance --- wpa_supplicant/wps_supplicant.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.7.9.5 diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index f6c2fcb..a2b941c 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -2174,6 +2174,8 @@ static int wpas_wps_use_cred(struct wpa_supplicant *wpa_s, } wpa_s->disconnected = 0; wpa_s->reassociate = 1; + + wpa_supplicant_cancel_sched_scan(wpa_s); wpa_supplicant_req_scan(wpa_s, 0, 0); return 0;