From patchwork Thu Mar 8 07:17:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10267083 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 9865260211 for ; Thu, 8 Mar 2018 07:17:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 827DC297C0 for ; Thu, 8 Mar 2018 07:17:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7506F297C5; Thu, 8 Mar 2018 07:17:16 +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 EC359297C0 for ; Thu, 8 Mar 2018 07:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754621AbeCHHRO (ORCPT ); Thu, 8 Mar 2018 02:17:14 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59384 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbeCHHRN (ORCPT ); Thu, 8 Mar 2018 02:17:13 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DCBBB601D3; Thu, 8 Mar 2018 07:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520493432; bh=csfLzvpSV8+ihf4Bm2vap6DgcBsqP5Qpril8ZBPhjkE=; h=From:To:Cc:Subject:Date:From; b=YonYGkXQWCoZ9aTkQl62KTgcMf2VipuS8A4U74NiJ6Eqngpc+ONXlvhhFaQTaNdbz idRpsg6LJ2JYTxI3yjm2aU0OrnE8pN6FHBJ6R8h5Q+5U/gU1V1uDzU5C2N0mhA7i+/ 13FAnGlPN26qlYjNKd7DiDNLj2R3b8Mmmwzf9ocA= 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 1DFF16022C; Thu, 8 Mar 2018 07:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520493432; bh=csfLzvpSV8+ihf4Bm2vap6DgcBsqP5Qpril8ZBPhjkE=; h=From:To:Cc:Subject:Date:From; b=YonYGkXQWCoZ9aTkQl62KTgcMf2VipuS8A4U74NiJ6Eqngpc+ONXlvhhFaQTaNdbz idRpsg6LJ2JYTxI3yjm2aU0OrnE8pN6FHBJ6R8h5Q+5U/gU1V1uDzU5C2N0mhA7i+/ 13FAnGlPN26qlYjNKd7DiDNLj2R3b8Mmmwzf9ocA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1DFF16022C 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:47:06 +0530 Message-Id: <1520493426-26628-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. --- 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;