From patchwork Wed Feb 27 20:39:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 223709 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 BD2F22C0084 for ; Thu, 28 Feb 2013 08:32:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id C11819D3B5; Wed, 27 Feb 2013 16:32:13 -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 8XxjSF-TTwE5; Wed, 27 Feb 2013 16:32:13 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id AD8DD9D3D0; Wed, 27 Feb 2013 16:32:08 -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 3DA569D3D0 for ; Wed, 27 Feb 2013 16:32:07 -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 t0mkPU6Tenuz for ; Wed, 27 Feb 2013 16:32:03 -0500 (EST) Received: from mail-ye0-f201.google.com (mail-ye0-f201.google.com [209.85.213.201]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id AB0809D3B5 for ; Wed, 27 Feb 2013 16:32:03 -0500 (EST) Received: by mail-ye0-f201.google.com with SMTP id m12so116809yen.2 for ; Wed, 27 Feb 2013 13:32:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:date:subject:to:message-id:x-gm-message-state; bh=fvoUPuzdju+7h+E3VzH3CvXt+onDrf4N2qVlfaWS7P0=; b=M5svoZ7K1mJrBUofKTFTHrc9t7nzDc+mcbvBAHAm90jAwjhdRNLXnAnMByV+GY5DAI 1EGof1OXKglW5+p2F9d0CmHPcUVNiJV7TISz1/VePWHizSWmpZi09mciUoYZPRIcaynX y8p6I8XQ169bEMrFREYMNzq09Ny4dK2XSZkIqn6jPUeNcHuKEoZ0t13DCWyw+RPQ6I1m TGJymiHn7KBqsAfn/kBh5H5T6WDKQArwFbYnftqwBeiJksOsD4mdM0+OIpT1BjWHq9gt JWJdHdrBwZDOFGs86Dqgea87bNBIZ9xBBj1DNOMUn4fpf5T6dMnKfsAHuiVQId8CuiJc WSvQ== X-Received: by 10.236.126.5 with SMTP id a5mr2217116yhi.34.1362000723099; Wed, 27 Feb 2013 13:32:03 -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 u28si369446yhm.1.2013.02.27.13.32.03 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 27 Feb 2013 13:32:03 -0800 (PST) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.104.41]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id EE50A31C26C for ; Wed, 27 Feb 2013 13:32:02 -0800 (PST) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 9263E13FB53; Wed, 27 Feb 2013 13:32:02 -0800 (PST) From: Dmitry Shmidt Date: Wed, 27 Feb 2013 12:39:35 -0800 Subject: [PATCH] Add WPA_BSS_MASK_DELIM flag to BSS command To: hostap@lists.shmoo.com Message-Id: <20130227213202.9263E13FB53@ushik.mtv.corp.google.com> X-Gm-Message-State: ALoCoQl4gI4MWwAVa719A9XZQ62lzUpnkisjVBDl/4abEX0p1+z4eDa+h8ixM53CmCZijAflByktiMWK+zXjDuu/X4fgVAJ5+HYHvMtmv0IQ9DnJuK/Q4g3j6zDQGJ36NGPQbZUke1AJwLIT2a7nftIjlCtruLXGHJTJng39rFbRakrDnPYfuFHT5DAndzu7TolLryAPL1hMlyK/kzsZT9pS32U0sou4GeJL9AScKWnEE6MU6idLpQw= 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 This flag will add ==== delimiter between to separate bss results Signed-off-by: Dmitry Shmidt --- src/common/wpa_ctrl.h | 3 ++- wpa_supplicant/ctrl_iface.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 46e8dc7..ce1c3a6 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -151,7 +151,7 @@ extern "C" { /* BSS command information masks */ -#define WPA_BSS_MASK_ALL 0xFFFFFFFF +#define WPA_BSS_MASK_ALL 0xFFFDFFFF #define WPA_BSS_MASK_ID BIT(0) #define WPA_BSS_MASK_BSSID BIT(1) #define WPA_BSS_MASK_FREQ BIT(2) @@ -169,6 +169,7 @@ extern "C" { #define WPA_BSS_MASK_P2P_SCAN BIT(14) #define WPA_BSS_MASK_INTERNETW BIT(15) #define WPA_BSS_MASK_WIFI_DISPLAY BIT(16) +#define WPA_BSS_MASK_DELIM BIT(17) /* wpa_supplicant/hostapd control interface access */ diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 87467b8..65a769e 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -3225,6 +3225,13 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, } #endif /* CONFIG_INTERWORKING */ + if (mask & WPA_BSS_MASK_DELIM) { + ret = os_snprintf(pos, end - pos, "====\n"); + if (ret < 0 || ret >= end - pos) + return 0; + pos += ret; + } + return pos - buf; }