From patchwork Thu Sep 11 03:09:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Abinader X-Patchwork-Id: 388024 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 ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0996414008F for ; Thu, 11 Sep 2014 13:07:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E369A9D3AD; Wed, 10 Sep 2014 23:07:38 -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 xo8YbXl8yG3s; Wed, 10 Sep 2014 23:07:38 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B0DDF9D3B0; Wed, 10 Sep 2014 23:07:32 -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 2A54B9D3B0 for ; Wed, 10 Sep 2014 23:07:32 -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 2VwvbUZmCJq0 for ; Wed, 10 Sep 2014 23:07:25 -0400 (EDT) Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) (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 2F08C9D3AD for ; Wed, 10 Sep 2014 23:07:25 -0400 (EDT) Received: by mail-qc0-f180.google.com with SMTP id c9so20100872qcz.25 for ; Wed, 10 Sep 2014 20:07:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=MKt3KO+XD7sLsKmDMUTTtdjU4i+XzAxBO7YVKsyOhfc=; b=G3RiYXB9+VpK6u3JiTX3OCBPLq2CE9VftFKj0M4T84lLZWqY6lD1Rl8LGJprQDGUM+ TjnuN7phs356hW3wEwPqe6Yz7MXLvzWdfBlEGaI2a2YADcFmVPS6bC41bbI4UK54aK8p edG+nGfI+T83ydyat1JnUCb2fBQC+xKLwbucXt+naKusPoIqGBLADZkKcZGn4jSJxVOY 6UcRTw1yAtuKwzjlKHte7YzkOOyljyplibxuIpiuH7WjKLwG4yUeqOZxH7mxQnw+Gqv1 23lnC5JUMFrVnH8mj/C464SiJh1S+KU+10/pa3MgSl0RkTb+g40z5RZfsM0qY0+u0szc m6QQ== X-Gm-Message-State: ALoCoQm8H6EX0DzF/XDNDDuXHjP3+MNthk0wbKf4/3zTHhZHWpY6Y9a10C3NAg4EEH3UlsMI7IxE X-Received: by 10.229.229.135 with SMTP id ji7mr66251716qcb.15.1410404844696; Wed, 10 Sep 2014 20:07:24 -0700 (PDT) Received: from localhost.localdomain ([179.234.208.171]) by mx.google.com with ESMTPSA id l7sm14393642qaf.16.2014.09.10.20.07.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Sep 2014 20:07:24 -0700 (PDT) From: Eduardo Abinader To: hostap@lists.shmoo.com Subject: [PATCH] bss: Update bss with P2P IE for p2p find Date: Wed, 10 Sep 2014 23:09:41 -0400 Message-Id: <1410404981-6067-1-git-send-email-eduardo.abinader@openbossa.org> X-Mailer: git-send-email 1.9.1 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 Just update bss scan results for a p2p finding, if the scan results contain p2p IE, no matter if the receiving iface is p2p or not. Such change saves memory and avoid unecessary notifications, by ignoring those BSSs supposedly not relevant for p2p find procedure. Signed-off-by: Eduardo Abinader --- wpa_supplicant/bss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 7d01a5f..af4e8ba 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -627,7 +627,8 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, p2p = wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE); #ifdef CONFIG_P2P if (p2p == NULL && - wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) { + (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE || + wpa_s->p2p_scan_work)) { /* * If it's a P2P specific interface, then don't update * the scan result without a P2P IE.