aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/bcm/Debug.c39
-rw-r--r--drivers/staging/bcm/Debug.h25
-rw-r--r--drivers/staging/bcm/Makefile2
3 files changed, 8 insertions, 58 deletions
diff --git a/drivers/staging/bcm/Debug.c b/drivers/staging/bcm/Debug.c
deleted file mode 100644
index b86d8456cf7..00000000000
--- a/drivers/staging/bcm/Debug.c
+++ /dev/null
@@ -1,39 +0,0 @@
1#include "headers.h"
2
3void bcm_print_buffer(UINT debug_level, const char *function_name,
4 const char *file_name, int line_number,
5 const unsigned char *buffer, int bufferlen,
6 BASE_TYPE base)
7{
8 int i;
9 static const char * const buff_dump_base[] = {
10 "DEC", "HEX", "OCT", "BIN"
11 };
12
13 if(debug_level < BCM_SCREAM)
14 return;
15
16 printk("\n" KERN_DEBUG "%s:%s:%d:Buffer dump of size 0x%x in the %s:\n",
17 file_name, function_name, line_number, bufferlen, buff_dump_base[1]);
18
19 for(i = 0; i < bufferlen;i++) {
20 if(i && !(i%16) )
21 printk("\n");
22 switch(base) {
23 case BCM_BASE_TYPE_DEC:
24 printk("%03d ", buffer[i]);
25 break;
26 case BCM_BASE_TYPE_OCT:
27 printk("%0x03o ", buffer[i]);
28 break;
29 case BCM_BASE_TYPE_BIN:
30 printk("%02x ", buffer[i]);
31 break;
32 case BCM_BASE_TYPE_HEX:
33 default:
34 printk("%02X ", buffer[i]);
35 break;
36 }
37 printk("\n");
38 }
39}
diff --git a/drivers/staging/bcm/Debug.h b/drivers/staging/bcm/Debug.h
index 58e46a601de..3138729cf34 100644
--- a/drivers/staging/bcm/Debug.h
+++ b/drivers/staging/bcm/Debug.h
@@ -9,19 +9,6 @@
9#include <linux/string.h> 9#include <linux/string.h>
10#define NONE 0xFFFF 10#define NONE 0xFFFF
11 11
12typedef enum _BASE_TYPE
13{
14 BCM_BASE_TYPE_DEC,
15 BCM_BASE_TYPE_OCT,
16 BCM_BASE_TYPE_BIN,
17 BCM_BASE_TYPE_HEX,
18 BCM_BASE_TYPE_NONE,
19} BASE_TYPE, *PBASE_TYPE;
20
21void bcm_print_buffer(UINT debug_level, const char *function_name,
22 const char *file_name, int line_number,
23 const unsigned char *buffer, int bufferlen, BASE_TYPE base);
24
25 12
26//-------------------------------------------------------------------------------- 13//--------------------------------------------------------------------------------
27 14
@@ -231,7 +218,7 @@ typedef struct _S_BCM_DEBUG_STATE {
231#define BCM_DEBUG_PRINT(Adapter, Type, SubType, dbg_level, string, args...) \ 218#define BCM_DEBUG_PRINT(Adapter, Type, SubType, dbg_level, string, args...) \
232 do { \ 219 do { \
233 if (DBG_TYPE_PRINTK == Type) \ 220 if (DBG_TYPE_PRINTK == Type) \
234 pr_info("%s:" string "\n", __func__, ##args); \ 221 pr_info("%s:" string, __func__, ##args); \
235 else if (Adapter && \ 222 else if (Adapter && \
236 (dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \ 223 (dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \
237 (Type & Adapter->stDebugState.type) && \ 224 (Type & Adapter->stDebugState.type) && \
@@ -239,7 +226,7 @@ typedef struct _S_BCM_DEBUG_STATE {
239 if (dbg_level & DBG_NO_FUNC_PRINT) \ 226 if (dbg_level & DBG_NO_FUNC_PRINT) \
240 printk(KERN_DEBUG string, ##args); \ 227 printk(KERN_DEBUG string, ##args); \
241 else \ 228 else \
242 printk(KERN_DEBUG "%s:" string "\n", __func__, ##args); \ 229 printk(KERN_DEBUG "%s:" string, __func__, ##args); \
243 } \ 230 } \
244 } while (0) 231 } while (0)
245 232
@@ -248,9 +235,11 @@ typedef struct _S_BCM_DEBUG_STATE {
248 (Adapter && \ 235 (Adapter && \
249 (dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \ 236 (dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \
250 (Type & Adapter->stDebugState.type) && \ 237 (Type & Adapter->stDebugState.type) && \
251 (SubType & Adapter->stDebugState.subtype[Type]))) \ 238 (SubType & Adapter->stDebugState.subtype[Type]))) { \
252 bcm_print_buffer(dbg_level, __func__, __FILE__, __LINE__, \ 239 printk(KERN_DEBUG "%s:\n", __func__); \
253 buffer, bufferlen, BCM_BASE_TYPE_HEX); \ 240 print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET, \
241 16, 1, buffer, bufferlen, false); \
242 } \
254} while(0) 243} while(0)
255 244
256 245
diff --git a/drivers/staging/bcm/Makefile b/drivers/staging/bcm/Makefile
index c3ae25af670..6f6fcee8e4a 100644
--- a/drivers/staging/bcm/Makefile
+++ b/drivers/staging/bcm/Makefile
@@ -6,7 +6,7 @@ obj-$(CONFIG_BCM_WIMAX) += bcm_wimax.o
6 6
7bcm_wimax-y := InterfaceDld.o InterfaceIdleMode.o InterfaceInit.o InterfaceRx.o \ 7bcm_wimax-y := InterfaceDld.o InterfaceIdleMode.o InterfaceInit.o InterfaceRx.o \
8 InterfaceIsr.o InterfaceMisc.o InterfaceTx.o \ 8 InterfaceIsr.o InterfaceMisc.o InterfaceTx.o \
9 Arp.o CmHost.o Debug.o IPv6Protocol.o Qos.o Transmit.o\ 9 Arp.o CmHost.o IPv6Protocol.o Qos.o Transmit.o\
10 Bcmnet.o DDRInit.o HandleControlPacket.o\ 10 Bcmnet.o DDRInit.o HandleControlPacket.o\
11 LeakyBucket.o Misc.o sort.o Bcmchar.o hostmibs.o PHSModule.o\ 11 LeakyBucket.o Misc.o sort.o Bcmchar.o hostmibs.o PHSModule.o\
12 Osal_Misc.o led_control.o nvm.o vendorspecificextn.o 12 Osal_Misc.o led_control.o nvm.o vendorspecificextn.o