diff options
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/boot.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/debug.h | 101 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/debugfs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/event.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/io.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/ps.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/sdio.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/spi.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/testmode.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 70 |
17 files changed, 116 insertions, 70 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index e2e46705059d..bde1d862bdd5 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | 30 | ||
31 | #include "wl12xx.h" | 31 | #include "wl12xx.h" |
32 | #include "debug.h" | ||
32 | #include "wl12xx_80211.h" | 33 | #include "wl12xx_80211.h" |
33 | #include "reg.h" | 34 | #include "reg.h" |
34 | #include "ps.h" | 35 | #include "ps.h" |
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index d4e628db76b0..4ce634b925cb 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/wl12xx.h> | 25 | #include <linux/wl12xx.h> |
26 | 26 | ||
27 | #include "debug.h" | ||
27 | #include "acx.h" | 28 | #include "acx.h" |
28 | #include "reg.h" | 29 | #include "reg.h" |
29 | #include "boot.h" | 30 | #include "boot.h" |
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index 65bf9526576d..2413c43d0894 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | 30 | ||
31 | #include "wl12xx.h" | 31 | #include "wl12xx.h" |
32 | #include "debug.h" | ||
32 | #include "reg.h" | 33 | #include "reg.h" |
33 | #include "io.h" | 34 | #include "io.h" |
34 | #include "acx.h" | 35 | #include "acx.h" |
diff --git a/drivers/net/wireless/wl12xx/debug.h b/drivers/net/wireless/wl12xx/debug.h new file mode 100644 index 000000000000..b85fd8c41e8f --- /dev/null +++ b/drivers/net/wireless/wl12xx/debug.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * This file is part of wl12xx | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments. All rights reserved. | ||
5 | * Copyright (C) 2008-2009 Nokia Corporation | ||
6 | * | ||
7 | * Contact: Luciano Coelho <coelho@ti.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __DEBUG_H__ | ||
26 | #define __DEBUG_H__ | ||
27 | |||
28 | #include <linux/bitops.h> | ||
29 | #include <linux/printk.h> | ||
30 | |||
31 | #define DRIVER_NAME "wl12xx" | ||
32 | #define DRIVER_PREFIX DRIVER_NAME ": " | ||
33 | |||
34 | enum { | ||
35 | DEBUG_NONE = 0, | ||
36 | DEBUG_IRQ = BIT(0), | ||
37 | DEBUG_SPI = BIT(1), | ||
38 | DEBUG_BOOT = BIT(2), | ||
39 | DEBUG_MAILBOX = BIT(3), | ||
40 | DEBUG_TESTMODE = BIT(4), | ||
41 | DEBUG_EVENT = BIT(5), | ||
42 | DEBUG_TX = BIT(6), | ||
43 | DEBUG_RX = BIT(7), | ||
44 | DEBUG_SCAN = BIT(8), | ||
45 | DEBUG_CRYPT = BIT(9), | ||
46 | DEBUG_PSM = BIT(10), | ||
47 | DEBUG_MAC80211 = BIT(11), | ||
48 | DEBUG_CMD = BIT(12), | ||
49 | DEBUG_ACX = BIT(13), | ||
50 | DEBUG_SDIO = BIT(14), | ||
51 | DEBUG_FILTERS = BIT(15), | ||
52 | DEBUG_ADHOC = BIT(16), | ||
53 | DEBUG_AP = BIT(17), | ||
54 | DEBUG_MASTER = (DEBUG_ADHOC | DEBUG_AP), | ||
55 | DEBUG_ALL = ~0, | ||
56 | }; | ||
57 | |||
58 | extern u32 wl12xx_debug_level; | ||
59 | |||
60 | #define DEBUG_DUMP_LIMIT 1024 | ||
61 | |||
62 | #define wl1271_error(fmt, arg...) \ | ||
63 | pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg) | ||
64 | |||
65 | #define wl1271_warning(fmt, arg...) \ | ||
66 | pr_warning(DRIVER_PREFIX "WARNING " fmt "\n", ##arg) | ||
67 | |||
68 | #define wl1271_notice(fmt, arg...) \ | ||
69 | pr_info(DRIVER_PREFIX fmt "\n", ##arg) | ||
70 | |||
71 | #define wl1271_info(fmt, arg...) \ | ||
72 | pr_info(DRIVER_PREFIX fmt "\n", ##arg) | ||
73 | |||
74 | #define wl1271_debug(level, fmt, arg...) \ | ||
75 | do { \ | ||
76 | if (level & wl12xx_debug_level) \ | ||
77 | pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \ | ||
78 | } while (0) | ||
79 | |||
80 | /* TODO: use pr_debug_hex_dump when it becomes available */ | ||
81 | #define wl1271_dump(level, prefix, buf, len) \ | ||
82 | do { \ | ||
83 | if (level & wl12xx_debug_level) \ | ||
84 | print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ | ||
85 | DUMP_PREFIX_OFFSET, 16, 1, \ | ||
86 | buf, \ | ||
87 | min_t(size_t, len, DEBUG_DUMP_LIMIT), \ | ||
88 | 0); \ | ||
89 | } while (0) | ||
90 | |||
91 | #define wl1271_dump_ascii(level, prefix, buf, len) \ | ||
92 | do { \ | ||
93 | if (level & wl12xx_debug_level) \ | ||
94 | print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ | ||
95 | DUMP_PREFIX_OFFSET, 16, 1, \ | ||
96 | buf, \ | ||
97 | min_t(size_t, len, DEBUG_DUMP_LIMIT), \ | ||
98 | true); \ | ||
99 | } while (0) | ||
100 | |||
101 | #endif /* __DEBUG_H__ */ | ||
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c index d6c2d0c1b6cd..a9e0b7383bb5 100644 --- a/drivers/net/wireless/wl12xx/debugfs.c +++ b/drivers/net/wireless/wl12xx/debugfs.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | 28 | ||
29 | #include "wl12xx.h" | 29 | #include "wl12xx.h" |
30 | #include "debug.h" | ||
30 | #include "acx.h" | 31 | #include "acx.h" |
31 | #include "ps.h" | 32 | #include "ps.h" |
32 | #include "io.h" | 33 | #include "io.h" |
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c index fd2e7b2d9389..e22df6ce139a 100644 --- a/drivers/net/wireless/wl12xx/event.c +++ b/drivers/net/wireless/wl12xx/event.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include "wl12xx.h" | 24 | #include "wl12xx.h" |
25 | #include "debug.h" | ||
25 | #include "reg.h" | 26 | #include "reg.h" |
26 | #include "io.h" | 27 | #include "io.h" |
27 | #include "event.h" | 28 | #include "event.h" |
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index ba286d0a74a8..c6084f8a9c43 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | 27 | ||
28 | #include "debug.h" | ||
28 | #include "init.h" | 29 | #include "init.h" |
29 | #include "wl12xx_80211.h" | 30 | #include "wl12xx_80211.h" |
30 | #include "acx.h" | 31 | #include "acx.h" |
diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c index 1a7df8a7ed2d..079ad380e8ff 100644 --- a/drivers/net/wireless/wl12xx/io.c +++ b/drivers/net/wireless/wl12xx/io.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | 28 | ||
29 | #include "wl12xx.h" | 29 | #include "wl12xx.h" |
30 | #include "debug.h" | ||
30 | #include "wl12xx_80211.h" | 31 | #include "wl12xx_80211.h" |
31 | #include "io.h" | 32 | #include "io.h" |
32 | #include "tx.h" | 33 | #include "tx.h" |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index c72f7497db09..44d52efedc74 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | 36 | ||
37 | #include "wl12xx.h" | 37 | #include "wl12xx.h" |
38 | #include "debug.h" | ||
38 | #include "wl12xx_80211.h" | 39 | #include "wl12xx_80211.h" |
39 | #include "reg.h" | 40 | #include "reg.h" |
40 | #include "io.h" | 41 | #include "io.h" |
diff --git a/drivers/net/wireless/wl12xx/ps.c b/drivers/net/wireless/wl12xx/ps.c index 84a1afac6f53..9f4e8c03cc8f 100644 --- a/drivers/net/wireless/wl12xx/ps.c +++ b/drivers/net/wireless/wl12xx/ps.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "ps.h" | 25 | #include "ps.h" |
26 | #include "io.h" | 26 | #include "io.h" |
27 | #include "tx.h" | 27 | #include "tx.h" |
28 | #include "debug.h" | ||
28 | 29 | ||
29 | #define WL1271_WAKEUP_TIMEOUT 500 | 30 | #define WL1271_WAKEUP_TIMEOUT 500 |
30 | 31 | ||
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c index dd2f8b714a7f..8c277c0cb372 100644 --- a/drivers/net/wireless/wl12xx/rx.c +++ b/drivers/net/wireless/wl12xx/rx.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | 26 | ||
27 | #include "wl12xx.h" | 27 | #include "wl12xx.h" |
28 | #include "debug.h" | ||
28 | #include "acx.h" | 29 | #include "acx.h" |
29 | #include "reg.h" | 30 | #include "reg.h" |
30 | #include "rx.h" | 31 | #include "rx.h" |
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index 2711438fdde3..fb2c4319749d 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/ieee80211.h> | 24 | #include <linux/ieee80211.h> |
25 | 25 | ||
26 | #include "wl12xx.h" | 26 | #include "wl12xx.h" |
27 | #include "debug.h" | ||
27 | #include "cmd.h" | 28 | #include "cmd.h" |
28 | #include "scan.h" | 29 | #include "scan.h" |
29 | #include "acx.h" | 30 | #include "acx.h" |
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 78e5352c4037..55c63adb1d0f 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/pm_runtime.h> | 34 | #include <linux/pm_runtime.h> |
35 | 35 | ||
36 | #include "wl12xx.h" | 36 | #include "wl12xx.h" |
37 | #include "debug.h" | ||
37 | #include "wl12xx_80211.h" | 38 | #include "wl12xx_80211.h" |
38 | #include "io.h" | 39 | #include "io.h" |
39 | 40 | ||
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c index 22c1337ba883..bcc7d7c95a22 100644 --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | 32 | ||
33 | #include "wl12xx.h" | 33 | #include "wl12xx.h" |
34 | #include "debug.h" | ||
34 | #include "wl12xx_80211.h" | 35 | #include "wl12xx_80211.h" |
35 | #include "io.h" | 36 | #include "io.h" |
36 | 37 | ||
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index 4ae8effaee22..61fff45686ad 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <net/genetlink.h> | 26 | #include <net/genetlink.h> |
27 | 27 | ||
28 | #include "wl12xx.h" | 28 | #include "wl12xx.h" |
29 | #include "debug.h" | ||
29 | #include "acx.h" | 30 | #include "acx.h" |
30 | #include "reg.h" | 31 | #include "reg.h" |
31 | 32 | ||
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 5aeef95229eb..5351f015feef 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/etherdevice.h> | 26 | #include <linux/etherdevice.h> |
27 | 27 | ||
28 | #include "wl12xx.h" | 28 | #include "wl12xx.h" |
29 | #include "debug.h" | ||
29 | #include "io.h" | 30 | #include "io.h" |
30 | #include "reg.h" | 31 | #include "reg.h" |
31 | #include "ps.h" | 32 | #include "ps.h" |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index 158714a1092f..b7036df5939d 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -35,9 +35,6 @@ | |||
35 | #include "conf.h" | 35 | #include "conf.h" |
36 | #include "ini.h" | 36 | #include "ini.h" |
37 | 37 | ||
38 | #define DRIVER_NAME "wl1271" | ||
39 | #define DRIVER_PREFIX DRIVER_NAME ": " | ||
40 | |||
41 | /* | 38 | /* |
42 | * FW versions support BA 11n | 39 | * FW versions support BA 11n |
43 | * versions marks x.x.x.50-60.x | 40 | * versions marks x.x.x.50-60.x |
@@ -45,73 +42,6 @@ | |||
45 | #define WL12XX_BA_SUPPORT_FW_COST_VER2_START 50 | 42 | #define WL12XX_BA_SUPPORT_FW_COST_VER2_START 50 |
46 | #define WL12XX_BA_SUPPORT_FW_COST_VER2_END 60 | 43 | #define WL12XX_BA_SUPPORT_FW_COST_VER2_END 60 |
47 | 44 | ||
48 | enum { | ||
49 | DEBUG_NONE = 0, | ||
50 | DEBUG_IRQ = BIT(0), | ||
51 | DEBUG_SPI = BIT(1), | ||
52 | DEBUG_BOOT = BIT(2), | ||
53 | DEBUG_MAILBOX = BIT(3), | ||
54 | DEBUG_TESTMODE = BIT(4), | ||
55 | DEBUG_EVENT = BIT(5), | ||
56 | DEBUG_TX = BIT(6), | ||
57 | DEBUG_RX = BIT(7), | ||
58 | DEBUG_SCAN = BIT(8), | ||
59 | DEBUG_CRYPT = BIT(9), | ||
60 | DEBUG_PSM = BIT(10), | ||
61 | DEBUG_MAC80211 = BIT(11), | ||
62 | DEBUG_CMD = BIT(12), | ||
63 | DEBUG_ACX = BIT(13), | ||
64 | DEBUG_SDIO = BIT(14), | ||
65 | DEBUG_FILTERS = BIT(15), | ||
66 | DEBUG_ADHOC = BIT(16), | ||
67 | DEBUG_AP = BIT(17), | ||
68 | DEBUG_MASTER = (DEBUG_ADHOC | DEBUG_AP), | ||
69 | DEBUG_ALL = ~0, | ||
70 | }; | ||
71 | |||
72 | extern u32 wl12xx_debug_level; | ||
73 | |||
74 | #define DEBUG_DUMP_LIMIT 1024 | ||
75 | |||
76 | #define wl1271_error(fmt, arg...) \ | ||
77 | pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg) | ||
78 | |||
79 | #define wl1271_warning(fmt, arg...) \ | ||
80 | pr_warning(DRIVER_PREFIX "WARNING " fmt "\n", ##arg) | ||
81 | |||
82 | #define wl1271_notice(fmt, arg...) \ | ||
83 | pr_info(DRIVER_PREFIX fmt "\n", ##arg) | ||
84 | |||
85 | #define wl1271_info(fmt, arg...) \ | ||
86 | pr_info(DRIVER_PREFIX fmt "\n", ##arg) | ||
87 | |||
88 | #define wl1271_debug(level, fmt, arg...) \ | ||
89 | do { \ | ||
90 | if (level & wl12xx_debug_level) \ | ||
91 | pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \ | ||
92 | } while (0) | ||
93 | |||
94 | /* TODO: use pr_debug_hex_dump when it will be available */ | ||
95 | #define wl1271_dump(level, prefix, buf, len) \ | ||
96 | do { \ | ||
97 | if (level & wl12xx_debug_level) \ | ||
98 | print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ | ||
99 | DUMP_PREFIX_OFFSET, 16, 1, \ | ||
100 | buf, \ | ||
101 | min_t(size_t, len, DEBUG_DUMP_LIMIT), \ | ||
102 | 0); \ | ||
103 | } while (0) | ||
104 | |||
105 | #define wl1271_dump_ascii(level, prefix, buf, len) \ | ||
106 | do { \ | ||
107 | if (level & wl12xx_debug_level) \ | ||
108 | print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ | ||
109 | DUMP_PREFIX_OFFSET, 16, 1, \ | ||
110 | buf, \ | ||
111 | min_t(size_t, len, DEBUG_DUMP_LIMIT), \ | ||
112 | true); \ | ||
113 | } while (0) | ||
114 | |||
115 | #define WL127X_FW_NAME "ti-connectivity/wl127x-fw-3.bin" | 45 | #define WL127X_FW_NAME "ti-connectivity/wl127x-fw-3.bin" |
116 | #define WL128X_FW_NAME "ti-connectivity/wl128x-fw-3.bin" | 46 | #define WL128X_FW_NAME "ti-connectivity/wl128x-fw-3.bin" |
117 | 47 | ||