From patchwork Thu Jan 18 10:18:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 10172771 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 0916E601E7 for ; Thu, 18 Jan 2018 10:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E98002623D for ; Thu, 18 Jan 2018 10:18:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC1B12625B; Thu, 18 Jan 2018 10:18:57 +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 5D26D2623D for ; Thu, 18 Jan 2018 10:18:57 +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=ZRC pBU+XjP1Ic/4Cf3eoHDN8UwrdceQk3czdqDsEKGTmMeC0XQFlIAciYC6Yy17YYGGaGCsCoP4yLwNk hZIcdRRXsUJpAvWuX9noxBb2vsb4m5KcgaXRNmHg6eBANypHu73iwtLHCSkRMhDuGuaTWG/pZHLcx ICy8bTICb1pAsSuOMJcxPlk05OVNCCZV6yR63TyniRd4eoAjvUyyU4viuQnXKdK/FbgKF7Gt/Rgnp rQLzbGo/EV5ND86+vFblOvMYboQPGBusCAzIaKVLPZ2ALnZe9CpOVlaYDd9Gu8Mk1JG6bMFEtffIC iq3J7j7MGs8ljzxGnsudNqFfC9/eAbQ==; 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 1ec7HY-0001cY-CC; Thu, 18 Jan 2018 10:18:52 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ec7HU-0001ap-Sa for ath10k@lists.infradead.org; Thu, 18 Jan 2018 10:18:50 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 861826021C; Thu, 18 Jan 2018 10:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516270718; bh=QaykLGhWZ7YlRjcT20+TZJYG+XRn0pU/SxUK2krvXfs=; h=From:To:Cc:Subject:Date:From; b=UDOF2VM5sgs1i43yPuo4/cbnxJVSFi6ztv/wEEKsQmtONFCZM3K20wwA6xNfTPpTZ SYuZ8FGwDS01i86x5nqqnGNf+wNISR1ffyWnRJnysQfKsoo4e0+HkDsP3BJikQe60M PbkI0Fe4x32RixYWWISIjRR+mEHE9Oa4BH8chelw= 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 EACF660452; Thu, 18 Jan 2018 10:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516270718; bh=QaykLGhWZ7YlRjcT20+TZJYG+XRn0pU/SxUK2krvXfs=; h=From:To:Cc:Subject:Date:From; b=UDOF2VM5sgs1i43yPuo4/cbnxJVSFi6ztv/wEEKsQmtONFCZM3K20wwA6xNfTPpTZ SYuZ8FGwDS01i86x5nqqnGNf+wNISR1ffyWnRJnysQfKsoo4e0+HkDsP3BJikQe60M PbkI0Fe4x32RixYWWISIjRR+mEHE9Oa4BH8chelw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EACF660452 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:48:33 +0530 Message-Id: <1516270713-12900-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