From patchwork Tue Jul 10 14:36:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoni Divinsky X-Patchwork-Id: 170199 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 4C21B2C0203 for ; Wed, 11 Jul 2012 00:43:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id AB0D19C0EE; Tue, 10 Jul 2012 10:42:58 -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 vbtjmnvh8PtZ; Tue, 10 Jul 2012 10:42:58 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5CA7E9C120; Tue, 10 Jul 2012 10:42:53 -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 E39659C0EE for ; Tue, 10 Jul 2012 10:42:51 -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 nWJ-6mEzKsnd for ; Tue, 10 Jul 2012 10:42:48 -0400 (EDT) Received: from na3sys009aog138.obsmtp.com (na3sys009aog138.obsmtp.com [74.125.149.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 380419CDCC for ; Tue, 10 Jul 2012 10:42:47 -0400 (EDT) Received: from mail-qa0-f53.google.com ([209.85.216.53]) (using TLSv1) by na3sys009aob138.postini.com ([74.125.148.12]) with SMTP ID DSNKT/w/ZoCwGQ37/r+4JMRvLcl7nOGVn4mO@postini.com; Tue, 10 Jul 2012 07:42:47 PDT Received: by qaas11 with SMTP id s11so203284qaa.19 for ; Tue, 10 Jul 2012 07:42:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=6IzJ3l5dItGVkW18xT/1r8kHp2ZCAeNdAQbGkxxpiu4=; b=lG6r3SxEmN7E7CLlgBF/LoUpTuM0n5ShfHUda2b03iK2Hnv1/ZajTMRR9azx8rwqDJ 1YXi6i681PIlxg34K5Qj3kQ36Ok7bHlPEXS9+mpUe+S0ux3eq8RWeusmAuNJWjcb40Z/ RJymTvq8GG9jBAtIAHhD8LJ1r3hgc9vjbjLedIks6tdNvm70TO5xNnQlCM2bX8c/su09 vl9UDuiX3g0PL8jUoUfsdd3Rg8ZbxPXirjVWMjPWiosawLSotCi7EuRSx4WDppe7S7/w OIelLoQsShM+/pN0qXfdAXs83D33BLrh5Mdc+egCPzsSUKckvI1hQ+fTziHTC5DOfhkT +aMw== Received: by 10.60.2.35 with SMTP id 3mr46070415oer.63.1341931365410; Tue, 10 Jul 2012 07:42:45 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id c6sm5509219obn.13.2012.07.10.07.42.43 (version=SSLv3 cipher=OTHER); Tue, 10 Jul 2012 07:42:44 -0700 (PDT) From: Yoni Divinsky To: hostap@lists.shmoo.com Subject: [PATCH] Supply the connection scan results to bgscan after init Date: Tue, 10 Jul 2012 17:36:23 +0300 Message-Id: <1341930983-6957-1-git-send-email-yoni.divinsky@ti.com> X-Mailer: git-send-email 1.7.0.4 X-Gm-Message-State: ALoCoQk5Cq8/Ep9EzYr9K7hGL1bIVZ+AGGTDnnJaqWUCnh6v9s8IgWJf8EtmKrR5aJukTNGXVipc 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 If bgscan is enabled, then bgscan is initiated after the connection, with no bss scan result information. Since a scan was performed prior to the connection, the information exists and can be used to initialize the bgscan's cache. Signed-hostap: Yoni Divinsky --- wpa_supplicant/wpa_supplicant.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index c65dc3c..44090fe 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -554,8 +554,13 @@ static void wpa_supplicant_start_bgscan(struct wpa_supplicant *wpa_s) * optimization, so the initial connection is not * affected. */ - } else + } else { + struct wpa_scan_results *scan_res = + wpa_supplicant_get_scan_results(wpa_s, NULL, 0); wpa_s->bgscan_ssid = wpa_s->current_ssid; + if (scan_res) + bgscan_notify_scan(wpa_s, scan_res); + } } else wpa_s->bgscan_ssid = NULL; }