OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | /* |
2 | * Driver for KeyStream 11b/g wireless LAN cards. |
3 | * |
4 | * ks_debug.c |
5 | * $Id: ks_debug.c 991 2009-09-14 01:38:58Z sekine $ |
6 | * |
7 | * Copyright (C) 2005-2008 KeyStream Corp. |
8 | * Copyright (C) 2009 Renesas Technology Corp. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it undr the terms of the GNU General Public License version 2 as |
12 | * published by the Free Sotware Foundation. |
13 | */ |
14 | #include "ks_wlan.h" |
15 | #include "ks_debug.h" |
16 | |
17 | void print_buffer(unsigned char *p, int length) |
18 | { |
19 | #ifdef KS_WLAN_DEBUG |
20 | int i; |
21 | #define HEX_OFFSET "\ |
22 | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F" |
23 | printk(HEX_OFFSET); |
24 | for (i=0; i<length; i++) { |
25 | if (i % 16 == 0) printk("\n%04X-%04X:", i, i+15); |
26 | printk(" %02X", *(p+i)); |
27 | } |
28 | printk("\n"); |
29 | #endif |
30 | } |
31 |