From patchwork Thu Mar 8 06:52:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10266925 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 1DA6060364 for ; Thu, 8 Mar 2018 06:52:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E89E27853 for ; Thu, 8 Mar 2018 06:52:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 031FC27FC0; Thu, 8 Mar 2018 06:52:44 +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 6AB8727853 for ; Thu, 8 Mar 2018 06:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965087AbeCHGwm (ORCPT ); Thu, 8 Mar 2018 01:52:42 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44658 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965060AbeCHGwj (ORCPT ); Thu, 8 Mar 2018 01:52:39 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 824BA6043F; Thu, 8 Mar 2018 06:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520491959; bh=VfVfoYBlIsXBlwLr8xtHP8zRej3s7E5npueHIJ3jdP0=; h=From:To:Cc:Subject:Date:From; b=Yrt0aIw1JhE4qJxsMwfM29tlouvDKQS9qvCHZMPhtlgVJYPKmlL+Wjttv3EP+jFPw +8UPMu6B8HKJ7uBmvm1qiIIEYa0UqXWlWJS0yD2JLLL/8PU1RSNKlM5Y7muj214+k9 o5RSOVSjfFyMkoR92kOFn38JP2BOFUKyI1mXzAnI= 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 7A36C602A0; Thu, 8 Mar 2018 06:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520491959; bh=VfVfoYBlIsXBlwLr8xtHP8zRej3s7E5npueHIJ3jdP0=; h=From:To:Cc:Subject:Date:From; b=Yrt0aIw1JhE4qJxsMwfM29tlouvDKQS9qvCHZMPhtlgVJYPKmlL+Wjttv3EP+jFPw +8UPMu6B8HKJ7uBmvm1qiIIEYa0UqXWlWJS0yD2JLLL/8PU1RSNKlM5Y7muj214+k9 o5RSOVSjfFyMkoR92kOFn38JP2BOFUKyI1mXzAnI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7A36C602A0 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] iw: avgerage ack rssi changes for data frames Date: Thu, 8 Mar 2018 12:22:32 +0530 Message-Id: <1520491952-26289-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 patchset changes 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 --- nl80211.h | 6 ++++++ station.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/nl80211.h b/nl80211.h index 56368e9..6e9614d 100644 --- a/nl80211.h +++ b/nl80211.h @@ -2655,6 +2655,10 @@ enum nl80211_sta_bss_param { * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames * received from the station (u64, usec) * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment + * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK + * frame(u8, dBm) + * @NL80211_STA_INFO_DATA_AVG_ACK_SIGNAL: avg signal strength of data ACK + * frame(u8, dBm) * @__NL80211_STA_INFO_AFTER_LAST: internal * @NL80211_STA_INFO_MAX: highest possible station info attribute */ @@ -2693,6 +2697,8 @@ enum nl80211_sta_info { NL80211_STA_INFO_TID_STATS, NL80211_STA_INFO_RX_DURATION, NL80211_STA_INFO_PAD, + NL80211_STA_INFO_ACK_SIGNAL, + NL80211_STA_INFO_DATA_AVG_ACK_SIGNAL, /* keep last */ __NL80211_STA_INFO_AFTER_LAST, diff --git a/station.c b/station.c index f3e3da8..ec1f7bc 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,10 @@ 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;