From patchwork Thu Jul 19 14:29:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10534631 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 EE460600F4 for ; Thu, 19 Jul 2018 14:30:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E142C299C4 for ; Thu, 19 Jul 2018 14:30:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5A9029AF3; Thu, 19 Jul 2018 14:30: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 7A000299C4 for ; Thu, 19 Jul 2018 14:30:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731126AbeGSPN1 (ORCPT ); Thu, 19 Jul 2018 11:13:27 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37278 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730919AbeGSPN1 (ORCPT ); Thu, 19 Jul 2018 11:13:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F023A607C6; Thu, 19 Jul 2018 14:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532010600; bh=M3Le6KktBPlX6WqXCkMcsQE1AB/0CT7886WLqdxKI/s=; h=From:To:Cc:Subject:Date:From; b=Zmwt5McJl5sxFdDyL6rZOh8lfe0PF6aq17WEBokFcjPgBH+NA/kpqWMuDpqBQV+Im QzlggLpnclErsxs+JcP+Ozh9xH6MFV7OjzpbGsEsew6lvuz/yoTGMHA4MBkRSID73G tPyus1t4nLu3QEWMLAtIqnvIIjyDZDgDqttg/yxY= 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 61987602B3; Thu, 19 Jul 2018 14:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532010600; bh=M3Le6KktBPlX6WqXCkMcsQE1AB/0CT7886WLqdxKI/s=; h=From:To:Cc:Subject:Date:From; b=Zmwt5McJl5sxFdDyL6rZOh8lfe0PF6aq17WEBokFcjPgBH+NA/kpqWMuDpqBQV+Im QzlggLpnclErsxs+JcP+Ozh9xH6MFV7OjzpbGsEsew6lvuz/yoTGMHA4MBkRSID73G tPyus1t4nLu3QEWMLAtIqnvIIjyDZDgDqttg/yxY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 61987602B3 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 v5] iw: ack signal support for tx ack packets Date: Thu, 19 Jul 2018 19:59:50 +0530 Message-Id: <1532010590-475-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 --- v5: * Rebased, No changes 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;