From patchwork Mon Feb 9 07:36:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Raj Nagarajan X-Patchwork-Id: 5798661 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EFA199F36A for ; Mon, 9 Feb 2015 07:37:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3819B20121 for ; Mon, 9 Feb 2015 07:37:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4721F20120 for ; Mon, 9 Feb 2015 07:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759477AbbBIHhV (ORCPT ); Mon, 9 Feb 2015 02:37:21 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:62314 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236AbbBIHhU (ORCPT ); Mon, 9 Feb 2015 02:37:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1423467440; x=1455003440; h=from:to:cc:subject:date:message-id:mime-version; bh=edjB3yuqTYZFnM5I/lHcqLVAPna8MU7n2fS8nxeciVE=; b=Qu9M5AKE0b+W4PdQmlq0TNAQRoA+F5vlB3+Z4CVwiOXqF/ZlNmpv9O2R Eo18eNLcFenjH35NRPNGXXaQrlpq+sALtzQg0J31RiXXHMet0qBzFXxsx cvZXC5sfjDzQNMY/roZCDxsaufwrmj5tXHI8cU3l/TVkVlz1UiHHVmZz4 4=; X-IronPort-AV: E=McAfee;i="5600,1067,7706"; a="102617316" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Feb 2015 23:37:20 -0800 X-IronPort-AV: E=Sophos;i="5.09,542,1418112000"; d="scan'208";a="847544406" Received: from nasanexm01f.na.qualcomm.com ([10.85.0.32]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 08 Feb 2015 23:37:20 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01F.na.qualcomm.com (10.85.0.32) with Microsoft SMTP Server (TLS) id 15.0.995.29; Sun, 8 Feb 2015 23:37:19 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.995.29; Sun, 8 Feb 2015 23:37:09 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Mon, 09 Feb 2015 13:07:00 +0530 From: Ashok Raj Nagarajan To: CC: , , , Ashok Raj Nagarajan Subject: [PATCH] iw: display allowable channel bandwidth information Date: Mon, 9 Feb 2015 13:06:58 +0530 Message-ID: <1423467418-3912-1-git-send-email-arnagara@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We already have allowable channel bandwidth information at userspace. Display this information with 'iw list'. Excerpt of iw list command Frequencies: * 5180 MHz [36] (17.0 dBm) (HT40+, VHT80, VHT160) * 5200 MHz [40] (17.0 * dBm) (HT40-, HT40+, VHT80, VHT160) Signed-off-by: Ashok Raj Nagarajan --- info.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/info.c b/info.c index 6e21e45..84db716 100644 --- a/info.c +++ b/info.c @@ -173,6 +173,18 @@ static int print_phy_handler(struct nl_msg *msg, void *arg) goto next; } + if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_HT40_MINUS]) + print_flag("HT40-", &open); + + if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_HT40_PLUS]) + print_flag("HT40+", &open); + + if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_80MHZ]) + print_flag("VHT80", &open); + + if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_160MHZ]) + print_flag("VHT160", &open); + /* If both flags are set assume an new kernel */ if (tb_freq[NL80211_FREQUENCY_ATTR_NO_IR] && tb_freq[__NL80211_FREQUENCY_ATTR_NO_IBSS]) { print_flag("no IR", &open);