/* * Debug headler file. It defines various print out method * * $Id: 8192cd_debug.h,v 1.2.4.2 2010/12/01 13:38:00 button Exp $ * * Copyright (c) 2009 Realtek Semiconductor Corp. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _8192CD_DEBUG_H_ #define _8192CD_DEBUG_H_ #if 1 //#define _MESH_MOD_ #define printMac(da) printk("%02X:%02X:%02X:%02X:%02X:%02X\n", 0xff&*(da), 0xff&*(da+1), 0xff&*(da+2), 0xff&*(da+3), 0xff&*(da+4), 0xff&*(da+5)); #define printMac4(pframe) {\ printMac(GetAddr1Ptr(pframe));\ printMac(GetAddr2Ptr(pframe));\ printMac(GetAddr3Ptr(pframe));\ printMac(GetAddr4Ptr(pframe));\ } #define printHex(d,n) {int i; \ for(i=0; i\n", name, (char *)__FUNCTION__); #define __DEBUG_INFO(name, fmt, args...) \ if (rtl8192cd_debug_info&_MODULE_DEFINE) \ printk("%s-"_MODULE_NAME"-info: " fmt, name, ## args); #define __DEBUG_WARN(name, fmt, args...) \ if (rtl8192cd_debug_warn&_MODULE_DEFINE) \ printk("%s-"_MODULE_NAME"-warn: " fmt, name, ## args); #define DEBUG_ERR(fmt, args...) __DEBUG_ERR(priv->dev->name, fmt, ## args) #define DEBUG_INFO(fmt, args...) __DEBUG_INFO(priv->dev->name, fmt, ## args) #define DEBUG_TRACE __DEBUG_TRACE(priv->dev->name) #define DEBUG_WARN(fmt, args...) __DEBUG_WARN(priv->dev->name, fmt, ## args) #define _DEBUG_ERR(fmt, args...) __DEBUG_ERR("wlan", fmt, ## args) #define _DEBUG_INFO(fmt, args...) __DEBUG_INFO("wlan", fmt, ## args) #define _DEBUG_TRACE __DEBUG_TRACE("wlan") #define _DEBUG_WARN(fmt, args...) __DEBUG_WARN("wlan", fmt, ## args) #define DBFENTER printk("----->%s\n", (char *)__FUNCTION__) #define DBFEXIT printk("%s----->\n", (char *)__FUNCTION__) #define PRINT_INFO(fmt, args...) printk(fmt, ## args) #endif #endif // __GNUC__ /* #ifdef __DRAYTEK_OS__ #define __FUNCTION__ "" #define DEBUG_ERR Print #define DEBUG_INFO Print #define DEBUG_TRACE #define DEBUG_WARN Print #define _DEBUG_ERR DEBUG_ERR #define _DEBUG_INFO DEBUG_INFO #define _DEBUG_TRACE DEBUG_TRACE #define _DEBUG_WARN DEBUG_WARN #define DBFENTER #define DBFEXIT #define PRINT_INFO Print #endif // __DRAYTEK_OS__ #ifdef GREEN_HILL #define DEBUG_ERR printk #define DEBUG_INFO printk #define DEBUG_TRACE printk #define DEBUG_WARN printk #define _DEBUG_ERR printk #define _DEBUG_INFO printk #define _DEBUG_TRACE printk #define _DEBUG_WARN printk #define DBFENTER printk #define DBFEXIT printk #define PRINT_INFO printk #endif // GREEN_HILL */ #else // not _DEBUG_RTL8192CD_ #ifdef __GNUC__ #define DEBUG_ERR(fmt, args...) {} #define DEBUG_INFO(fmt, args...) {} #define DEBUG_TRACE {} #define DEBUG_WARN(fmt, args...) {} #define _DEBUG_ERR(fmt, args...) {} #define _DEBUG_INFO(fmt, args...) {} #define _DEBUG_TRACE {} #define _DEBUG_WARN(fmt, args...) {} #define DBFENTER {} #define DBFEXIT {} #define PRINT_INFO(fmt, args...) {} #endif // __GNUC__ /* #ifdef __DRAYTEK_OS__ #define __FUNCTION__ "" #define DEBUG_ERR #define DEBUG_INFO #define DEBUG_TRACE #define DEBUG_WARN #define _DEBUG_ERR #define _DEBUG_INFO #define _DEBUG_TRACE #define _DEBUG_WARN #define DBFENTER #define DBFEXIT #define PRINT_INFO #endif // __DRAYTEK_OS__ #ifdef GREEN_HILL #define DEBUG_ERR(fmt, args...) {} #define DEBUG_INFO(fmt, args...) {} #define DEBUG_TRACE {} #define DEBUG_WARN(fmt, args...) {} #define _DEBUG_ERR(fmt, args...) {} #define _DEBUG_INFO(fmt, args...) {} #define _DEBUG_TRACE {} #define _DEBUG_WARN(fmt, args...) {} #define DBFENTER {} #define DBFEXIT {} #define PRINT_INFO(fmt, args...) {} #endif // GREEN_HILL */ #endif // _DEBUG_RTL8192CD_ #endif // _8192CD_DEBUG_H_