From patchwork Tue Sep 1 07:55:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 7103681 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 8F67B9F36E for ; Tue, 1 Sep 2015 07:56:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90D82202E6 for ; Tue, 1 Sep 2015 07:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E40F20268 for ; Tue, 1 Sep 2015 07:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755261AbbIAH4A (ORCPT ); Tue, 1 Sep 2015 03:56:00 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:36546 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755247AbbIAH4A (ORCPT ); Tue, 1 Sep 2015 03:56:00 -0400 Received: by lbvd4 with SMTP id d4so37772562lbv.3 for ; Tue, 01 Sep 2015 00:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=ZOMq5XhsIZj75OkcVg7z24XmLmrTUmPHXaQLIriCLFA=; b=J9FbwxTwxoCFxka+cZ7/NjdojvVEIoFs/PoplPYvxlngZFcQxtE1G/DDJe7Fq2rmbB Kz3OtxRk/0/mQrxfnvThYJ+PJxZG1QjMjLD2wMsz35hx9gNb23eDoD6IEB61E8I8APui QE/HV5Ro5c9hfSqjQSAd9/uDaEuqJ2Tavnh/bWu+VzNgDgpTJHmoXiU2GHU7yYFbaWzt YT//zsf8/9NPQb44GbAhSCGRB+iZc9z3YLuSQKXTVeA8lzMlckLIEn49vvBzlrXwkfoa dBU0rjsYHJ9Ea+XT8C062hA+o/ri1n64qx3SShzXtpFDrGIw6L4PU7lQCYQo3LQfvXQU FFtQ== X-Received: by 10.152.179.107 with SMTP id df11mr12038263lac.95.1441094158423; Tue, 01 Sep 2015 00:55:58 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id ao8sm4579930lac.38.2015.09.01.00.55.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 00:55:57 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH iw] iw: display interface TX power if available Date: Tue, 1 Sep 2015 09:55:52 +0200 Message-Id: <1441094152-10977-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Signed-off-by: Rafa? Mi?ecki --- This makes use of the recently submitted patch [PATCH] nl80211: put current TX power in interface info --- interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface.c b/interface.c index 73ccecd..13806ba 100644 --- a/interface.c +++ b/interface.c @@ -367,6 +367,8 @@ static int print_iface_handler(struct nl_msg *msg, void *arg) printf("\n"); } + if (tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]) + printf("%s\ttxpower %d mBm\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL])); return NL_SKIP; }