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 | #ifndef __WDA_DEBUG_H__ |
| 23 | #define __WDA_DEBUG_H__ |
| 24 | #if (!defined ANI_OS_TYPE_OSX && !defined (ANI_OS_TYPE_ANDROID)) |
| 25 | #include <stdio.h> |
| 26 | #endif |
| 27 | #include <stdarg.h> |
| 28 | |
| 29 | #include "utilsApi.h" |
| 30 | #include "sirDebug.h" |
| 31 | #include "sirParams.h" |
| 32 | #define WDA_DEBUG_LOGIDX ( LOG_INDEX_FOR_MODULE(SIR_WDA_MODULE_ID) ) |
| 33 | |
| 34 | |
| 35 | |
| 36 | #ifdef WLAN_DEBUG |
| 37 | |
| 38 | #define WDALOGP(x0) x0 |
| 39 | #define WDALOGE(x0) x0 |
| 40 | #define WDALOGW(x0) x0 |
| 41 | #define WDALOG1(x0) x0 |
| 42 | |
| 43 | #ifdef HAL_DEBUG_LOG2 |
| 44 | #define WDALOG2(x0) x0 |
| 45 | #else |
| 46 | #define WDALOG2(x0) |
| 47 | #endif |
| 48 | |
| 49 | #ifdef HAL_DEBUG_LOG3 |
| 50 | #define WDALOG3(x0) x0 |
| 51 | #else |
| 52 | #define WDALOG3(x0) |
| 53 | #endif |
| 54 | |
| 55 | #ifdef HAL_DEBUG_LOG4 |
| 56 | #define WDALOG4(x0) x0 |
| 57 | #else |
| 58 | #define WDALOG4(x0) |
| 59 | #endif |
| 60 | |
| 61 | #define STR(x) x |
| 62 | |
| 63 | #else |
| 64 | |
| 65 | #define WDALOGP(x) x |
| 66 | #define WDALOGE(x) {} |
| 67 | #define WDALOGW(x) {} |
| 68 | #define WDALOG1(x) {} |
| 69 | #define WDALOG2(x) {} |
| 70 | #define WDALOG3(x) {} |
| 71 | #define WDALOG4(x) {} |
| 72 | #define STR(x) "" |
| 73 | #endif |
| 74 | |
| 75 | void wdaLog(tpAniSirGlobal pMac, tANI_U32 loglevel, const char *pString,...); |
| 76 | |
| 77 | #endif // __WDA_DEBUG_H__ |
| 78 | |