From patchwork Tue Dec 17 16:21:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 11298211 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB2DB6C1 for ; Tue, 17 Dec 2019 16:21:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A968D21582 for ; Tue, 17 Dec 2019 16:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728229AbfLQQVq (ORCPT ); Tue, 17 Dec 2019 11:21:46 -0500 Received: from nbd.name ([46.4.11.11]:49734 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728217AbfLQQVq (ORCPT ); Tue, 17 Dec 2019 11:21:46 -0500 Received: from pd95fd66b.dip0.t-ipconnect.de ([217.95.214.107] helo=bertha.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1ihFbT-0003dj-Md; Tue, 17 Dec 2019 17:21:44 +0100 From: John Crispin To: Kalle Valo Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Anilkumar Kolli , John Crispin Subject: [PATCH] ath11k: enable HE tlvs in ppdu stats for pktlog lite Date: Tue, 17 Dec 2019 17:21:40 +0100 Message-Id: <20191217162140.2102-1-john@phrozen.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Anilkumar Kolli This patch enables HE tlvs in ppdu stats for pktlog lite mode. Signed-off-by: John Crispin Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath11k/debug.c | 15 +++++++++++++++ drivers/net/wireless/ath/ath11k/dp.h | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index 2311e08d0889..078486c32dca 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -1129,7 +1129,22 @@ static ssize_t ath11k_write_pktlog_filter(struct file *file, HTT_RX_FILTER_TLV_FLAGS_PACKET_HEADER | HTT_RX_FILTER_TLV_FLAGS_ATTENTION; } else if (mode == ATH11K_PKTLOG_MODE_LITE) { + ret = ath11k_dp_tx_htt_h2t_ppdu_stats_req(ar, + HTT_PPDU_STATS_TAG_PKTLOG); + if (ret) { + ath11k_err(ar->ab, "failed to enable pktlog lite: %d\n", ret); + goto out; + } + rx_filter = HTT_RX_FILTER_TLV_LITE_MODE; + } else { + ret = ath11k_dp_tx_htt_h2t_ppdu_stats_req(ar, + HTT_PPDU_STATS_TAG_DEFAULT); + if (ret) { + ath11k_err(ar->ab, "failed to send htt ppdu stats req: %d\n", + ret); + goto out; + } } tlv_filter.rx_filter = rx_filter; diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h index 00ce7747d595..87114082b9b6 100644 --- a/drivers/net/wireless/ath/ath11k/dp.h +++ b/drivers/net/wireless/ath/ath11k/dp.h @@ -519,6 +519,14 @@ enum htt_ppdu_stats_tag_type { | BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_FLUSH) \ | BIT(HTT_PPDU_STATS_TAG_USR_COMMON_ARRAY)) +#define HTT_PPDU_STATS_TAG_PKTLOG (BIT(HTT_PPDU_STATS_TAG_USR_MPDU_ENQ_BITMAP_64) | \ + BIT(HTT_PPDU_STATS_TAG_USR_MPDU_ENQ_BITMAP_256) | \ + BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_BA_BITMAP_64) | \ + BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_BA_BITMAP_256) | \ + BIT(HTT_PPDU_STATS_TAG_INFO) | \ + BIT(HTT_PPDU_STATS_TAG_TX_MGMTCTRL_PAYLOAD) | \ + HTT_PPDU_STATS_TAG_DEFAULT) + /* HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG Message * * details: