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