From patchwork Fri May 25 09:20:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10426699 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 D9E14601D5 for ; Fri, 25 May 2018 09:21:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D73A6295F0 for ; Fri, 25 May 2018 09:21:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC08429615; Fri, 25 May 2018 09:21:04 +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 76696295F0 for ; Fri, 25 May 2018 09:21:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754925AbeEYJVC (ORCPT ); Fri, 25 May 2018 05:21:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43336 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754859AbeEYJVB (ORCPT ); Fri, 25 May 2018 05:21:01 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 50B8D60618; Fri, 25 May 2018 09:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527240061; bh=r+0kk/AWXpxYkAVXBEkESNWLBqNdOBEYzxKyCjnNa+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zdk/Mtm7E6qHMrubv6J3qJtAYqo/87SiYtgI+n0rFcLeMtrhKBUo5dLhYFHeG/Cxf 02AiWGArn99TpsEcbM+e6u34O6rBTail522HSFAo6fM8ElHVtKK4XLTjjHe2G+pHbz MY7NGQVNOqjXXaS7dAwkolYeSImgpJGw3Aobt+w0= 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 E773160392; Fri, 25 May 2018 09:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527240060; bh=r+0kk/AWXpxYkAVXBEkESNWLBqNdOBEYzxKyCjnNa+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TG1lisrQIUfaFxAD0qN3YKJXUEz7+WkdPt51VBFfrCs0fXAiQw/VHjVRwj11wiWrA gZuRQNH96nFdwBVd9A9cbXDoVYwuOuOgb/D+2z/n+fswmSBm8E/0p1kfSjhbi/wDPe zp0Gqhq/5d1hg2tlkL1ybp+oLWXvJkMQaTRprFJQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E773160392 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 2/2] mac80211: last ack singal support in station dump Date: Fri, 25 May 2018 14:50:05 +0530 Message-Id: <1527240005-8508-3-git-send-email-bpothuno@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527240005-8508-1-git-send-email-bpothuno@codeaurora.org> References: <1527240005-8508-1-git-send-email-bpothuno@codeaurora.org> 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 adds "last ack signal" and "avg ack signal" support in station dump for valid ack rssi. Signed-off-by: Balaji Pothunoori --- net/mac80211/sta_info.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 6428f1a..12b618e 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -2310,13 +2310,21 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL); } - if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS) && - !(sinfo->filled & BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG))) { - sinfo->avg_ack_signal = - -(s8)ewma_avg_signal_read( + if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS)) { + if (sta->status_stats.ack_signal_filled && ((!(sinfo->filled & + BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL))) || + (!(sinfo->filled & + BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG))))) { + sinfo->ack_signal = + sta->status_stats.last_ack_signal; + sinfo->filled |= + BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL); + sinfo->avg_ack_signal = + -(s8)ewma_avg_signal_read( &sta->status_stats.avg_ack_signal); - sinfo->filled |= - BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG); + sinfo->filled |= + BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG); + } } }