From patchwork Thu Nov 15 14:07:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1749421 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 36FA9DF230 for ; Thu, 15 Nov 2012 14:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1767955Ab2KOOIf (ORCPT ); Thu, 15 Nov 2012 09:08:35 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58890 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767951Ab2KOOIe (ORCPT ); Thu, 15 Nov 2012 09:08:34 -0500 Received: from 64-126-113-183.dyn.everestkc.net ([64.126.113.183] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TZ07N-0002fP-CP; Thu, 15 Nov 2012 14:08:33 +0000 From: Seth Forshee To: Arend van Spriel , linux-wireless@vger.kernel.org Cc: "John W. Linville" , "Franky (Zhenhui) Lin" , Brett Rudley , Roland Vossen , Kan Yan , brcm80211-dev-list@broadcom.com, Daniel Wagner , Seth Forshee Subject: [PATCH v2 09/22] brcm80211: Allow trace support to be enabled separately from debug Date: Thu, 15 Nov 2012 08:07:59 -0600 Message-Id: <1352988492-21340-10-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352988492-21340-1-git-send-email-seth.forshee@canonical.com> References: <1352988492-21340-1-git-send-email-seth.forshee@canonical.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Since the runtime overhead of trace support is small when tracing is disabled, users may be interested in turning on trace support while leaving other debug features off. Add a new config option named CONFIG_BRCM_TRACING for this purpose. Signed-off-by: Seth Forshee Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Arend van Spriel --- drivers/net/wireless/brcm80211/Kconfig | 11 +++++++++++ .../brcm80211/brcmsmac/brcms_trace_events.h | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/brcm80211/Kconfig b/drivers/net/wireless/brcm80211/Kconfig index c9d811e..3735c27 100644 --- a/drivers/net/wireless/brcm80211/Kconfig +++ b/drivers/net/wireless/brcm80211/Kconfig @@ -63,6 +63,17 @@ config BRCMISCAN new E-Scan method which uses less memory in firmware and gives no limitation on the number of scan results. +config BRCM_TRACING + bool "Broadcom device tracing" + depends on BRCMSMAC || BRCMFMAC + ---help--- + If you say Y here, the Broadcom wireless drivers will register + with ftrace to dump event information into the trace ringbuffer. + Tracing can be enabled at runtime to aid in debugging wireless + issues. This option adds a small amount of overhead when tracing + is disabled. If unsure, say Y to allow developers to better help + you when wireless problems occur. + config BRCMDBG bool "Broadcom driver debug functions" depends on BRCMSMAC || BRCMFMAC diff --git a/drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.h b/drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.h index 27dd73e..bcf6969 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.h @@ -24,7 +24,7 @@ #include #include "mac80211_if.h" -#ifndef CONFIG_BRCMDBG +#ifndef CONFIG_BRCM_TRACING #undef TRACE_EVENT #define TRACE_EVENT(name, proto, ...) \ static inline void trace_ ## name(proto) {} @@ -80,7 +80,7 @@ TRACE_EVENT(brcms_dpc, #endif /* __TRACE_BRCMSMAC_H */ -#ifdef CONFIG_BRCMDBG +#ifdef CONFIG_BRCM_TRACING #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . @@ -89,4 +89,4 @@ TRACE_EVENT(brcms_dpc, #include -#endif /* CONFIG_BRCMDBG */ +#endif /* CONFIG_BRCM_TRACING */