From patchwork Fri Feb 5 15:42:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Raj Nagarajan X-Patchwork-Id: 8236571 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 31234BEEED for ; Fri, 5 Feb 2016 15:43:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54DD320390 for ; Fri, 5 Feb 2016 15:43:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCC0820265 for ; Fri, 5 Feb 2016 15:43:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRiY1-0001EG-T3; Fri, 05 Feb 2016 15:43:49 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRiXw-00011q-0x for ath10k@lists.infradead.org; Fri, 05 Feb 2016 15:43:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1454687023; x=1486223023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TFYkrXf/HXiVmLOnLsprh8IHdBbhoH9HyimSKNZFEZ8=; b=OEyPxBdyaxbI5BrkuT6wc3RBOXnK2HGLBSWgoRtqAcXzfG/H50rTQC+n 093DYs5Pa0dupCLfeu+On0BVIBUqrbyasWZCjJkuJL881kdIIXZiB8wMZ W/O97uDxkdJrsHfKkjEep3AYO+qOWOe+pqAZgqW1FjhlMfX9GkvDvIN5r 8=; X-IronPort-AV: E=Sophos;i="5.22,401,1449561600"; d="scan'208";a="167037175" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Feb 2016 07:43:22 -0800 X-IronPort-AV: E=McAfee;i="5700,7163,8065"; a="1058932568" Received: from nasanexm01a.na.qualcomm.com ([10.85.0.81]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 05 Feb 2016 07:43:22 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm01a.na.qualcomm.com (10.85.0.81) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 5 Feb 2016 07:43:21 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 5 Feb 2016 21:13:12 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 05 Feb 2016 21:13:04 +0530 From: Ashok Raj Nagarajan To: Subject: [PATCH 2/2] ath10k: add hw_rev to trace events to support pktlog Date: Fri, 5 Feb 2016 21:12:49 +0530 Message-ID: <1454686969-5740-2-git-send-email-arnagara@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454686969-5740-1-git-send-email-arnagara@qti.qualcomm.com> References: <1454686969-5740-1-git-send-email-arnagara@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160205_074344_257236_7098A94A X-CRM114-Status: UNSURE ( 7.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnagara@qti.qualcomm.com, kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pktlog data is different between firmware variants (eg. 10.2 vs 10.4). To have a unified user space script to decode pktlog trace events generated, it is desirable to know which firmware variant has provided the events and thereby decode the pktlogs appropriately. Hardware revision (hw_rev) helps to determine the firmware variant sending these trace events. So add hw_rev to trace events. Signed-off-by: Ashok Raj Nagarajan --- drivers/net/wireless/ath/ath10k/trace.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/trace.h b/drivers/net/wireless/ath/ath10k/trace.h index 71bdb36..e0d00ce 100644 --- a/drivers/net/wireless/ath/ath10k/trace.h +++ b/drivers/net/wireless/ath/ath10k/trace.h @@ -250,6 +250,7 @@ TRACE_EVENT(ath10k_wmi_dbglog, TP_STRUCT__entry( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) + __field(u8, hw_type); __field(size_t, buf_len) __dynamic_array(u8, buf, buf_len) ), @@ -257,14 +258,16 @@ TRACE_EVENT(ath10k_wmi_dbglog, TP_fast_assign( __assign_str(device, dev_name(ar->dev)); __assign_str(driver, dev_driver_string(ar->dev)); + __entry->hw_type = ar->hw_rev; __entry->buf_len = buf_len; memcpy(__get_dynamic_array(buf), buf, buf_len); ), TP_printk( - "%s %s len %zu", + "%s %s %d len %zu", __get_str(driver), __get_str(device), + __entry->hw_type, __entry->buf_len ) ); @@ -277,6 +280,7 @@ TRACE_EVENT(ath10k_htt_pktlog, TP_STRUCT__entry( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) + __field(u8, hw_type); __field(u16, buf_len) __dynamic_array(u8, pktlog, buf_len) ), @@ -284,14 +288,16 @@ TRACE_EVENT(ath10k_htt_pktlog, TP_fast_assign( __assign_str(device, dev_name(ar->dev)); __assign_str(driver, dev_driver_string(ar->dev)); + __entry->hw_type = ar->hw_rev; __entry->buf_len = buf_len; memcpy(__get_dynamic_array(pktlog), buf, buf_len); ), TP_printk( - "%s %s size %hu", + "%s %s %d size %hu", __get_str(driver), __get_str(device), + __entry->hw_type, __entry->buf_len ) ); @@ -440,6 +446,7 @@ TRACE_EVENT(ath10k_htt_rx_desc, TP_STRUCT__entry( __string(device, dev_name(ar->dev)) __string(driver, dev_driver_string(ar->dev)) + __field(u8, hw_type); __field(u16, len) __dynamic_array(u8, rxdesc, len) ), @@ -447,14 +454,16 @@ TRACE_EVENT(ath10k_htt_rx_desc, TP_fast_assign( __assign_str(device, dev_name(ar->dev)); __assign_str(driver, dev_driver_string(ar->dev)); + __entry->hw_type = ar->hw_rev; __entry->len = len; memcpy(__get_dynamic_array(rxdesc), data, len); ), TP_printk( - "%s %s rxdesc len %d", + "%s %s %d rxdesc len %d", __get_str(driver), __get_str(device), + __entry->hw_type, __entry->len ) );