From patchwork Wed Oct 14 09:26:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 530063 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]) by ozlabs.org (Postfix) with ESMTP id 6E5D914016A for ; Wed, 14 Oct 2015 18:28:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CE02717C3BA; Wed, 14 Oct 2015 03:28:37 -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 lcpvvkH44-mZ; Wed, 14 Oct 2015 03:28:37 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E3C4217C3C1; Wed, 14 Oct 2015 03:28:28 -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 970D617C3BB for ; Wed, 14 Oct 2015 03:28:07 -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 IKKLHoG5v7Q9 for ; Wed, 14 Oct 2015 03:28:05 -0400 (EDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 9C9A517C12C for ; Wed, 14 Oct 2015 03:28:03 -0400 (EDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 14 Oct 2015 00:28:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="663991806" Received: from unknown (HELO JED00377.ger.corp.intel.com) ([10.12.217.192]) by orsmga003.jf.intel.com with ESMTP; 14 Oct 2015 00:28:01 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 2/4] wpa_supplicant: Do not expire scan results based on aborted scan Date: Wed, 14 Oct 2015 12:26:31 +0300 Message-Id: <1444814793-21050-2-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444814793-21050-1-git-send-email-ilan.peer@intel.com> References: <1444814793-21050-1-git-send-email-ilan.peer@intel.com> Cc: Avraham Stern X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.13 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 From: Avraham Stern Do not expire scan results entries based on scan results from a scan that was aborted. The aborted scan did not scan all the requested channels or SSIDs, so the fact that a BSS is missing from the scan results does not mean it is not available. Signed-off-by: Avraham Stern --- wpa_supplicant/bss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 704ee7e..2003c66 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -799,7 +799,7 @@ void wpa_bss_update_end(struct wpa_supplicant *wpa_s, struct scan_info *info, struct wpa_bss *bss, *n; os_get_reltime(&wpa_s->last_scan); - if (!new_scan) + if ((info && info->aborted) || !new_scan) return; /* do not expire entries without new scan */ dl_list_for_each_safe(bss, n, &wpa_s->bss, struct wpa_bss, list) {