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: 223698 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 9187C2C007C for ; Thu, 28 Feb 2013 07:43:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 341499D393; Wed, 27 Feb 2013 15:42:59 -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 MWFsP0hhzTml; Wed, 27 Feb 2013 15:42:58 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2D0FE9D38A; Wed, 27 Feb 2013 15:42:55 -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 7E60A9D38A for ; Wed, 27 Feb 2013 15:42:53 -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 CNuj+KsCvR7e for ; Wed, 27 Feb 2013 15:42:48 -0500 (EST) Received: from mail-gh0-f202.google.com (mail-gh0-f202.google.com [209.85.160.202]) (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 437B79D385 for ; Wed, 27 Feb 2013 15:42:47 -0500 (EST) Received: by mail-gh0-f202.google.com with SMTP id z10so109089ghb.5 for ; Wed, 27 Feb 2013 12:42:47 -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=seDR8v6TWqmJ/CXdK7cEyKXpqy0vIsJ0EZgqeyhmJmE=; b=fOWV0Z7v4+CFqKsdPQ2ATzez/74Y+GznIgzP57NhDFmQleFDHlaU8E2j88T5JQOWcN i8PwVNy4jD6869xy25YnXnZ8rdaUqL/5l76L/qICmqGqdksaClFtf3FGuk/RTqcegGKv RM1weQwXyjej4AOuoyTfGJpdXx+mnJv9Tf52/u5RkdqwabMjZ4PyDhGPM2+yvrOu8KwW lcBntUSS7PNiz3IW37n+1P8LlIS77GgFONne/tZvN/HzDQgq7ZZYU2DOmAkupFU3CQz9 wDs9Unrk2H9T225AjqwRYJwDAgqg8joaeEo3iRZll0l35V2gqSOnguat/BU1lbrLjak1 F74w== X-Received: by 10.236.147.234 with SMTP id t70mr2020162yhj.12.1361997767688; Wed, 27 Feb 2013 12:42:47 -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 f64si354390yhj.7.2013.02.27.12.42.47 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 27 Feb 2013 12:42:47 -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 8749A31C071 for ; Wed, 27 Feb 2013 12:42:47 -0800 (PST) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 23C5014029C; Wed, 27 Feb 2013 12:42:47 -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: <20130227204247.23C5014029C@ushik.mtv.corp.google.com> X-Gm-Message-State: ALoCoQk51OTBvyji1Zqhfbbn0tWG46UqFypGYpYu+0sK5Py2T4lsFfO0u3GBQT0XSAmxqMN4oC1Ge/RaV04jDE1Pn3F7jYzZn1HJ7E6TAk+aVyfDjSXM3nXlnz6UTg34lU2PH6bJDnskCzkEF82oVOzSoQVPOK67x6QGgJyAqczl5ue4eFJKwj+khPKwVuFZfJ1SYMTarkIW5/1ddN2MzF3teybTM5GGUJ+S5+TfL6bGtcmXJEl5G7w= 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 | 1 + wpa_supplicant/ctrl_iface.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 46e8dc7..19faf4e 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -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; }