Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp616264lqs; Thu, 13 Jun 2024 23:34:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhxzFI63OQpQyz1IlCwdhc0d7Gjf3O/Yf5iyMq5b1ZqKEY7pF//+dPdRkmaUvc9PcWrLbe7vOswdOGIcEv0zp7ecoU9vNU0Bp5Fm05Og== X-Google-Smtp-Source: AGHT+IF0BZQ3/Be2+z/cRQ+jfats35mzTEt7ToomMKRU02x4oB+gw3d7g2XPeewDV7X0KVSFVUrj X-Received: by 2002:a50:ed85:0:b0:57c:bc03:caa2 with SMTP id 4fb4d7f45d1cf-57cbc03cddbmr1603905a12.20.1718346868060; Thu, 13 Jun 2024 23:34:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718346868; cv=pass; d=google.com; s=arc-20160816; b=L69c6D2upJv+LJJjiQpgCHd/pkQ4lvFJj39JFCD3hfu6q4cdisL0VG2X08JPbLat0+ yFYxQdE43EsXpHgZ8PtWqoFwPVZmF1U3HoCDq6Dwavw7ojyenxOo0zSUoOJMcWyp/nhl CpqJRIsV3tVl6QqmSHpd6X7rI157fiJEsTBsUEg4V7p4V8lyRO3Xk9qiBzBcrTCGCulz DcM3rzkyoLRqwVqLrLyH/KHnnZ1Tjcxc9wNIuSyR7j9roLnhmB7/GIPNfMela3qdnfop 2cDkPOvDnh0IrtuVzS93ALYpot7ZjhDJM+771ff1A7MsSlw7nkCtytriRal30S9w1S/8 Zy3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=MieBab9KPLRmGPerEbO+te9E9MQWOAixT8qR/wFgPOY=; fh=8JfDQlpUjKMrwFSvSU4A2C1GR8rVM1mF1CGTl2hgXQg=; b=gxmoNxQD8BvsTnxA0wawGGSK5+XN5f4TyhtZaLMrWk0jjhSk7AoMfcUuGkqIYa8NpE S0rBp7m95+NK6UjB5eOMqEH1Ng0uyTwceglBBWEcHrZatJIL5ASH00SHJosvZfZoIVgs APtvlf+FGlCJYg6rjTCZmqZZ08He0pYZG+YPK8Xky22axGMNo4bU750vvO6h95aGLYTr Y2aVsysazFxtGcFHyumSuBJleNrXEZwXiCjOaCEMKxP4jXGTf7nrOAn9PDYvh65FsY3d y9v+UiZsCZtL2vr+LaifEwIff7i3ymH4CZn0KBazz8LV7M8J3GSVLE1ksaNlsMzQifkh pZbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JN2ZHJSx; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb745f144si1520091a12.518.2024.06.13.23.34.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 23:34:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JN2ZHJSx; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C46571F21670 for ; Fri, 14 Jun 2024 06:34:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F023147C96; Fri, 14 Jun 2024 06:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="JN2ZHJSx" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAD5D41A88 for ; Fri, 14 Jun 2024 06:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718346861; cv=none; b=kOCI2TNVzsTij4T6xjElYjt85n9dC7N0CtRUuObqy/x2wHgcrCus9i8GsVtWyA9rI/mc7Qar6n0qwgpJ5eIZLldFqwX9hRMlWd8g4adraUTJREnlqozw08Cjqpo+hSEdQ5KimWccDok076CU7TOgm0R/U7X+sDHXhAgM6MO/3bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718346861; c=relaxed/simple; bh=M7hVVyMPgZfVSDZP2jqVwwQ1+sS+pMWyoVL9MTFxGSY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DNXcYGDmE1aVQsT9cfEoFyF/B71vCxmB1iz1w4hgSmOWCH4kiiZ+7E3H85OySuWLU3CuE3DtjXZ1H/sFTOUdk6PjFMtKHFxwh463zLF0FDuJ/PoRqo4EDkgWAEgOkeOkwu65dyaZEMU4uiTfelrKUDIwP2FscfCH0dDGade1GI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=JN2ZHJSx; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45DJH3gY002336; Fri, 14 Jun 2024 06:34:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=MieBab9KPLRmGPerEbO+te9E9MQWOAixT8q R/wFgPOY=; b=JN2ZHJSxcqn7N+5EIyxeUYA7g74NZzAP5vHKboOnp8UWqYEt2jK e+yGL87klkkAlzfQTGXjUPg9GMvVPJ+f11Hn6UERikcJTPmHtSrBurlPFhZkjCM2 PY0NhD+ZqujMg19x+zWA7AcEHrupfnLFLBIHDJKEIzIgG30YRB989WF9Encez3F8 Iae/7wpeQoRMZHo83uBlIpM2r1ApMZeBzDFDFgrmx94OL6z2V7IGGMugi/3ie9q/ Hr9gGL5j9Z518UuEBa1hIa+12QWknZF4FcIe59LSAJbeFeSQiCzsg1Vy7jfrMm5W eL1MnTTcBaudhQf645aRko8uOVIG1GIP2rA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yr6q2s721-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jun 2024 06:34:14 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTP id 45E6YAs8026756; Fri, 14 Jun 2024 06:34:10 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3yn1s6n076-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jun 2024 06:34:10 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 45E6YA8X026749; Fri, 14 Jun 2024 06:34:10 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-rgnanase-blr.qualcomm.com [10.190.106.79]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 45E6YAWs026746 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jun 2024 06:34:10 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 2378837) id 712744112C; Fri, 14 Jun 2024 12:04:09 +0530 (+0530) From: Ramya Gnanasekar To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Ramya Gnanasekar Subject: [PATCH v5 0/4] wifi: ath12k: Add support to enable debugfs_htt_stats Date: Fri, 14 Jun 2024 12:04:00 +0530 Message-Id: <20240614063404.2659089-1-quic_rgnanase@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 3HhfEEBcZwtqOpfGGAfYgLPFLK2W7Bqu X-Proofpoint-GUID: 3HhfEEBcZwtqOpfGGAfYgLPFLK2W7Bqu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-13_15,2024-06-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406140043 Bring in the basic infrastructure necessary for enabling htt_stats via debugfs. Patch series bring support to request stats type to firmware, dump the stats and request to reset the stats from firmware. Schema with one ath12k device: ath12k `-- pci-0000:06:00.0 |-- mac0 `-- htt_stats |-- htt_stats_type |-- htt_stats_reset --- Depends-On: [PATCH] wifi: ath12k: Fix pdev id sent to firmware for single phy devices Link: https://lore.kernel.org/linux-wireless/20240611043342.2672998-1-quic_rgnanase@quicinc.com/ v5: - Addressed Jeff comments - Changed sizeof type with data structure pointer. - Pulled out patch #3 from series. - Rebased on ToT v4: - No changes. Re-sending due to mail issue. v3: - Addressed Kalle's comments - Locking is taken care. ar::data_lock is used to protect stats request completion and other HTT debug entities protected using ar::conf_mutex. - Fixed KASAN warning from WCN7580 during stats type write. - Changed header style for MU PPDU stats printing routine - Renamed function ath12k_debugfs_htt_stats_init() to ath12k_debugfs_htt_stats_register() - Added expected length check while parsing each tag to prevent buffer overread. v2: - Handled pdev id sent in HTT stats request command for WCN7850 Added changes as a separate patch #3 - Tested in WCN7850 and added Tested-on tag - Rebased on ToT --- Dinesh Karthikeyan (3): wifi: ath12k: Add support to enable debugfs_htt_stats wifi: ath12k: Add htt_stats_dump file ops support wifi: ath12k: Add support to parse requested stats_type Ramya Gnanasekar (1): wifi: ath12k: Dump additional Tx PDEV HTT stats drivers/net/wireless/ath/ath12k/Makefile | 2 +- drivers/net/wireless/ath/ath12k/core.h | 9 + drivers/net/wireless/ath/ath12k/debugfs.c | 3 + .../wireless/ath/ath12k/debugfs_htt_stats.c | 754 ++++++++++++++++++ .../wireless/ath/ath12k/debugfs_htt_stats.h | 300 +++++++ drivers/net/wireless/ath/ath12k/dp_rx.c | 10 +- drivers/net/wireless/ath/ath12k/dp_rx.h | 4 + drivers/net/wireless/ath/ath12k/dp_tx.c | 4 +- 8 files changed, 1080 insertions(+), 6 deletions(-) create mode 100644 drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c create mode 100644 drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h base-commit: e72048809ec7355a947415ae6836d2eb7fdcda39 prerequisite-patch-id: d2a9e43548368a409107e185dc8755fdb30507fb -- 2.34.1