1 /******************************************************************************
3 * Copyright(c) 2009-2012 Realtek Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
23 *****************************************************************************/
27 #include <linux/moduleparam.h>
29 #ifdef CONFIG_RTLWIFI_DEBUG
30 void _rtl_dbg_trace(struct rtl_priv *rtlpriv, u64 comp, int level,
33 if (unlikely((comp & rtlpriv->cfg->mod_params->debug_mask) &&
34 (level <= rtlpriv->cfg->mod_params->debug_level))) {
43 pr_info(":<%lx> %pV", in_interrupt(), &vaf);
48 EXPORT_SYMBOL_GPL(_rtl_dbg_trace);
50 void _rtl_dbg_print(struct rtl_priv *rtlpriv, u64 comp, int level,
53 if (unlikely((comp & rtlpriv->cfg->mod_params->debug_mask) &&
54 (level <= rtlpriv->cfg->mod_params->debug_level))) {
68 EXPORT_SYMBOL_GPL(_rtl_dbg_print);
70 void _rtl_dbg_print_data(struct rtl_priv *rtlpriv, u64 comp, int level,
71 const char *titlestring,
72 const void *hexdata, int hexdatalen)
74 if (unlikely(((comp) & rtlpriv->cfg->mod_params->debug_mask) &&
75 ((level) <= rtlpriv->cfg->mod_params->debug_level))) {
76 pr_info("In process \"%s\" (pid %i): %s\n",
77 current->comm, current->pid, titlestring);
78 print_hex_dump_bytes("", DUMP_PREFIX_NONE,
82 EXPORT_SYMBOL_GPL(_rtl_dbg_print_data);