From patchwork Thu Jul 19 13:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10534399 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 64BD5601D2 for ; Thu, 19 Jul 2018 13:26:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C84F2988E for ; Thu, 19 Jul 2018 13:26:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D87D2989F; Thu, 19 Jul 2018 13:26:59 +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 DE9E72988E for ; Thu, 19 Jul 2018 13:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731735AbeGSOKI (ORCPT ); Thu, 19 Jul 2018 10:10:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43928 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731696AbeGSOKH (ORCPT ); Thu, 19 Jul 2018 10:10:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4AAD160B10; Thu, 19 Jul 2018 13:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532006817; bh=PUse/wTGPxoTAtPq04WqNLkE2U7wfqiSUOwfFcaqkYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CFyWIx7sUVhU34nPt5EifuaFM+zlfWSHAxohGG6e53FusiXHLqDYtw6SqwWFrhKgI 8sObNRwRrbojVs2aO1EvncXsl0c15cqOKcTdXGVWUaLYg3Gwe6HmMgs3YZaQenboa8 +9bmUCj3RxfuFd59QIH5fgS4i/tf+p/NJn7iSnsQ= 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 689F1606DB; Thu, 19 Jul 2018 13:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532006816; bh=PUse/wTGPxoTAtPq04WqNLkE2U7wfqiSUOwfFcaqkYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UfeChl8NBgOSBEqAG1DqAxAQrjLf7dwqFiOEzN1E4YoqQ8keJCCaqJJ+f6xGffGCT JXvVQ1CnyFumgOOfbSIRUj0gFOFpi76N8zE0FOtojfNyv+/0iM3yVgOdZcWe/oEqy9 jYMz0lwmDvZVzXZrnBI/Rne+XaFXA1Cm5SuSMFmw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 689F1606DB 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, ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Balaji Pothunoori Subject: [PATCH v2 2/3] mac80211: Extend avg ack rssi support for mgmt frames Date: Thu, 19 Jul 2018 18:56:28 +0530 Message-Id: <1532006789-32454-3-git-send-email-bpothuno@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532006789-32454-1-git-send-email-bpothuno@codeaurora.org> References: <1532006789-32454-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 Used defined API to make common average ack rssi support irrespective of data or mamagement tx ack packet. Signed-off-by: Balaji Pothunoori --- v2: Addressed Johannes comments Modified subject and commit log net/mac80211/sta_info.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index aa8fe77..1364f0b 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -2317,19 +2317,19 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, sinfo->expected_throughput = thr; } - if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL)) && - sta->status_stats.ack_signal_filled) { - sinfo->ack_signal = sta->status_stats.last_ack_signal; - 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( - &sta->status_stats.avg_ack_signal); - sinfo->filled |= - BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG); + 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_ACK_SIGNAL_AVG); + } } }