From patchwork Thu Jul 19 13:26:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10534401 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 16283600F4 for ; Thu, 19 Jul 2018 13:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F32FF298C4 for ; Thu, 19 Jul 2018 13:27:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E741B298D0; Thu, 19 Jul 2018 13:27: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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 965E3298C4 for ; Thu, 19 Jul 2018 13:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8GJuLEytn7tvul7rL32YL/AIJSumrULukaMBDi1V8gc=; b=lhaT5Io4sfuLki3W4RRNOQG2Mn AYgS2OY5UNUj6T/R2VYjLaYViqoG2SyW4NP5RruN+y2yXbwqZVlsNAjux9JltPXjvQ7LuV++A9L75 jv4bU3OJu+88rzIKAMyBuz0/REbmJdh55PEOkhlx3IfZccx7mLE5qi6ZM+XFhq/mEYeM4huZg47Ui sQUZvcsRaXW5jbNPAfjDeROxqI0tn91KaWDi2cWcBzdLxsLBGfkbkNF5hiUV1xin1oUNmFUtKJORO OUnmUgdZCaYzYQLCWX6KZUwWHLkNntlAsgiNMYibUyZqY4GorifivrRr3fOcUmYnBwwAMpE+6khTv M74WsS9g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fg8xO-00010o-Bc; Thu, 19 Jul 2018 13:26:58 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fg8xK-0000yq-15 for ath10k@lists.infradead.org; Thu, 19 Jul 2018 13:26:55 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8351E607B9; Thu, 19 Jul 2018 13:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532006810; bh=olD0t/4mTTV8Fh8+5NEumFoobKV89fteHczu+iv2Vv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=agaILgys5PkMX6O0eheuPmK9Qu+JxKTjcZrLJBuH9y9oTIKv5r7OB9tpySn1oXV5l 0ZMCqqs/leQDcduPbFm9do+C2gGDbpF9a8yaTUhm6agAwuAWeEHMfGi4YC5iAxDzub 6vE1pCG6JYqiy12hFnlRHIYgxYLWipkFxv2k5pvk= 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 AE91E60116; Thu, 19 Jul 2018 13:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532006810; bh=olD0t/4mTTV8Fh8+5NEumFoobKV89fteHczu+iv2Vv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=agaILgys5PkMX6O0eheuPmK9Qu+JxKTjcZrLJBuH9y9oTIKv5r7OB9tpySn1oXV5l 0ZMCqqs/leQDcduPbFm9do+C2gGDbpF9a8yaTUhm6agAwuAWeEHMfGi4YC5iAxDzub 6vE1pCG6JYqiy12hFnlRHIYgxYLWipkFxv2k5pvk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AE91E60116 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 Subject: [PATCH v2 1/3] cfg80211: Extend avg ack rssi support for mgmt frames Date: Thu, 19 Jul 2018 18:56:27 +0530 Message-Id: <1532006789-32454-2-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180719_062654_109720_7EDFD202 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balaji Pothunoori , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Defining APIs to update avg ack rssi irrespective of data or mgmt tx ack packet; this patch keeps the original behavior intact without breaking the existing API. Signed-off-by: Balaji Pothunoori --- v2: Addressed Johannes comments Modified subject and commit log include/uapi/linux/nl80211.h | 7 +++++++ net/wireless/nl80211.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index f82ce3c..06f23db 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -52,6 +52,13 @@ #define NL80211_MULTICAST_GROUP_NAN "nan" #define NL80211_MULTICAST_GROUP_TESTMODE "testmode" +/* + * These APIs are defined to maintain average ack signal for both data and + * mgmt tx ack packets + */ +#define NL80211_STA_INFO_ACK_SIGNAL_AVG NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG +#define NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT + /** * DOC: Station handling * diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0ccce33..a0ad39e 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4723,10 +4723,11 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, PUT_SINFO_U64(RX_DROP_MISC, rx_dropped_misc); PUT_SINFO_U64(BEACON_RX, rx_beacon); PUT_SINFO(BEACON_SIGNAL_AVG, rx_beacon_signal_avg, u8); - PUT_SINFO(ACK_SIGNAL, ack_signal, u8); if (wiphy_ext_feature_isset(&rdev->wiphy, - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT)) - PUT_SINFO(DATA_ACK_SIGNAL_AVG, avg_ack_signal, s8); + NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT)) { + PUT_SINFO(ACK_SIGNAL, ack_signal, u8); + PUT_SINFO(ACK_SIGNAL_AVG, avg_ack_signal, s8); + } #undef PUT_SINFO #undef PUT_SINFO_U64