From patchwork Wed Feb 27 11:24:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 10831591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 196B0922 for ; Wed, 27 Feb 2019 11:23:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0224F2D015 for ; Wed, 27 Feb 2019 11:23:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA7082D0D4; Wed, 27 Feb 2019 11:22: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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 8AF1E2D0F4 for ; Wed, 27 Feb 2019 11:22:59 +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=SlctTiNmjdeeOr+opVr6AWR+da3uPJ3Lypn1A2aSOzQ=; b=jJy LEGzVUfOfqVv8fjRQBkMF10Dx3nGCGuSh9xmLm++n0jbMR82qLIwG7PP5WiYVva/jazDOVKnQMDfp 5CSL1+CdbxVTgKi/XpQtMzRzrpKwJUZ7fTL7U/zv4jYoGPjZsenIDQjAhQ8De3dr8j7GgBVu+OmiR QwSHdrtoSRB8zrWTm9H7JfgwNvzonfaD0uppQ29cSiRXqg5rUH+6cq/oez8jYDaGAdF5bdVeOZtc0 HyiHfSTwwP1oVQYXHWUqPv6xVcM6DOnvKrGT8AiFjulHM48ned7RF/RiqEcJjTG1TT2CepnfFhyeu QIPxgzmLeAQYIlxFSLXwrUHQzFljXlQ==; 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 1gyxIg-00070l-MM; Wed, 27 Feb 2019 11:22: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 1gyxIe-000707-6N for ath10k@lists.infradead.org; Wed, 27 Feb 2019 11:22:57 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E53A260E3E; Wed, 27 Feb 2019 11:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551266575; bh=pDTl6BWuI2MvOL7E/5d/5JVXhf+vE7YSrsFeVJD0QKg=; h=From:To:Cc:Subject:Date:From; b=I8vL4Z84Hc2kBai9i9l9HMWp2gZWhYc4glJDhqlSEwDq+1t2Bd42e8NG3iWw3JsWo tv33ybXsYEUOZ8MWO50tsoooLRUhG+8u9iAbucqQquWw/kM8/BHS5GPhxrudLdt+a8 q9tUzqUUfGHjiq8yaM1JMPlzB8mv1FDaJa6KAZm8= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mkenna@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 579CA60909; Wed, 27 Feb 2019 11:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551266575; bh=pDTl6BWuI2MvOL7E/5d/5JVXhf+vE7YSrsFeVJD0QKg=; h=From:To:Cc:Subject:Date:From; b=I8vL4Z84Hc2kBai9i9l9HMWp2gZWhYc4glJDhqlSEwDq+1t2Bd42e8NG3iWw3JsWo tv33ybXsYEUOZ8MWO50tsoooLRUhG+8u9iAbucqQquWw/kM8/BHS5GPhxrudLdt+a8 q9tUzqUUfGHjiq8yaM1JMPlzB8mv1FDaJa6KAZm8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 579CA60909 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=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath10k@lists.infradead.org Subject: [PATCH 1/2] ath10k: Extended the HTT stats support to retrieve Mu-MIMO related stats Date: Wed, 27 Feb 2019 16:54:41 +0530 Message-Id: <1551266682-32073-1-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190227_032256_264290_C3F6BB28 X-CRM114-Status: GOOD ( 11.42 ) 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: Maharaja Kennadyrajan , vikpatel@codeaurora.org, arnagara@codeaurora.org, 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 Extended the bit mask value of the HTT stats to get the Mu-MIMO related stats via tracing. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath10k/debug.c | 4 ++-- drivers/net/wireless/ath/ath10k/htt.h | 3 ++- drivers/net/wireless/ath/ath10k/htt_tx.c | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 1b8903280d42..ca1af0e1623c 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -922,8 +922,8 @@ static ssize_t ath10k_write_htt_stats_mask(struct file *file, if (ret) return ret; - /* max 8 bit masks (for now) */ - if (mask > 0xff) + /* max 17 bit masks (for now) */ + if (mask > HTT_STATS_BIT_MASK) return -E2BIG; mutex_lock(&ar->conf_mutex); diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index fef716aa8f3a..8ff432bb2e86 100644 --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h @@ -315,6 +315,7 @@ struct htt_stats_req { } __packed; #define HTT_STATS_REQ_CFG_STAT_TYPE_INVALID 0xff +#define HTT_STATS_BIT_MASK GENMASK(16, 0) /* * htt_oob_sync_req - request out-of-band sync @@ -2109,7 +2110,7 @@ void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb); void ath10k_htt_htc_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb); bool ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb); int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt); -int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie); +int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u32 mask, u64 cookie); int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, u8 max_subfrms_ampdu, u8 max_subfrms_amsdu); diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index d8e9cc0bb772..7e5f0eba043b 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -580,7 +580,7 @@ int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt) return 0; } -int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie) +int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u32 mask, u64 cookie) { struct ath10k *ar = htt->ar; struct htt_stats_req *req; @@ -603,11 +603,11 @@ int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie) memset(req, 0, sizeof(*req)); - /* currently we support only max 8 bit masks so no need to worry + /* currently we support only max 24 bit masks so no need to worry * about endian support */ - req->upload_types[0] = mask; - req->reset_types[0] = mask; + memcpy(req->upload_types, &mask, 3); + memcpy(req->reset_types, &mask, 3); req->stat_type = HTT_STATS_REQ_CFG_STAT_TYPE_INVALID; req->cookie_lsb = cpu_to_le32(cookie & 0xffffffff); req->cookie_msb = cpu_to_le32((cookie & 0xffffffff00000000ULL) >> 32);