From patchwork Fri May 25 11:06:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10427105 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 02525602D8 for ; Fri, 25 May 2018 11:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E134C2961A for ; Fri, 25 May 2018 11:07:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D37AB29646; Fri, 25 May 2018 11:07:02 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 1CBE82961A for ; Fri, 25 May 2018 11:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965908AbeEYLHA (ORCPT ); Fri, 25 May 2018 07:07:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50864 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965872AbeEYLG7 (ORCPT ); Fri, 25 May 2018 07:06:59 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3BD4E60117; Fri, 25 May 2018 11:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527246419; bh=xX1QNkCmu7/2QS+4qarVQVCoAIHUnEfNrYYmL6EyyCk=; h=From:To:Cc:Subject:Date:From; b=n2hoUgN5SN+9DdroUhvW3nzUfCuepX/csYCAXKUShJaOdCfIyeEhXrc3HqCVUIyyT jH7XE0Dqx3ZPX0NFlRgW3qFdlgIceZjLQx/emuDDSLcOLO5yKKgAbeSXu9XsVEpPI2 l+xJfR0yvKjcBPTGJNnFteThAI1C5PDO4AXu3ZtA= 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@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7613D6044E; Fri, 25 May 2018 11:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527246418; bh=xX1QNkCmu7/2QS+4qarVQVCoAIHUnEfNrYYmL6EyyCk=; h=From:To:Cc:Subject:Date:From; b=VqlCLLQAai/QDVzFYyRYsX9XzdnZuozpDLuz+cOyvbK9s84rMhOJp4sb9su+dm+oa i6xS9xgbxqFEjVWoQqVVf1HJZE63LM5PYG25z1fYnYqJvKJGt3/tHdBn1PjhCq+5+f R7OdCju3KkB71NP9VqeaNCwWOSsKtuW/SxuGiiAA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7613D6044E 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: linux-wireless@vger.kernel.org, Balaji Pothunoori Subject: [PATCH v4] iw: ack signal support for tx ack packets Date: Fri, 25 May 2018 16:36:46 +0530 Message-Id: <1527246406-25475-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 signal, last ack signal of tx ack packets. Signed-off-by: Balaji Pothunoori --- V4: * Changed the subject * Added last ack signal support and renamed avg ack signal macro V3: * Added version no V2: * Removed nl80211.h changes and modified the commit log station.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/station.c b/station.c index 38c5f91..fd38043 100644 --- a/station.c +++ b/station.c @@ -308,6 +308,8 @@ 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_ACK_SIGNAL] = {.type = NLA_U8 }, + [NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 }, }; char *chain; @@ -409,6 +411,14 @@ 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_ACK_SIGNAL]) + printf("\n\tlast ack signal:%d dBm", + (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL])); + + if (sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG]) + printf("\n\tavg ack signal:\t%d dBm", + (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG])); + if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) { uint32_t thr;