1c46917bbSLuis R. Rodriguez /* 2c46917bbSLuis R. Rodriguez * Copyright (c) 2009 Atheros Communications Inc. 3c46917bbSLuis R. Rodriguez * 4c46917bbSLuis R. Rodriguez * Permission to use, copy, modify, and/or distribute this software for any 5c46917bbSLuis R. Rodriguez * purpose with or without fee is hereby granted, provided that the above 6c46917bbSLuis R. Rodriguez * copyright notice and this permission notice appear in all copies. 7c46917bbSLuis R. Rodriguez * 8c46917bbSLuis R. Rodriguez * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9c46917bbSLuis R. Rodriguez * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10c46917bbSLuis R. Rodriguez * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11c46917bbSLuis R. Rodriguez * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12c46917bbSLuis R. Rodriguez * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13c46917bbSLuis R. Rodriguez * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14c46917bbSLuis R. Rodriguez * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15c46917bbSLuis R. Rodriguez */ 16c46917bbSLuis R. Rodriguez 17c46917bbSLuis R. Rodriguez #include "ath.h" 18c46917bbSLuis R. Rodriguez #include "debug.h" 19c46917bbSLuis R. Rodriguez 20c46917bbSLuis R. Rodriguez void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...) 21c46917bbSLuis R. Rodriguez { 22c46917bbSLuis R. Rodriguez va_list args; 23c46917bbSLuis R. Rodriguez 24c46917bbSLuis R. Rodriguez if (likely(!(common->debug_mask & dbg_mask))) 25c46917bbSLuis R. Rodriguez return; 26c46917bbSLuis R. Rodriguez 27c46917bbSLuis R. Rodriguez va_start(args, fmt); 28c46917bbSLuis R. Rodriguez printk(KERN_DEBUG "ath: "); 29c46917bbSLuis R. Rodriguez vprintk(fmt, args); 30c46917bbSLuis R. Rodriguez va_end(args); 31c46917bbSLuis R. Rodriguez } 32c46917bbSLuis R. Rodriguez EXPORT_SYMBOL(ath_print); 33