From patchwork Thu Mar 8 07:19:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10267109 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F009160211 for ; Thu, 8 Mar 2018 07:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA2B4297C0 for ; Thu, 8 Mar 2018 07:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE7AC297C6; Thu, 8 Mar 2018 07:19:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 679DF297C0 for ; Thu, 8 Mar 2018 07:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933762AbeCHHTs (ORCPT ); Thu, 8 Mar 2018 02:19:48 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60664 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754752AbeCHHTr (ORCPT ); Thu, 8 Mar 2018 02:19:47 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2ED446053B; Thu, 8 Mar 2018 07:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520493587; bh=/hMI9jyvTpFWYeoiWmzTaFMVbPQGWcLDMKzTIo/q65k=; h=From:To:Cc:Subject:Date:From; b=aRzsVbE5Z+Kd8dMRc8bxxJPczapd3Of67rw5GV59WIaZE9afnSq+oUDfq31T49cfx 6fFJIjRt5uUkC4fY4P5He+LSP3LXA1EwcQjiGL3a3ztSlWHo2Xy6S+i98e2L/1vahP Re5be0qCnDmEsq/QjBbsWPYZNUUNZzdY22O+MWbU= Received: from tejas.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bpothuno@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4A322601D3; Thu, 8 Mar 2018 07:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520493586; bh=/hMI9jyvTpFWYeoiWmzTaFMVbPQGWcLDMKzTIo/q65k=; h=From:To:Cc:Subject:Date:From; b=nt6/pOysOTaETNxCcdZMbe4COG3wYEfAeXqj9Nyb9/DgX24C8xusbnVNMsz4L/HmP 0FgB8o/wa6yGeYShOHS1dQth/W/m9T0js7OEy2/TSxPOyayGTXyD2w0k+0DWd9z/YO lNTrVFe7Gt4+veU4oU0nwxXN5DtMQxVSR1ZV4zn0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4A322601D3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=bpothuno@codeaurora.org From: Balaji Pothunoori To: johannes@sipsolutions.net Cc: bpothuno@qti.qualcomm.com, linux-wireless@vger.kernel.org, Balaji Pothunoori Subject: [PATCH v3] iw: avgerage ack rssi changes for data frames Date: Thu, 8 Mar 2018 12:49:41 +0530 Message-Id: <1520493581-26708-1-git-send-email-bpothuno@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is to display the average ack rssi for data frames. "avg ack signal" field diplay limited by host based on firmware capablities. Example output: localhost ~ #iw dev wlan-5000mhz station dump Station 34:f3:9a:aa:3b:29 (on wlan-5000mhz) inactive time: 5370 ms rx bytes: 85321 rx packets: 576 tx bytes: 14225 tx packets: 71 tx retries: 0 tx failed: 2 beacon loss: 0 rx drop misc: 0 signal: -54 dBm signal avg: -53 dBm tx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2 rx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2 avg ack signal: -56 dBm authorized: yes authenticated: yes associated: yes preamble: short WMM/WME: yes MFP: no TDLS peer: no DTIM period: 2 beacon interval:100 short preamble: yes short slot time:yes connected time: 203 seconds Signed-off-by: Balaji Pothunoori --- V2: -Removed nl80211.h changes and modified the commit log. V3: -Adding version. --- station.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/station.c b/station.c index f3e3da8..6c567bc 100644 --- a/station.c +++ b/station.c @@ -237,6 +237,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg) [NL80211_STA_INFO_TID_STATS] = { .type = NLA_NESTED }, [NL80211_STA_INFO_BSS_PARAM] = { .type = NLA_NESTED }, [NL80211_STA_INFO_RX_DURATION] = { .type = NLA_U64 }, + [NL80211_STA_INFO_DATA_AVG_ACK_SIGNAL] = { .type = NLA_U8 }, }; char *chain; @@ -338,6 +339,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg) printf("\n\trx duration:\t%lld us", (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_RX_DURATION])); + if (sinfo[NL80211_STA_INFO_DATA_AVG_ACK_SIGNAL]) + printf("\n\tavg ack signal:\t%d dBm", + (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_DATA_AVG_ACK_SIGNAL])); if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) { uint32_t thr;