aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-01-15 03:38:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:13 -0500
commit8ae746543c8370fd04c28aaf8f185c1687b0e694 (patch)
tree371607ef4f5e9daee7e34c2bf3c113ea12176c56 /drivers
parentf99725777e0f57e71f37191eee5f10071ed7b423 (diff)
brcm80211: Use normal DEBUG define
Current CONFIG_BRCMDBG flag when enabled does not necessarily enable proper pr_debug output when DEBUG is not also enabled. Remove BCMDBG define and just use DEBUG instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/brcm80211/Makefile2
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd.h4
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c10
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h6
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c4
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c86
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h6
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/aiutils.c4
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/ampdu.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/dma.c8
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c18
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h2
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c42
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.h2
-rw-r--r--drivers/net/wireless/brcm80211/brcmutil/utils.c4
-rw-r--r--drivers/net/wireless/brcm80211/include/brcmu_utils.h4
16 files changed, 102 insertions, 102 deletions
diff --git a/drivers/net/wireless/brcm80211/Makefile b/drivers/net/wireless/brcm80211/Makefile
index f41c047eca8..b987920e982 100644
--- a/drivers/net/wireless/brcm80211/Makefile
+++ b/drivers/net/wireless/brcm80211/Makefile
@@ -16,7 +16,7 @@
16# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 17
18# common flags 18# common flags
19subdir-ccflags-$(CONFIG_BRCMDBG) += -DBCMDBG 19subdir-ccflags-$(CONFIG_BRCMDBG) += -DDEBUG
20 20
21obj-$(CONFIG_BRCMUTIL) += brcmutil/ 21obj-$(CONFIG_BRCMUTIL) += brcmutil/
22obj-$(CONFIG_BRCMFMAC) += brcmfmac/ 22obj-$(CONFIG_BRCMFMAC) += brcmfmac/
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index e58ea40a75b..07686a748d3 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
@@ -644,9 +644,9 @@ extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
644extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, 644extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx,
645 uint cmd, void *buf, uint len); 645 uint cmd, void *buf, uint len);
646 646
647#ifdef BCMDBG 647#ifdef DEBUG
648extern int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size); 648extern int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size);
649#endif /* BCMDBG */ 649#endif /* DEBUG */
650 650
651extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name); 651extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name);
652extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx, 652extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx,
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
index a51d8f5d36f..9385c84646e 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
@@ -38,7 +38,7 @@
38#define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN \ 38#define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN \
39 offsetof(struct brcmf_pkt_filter_pattern_le, mask_and_pattern) 39 offsetof(struct brcmf_pkt_filter_pattern_le, mask_and_pattern)
40 40
41#ifdef BCMDBG 41#ifdef DEBUG
42static const char brcmf_version[] = 42static const char brcmf_version[] =
43 "Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on " 43 "Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on "
44 __DATE__ " at " __TIME__; 44 __DATE__ " at " __TIME__;
@@ -133,7 +133,7 @@ bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
133 return p != NULL; 133 return p != NULL;
134} 134}
135 135
136#ifdef BCMDBG 136#ifdef DEBUG
137static void 137static void
138brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) 138brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
139{ 139{
@@ -430,7 +430,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
430 brcmf_dbg(EVENT, "\n"); 430 brcmf_dbg(EVENT, "\n");
431 } 431 }
432} 432}
433#endif /* BCMDBG */ 433#endif /* DEBUG */
434 434
435int 435int
436brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata, 436brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata,
@@ -518,9 +518,9 @@ brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata,
518 break; 518 break;
519 } 519 }
520 520
521#ifdef BCMDBG 521#ifdef DEBUG
522 brcmf_c_show_host_event(event, event_data); 522 brcmf_c_show_host_event(event, event_data);
523#endif /* BCMDBG */ 523#endif /* DEBUG */
524 524
525 return 0; 525 return 0;
526} 526}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
index bb26ee36bc6..8b2060b578d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
@@ -32,7 +32,7 @@
32#define BRCMF_BTA_VAL 0x1000 32#define BRCMF_BTA_VAL 0x1000
33#define BRCMF_ISCAN_VAL 0x2000 33#define BRCMF_ISCAN_VAL 0x2000
34 34
35#if defined(BCMDBG) 35#if defined(DEBUG)
36 36
37#define brcmf_dbg(level, fmt, ...) \ 37#define brcmf_dbg(level, fmt, ...) \
38do { \ 38do { \
@@ -56,7 +56,7 @@ do { \
56#define BRCMF_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL) 56#define BRCMF_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL)
57#define BRCMF_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL) 57#define BRCMF_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL)
58 58
59#else /* (defined BCMDBG) || (defined BCMDBG) */ 59#else /* (defined DEBUG) || (defined DEBUG) */
60 60
61#define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__) 61#define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
62 62
@@ -66,7 +66,7 @@ do { \
66#define BRCMF_BYTES_ON() 0 66#define BRCMF_BYTES_ON() 0
67#define BRCMF_GLOM_ON() 0 67#define BRCMF_GLOM_ON() 0
68 68
69#endif /* defined(BCMDBG) */ 69#endif /* defined(DEBUG) */
70 70
71extern int brcmf_msg_level; 71extern int brcmf_msg_level;
72 72
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index c3980c50a99..16fd1ab3540 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -1146,7 +1146,7 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev)
1146 return pend; 1146 return pend;
1147} 1147}
1148 1148
1149#ifdef BCMDBG 1149#ifdef DEBUG
1150int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size) 1150int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size)
1151{ 1151{
1152 int ret = 0; 1152 int ret = 0;
@@ -1180,4 +1180,4 @@ exit:
1180 1180
1181 return ret; 1181 return ret;
1182} 1182}
1183#endif /* BCMDBG */ 1183#endif /* DEBUG */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index f7eeee1dcdb..7157a60c94b 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -40,7 +40,7 @@
40 40
41#define DCMD_RESP_TIMEOUT 2000 /* In milli second */ 41#define DCMD_RESP_TIMEOUT 2000 /* In milli second */
42 42
43#ifdef BCMDBG 43#ifdef DEBUG
44 44
45#define BRCMF_TRAP_INFO_SIZE 80 45#define BRCMF_TRAP_INFO_SIZE 80
46 46
@@ -84,7 +84,7 @@ struct rte_console {
84 char cbuf[CBUF_LEN]; 84 char cbuf[CBUF_LEN];
85}; 85};
86 86
87#endif /* BCMDBG */ 87#endif /* DEBUG */
88#include <chipcommon.h> 88#include <chipcommon.h>
89 89
90#include "dhd_bus.h" 90#include "dhd_bus.h"
@@ -416,7 +416,7 @@ struct sdpcmd_regs {
416 u16 PAD[0x80]; 416 u16 PAD[0x80];
417}; 417};
418 418
419#ifdef BCMDBG 419#ifdef DEBUG
420/* Device console log buffer state */ 420/* Device console log buffer state */
421struct brcmf_console { 421struct brcmf_console {
422 uint count; /* Poll interval msec counter */ 422 uint count; /* Poll interval msec counter */
@@ -426,7 +426,7 @@ struct brcmf_console {
426 u8 *buf; /* Log buffer (host copy) */ 426 u8 *buf; /* Log buffer (host copy) */
427 uint last; /* Last buffer read index */ 427 uint last; /* Last buffer read index */
428}; 428};
429#endif /* BCMDBG */ 429#endif /* DEBUG */
430 430
431struct sdpcm_shared { 431struct sdpcm_shared {
432 u32 flags; 432 u32 flags;
@@ -507,11 +507,11 @@ struct brcmf_sdio {
507 uint polltick; /* Tick counter */ 507 uint polltick; /* Tick counter */
508 uint pollcnt; /* Count of active polls */ 508 uint pollcnt; /* Count of active polls */
509 509
510#ifdef BCMDBG 510#ifdef DEBUG
511 uint console_interval; 511 uint console_interval;
512 struct brcmf_console console; /* Console output polling support */ 512 struct brcmf_console console; /* Console output polling support */
513 uint console_addr; /* Console address from shared struct */ 513 uint console_addr; /* Console address from shared struct */
514#endif /* BCMDBG */ 514#endif /* DEBUG */
515 515
516 uint regfails; /* Count of R_REG failures */ 516 uint regfails; /* Count of R_REG failures */
517 517
@@ -587,10 +587,10 @@ struct brcmf_sdio {
587#define CLK_PENDING 2 /* Not used yet */ 587#define CLK_PENDING 2 /* Not used yet */
588#define CLK_AVAIL 3 588#define CLK_AVAIL 3
589 589
590#ifdef BCMDBG 590#ifdef DEBUG
591static int qcount[NUMPRIO]; 591static int qcount[NUMPRIO];
592static int tx_packets[NUMPRIO]; 592static int tx_packets[NUMPRIO];
593#endif /* BCMDBG */ 593#endif /* DEBUG */
594 594
595#define SDIO_DRIVE_STRENGTH 6 /* in milliamps */ 595#define SDIO_DRIVE_STRENGTH 6 /* in milliamps */
596 596
@@ -764,12 +764,12 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
764 bus->clkstate = CLK_AVAIL; 764 bus->clkstate = CLK_AVAIL;
765 brcmf_dbg(INFO, "CLKCTL: turned ON\n"); 765 brcmf_dbg(INFO, "CLKCTL: turned ON\n");
766 766
767#if defined(BCMDBG) 767#if defined(DEBUG)
768 if (bus->alp_only != true) { 768 if (bus->alp_only != true) {
769 if (SBSDIO_ALPONLY(clkctl)) 769 if (SBSDIO_ALPONLY(clkctl))
770 brcmf_dbg(ERROR, "HT Clock should be on\n"); 770 brcmf_dbg(ERROR, "HT Clock should be on\n");
771 } 771 }
772#endif /* defined (BCMDBG) */ 772#endif /* defined (DEBUG) */
773 773
774 bus->activity = true; 774 bus->activity = true;
775 } else { 775 } else {
@@ -814,9 +814,9 @@ static int brcmf_sdbrcm_sdclk(struct brcmf_sdio *bus, bool on)
814/* Transition SD and backplane clock readiness */ 814/* Transition SD and backplane clock readiness */
815static int brcmf_sdbrcm_clkctl(struct brcmf_sdio *bus, uint target, bool pendok) 815static int brcmf_sdbrcm_clkctl(struct brcmf_sdio *bus, uint target, bool pendok)
816{ 816{
817#ifdef BCMDBG 817#ifdef DEBUG
818 uint oldstate = bus->clkstate; 818 uint oldstate = bus->clkstate;
819#endif /* BCMDBG */ 819#endif /* DEBUG */
820 820
821 brcmf_dbg(TRACE, "Enter\n"); 821 brcmf_dbg(TRACE, "Enter\n");
822 822
@@ -861,9 +861,9 @@ static int brcmf_sdbrcm_clkctl(struct brcmf_sdio *bus, uint target, bool pendok)
861 brcmf_sdbrcm_wd_timer(bus, 0); 861 brcmf_sdbrcm_wd_timer(bus, 0);
862 break; 862 break;
863 } 863 }
864#ifdef BCMDBG 864#ifdef DEBUG
865 brcmf_dbg(INFO, "%d -> %d\n", oldstate, bus->clkstate); 865 brcmf_dbg(INFO, "%d -> %d\n", oldstate, bus->clkstate);
866#endif /* BCMDBG */ 866#endif /* DEBUG */
867 867
868 return 0; 868 return 0;
869} 869}
@@ -1279,7 +1279,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1279 } 1279 }
1280 return 0; 1280 return 0;
1281 } 1281 }
1282#ifdef BCMDBG 1282#ifdef DEBUG
1283 if (BRCMF_GLOM_ON()) { 1283 if (BRCMF_GLOM_ON()) {
1284 printk(KERN_DEBUG "SUPERFRAME:\n"); 1284 printk(KERN_DEBUG "SUPERFRAME:\n");
1285 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 1285 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -1362,7 +1362,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1362 check = get_unaligned_le16(dptr + sizeof(u16)); 1362 check = get_unaligned_le16(dptr + sizeof(u16));
1363 chan = SDPCM_PACKET_CHANNEL(&dptr[SDPCM_FRAMETAG_LEN]); 1363 chan = SDPCM_PACKET_CHANNEL(&dptr[SDPCM_FRAMETAG_LEN]);
1364 doff = SDPCM_DOFFSET_VALUE(&dptr[SDPCM_FRAMETAG_LEN]); 1364 doff = SDPCM_DOFFSET_VALUE(&dptr[SDPCM_FRAMETAG_LEN]);
1365#ifdef BCMDBG 1365#ifdef DEBUG
1366 if (BRCMF_GLOM_ON()) { 1366 if (BRCMF_GLOM_ON()) {
1367 printk(KERN_DEBUG "subframe:\n"); 1367 printk(KERN_DEBUG "subframe:\n");
1368 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 1368 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -1433,7 +1433,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1433 } 1433 }
1434 rxseq++; 1434 rxseq++;
1435 1435
1436#ifdef BCMDBG 1436#ifdef DEBUG
1437 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) { 1437 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) {
1438 printk(KERN_DEBUG "Rx Subframe Data:\n"); 1438 printk(KERN_DEBUG "Rx Subframe Data:\n");
1439 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 1439 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -1457,7 +1457,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1457 continue; 1457 continue;
1458 } 1458 }
1459 1459
1460#ifdef BCMDBG 1460#ifdef DEBUG
1461 if (BRCMF_GLOM_ON()) { 1461 if (BRCMF_GLOM_ON()) {
1462 brcmf_dbg(GLOM, "subframe %d to stack, %p (%p/%d) nxt/lnk %p/%p\n", 1462 brcmf_dbg(GLOM, "subframe %d to stack, %p (%p/%d) nxt/lnk %p/%p\n",
1463 bus->glom.qlen, pfirst, pfirst->data, 1463 bus->glom.qlen, pfirst, pfirst->data,
@@ -1467,7 +1467,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1467 pfirst->data, 1467 pfirst->data,
1468 min_t(int, pfirst->len, 32)); 1468 min_t(int, pfirst->len, 32));
1469 } 1469 }
1470#endif /* BCMDBG */ 1470#endif /* DEBUG */
1471 } 1471 }
1472 /* sent any remaining packets up */ 1472 /* sent any remaining packets up */
1473 if (bus->glom.qlen) { 1473 if (bus->glom.qlen) {
@@ -1584,7 +1584,7 @@ brcmf_sdbrcm_read_control(struct brcmf_sdio *bus, u8 *hdr, uint len, uint doff)
1584 1584
1585gotpkt: 1585gotpkt:
1586 1586
1587#ifdef BCMDBG 1587#ifdef DEBUG
1588 if (BRCMF_BYTES_ON() && BRCMF_CTL_ON()) { 1588 if (BRCMF_BYTES_ON() && BRCMF_CTL_ON()) {
1589 printk(KERN_DEBUG "RxCtrl:\n"); 1589 printk(KERN_DEBUG "RxCtrl:\n");
1590 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, bus->rxctl, len); 1590 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, bus->rxctl, len);
@@ -1818,7 +1818,7 @@ brcmf_sdbrcm_readframes(struct brcmf_sdio *bus, uint maxframes, bool *finished)
1818 } 1818 }
1819 bus->tx_max = txmax; 1819 bus->tx_max = txmax;
1820 1820
1821#ifdef BCMDBG 1821#ifdef DEBUG
1822 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) { 1822 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) {
1823 printk(KERN_DEBUG "Rx Data:\n"); 1823 printk(KERN_DEBUG "Rx Data:\n");
1824 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 1824 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -1865,7 +1865,7 @@ brcmf_sdbrcm_readframes(struct brcmf_sdio *bus, uint maxframes, bool *finished)
1865 brcmf_sdbrcm_rxfail(bus, true, true); 1865 brcmf_sdbrcm_rxfail(bus, true, true);
1866 continue; 1866 continue;
1867 } 1867 }
1868#ifdef BCMDBG 1868#ifdef DEBUG
1869 if (BRCMF_BYTES_ON() || BRCMF_HDRS_ON()) { 1869 if (BRCMF_BYTES_ON() || BRCMF_HDRS_ON()) {
1870 printk(KERN_DEBUG "RxHdr:\n"); 1870 printk(KERN_DEBUG "RxHdr:\n");
1871 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 1871 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -2024,7 +2024,7 @@ brcmf_sdbrcm_readframes(struct brcmf_sdio *bus, uint maxframes, bool *finished)
2024 skb_push(pkt, BRCMF_FIRSTREAD); 2024 skb_push(pkt, BRCMF_FIRSTREAD);
2025 memcpy(pkt->data, bus->rxhdr, BRCMF_FIRSTREAD); 2025 memcpy(pkt->data, bus->rxhdr, BRCMF_FIRSTREAD);
2026 2026
2027#ifdef BCMDBG 2027#ifdef DEBUG
2028 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) { 2028 if (BRCMF_BYTES_ON() && BRCMF_DATA_ON()) {
2029 printk(KERN_DEBUG "Rx Data:\n"); 2029 printk(KERN_DEBUG "Rx Data:\n");
2030 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 2030 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -2038,7 +2038,7 @@ deliver:
2038 if (SDPCM_GLOMDESC(&bus->rxhdr[SDPCM_FRAMETAG_LEN])) { 2038 if (SDPCM_GLOMDESC(&bus->rxhdr[SDPCM_FRAMETAG_LEN])) {
2039 brcmf_dbg(GLOM, "glom descriptor, %d bytes:\n", 2039 brcmf_dbg(GLOM, "glom descriptor, %d bytes:\n",
2040 len); 2040 len);
2041#ifdef BCMDBG 2041#ifdef DEBUG
2042 if (BRCMF_GLOM_ON()) { 2042 if (BRCMF_GLOM_ON()) {
2043 printk(KERN_DEBUG "Glom Data:\n"); 2043 printk(KERN_DEBUG "Glom Data:\n");
2044 print_hex_dump_bytes("", 2044 print_hex_dump_bytes("",
@@ -2078,13 +2078,13 @@ deliver:
2078 down(&bus->sdsem); 2078 down(&bus->sdsem);
2079 } 2079 }
2080 rxcount = maxframes - rxleft; 2080 rxcount = maxframes - rxleft;
2081#ifdef BCMDBG 2081#ifdef DEBUG
2082 /* Message if we hit the limit */ 2082 /* Message if we hit the limit */
2083 if (!rxleft) 2083 if (!rxleft)
2084 brcmf_dbg(DATA, "hit rx limit of %d frames\n", 2084 brcmf_dbg(DATA, "hit rx limit of %d frames\n",
2085 maxframes); 2085 maxframes);
2086 else 2086 else
2087#endif /* BCMDBG */ 2087#endif /* DEBUG */
2088 brcmf_dbg(DATA, "processed %d frames\n", rxcount); 2088 brcmf_dbg(DATA, "processed %d frames\n", rxcount);
2089 /* Back off rxseq if awaiting rtx, update rx_seq */ 2089 /* Back off rxseq if awaiting rtx, update rx_seq */
2090 if (bus->rxskip) 2090 if (bus->rxskip)
@@ -2176,7 +2176,7 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_sdio *bus, struct sk_buff *pkt,
2176 put_unaligned_le32(swheader, frame + SDPCM_FRAMETAG_LEN); 2176 put_unaligned_le32(swheader, frame + SDPCM_FRAMETAG_LEN);
2177 put_unaligned_le32(0, frame + SDPCM_FRAMETAG_LEN + sizeof(swheader)); 2177 put_unaligned_le32(0, frame + SDPCM_FRAMETAG_LEN + sizeof(swheader));
2178 2178
2179#ifdef BCMDBG 2179#ifdef DEBUG
2180 tx_packets[pkt->priority]++; 2180 tx_packets[pkt->priority]++;
2181 if (BRCMF_BYTES_ON() && 2181 if (BRCMF_BYTES_ON() &&
2182 (((BRCMF_CTL_ON() && (chan == SDPCM_CONTROL_CHANNEL)) || 2182 (((BRCMF_CTL_ON() && (chan == SDPCM_CONTROL_CHANNEL)) ||
@@ -2410,7 +2410,7 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_sdio *bus)
2410 int err; 2410 int err;
2411 u8 clkctl, devctl = 0; 2411 u8 clkctl, devctl = 0;
2412 2412
2413#ifdef BCMDBG 2413#ifdef DEBUG
2414 /* Check for inconsistent device control */ 2414 /* Check for inconsistent device control */
2415 devctl = brcmf_sdcard_cfg_read(bus->sdiodev, SDIO_FUNC_1, 2415 devctl = brcmf_sdcard_cfg_read(bus->sdiodev, SDIO_FUNC_1,
2416 SBSDIO_DEVICE_CTL, &err); 2416 SBSDIO_DEVICE_CTL, &err);
@@ -2418,7 +2418,7 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_sdio *bus)
2418 brcmf_dbg(ERROR, "error reading DEVCTL: %d\n", err); 2418 brcmf_dbg(ERROR, "error reading DEVCTL: %d\n", err);
2419 bus->sdiodev->bus_if->state = BRCMF_BUS_DOWN; 2419 bus->sdiodev->bus_if->state = BRCMF_BUS_DOWN;
2420 } 2420 }
2421#endif /* BCMDBG */ 2421#endif /* DEBUG */
2422 2422
2423 /* Read CSR, if clock on switch to AVAIL, else ignore */ 2423 /* Read CSR, if clock on switch to AVAIL, else ignore */
2424 clkctl = brcmf_sdcard_cfg_read(bus->sdiodev, SDIO_FUNC_1, 2424 clkctl = brcmf_sdcard_cfg_read(bus->sdiodev, SDIO_FUNC_1,
@@ -2701,7 +2701,7 @@ static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
2701 brcmf_txflowcontrol(bus->sdiodev->dev, 0, ON); 2701 brcmf_txflowcontrol(bus->sdiodev->dev, 0, ON);
2702 } 2702 }
2703 2703
2704#ifdef BCMDBG 2704#ifdef DEBUG
2705 if (pktq_plen(&bus->txq, prec) > qcount[prec]) 2705 if (pktq_plen(&bus->txq, prec) > qcount[prec])
2706 qcount[prec] = pktq_plen(&bus->txq, prec); 2706 qcount[prec] = pktq_plen(&bus->txq, prec);
2707#endif 2707#endif
@@ -2774,7 +2774,7 @@ xfer_done:
2774 return bcmerror; 2774 return bcmerror;
2775} 2775}
2776 2776
2777#ifdef BCMDBG 2777#ifdef DEBUG
2778#define CONSOLE_LINE_MAX 192 2778#define CONSOLE_LINE_MAX 192
2779 2779
2780static int brcmf_sdbrcm_readconsole(struct brcmf_sdio *bus) 2780static int brcmf_sdbrcm_readconsole(struct brcmf_sdio *bus)
@@ -2852,7 +2852,7 @@ break2:
2852 2852
2853 return 0; 2853 return 0;
2854} 2854}
2855#endif /* BCMDBG */ 2855#endif /* DEBUG */
2856 2856
2857static int brcmf_tx_frame(struct brcmf_sdio *bus, u8 *frame, u16 len) 2857static int brcmf_tx_frame(struct brcmf_sdio *bus, u8 *frame, u16 len)
2858{ 2858{
@@ -2982,7 +2982,7 @@ brcmf_sdbrcm_bus_txctl(struct device *dev, unsigned char *msg, uint msglen)
2982 } 2982 }
2983 2983
2984 if (ret == -1) { 2984 if (ret == -1) {
2985#ifdef BCMDBG 2985#ifdef DEBUG
2986 if (BRCMF_BYTES_ON() && BRCMF_CTL_ON()) { 2986 if (BRCMF_BYTES_ON() && BRCMF_CTL_ON()) {
2987 printk(KERN_DEBUG "Tx Frame:\n"); 2987 printk(KERN_DEBUG "Tx Frame:\n");
2988 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 2988 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
@@ -3096,9 +3096,9 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_sdio *bus)
3096 u8 *vbuffer; 3096 u8 *vbuffer;
3097 u32 varsizew; 3097 u32 varsizew;
3098 __le32 varsizew_le; 3098 __le32 varsizew_le;
3099#ifdef BCMDBG 3099#ifdef DEBUG
3100 char *nvram_ularray; 3100 char *nvram_ularray;
3101#endif /* BCMDBG */ 3101#endif /* DEBUG */
3102 3102
3103 /* Even if there are no vars are to be written, we still 3103 /* Even if there are no vars are to be written, we still
3104 need to set the ramsize. */ 3104 need to set the ramsize. */
@@ -3115,7 +3115,7 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_sdio *bus)
3115 /* Write the vars list */ 3115 /* Write the vars list */
3116 bcmerror = 3116 bcmerror =
3117 brcmf_sdbrcm_membytes(bus, true, varaddr, vbuffer, varsize); 3117 brcmf_sdbrcm_membytes(bus, true, varaddr, vbuffer, varsize);
3118#ifdef BCMDBG 3118#ifdef DEBUG
3119 /* Verify NVRAM bytes */ 3119 /* Verify NVRAM bytes */
3120 brcmf_dbg(INFO, "Compare NVRAM dl & ul; varsize=%d\n", varsize); 3120 brcmf_dbg(INFO, "Compare NVRAM dl & ul; varsize=%d\n", varsize);
3121 nvram_ularray = kmalloc(varsize, GFP_ATOMIC); 3121 nvram_ularray = kmalloc(varsize, GFP_ATOMIC);
@@ -3142,7 +3142,7 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_sdio *bus)
3142 brcmf_dbg(ERROR, "Download/Upload/Compare of NVRAM ok\n"); 3142 brcmf_dbg(ERROR, "Download/Upload/Compare of NVRAM ok\n");
3143 3143
3144 kfree(nvram_ularray); 3144 kfree(nvram_ularray);
3145#endif /* BCMDBG */ 3145#endif /* DEBUG */
3146 3146
3147 kfree(vbuffer); 3147 kfree(vbuffer);
3148 } 3148 }
@@ -3569,9 +3569,9 @@ void brcmf_sdbrcm_isr(void *arg)
3569 3569
3570static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus) 3570static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)
3571{ 3571{
3572#ifdef BCMDBG 3572#ifdef DEBUG
3573 struct brcmf_bus *bus_if = dev_get_drvdata(bus->sdiodev->dev); 3573 struct brcmf_bus *bus_if = dev_get_drvdata(bus->sdiodev->dev);
3574#endif /* BCMDBG */ 3574#endif /* DEBUG */
3575 3575
3576 brcmf_dbg(TIMER, "Enter\n"); 3576 brcmf_dbg(TIMER, "Enter\n");
3577 3577
@@ -3616,7 +3616,7 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)
3616 /* Update interrupt tracking */ 3616 /* Update interrupt tracking */
3617 bus->lastintrs = bus->intrcount; 3617 bus->lastintrs = bus->intrcount;
3618 } 3618 }
3619#ifdef BCMDBG 3619#ifdef DEBUG
3620 /* Poll for console output periodically */ 3620 /* Poll for console output periodically */
3621 if (bus_if->state == BRCMF_BUS_DATA && 3621 if (bus_if->state == BRCMF_BUS_DATA &&
3622 bus->console_interval != 0) { 3622 bus->console_interval != 0) {
@@ -3630,7 +3630,7 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)
3630 bus->console_interval = 0; 3630 bus->console_interval = 0;
3631 } 3631 }
3632 } 3632 }
3633#endif /* BCMDBG */ 3633#endif /* DEBUG */
3634 3634
3635 /* On idle timeout clear activity flag and/or turn off clock */ 3635 /* On idle timeout clear activity flag and/or turn off clock */
3636 if ((bus->idletime > 0) && (bus->clkstate == CLK_AVAIL)) { 3636 if ((bus->idletime > 0) && (bus->clkstate == CLK_AVAIL)) {
@@ -3721,11 +3721,11 @@ brcmf_sdbrcm_probe_attach(struct brcmf_sdio *bus, u32 regsva)
3721 if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, SI_ENUM_BASE)) 3721 if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, SI_ENUM_BASE))
3722 brcmf_dbg(ERROR, "FAILED to return to SI_ENUM_BASE\n"); 3722 brcmf_dbg(ERROR, "FAILED to return to SI_ENUM_BASE\n");
3723 3723
3724#ifdef BCMDBG 3724#ifdef DEBUG
3725 printk(KERN_DEBUG "F1 signature read @0x18000000=0x%4x\n", 3725 printk(KERN_DEBUG "F1 signature read @0x18000000=0x%4x\n",
3726 brcmf_sdcard_reg_read(bus->sdiodev, SI_ENUM_BASE, 4)); 3726 brcmf_sdcard_reg_read(bus->sdiodev, SI_ENUM_BASE, 4));
3727 3727
3728#endif /* BCMDBG */ 3728#endif /* DEBUG */
3729 3729
3730 /* 3730 /*
3731 * Force PLL off until brcmf_sdio_chip_attach() 3731 * Force PLL off until brcmf_sdio_chip_attach()
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
index a613b49cb13..69a48729a72 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
@@ -42,7 +42,7 @@ do { \
42 } \ 42 } \
43} while (0) 43} while (0)
44 44
45#if (defined BCMDBG) 45#if (defined DEBUG)
46#define WL_INFO(fmt, args...) \ 46#define WL_INFO(fmt, args...) \
47do { \ 47do { \
48 if (brcmf_dbg_level & WL_DBG_INFO) { \ 48 if (brcmf_dbg_level & WL_DBG_INFO) { \
@@ -83,12 +83,12 @@ do { \
83 } \ 83 } \
84} while (0) 84} while (0)
85 85
86#else /* (defined BCMDBG) */ 86#else /* (defined DEBUG) */
87#define WL_INFO(fmt, args...) 87#define WL_INFO(fmt, args...)
88#define WL_TRACE(fmt, args...) 88#define WL_TRACE(fmt, args...)
89#define WL_SCAN(fmt, args...) 89#define WL_SCAN(fmt, args...)
90#define WL_CONN(fmt, args...) 90#define WL_CONN(fmt, args...)
91#endif /* (defined BCMDBG) */ 91#endif /* (defined DEBUG) */
92 92
93#define WL_NUM_SCAN_MAX 1 93#define WL_NUM_SCAN_MAX 1
94#define WL_NUM_PMKIDS_MAX MAXPMKID /* will be used 94#define WL_NUM_PMKIDS_MAX MAXPMKID /* will be used
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
index ab9bb11abfb..c93ea35bcee 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
@@ -326,11 +326,11 @@
326 326
327#define PCI_FORCEHT(sih) (PCIE(sih) && (ai_get_chip_id(sih) == BCM4716_CHIP_ID)) 327#define PCI_FORCEHT(sih) (PCIE(sih) && (ai_get_chip_id(sih) == BCM4716_CHIP_ID))
328 328
329#ifdef BCMDBG 329#ifdef DEBUG
330#define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__) 330#define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__)
331#else 331#else
332#define SI_MSG(fmt, ...) no_printk(fmt, ##__VA_ARGS__) 332#define SI_MSG(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
333#endif /* BCMDBG */ 333#endif /* DEBUG */
334 334
335#define GOODCOREADDR(x, b) \ 335#define GOODCOREADDR(x, b) \
336 (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ 336 (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index 90911eec0cf..d89dcb14cb6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -915,7 +915,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
915 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); 915 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);
916 struct wiphy *wiphy = wlc->wiphy; 916 struct wiphy *wiphy = wlc->wiphy;
917 917
918#ifdef BCMDBG 918#ifdef DEBUG
919 u8 hole[AMPDU_MAX_MPDU]; 919 u8 hole[AMPDU_MAX_MPDU];
920 memset(hole, 0, sizeof(hole)); 920 memset(hole, 0, sizeof(hole));
921#endif 921#endif
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
index 2e90a9a16ed..11054ae9d4f 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
@@ -177,7 +177,7 @@
177#define BCMEXTRAHDROOM 172 177#define BCMEXTRAHDROOM 172
178 178
179/* debug/trace */ 179/* debug/trace */
180#ifdef BCMDBG 180#ifdef DEBUG
181#define DMA_ERROR(fmt, ...) \ 181#define DMA_ERROR(fmt, ...) \
182do { \ 182do { \
183 if (*di->msg_level & 1) \ 183 if (*di->msg_level & 1) \
@@ -193,7 +193,7 @@ do { \
193 no_printk(fmt, ##__VA_ARGS__) 193 no_printk(fmt, ##__VA_ARGS__)
194#define DMA_TRACE(fmt, ...) \ 194#define DMA_TRACE(fmt, ...) \
195 no_printk(fmt, ##__VA_ARGS__) 195 no_printk(fmt, ##__VA_ARGS__)
196#endif /* BCMDBG */ 196#endif /* DEBUG */
197 197
198#define DMA_NONE(fmt, ...) \ 198#define DMA_NONE(fmt, ...) \
199 no_printk(fmt, ##__VA_ARGS__) 199 no_printk(fmt, ##__VA_ARGS__)
@@ -968,7 +968,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list)
968 pktcnt++; 968 pktcnt++;
969 } 969 }
970 970
971#ifdef BCMDBG 971#ifdef DEBUG
972 if (resid > 0) { 972 if (resid > 0) {
973 uint cur; 973 uint cur;
974 cur = 974 cur =
@@ -979,7 +979,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list)
979 DMA_ERROR("rxin %d rxout %d, hw_curr %d\n", 979 DMA_ERROR("rxin %d rxout %d, hw_curr %d\n",
980 di->rxin, di->rxout, cur); 980 di->rxin, di->rxout, cur);
981 } 981 }
982#endif /* BCMDBG */ 982#endif /* DEBUG */
983 983
984 if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) { 984 if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) {
985 DMA_ERROR("%s: bad frame length (%d)\n", 985 DMA_ERROR("%s: bad frame length (%d)\n",
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 448ab9c4eb4..04ba9a878f4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -96,10 +96,10 @@ static struct bcma_device_id brcms_coreid_table[] = {
96}; 96};
97MODULE_DEVICE_TABLE(bcma, brcms_coreid_table); 97MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
98 98
99#ifdef BCMDBG 99#ifdef DEBUG
100static int msglevel = 0xdeadbeef; 100static int msglevel = 0xdeadbeef;
101module_param(msglevel, int, 0); 101module_param(msglevel, int, 0);
102#endif /* BCMDBG */ 102#endif /* DEBUG */
103 103
104static struct ieee80211_channel brcms_2ghz_chantable[] = { 104static struct ieee80211_channel brcms_2ghz_chantable[] = {
105 CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS), 105 CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS),
@@ -857,7 +857,7 @@ static void brcms_free(struct brcms_info *wl)
857 /* free timers */ 857 /* free timers */
858 for (t = wl->timers; t; t = next) { 858 for (t = wl->timers; t; t = next) {
859 next = t->next; 859 next = t->next;
860#ifdef BCMDBG 860#ifdef DEBUG
861 kfree(t->name); 861 kfree(t->name);
862#endif 862#endif
863 kfree(t); 863 kfree(t);
@@ -1177,10 +1177,10 @@ static int __init brcms_module_init(void)
1177{ 1177{
1178 int error = -ENODEV; 1178 int error = -ENODEV;
1179 1179
1180#ifdef BCMDBG 1180#ifdef DEBUG
1181 if (msglevel != 0xdeadbeef) 1181 if (msglevel != 0xdeadbeef)
1182 brcm_msg_level = msglevel; 1182 brcm_msg_level = msglevel;
1183#endif /* BCMDBG */ 1183#endif /* DEBUG */
1184 1184
1185 error = bcma_driver_register(&brcms_bcma_driver); 1185 error = bcma_driver_register(&brcms_bcma_driver);
1186 printk(KERN_ERR "%s: register returned %d\n", __func__, error); 1186 printk(KERN_ERR "%s: register returned %d\n", __func__, error);
@@ -1367,7 +1367,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
1367 t->next = wl->timers; 1367 t->next = wl->timers;
1368 wl->timers = t; 1368 wl->timers = t;
1369 1369
1370#ifdef BCMDBG 1370#ifdef DEBUG
1371 t->name = kmalloc(strlen(name) + 1, GFP_ATOMIC); 1371 t->name = kmalloc(strlen(name) + 1, GFP_ATOMIC);
1372 if (t->name) 1372 if (t->name)
1373 strcpy(t->name, name); 1373 strcpy(t->name, name);
@@ -1386,7 +1386,7 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
1386{ 1386{
1387 struct ieee80211_hw *hw = t->wl->pub->ieee_hw; 1387 struct ieee80211_hw *hw = t->wl->pub->ieee_hw;
1388 1388
1389#ifdef BCMDBG 1389#ifdef DEBUG
1390 if (t->set) 1390 if (t->set)
1391 wiphy_err(hw->wiphy, "%s: Already set. Name: %s, per %d\n", 1391 wiphy_err(hw->wiphy, "%s: Already set. Name: %s, per %d\n",
1392 __func__, t->name, periodic); 1392 __func__, t->name, periodic);
@@ -1431,7 +1431,7 @@ void brcms_free_timer(struct brcms_timer *t)
1431 1431
1432 if (wl->timers == t) { 1432 if (wl->timers == t) {
1433 wl->timers = wl->timers->next; 1433 wl->timers = wl->timers->next;
1434#ifdef BCMDBG 1434#ifdef DEBUG
1435 kfree(t->name); 1435 kfree(t->name);
1436#endif 1436#endif
1437 kfree(t); 1437 kfree(t);
@@ -1443,7 +1443,7 @@ void brcms_free_timer(struct brcms_timer *t)
1443 while (tmp) { 1443 while (tmp) {
1444 if (tmp->next == t) { 1444 if (tmp->next == t) {
1445 tmp->next = t->next; 1445 tmp->next = t->next;
1446#ifdef BCMDBG 1446#ifdef DEBUG
1447 kfree(t->name); 1447 kfree(t->name);
1448#endif 1448#endif
1449 kfree(t); 1449 kfree(t);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h
index 8f60419c37b..9358bd5ebd3 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.h
@@ -40,7 +40,7 @@ struct brcms_timer {
40 bool periodic; 40 bool periodic;
41 bool set; /* indicates if timer is active */ 41 bool set; /* indicates if timer is active */
42 struct brcms_timer *next; /* for freeing on unload */ 42 struct brcms_timer *next; /* for freeing on unload */
43#ifdef BCMDBG 43#ifdef DEBUG
44 char *name; /* Description of the timer */ 44 char *name; /* Description of the timer */
45#endif 45#endif
46}; 46};
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index f7ed34034f8..3ae07bb9cc6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -293,11 +293,11 @@ const u8 prio2fifo[NUMPRIO] = {
293 293
294/* debug/trace */ 294/* debug/trace */
295uint brcm_msg_level = 295uint brcm_msg_level =
296#if defined(BCMDBG) 296#if defined(DEBUG)
297 LOG_ERROR_VAL; 297 LOG_ERROR_VAL;
298#else 298#else
299 0; 299 0;
300#endif /* BCMDBG */ 300#endif /* DEBUG */
301 301
302/* TX FIFO number to WME/802.1E Access Category */ 302/* TX FIFO number to WME/802.1E Access Category */
303static const u8 wme_fifo2ac[] = { 303static const u8 wme_fifo2ac[] = {
@@ -342,14 +342,14 @@ static const u16 xmtfifo_sz[][NFIFO] = {
342 {9, 58, 22, 14, 14, 5}, 342 {9, 58, 22, 14, 14, 5},
343}; 343};
344 344
345#ifdef BCMDBG 345#ifdef DEBUG
346static const char * const fifo_names[] = { 346static const char * const fifo_names[] = {
347 "AC_BK", "AC_BE", "AC_VI", "AC_VO", "BCMC", "ATIM" }; 347 "AC_BK", "AC_BE", "AC_VI", "AC_VO", "BCMC", "ATIM" };
348#else 348#else
349static const char fifo_names[6][0]; 349static const char fifo_names[6][0];
350#endif 350#endif
351 351
352#ifdef BCMDBG 352#ifdef DEBUG
353/* pointer to most recently allocated wl/wlc */ 353/* pointer to most recently allocated wl/wlc */
354static struct brcms_c_info *wlc_info_dbg = (struct brcms_c_info *) (NULL); 354static struct brcms_c_info *wlc_info_dbg = (struct brcms_c_info *) (NULL);
355#endif 355#endif
@@ -3075,30 +3075,30 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc)
3075{ 3075{
3076 int i; 3076 int i;
3077 struct macstat macstats; 3077 struct macstat macstats;
3078#ifdef BCMDBG 3078#ifdef DEBUG
3079 u16 delta; 3079 u16 delta;
3080 u16 rxf0ovfl; 3080 u16 rxf0ovfl;
3081 u16 txfunfl[NFIFO]; 3081 u16 txfunfl[NFIFO];
3082#endif /* BCMDBG */ 3082#endif /* DEBUG */
3083 3083
3084 /* if driver down, make no sense to update stats */ 3084 /* if driver down, make no sense to update stats */
3085 if (!wlc->pub->up) 3085 if (!wlc->pub->up)
3086 return; 3086 return;
3087 3087
3088#ifdef BCMDBG 3088#ifdef DEBUG
3089 /* save last rx fifo 0 overflow count */ 3089 /* save last rx fifo 0 overflow count */
3090 rxf0ovfl = wlc->core->macstat_snapshot->rxf0ovfl; 3090 rxf0ovfl = wlc->core->macstat_snapshot->rxf0ovfl;
3091 3091
3092 /* save last tx fifo underflow count */ 3092 /* save last tx fifo underflow count */
3093 for (i = 0; i < NFIFO; i++) 3093 for (i = 0; i < NFIFO; i++)
3094 txfunfl[i] = wlc->core->macstat_snapshot->txfunfl[i]; 3094 txfunfl[i] = wlc->core->macstat_snapshot->txfunfl[i];
3095#endif /* BCMDBG */ 3095#endif /* DEBUG */
3096 3096
3097 /* Read mac stats from contiguous shared memory */ 3097 /* Read mac stats from contiguous shared memory */
3098 brcms_b_copyfrom_objmem(wlc->hw, M_UCODE_MACSTAT, &macstats, 3098 brcms_b_copyfrom_objmem(wlc->hw, M_UCODE_MACSTAT, &macstats,
3099 sizeof(struct macstat), OBJADDR_SHM_SEL); 3099 sizeof(struct macstat), OBJADDR_SHM_SEL);
3100 3100
3101#ifdef BCMDBG 3101#ifdef DEBUG
3102 /* check for rx fifo 0 overflow */ 3102 /* check for rx fifo 0 overflow */
3103 delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); 3103 delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl);
3104 if (delta) 3104 if (delta)
@@ -3114,7 +3114,7 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc)
3114 wiphy_err(wlc->wiphy, "wl%d: %u tx fifo %d underflows!" 3114 wiphy_err(wlc->wiphy, "wl%d: %u tx fifo %d underflows!"
3115 "\n", wlc->pub->unit, delta, i); 3115 "\n", wlc->pub->unit, delta, i);
3116 } 3116 }
3117#endif /* BCMDBG */ 3117#endif /* DEBUG */
3118 3118
3119 /* merge counters from dma module */ 3119 /* merge counters from dma module */
3120 for (i = 0; i < NFIFO; i++) { 3120 for (i = 0; i < NFIFO; i++) {
@@ -5765,7 +5765,7 @@ int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
5765 return -ENODATA; 5765 return -ENODATA;
5766} 5766}
5767 5767
5768#ifdef BCMDBG 5768#ifdef DEBUG
5769static const char * const supr_reason[] = { 5769static const char * const supr_reason[] = {
5770 "None", "PMQ Entry", "Flush request", 5770 "None", "PMQ Entry", "Flush request",
5771 "Previous frag failure", "Channel mismatch", 5771 "Previous frag failure", "Channel mismatch",
@@ -5790,11 +5790,11 @@ static void brcms_c_print_txs_status(u16 s)
5790 printk(KERN_DEBUG " [1] %d acked\n", 5790 printk(KERN_DEBUG " [1] %d acked\n",
5791 ((s & TX_STATUS_ACK_RCV) ? 1 : 0)); 5791 ((s & TX_STATUS_ACK_RCV) ? 1 : 0));
5792} 5792}
5793#endif /* BCMDBG */ 5793#endif /* DEBUG */
5794 5794
5795void brcms_c_print_txstatus(struct tx_status *txs) 5795void brcms_c_print_txstatus(struct tx_status *txs)
5796{ 5796{
5797#if defined(BCMDBG) 5797#if defined(DEBUG)
5798 u16 s = txs->status; 5798 u16 s = txs->status;
5799 u16 ackphyrxsh = txs->ackphyrxsh; 5799 u16 ackphyrxsh = txs->ackphyrxsh;
5800 5800
@@ -5814,7 +5814,7 @@ void brcms_c_print_txstatus(struct tx_status *txs)
5814 printk(KERN_DEBUG "RxAckSQ: %04x", 5814 printk(KERN_DEBUG "RxAckSQ: %04x",
5815 (ackphyrxsh & PRXS1_SQ_MASK) >> PRXS1_SQ_SHIFT); 5815 (ackphyrxsh & PRXS1_SQ_MASK) >> PRXS1_SQ_SHIFT);
5816 printk(KERN_DEBUG "\n"); 5816 printk(KERN_DEBUG "\n");
5817#endif /* defined(BCMDBG) */ 5817#endif /* defined(DEBUG) */
5818} 5818}
5819 5819
5820bool brcms_c_chipmatch(u16 vendor, u16 device) 5820bool brcms_c_chipmatch(u16 vendor, u16 device)
@@ -5837,7 +5837,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 device)
5837 return false; 5837 return false;
5838} 5838}
5839 5839
5840#if defined(BCMDBG) 5840#if defined(DEBUG)
5841void brcms_c_print_txdesc(struct d11txh *txh) 5841void brcms_c_print_txdesc(struct d11txh *txh)
5842{ 5842{
5843 u16 mtcl = le16_to_cpu(txh->MacTxControlLow); 5843 u16 mtcl = le16_to_cpu(txh->MacTxControlLow);
@@ -5919,9 +5919,9 @@ void brcms_c_print_txdesc(struct d11txh *txh)
5919 (u8 *)&rts, sizeof(txh->rts_frame)); 5919 (u8 *)&rts, sizeof(txh->rts_frame));
5920 printk(KERN_DEBUG "\n"); 5920 printk(KERN_DEBUG "\n");
5921} 5921}
5922#endif /* defined(BCMDBG) */ 5922#endif /* defined(DEBUG) */
5923 5923
5924#if defined(BCMDBG) 5924#if defined(DEBUG)
5925static int 5925static int
5926brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf, 5926brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf,
5927 int len) 5927 int len)
@@ -5975,9 +5975,9 @@ brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf,
5975 5975
5976 return (int)(p - buf); 5976 return (int)(p - buf);
5977} 5977}
5978#endif /* defined(BCMDBG) */ 5978#endif /* defined(DEBUG) */
5979 5979
5980#if defined(BCMDBG) 5980#if defined(DEBUG)
5981void brcms_c_print_rxh(struct d11rxhdr *rxh) 5981void brcms_c_print_rxh(struct d11rxhdr *rxh)
5982{ 5982{
5983 u16 len = rxh->RxFrameSize; 5983 u16 len = rxh->RxFrameSize;
@@ -6016,7 +6016,7 @@ void brcms_c_print_rxh(struct d11rxhdr *rxh)
6016 (macstatus2 & RXS_AGGTYPE_MASK)); 6016 (macstatus2 & RXS_AGGTYPE_MASK));
6017 printk(KERN_DEBUG "RxTSFTime: %04x\n", rxh->RxTSFTime); 6017 printk(KERN_DEBUG "RxTSFTime: %04x\n", rxh->RxTSFTime);
6018} 6018}
6019#endif /* defined(BCMDBG) */ 6019#endif /* defined(DEBUG) */
6020 6020
6021u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate) 6021u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate)
6022{ 6022{
@@ -8346,7 +8346,7 @@ brcms_c_attach(struct brcms_info *wl, struct bcma_device *core, uint unit,
8346 wlc->wiphy = wl->wiphy; 8346 wlc->wiphy = wl->wiphy;
8347 pub = wlc->pub; 8347 pub = wlc->pub;
8348 8348
8349#if defined(BCMDBG) 8349#if defined(DEBUG)
8350 wlc_info_dbg = wlc; 8350 wlc_info_dbg = wlc;
8351#endif 8351#endif
8352 8352
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.h b/drivers/net/wireless/brcm80211/brcmsmac/main.h
index adb136ec1f0..84a2a0d9dd3 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.h
@@ -648,7 +648,7 @@ extern void brcms_c_print_txstatus(struct tx_status *txs);
648extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo, 648extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,
649 uint *blocks); 649 uint *blocks);
650 650
651#if defined(BCMDBG) 651#if defined(DEBUG)
652extern void brcms_c_print_txdesc(struct d11txh *txh); 652extern void brcms_c_print_txdesc(struct d11txh *txh);
653#else 653#else
654#define brcms_c_print_txdesc(a) 654#define brcms_c_print_txdesc(a)
diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
index b7537f70a79..e25fb2da8e6 100644
--- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
+++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
@@ -240,7 +240,7 @@ struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp,
240} 240}
241EXPORT_SYMBOL(brcmu_pktq_mdeq); 241EXPORT_SYMBOL(brcmu_pktq_mdeq);
242 242
243#if defined(BCMDBG) 243#if defined(DEBUG)
244/* pretty hex print a pkt buffer chain */ 244/* pretty hex print a pkt buffer chain */
245void brcmu_prpkt(const char *msg, struct sk_buff *p0) 245void brcmu_prpkt(const char *msg, struct sk_buff *p0)
246{ 246{
@@ -253,4 +253,4 @@ void brcmu_prpkt(const char *msg, struct sk_buff *p0)
253 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len); 253 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len);
254} 254}
255EXPORT_SYMBOL(brcmu_prpkt); 255EXPORT_SYMBOL(brcmu_prpkt);
256#endif /* defined(BCMDBG) */ 256#endif /* defined(DEBUG) */
diff --git a/drivers/net/wireless/brcm80211/include/brcmu_utils.h b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
index ad249a0b473..0cde38aa63f 100644
--- a/drivers/net/wireless/brcm80211/include/brcmu_utils.h
+++ b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
@@ -176,10 +176,10 @@ struct ipv4_addr;
176 176
177/* externs */ 177/* externs */
178/* format/print */ 178/* format/print */
179#ifdef BCMDBG 179#ifdef DEBUG
180extern void brcmu_prpkt(const char *msg, struct sk_buff *p0); 180extern void brcmu_prpkt(const char *msg, struct sk_buff *p0);
181#else 181#else
182#define brcmu_prpkt(a, b) 182#define brcmu_prpkt(a, b)
183#endif /* BCMDBG */ 183#endif /* DEBUG */
184 184
185#endif /* _BRCMU_UTILS_H_ */ 185#endif /* _BRCMU_UTILS_H_ */