From patchwork Mon Jun 4 14:11:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balaji Pothunoori X-Patchwork-Id: 10446669 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 6275A60375 for ; Mon, 4 Jun 2018 14:11:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 593CF290BA for ; Mon, 4 Jun 2018 14:11:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C1C1290BC; Mon, 4 Jun 2018 14:11:41 +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 DA2EE290BA for ; Mon, 4 Jun 2018 14:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbeFDOLj (ORCPT ); Mon, 4 Jun 2018 10:11:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46700 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753855AbeFDOLd (ORCPT ); Mon, 4 Jun 2018 10:11:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8B8AF607E8; Mon, 4 Jun 2018 14:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528121492; bh=A/tsAI8Cg0EmsRIYbcToRvhupEj3yPeAo1rJMz5JYnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fTENE5wcjUBw2AO6CmXg+t9Y8y66yLRP87TTrNbFotWs+B/JpIM8mVDkrj98El++g DejTJn4ZXbUcEGsBcixJSd0qQfs0nZJ/f/+S4iPafUYzrZK23r5m+sSvUGF97a5eTl k0EA5XUmezjSSsgzZcLyAW39+0XsY0HsyEPgKvqs= 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 B24DB60591; Mon, 4 Jun 2018 14:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528121491; bh=A/tsAI8Cg0EmsRIYbcToRvhupEj3yPeAo1rJMz5JYnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bxpDhEiMJiqf4mAZvySINqrk5G13qvVAmYTYn4hFk6oxan+KNUiqi7DDFSbAfIoI+ dCzAc9i5eIm+j+Fw2Wm+Aw4FpLkUXEK1R3vdJDdsR/tsVKi+/ZL+Xd6IvxUkqqV1ZP Q6y2iu+ZslJZTEAbksjRsPwQEdN6FkVc9plwGSDU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B24DB60591 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 v2 1/2] cfg80211: last ack signal support in station dump Date: Mon, 4 Jun 2018 19:41:08 +0530 Message-Id: <1528121469-16450-2-git-send-email-bpothuno@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528121469-16450-1-git-send-email-bpothuno@codeaurora.org> References: <1528121469-16450-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" support in station dump if driver supports. Signed-off-by: Balaji Pothunoori --- v2: - typo corrected in subject include/uapi/linux/nl80211.h | 14 +++++++------- net/wireless/nl80211.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 28b3654..3514bef 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -3000,8 +3000,8 @@ enum nl80211_sta_bss_param { * 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_DATA_ACK_SIGNAL_AVG: avg signal strength of (data) - * ACK frame (s8, dBm) + * @NL80211_STA_INFO_ACK_SIGNAL_AVG: avg signal strength of data or management + * ACK frames(s8, dBm) * @__NL80211_STA_INFO_AFTER_LAST: internal * @NL80211_STA_INFO_MAX: highest possible station info attribute */ @@ -3041,7 +3041,7 @@ enum nl80211_sta_info { NL80211_STA_INFO_RX_DURATION, NL80211_STA_INFO_PAD, NL80211_STA_INFO_ACK_SIGNAL, - NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG, + NL80211_STA_INFO_ACK_SIGNAL_AVG, /* keep last */ __NL80211_STA_INFO_AFTER_LAST, @@ -5128,9 +5128,9 @@ enum nl80211_feature_flags { * "radar detected" event. * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and * receiving control port frames over nl80211 instead of the netdevice. - * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack - * rssi if firmware support, this flag is to intimate about ack rssi - * support to nl80211. + * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This Driver support ack rssi if + * firmware support, this flag is to intimate about ack rssi support + * to nl80211. * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate * TXQs. * @@ -5165,7 +5165,7 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN, NL80211_EXT_FEATURE_DFS_OFFLOAD, NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT, + NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, NL80211_EXT_FEATURE_TXQS, /* add new features before the definition below */ diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 07514ca..29cf5fd 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4650,11 +4650,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