From patchwork Thu Jan 18 10:17:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 10172769 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 A51BD601E7 for ; Thu, 18 Jan 2018 10:17:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9550B2623D for ; Thu, 18 Jan 2018 10:17:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89B342625B; Thu, 18 Jan 2018 10:17: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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 F1C7C2623D for ; Thu, 18 Jan 2018 10:17:58 +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: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:In-Reply-To: References:List-Owner; bh=SvcNUu0x6TcWrEe/GkXtYxcnJeHwH20aq48bKGfqfhU=; b=Ssy 0naFyg+iL0EttLM3Us/4N/y84bH3VSvB66w/piZ+h2yRHfkC9IY3an2yGDtYZgLYfzVpOlxoZiYd6 jVd47RlZxGt049nmXY8KHB0ZQ/fzPbqGCGmwE8a4qumIbhX6X67oz78ALba9vCcZkfpbRZabJdu8+ TtpkU5JFiSo3Qlyz7kSwbw7hMcvPIIKVWwM1GeoX39MXGlY5VHnPLdq3/QgtvsnfbUD6+WgD2PXwO 5V5TvmV5MwNyZg37zNYFOxqNQ/nhcm9/x+pjL/46nsidTdCAORWekjADMOHytTm86rkH5+G8t6flI KV0D3Z2cEl5fpiwwKRNefTl9yKDIrng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ec7GW-0001IN-3t; Thu, 18 Jan 2018 10:17:48 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec7GN-0001BJ-Ah for ath10k@lists.infradead.org; Thu, 18 Jan 2018 10:17:40 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 65E396021C; Thu, 18 Jan 2018 10:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516270648; bh=QaykLGhWZ7YlRjcT20+TZJYG+XRn0pU/SxUK2krvXfs=; h=From:To:Cc:Subject:Date:From; b=oCl0IaWa/crDxkRe+Wc1bcEwy7wvgZAxEv1/rCOpB67RwhRCgwuKwHPJrv+/Awr0O sVpBog/MqdvwnsO2MwYJC8OM7M4CrvsNNImwLKIe11OXpBMZ9YSpOg6kQwhMyOBhXU RzcSzuX2W7W3H/XMS5BG4FtQOLKrPuW5E8TyKXCU= 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: vnaralas@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D38F26021C; Thu, 18 Jan 2018 10:17:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516270648; bh=QaykLGhWZ7YlRjcT20+TZJYG+XRn0pU/SxUK2krvXfs=; h=From:To:Cc:Subject:Date:From; b=oCl0IaWa/crDxkRe+Wc1bcEwy7wvgZAxEv1/rCOpB67RwhRCgwuKwHPJrv+/Awr0O sVpBog/MqdvwnsO2MwYJC8OM7M4CrvsNNImwLKIe11OXpBMZ9YSpOg6kQwhMyOBhXU RzcSzuX2W7W3H/XMS5BG4FtQOLKrPuW5E8TyKXCU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D38F26021C 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=vnaralas@codeaurora.org From: Venkateswara Naralasetty To: ath10k@lists.infradead.org Subject: [PATCH 1/2] cfg80211: Add tx ack signal attribute in sta info Date: Thu, 18 Jan 2018 15:47:23 +0530 Message-Id: <1516270643-12833-1-git-send-email-vnaralas@codeaurora.org> X-Mailer: git-send-email 2.7.4 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: Venkateswara Naralasetty , Bhagavathi Perumal S MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bhagavathi Perumal S This patch provides support for users to get ack signal strength of last transmitted by introducing new attribute 'NL80211_STA_INFO_ACK_SIGNAL'. Signed-off-by: Bhagavathi Perumal S Signed-off-by: Venkateswara Naralasetty --- include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 2 ++ net/wireless/nl80211.c | 1 + 3 files changed, 5 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3a4a1a9..1236bea 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1145,6 +1145,7 @@ struct cfg80211_tid_stats { * @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer * @pertid: per-TID statistics, see &struct cfg80211_tid_stats, using the last * (IEEE80211_NUM_TIDS) index for MSDUs not encapsulated in QoS-MPDUs. + * @ack_signal: signal strength (in dBm) of the last ACK frame. */ struct station_info { u64 filled; @@ -1189,6 +1190,7 @@ struct station_info { u64 rx_duration; u8 rx_beacon_signal_avg; struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1]; + s8 ack_signal; }; #if IS_ENABLED(CONFIG_CFG80211) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index c587a61..5a1568d 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2899,6 +2899,7 @@ enum nl80211_sta_bss_param { * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames * received from the station (u64, usec) * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment + * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm) * @__NL80211_STA_INFO_AFTER_LAST: internal * @NL80211_STA_INFO_MAX: highest possible station info attribute */ @@ -2937,6 +2938,7 @@ enum nl80211_sta_info { NL80211_STA_INFO_TID_STATS, NL80211_STA_INFO_RX_DURATION, NL80211_STA_INFO_PAD, + NL80211_STA_INFO_ACK_SIGNAL, /* keep last */ __NL80211_STA_INFO_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b3f8970..94c623e 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4479,6 +4479,7 @@ 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); #undef PUT_SINFO #undef PUT_SINFO_U64