OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2004-2006 Atheros Communications Inc. |
| 3 * All rights reserved. |
| 4 * |
| 5 * |
| 6 // This program is free software; you can redistribute it and/or modify |
| 7 // it under the terms of the GNU General Public License version 2 as |
| 8 // published by the Free Software Foundation; |
| 9 // |
| 10 // Software distributed under the License is distributed on an "AS |
| 11 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 12 // implied. See the License for the specific language governing |
| 13 // rights and limitations under the License. |
| 14 // |
| 15 // |
| 16 * |
| 17 */ |
| 18 |
| 19 #ifndef _DEBUG_LINUX_H_ |
| 20 #define _DEBUG_LINUX_H_ |
| 21 |
| 22 /* macro to remove parens */ |
| 23 #define ATH_PRINTX_ARG(arg...) arg |
| 24 |
| 25 #ifdef DEBUG |
| 26 /* NOTE: the AR_DEBUG_PRINTF macro is defined here to handle special handlin
g of variable arg macros |
| 27 * which may be compiler dependent. */ |
| 28 #define AR_DEBUG_PRINTF(mask, args) do { \ |
| 29 if (GET_ATH_MODULE_DEBUG_VAR_MASK(ATH_MODULE_NAME) & (mask)) {
\ |
| 30 A_PRINTF(ATH_PRINTX_ARG args); \ |
| 31 } \ |
| 32 } while (0) |
| 33 #else |
| 34 /* on non-debug builds, keep in error and warning messages in the driver, al
l other |
| 35 * message tracing will get compiled out */ |
| 36 #define AR_DEBUG_PRINTF(mask, args) \ |
| 37 if ((mask) & (ATH_DEBUG_ERR | ATH_DEBUG_WARN)) { A_PRINTF(ATH_PRINTX_ARG arg
s); } |
| 38 |
| 39 #endif |
| 40 |
| 41 /* compile specific macro to get the function name string */ |
| 42 #define _A_FUNCNAME_ __func__ |
| 43 |
| 44 |
| 45 #endif /* _DEBUG_LINUX_H_ */ |
OLD | NEW |