Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame^] | 2 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | #if !defined( __WLAN_QCT_PAL_TRACE_H ) |
| 23 | #define __WLAN_QCT_PAL_TRACE_H |
| 24 | |
| 25 | /**========================================================================= |
| 26 | |
| 27 | \file wlan_qct_pal_api.h |
| 28 | |
| 29 | \brief define general APIs PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL) |
| 30 | |
| 31 | Definitions for platform independent |
| 32 | |
| 33 | Copyright 2010 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 34 | |
| 35 | Qualcomm Confidential and Proprietary. |
| 36 | |
| 37 | ========================================================================*/ |
| 38 | |
| 39 | #include "wlan_qct_pal_type.h" |
| 40 | #include "wlan_qct_pal_status.h" |
| 41 | |
| 42 | typedef enum |
| 43 | { |
| 44 | // NONE means NO traces will be logged. This value is in place for the |
| 45 | // vos_trace_setlevel() to allow the user to turn off all traces. |
| 46 | eWLAN_PAL_TRACE_LEVEL_NONE = 0, |
| 47 | |
| 48 | // the following trace levels are the ones that 'callers' of VOS_TRACE() |
| 49 | // can specify in for the VOS_TRACE_LEVEL parameter. Traces are classified |
| 50 | // by severity (FATAL being more serious than INFO for example). |
| 51 | eWLAN_PAL_TRACE_LEVEL_FATAL, |
| 52 | eWLAN_PAL_TRACE_LEVEL_ERROR, |
| 53 | eWLAN_PAL_TRACE_LEVEL_WARN, |
| 54 | eWLAN_PAL_TRACE_LEVEL_INFO, |
| 55 | eWLAN_PAL_TRACE_LEVEL_INFO_HIGH, |
| 56 | eWLAN_PAL_TRACE_LEVEL_INFO_MED, |
| 57 | eWLAN_PAL_TRACE_LEVEL_INFO_LOW, |
| 58 | |
| 59 | // ALL means all trace levels will be active. This value is in place for the |
| 60 | // vos_trace_setlevel() to allow the user to turn ON all traces. |
| 61 | eWLAN_PAL_TRACE_LEVEL_ALL, |
| 62 | |
| 63 | // not a real level. Used to identify the maximum number of |
| 64 | // VOS_TRACE_LEVELs defined. |
| 65 | eWLAN_PAL_TRACE_LEVEL_COUNT |
| 66 | } wpt_tracelevel; |
| 67 | |
| 68 | #include "wlan_qct_os_trace.h" |
| 69 | |
| 70 | /*---------------------------------------------------------------------------- |
| 71 | |
| 72 | \brief wpalTraceSetLevel() - Set the trace level for a particular module |
| 73 | |
| 74 | This is an external API that allows trace levels to be set for each module. |
| 75 | |
| 76 | \param module - id of the module whos trace level is being modified |
| 77 | \param level - trace level. A member of the wpt_tracelevel |
| 78 | enumeration indicating the severity of the condition causing the |
| 79 | trace message to be issued. More severe conditions are more |
| 80 | likely to be logged. |
| 81 | \param on - boolean to indicate if tracing at the given level should be |
| 82 | enabled or disabled. |
| 83 | |
| 84 | \return nothing |
| 85 | |
| 86 | \sa |
| 87 | --------------------------------------------------------------------------*/ |
| 88 | void wpalTraceSetLevel( wpt_moduleid module, wpt_tracelevel level, |
| 89 | wpt_boolean on ); |
| 90 | |
| 91 | /**---------------------------------------------------------------------------- |
| 92 | |
| 93 | \brief wpalTraceCheckLevel() |
| 94 | |
| 95 | This is an external API that returns a boolean value to signify if a |
| 96 | particular trace level is set for the specified module. |
| 97 | |
| 98 | \param level - trace level. A member of the wpt_tracelevel enumeration |
| 99 | indicating the severity of the condition causing the trace |
| 100 | message to be issued. |
| 101 | |
| 102 | Note that individual trace levels are the only valid values |
| 103 | for this API. eWLAN_PAL_TRACE_LEVEL_NONE and eWLAN_PAL_TRACE_LEVEL_ALL |
| 104 | are not valid input and will return FALSE |
| 105 | |
| 106 | \return eWLAN_PAL_FALSE - the specified trace level for the specified module is OFF |
| 107 | |
| 108 | eWLAN_PAL_TRUE - the specified trace level for the specified module is ON |
| 109 | |
| 110 | \sa |
| 111 | --------------------------------------------------------------------------*/ |
| 112 | wpt_boolean wpalTraceCheckLevel( wpt_moduleid module, wpt_tracelevel level ); |
| 113 | |
| 114 | |
| 115 | /*---------------------------------------------------------------------------- |
| 116 | |
| 117 | \brief wpalTraceDisplay() - Display current state of trace level for |
| 118 | all modules |
| 119 | |
| 120 | This is an external API that allows trace levels to be displayed to |
| 121 | an end user |
| 122 | |
| 123 | \param none |
| 124 | |
| 125 | \return nothing |
| 126 | |
| 127 | \sa |
| 128 | --------------------------------------------------------------------------*/ |
| 129 | void wpalTraceDisplay(void); |
| 130 | |
| 131 | |
| 132 | #endif // __WLAN_QCT_PAL_TRACE_H |