Commit 8ae74654 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f9972577
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# common flags # common flags
subdir-ccflags-$(CONFIG_BRCMDBG) += -DBCMDBG subdir-ccflags-$(CONFIG_BRCMDBG) += -DDEBUG
obj-$(CONFIG_BRCMUTIL) += brcmutil/ obj-$(CONFIG_BRCMUTIL) += brcmutil/
obj-$(CONFIG_BRCMFMAC) += brcmfmac/ obj-$(CONFIG_BRCMFMAC) += brcmfmac/
......
...@@ -644,9 +644,9 @@ extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx); ...@@ -644,9 +644,9 @@ extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx,
uint cmd, void *buf, uint len); uint cmd, void *buf, uint len);
#ifdef BCMDBG #ifdef DEBUG
extern int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size); extern int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size);
#endif /* BCMDBG */ #endif /* DEBUG */
extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name); extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name);
extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx, extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx,
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN \ #define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN \
offsetof(struct brcmf_pkt_filter_pattern_le, mask_and_pattern) offsetof(struct brcmf_pkt_filter_pattern_le, mask_and_pattern)
#ifdef BCMDBG #ifdef DEBUG
static const char brcmf_version[] = static const char brcmf_version[] =
"Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on " "Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on "
__DATE__ " at " __TIME__; __DATE__ " at " __TIME__;
...@@ -133,7 +133,7 @@ bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, ...@@ -133,7 +133,7 @@ bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
return p != NULL; return p != NULL;
} }
#ifdef BCMDBG #ifdef DEBUG
static void static void
brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
{ {
...@@ -430,7 +430,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -430,7 +430,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
brcmf_dbg(EVENT, "\n"); brcmf_dbg(EVENT, "\n");
} }
} }
#endif /* BCMDBG */ #endif /* DEBUG */
int int
brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata, brcmf_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,9 +518,9 @@ brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata,
break; break;
} }
#ifdef BCMDBG #ifdef DEBUG
brcmf_c_show_host_event(event, event_data); brcmf_c_show_host_event(event, event_data);
#endif /* BCMDBG */ #endif /* DEBUG */
return 0; return 0;
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define BRCMF_BTA_VAL 0x1000 #define BRCMF_BTA_VAL 0x1000
#define BRCMF_ISCAN_VAL 0x2000 #define BRCMF_ISCAN_VAL 0x2000
#if defined(BCMDBG) #if defined(DEBUG)
#define brcmf_dbg(level, fmt, ...) \ #define brcmf_dbg(level, fmt, ...) \
do { \ do { \
...@@ -56,7 +56,7 @@ do { \ ...@@ -56,7 +56,7 @@ do { \
#define BRCMF_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL) #define BRCMF_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL)
#define BRCMF_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL) #define BRCMF_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL)
#else /* (defined BCMDBG) || (defined BCMDBG) */ #else /* (defined DEBUG) || (defined DEBUG) */
#define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__) #define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
...@@ -66,7 +66,7 @@ do { \ ...@@ -66,7 +66,7 @@ do { \
#define BRCMF_BYTES_ON() 0 #define BRCMF_BYTES_ON() 0
#define BRCMF_GLOM_ON() 0 #define BRCMF_GLOM_ON() 0
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
extern int brcmf_msg_level; extern int brcmf_msg_level;
......
...@@ -1146,7 +1146,7 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev) ...@@ -1146,7 +1146,7 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev)
return pend; return pend;
} }
#ifdef BCMDBG #ifdef DEBUG
int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size) int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size)
{ {
int ret = 0; int ret = 0;
...@@ -1180,4 +1180,4 @@ int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size) ...@@ -1180,4 +1180,4 @@ int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size)
return ret; return ret;
} }
#endif /* BCMDBG */ #endif /* DEBUG */
...@@ -42,7 +42,7 @@ do { \ ...@@ -42,7 +42,7 @@ do { \
} \ } \
} while (0) } while (0)
#if (defined BCMDBG) #if (defined DEBUG)
#define WL_INFO(fmt, args...) \ #define WL_INFO(fmt, args...) \
do { \ do { \
if (brcmf_dbg_level & WL_DBG_INFO) { \ if (brcmf_dbg_level & WL_DBG_INFO) { \
...@@ -83,12 +83,12 @@ do { \ ...@@ -83,12 +83,12 @@ do { \
} \ } \
} while (0) } while (0)
#else /* (defined BCMDBG) */ #else /* (defined DEBUG) */
#define WL_INFO(fmt, args...) #define WL_INFO(fmt, args...)
#define WL_TRACE(fmt, args...) #define WL_TRACE(fmt, args...)
#define WL_SCAN(fmt, args...) #define WL_SCAN(fmt, args...)
#define WL_CONN(fmt, args...) #define WL_CONN(fmt, args...)
#endif /* (defined BCMDBG) */ #endif /* (defined DEBUG) */
#define WL_NUM_SCAN_MAX 1 #define WL_NUM_SCAN_MAX 1
#define WL_NUM_PMKIDS_MAX MAXPMKID /* will be used #define WL_NUM_PMKIDS_MAX MAXPMKID /* will be used
......
...@@ -326,11 +326,11 @@ ...@@ -326,11 +326,11 @@
#define PCI_FORCEHT(sih) (PCIE(sih) && (ai_get_chip_id(sih) == BCM4716_CHIP_ID)) #define PCI_FORCEHT(sih) (PCIE(sih) && (ai_get_chip_id(sih) == BCM4716_CHIP_ID))
#ifdef BCMDBG #ifdef DEBUG
#define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__) #define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__)
#else #else
#define SI_MSG(fmt, ...) no_printk(fmt, ##__VA_ARGS__) #define SI_MSG(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
#endif /* BCMDBG */ #endif /* DEBUG */
#define GOODCOREADDR(x, b) \ #define GOODCOREADDR(x, b) \
(((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
......
...@@ -915,7 +915,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -915,7 +915,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);
struct wiphy *wiphy = wlc->wiphy; struct wiphy *wiphy = wlc->wiphy;
#ifdef BCMDBG #ifdef DEBUG
u8 hole[AMPDU_MAX_MPDU]; u8 hole[AMPDU_MAX_MPDU];
memset(hole, 0, sizeof(hole)); memset(hole, 0, sizeof(hole));
#endif #endif
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
#define BCMEXTRAHDROOM 172 #define BCMEXTRAHDROOM 172
/* debug/trace */ /* debug/trace */
#ifdef BCMDBG #ifdef DEBUG
#define DMA_ERROR(fmt, ...) \ #define DMA_ERROR(fmt, ...) \
do { \ do { \
if (*di->msg_level & 1) \ if (*di->msg_level & 1) \
...@@ -193,7 +193,7 @@ do { \ ...@@ -193,7 +193,7 @@ do { \
no_printk(fmt, ##__VA_ARGS__) no_printk(fmt, ##__VA_ARGS__)
#define DMA_TRACE(fmt, ...) \ #define DMA_TRACE(fmt, ...) \
no_printk(fmt, ##__VA_ARGS__) no_printk(fmt, ##__VA_ARGS__)
#endif /* BCMDBG */ #endif /* DEBUG */
#define DMA_NONE(fmt, ...) \ #define DMA_NONE(fmt, ...) \
no_printk(fmt, ##__VA_ARGS__) no_printk(fmt, ##__VA_ARGS__)
...@@ -968,7 +968,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list) ...@@ -968,7 +968,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list)
pktcnt++; pktcnt++;
} }
#ifdef BCMDBG #ifdef DEBUG
if (resid > 0) { if (resid > 0) {
uint cur; uint cur;
cur = cur =
...@@ -979,7 +979,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list) ...@@ -979,7 +979,7 @@ int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list)
DMA_ERROR("rxin %d rxout %d, hw_curr %d\n", DMA_ERROR("rxin %d rxout %d, hw_curr %d\n",
di->rxin, di->rxout, cur); di->rxin, di->rxout, cur);
} }
#endif /* BCMDBG */ #endif /* DEBUG */
if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) { if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) {
DMA_ERROR("%s: bad frame length (%d)\n", DMA_ERROR("%s: bad frame length (%d)\n",
......
...@@ -96,10 +96,10 @@ static struct bcma_device_id brcms_coreid_table[] = { ...@@ -96,10 +96,10 @@ static struct bcma_device_id brcms_coreid_table[] = {
}; };
MODULE_DEVICE_TABLE(bcma, brcms_coreid_table); MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
#ifdef BCMDBG #ifdef DEBUG
static int msglevel = 0xdeadbeef; static int msglevel = 0xdeadbeef;
module_param(msglevel, int, 0); module_param(msglevel, int, 0);
#endif /* BCMDBG */ #endif /* DEBUG */
static struct ieee80211_channel brcms_2ghz_chantable[] = { static struct ieee80211_channel brcms_2ghz_chantable[] = {
CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS), CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS),
...@@ -857,7 +857,7 @@ static void brcms_free(struct brcms_info *wl) ...@@ -857,7 +857,7 @@ static void brcms_free(struct brcms_info *wl)
/* free timers */ /* free timers */
for (t = wl->timers; t; t = next) { for (t = wl->timers; t; t = next) {
next = t->next; next = t->next;
#ifdef BCMDBG #ifdef DEBUG
kfree(t->name); kfree(t->name);
#endif #endif
kfree(t); kfree(t);
...@@ -1177,10 +1177,10 @@ static int __init brcms_module_init(void) ...@@ -1177,10 +1177,10 @@ static int __init brcms_module_init(void)
{ {
int error = -ENODEV; int error = -ENODEV;
#ifdef BCMDBG #ifdef DEBUG
if (msglevel != 0xdeadbeef) if (msglevel != 0xdeadbeef)
brcm_msg_level = msglevel; brcm_msg_level = msglevel;
#endif /* BCMDBG */ #endif /* DEBUG */
error = bcma_driver_register(&brcms_bcma_driver); error = bcma_driver_register(&brcms_bcma_driver);
printk(KERN_ERR "%s: register returned %d\n", __func__, error); 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,7 +1367,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
t->next = wl->timers; t->next = wl->timers;
wl->timers = t; wl->timers = t;
#ifdef BCMDBG #ifdef DEBUG
t->name = kmalloc(strlen(name) + 1, GFP_ATOMIC); t->name = kmalloc(strlen(name) + 1, GFP_ATOMIC);
if (t->name) if (t->name)
strcpy(t->name, name); strcpy(t->name, name);
...@@ -1386,7 +1386,7 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic) ...@@ -1386,7 +1386,7 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
{ {
struct ieee80211_hw *hw = t->wl->pub->ieee_hw; struct ieee80211_hw *hw = t->wl->pub->ieee_hw;
#ifdef BCMDBG #ifdef DEBUG
if (t->set) if (t->set)
wiphy_err(hw->wiphy, "%s: Already set. Name: %s, per %d\n", wiphy_err(hw->wiphy, "%s: Already set. Name: %s, per %d\n",
__func__, t->name, periodic); __func__, t->name, periodic);
...@@ -1431,7 +1431,7 @@ void brcms_free_timer(struct brcms_timer *t) ...@@ -1431,7 +1431,7 @@ void brcms_free_timer(struct brcms_timer *t)
if (wl->timers == t) { if (wl->timers == t) {
wl->timers = wl->timers->next; wl->timers = wl->timers->next;
#ifdef BCMDBG #ifdef DEBUG
kfree(t->name); kfree(t->name);
#endif #endif
kfree(t); kfree(t);
...@@ -1443,7 +1443,7 @@ void brcms_free_timer(struct brcms_timer *t) ...@@ -1443,7 +1443,7 @@ void brcms_free_timer(struct brcms_timer *t)
while (tmp) { while (tmp) {
if (tmp->next == t) { if (tmp->next == t) {
tmp->next = t->next; tmp->next = t->next;
#ifdef BCMDBG #ifdef DEBUG
kfree(t->name); kfree(t->name);
#endif #endif
kfree(t); kfree(t);
......
...@@ -40,7 +40,7 @@ struct brcms_timer { ...@@ -40,7 +40,7 @@ struct brcms_timer {
bool periodic; bool periodic;
bool set; /* indicates if timer is active */ bool set; /* indicates if timer is active */
struct brcms_timer *next; /* for freeing on unload */ struct brcms_timer *next; /* for freeing on unload */
#ifdef BCMDBG #ifdef DEBUG
char *name; /* Description of the timer */ char *name; /* Description of the timer */
#endif #endif
}; };
......
...@@ -293,11 +293,11 @@ const u8 prio2fifo[NUMPRIO] = { ...@@ -293,11 +293,11 @@ const u8 prio2fifo[NUMPRIO] = {
/* debug/trace */ /* debug/trace */
uint brcm_msg_level = uint brcm_msg_level =
#if defined(BCMDBG) #if defined(DEBUG)
LOG_ERROR_VAL; LOG_ERROR_VAL;
#else #else
0; 0;
#endif /* BCMDBG */ #endif /* DEBUG */
/* TX FIFO number to WME/802.1E Access Category */ /* TX FIFO number to WME/802.1E Access Category */
static const u8 wme_fifo2ac[] = { static const u8 wme_fifo2ac[] = {
...@@ -342,14 +342,14 @@ static const u16 xmtfifo_sz[][NFIFO] = { ...@@ -342,14 +342,14 @@ static const u16 xmtfifo_sz[][NFIFO] = {
{9, 58, 22, 14, 14, 5}, {9, 58, 22, 14, 14, 5},
}; };
#ifdef BCMDBG #ifdef DEBUG
static const char * const fifo_names[] = { static const char * const fifo_names[] = {
"AC_BK", "AC_BE", "AC_VI", "AC_VO", "BCMC", "ATIM" }; "AC_BK", "AC_BE", "AC_VI", "AC_VO", "BCMC", "ATIM" };
#else #else
static const char fifo_names[6][0]; static const char fifo_names[6][0];
#endif #endif
#ifdef BCMDBG #ifdef DEBUG
/* pointer to most recently allocated wl/wlc */ /* pointer to most recently allocated wl/wlc */
static struct brcms_c_info *wlc_info_dbg = (struct brcms_c_info *) (NULL); static struct brcms_c_info *wlc_info_dbg = (struct brcms_c_info *) (NULL);
#endif #endif
...@@ -3075,30 +3075,30 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc) ...@@ -3075,30 +3075,30 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc)
{ {
int i; int i;
struct macstat macstats; struct macstat macstats;
#ifdef BCMDBG #ifdef DEBUG
u16 delta; u16 delta;
u16 rxf0ovfl; u16 rxf0ovfl;
u16 txfunfl[NFIFO]; u16 txfunfl[NFIFO];
#endif /* BCMDBG */ #endif /* DEBUG */
/* if driver down, make no sense to update stats */ /* if driver down, make no sense to update stats */
if (!wlc->pub->up) if (!wlc->pub->up)
return; return;
#ifdef BCMDBG #ifdef DEBUG
/* save last rx fifo 0 overflow count */ /* save last rx fifo 0 overflow count */
rxf0ovfl = wlc->core->macstat_snapshot->rxf0ovfl; rxf0ovfl = wlc->core->macstat_snapshot->rxf0ovfl;
/* save last tx fifo underflow count */ /* save last tx fifo underflow count */
for (i = 0; i < NFIFO; i++) for (i = 0; i < NFIFO; i++)
txfunfl[i] = wlc->core->macstat_snapshot->txfunfl[i]; txfunfl[i] = wlc->core->macstat_snapshot->txfunfl[i];
#endif /* BCMDBG */ #endif /* DEBUG */
/* Read mac stats from contiguous shared memory */ /* Read mac stats from contiguous shared memory */
brcms_b_copyfrom_objmem(wlc->hw, M_UCODE_MACSTAT, &macstats, brcms_b_copyfrom_objmem(wlc->hw, M_UCODE_MACSTAT, &macstats,
sizeof(struct macstat), OBJADDR_SHM_SEL); sizeof(struct macstat), OBJADDR_SHM_SEL);
#ifdef BCMDBG #ifdef DEBUG
/* check for rx fifo 0 overflow */ /* check for rx fifo 0 overflow */
delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl);
if (delta) if (delta)
...@@ -3114,7 +3114,7 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc) ...@@ -3114,7 +3114,7 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc)
wiphy_err(wlc->wiphy, "wl%d: %u tx fifo %d underflows!" wiphy_err(wlc->wiphy, "wl%d: %u tx fifo %d underflows!"
"\n", wlc->pub->unit, delta, i); "\n", wlc->pub->unit, delta, i);
} }
#endif /* BCMDBG */ #endif /* DEBUG */
/* merge counters from dma module */ /* merge counters from dma module */
for (i = 0; i < NFIFO; i++) { for (i = 0; i < NFIFO; i++) {
...@@ -5765,7 +5765,7 @@ int brcms_c_module_unregister(struct brcms_pub *pub, const char *name, ...@@ -5765,7 +5765,7 @@ int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
return -ENODATA; return -ENODATA;
} }
#ifdef BCMDBG #ifdef DEBUG
static const char * const supr_reason[] = { static const char * const supr_reason[] = {
"None", "PMQ Entry", "Flush request", "None", "PMQ Entry", "Flush request",
"Previous frag failure", "Channel mismatch", "Previous frag failure", "Channel mismatch",
...@@ -5790,11 +5790,11 @@ static void brcms_c_print_txs_status(u16 s) ...@@ -5790,11 +5790,11 @@ static void brcms_c_print_txs_status(u16 s)
printk(KERN_DEBUG " [1] %d acked\n", printk(KERN_DEBUG " [1] %d acked\n",
((s & TX_STATUS_ACK_RCV) ? 1 : 0)); ((s & TX_STATUS_ACK_RCV) ? 1 : 0));
} }
#endif /* BCMDBG */ #endif /* DEBUG */
void brcms_c_print_txstatus(struct tx_status *txs) void brcms_c_print_txstatus(struct tx_status *txs)
{ {
#if defined(BCMDBG) #if defined(DEBUG)
u16 s = txs->status; u16 s = txs->status;
u16 ackphyrxsh = txs->ackphyrxsh; u16 ackphyrxsh = txs->ackphyrxsh;
...@@ -5814,7 +5814,7 @@ void brcms_c_print_txstatus(struct tx_status *txs) ...@@ -5814,7 +5814,7 @@ void brcms_c_print_txstatus(struct tx_status *txs)
printk(KERN_DEBUG "RxAckSQ: %04x", printk(KERN_DEBUG "RxAckSQ: %04x",
(ackphyrxsh & PRXS1_SQ_MASK) >> PRXS1_SQ_SHIFT); (ackphyrxsh & PRXS1_SQ_MASK) >> PRXS1_SQ_SHIFT);
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
} }
bool brcms_c_chipmatch(u16 vendor, u16 device) bool brcms_c_chipmatch(u16 vendor, u16 device)
...@@ -5837,7 +5837,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 device) ...@@ -5837,7 +5837,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 device)
return false; return false;
} }
#if defined(BCMDBG) #if defined(DEBUG)
void brcms_c_print_txdesc(struct d11txh *txh) void brcms_c_print_txdesc(struct d11txh *txh)
{ {
u16 mtcl = le16_to_cpu(txh->MacTxControlLow); u16 mtcl = le16_to_cpu(txh->MacTxControlLow);
...@@ -5919,9 +5919,9 @@ void brcms_c_print_txdesc(struct d11txh *txh) ...@@ -5919,9 +5919,9 @@ void brcms_c_print_txdesc(struct d11txh *txh)
(u8 *)&rts, sizeof(txh->rts_frame)); (u8 *)&rts, sizeof(txh->rts_frame));
printk(KERN_DEBUG "\n"); printk(KERN_DEBUG "\n");
} }
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
#if defined(BCMDBG) #if defined(DEBUG)
static int static int
brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf, brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf,
int len) int len)
...@@ -5975,9 +5975,9 @@ brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf, ...@@ -5975,9 +5975,9 @@ brcms_c_format_flags(const struct brcms_c_bit_desc *bd, u32 flags, char *buf,
return (int)(p - buf); return (int)(p - buf);
} }
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
#if defined(BCMDBG) #if defined(DEBUG)
void brcms_c_print_rxh(struct d11rxhdr *rxh) void brcms_c_print_rxh(struct d11rxhdr *rxh)
{ {
u16 len = rxh->RxFrameSize; u16 len = rxh->RxFrameSize;
...@@ -6016,7 +6016,7 @@ void brcms_c_print_rxh(struct d11rxhdr *rxh) ...@@ -6016,7 +6016,7 @@ void brcms_c_print_rxh(struct d11rxhdr *rxh)
(macstatus2 & RXS_AGGTYPE_MASK)); (macstatus2 & RXS_AGGTYPE_MASK));
printk(KERN_DEBUG "RxTSFTime: %04x\n", rxh->RxTSFTime); printk(KERN_DEBUG "RxTSFTime: %04x\n", rxh->RxTSFTime);
} }
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate) u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate)
{ {
...@@ -8346,7 +8346,7 @@ brcms_c_attach(struct brcms_info *wl, struct bcma_device *core, uint unit, ...@@ -8346,7 +8346,7 @@ brcms_c_attach(struct brcms_info *wl, struct bcma_device *core, uint unit,
wlc->wiphy = wl->wiphy; wlc->wiphy = wl->wiphy;
pub = wlc->pub; pub = wlc->pub;
#if defined(BCMDBG) #if defined(DEBUG)
wlc_info_dbg = wlc; wlc_info_dbg = wlc;
#endif #endif
......
...@@ -648,7 +648,7 @@ extern void brcms_c_print_txstatus(struct tx_status *txs); ...@@ -648,7 +648,7 @@ extern void brcms_c_print_txstatus(struct tx_status *txs);
extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo, extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,
uint *blocks); uint *blocks);
#if defined(BCMDBG) #if defined(DEBUG)
extern void brcms_c_print_txdesc(struct d11txh *txh); extern void brcms_c_print_txdesc(struct d11txh *txh);
#else #else
#define brcms_c_print_txdesc(a) #define brcms_c_print_txdesc(a)
......
...@@ -240,7 +240,7 @@ struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, ...@@ -240,7 +240,7 @@ struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp,
} }
EXPORT_SYMBOL(brcmu_pktq_mdeq); EXPORT_SYMBOL(brcmu_pktq_mdeq);
#if defined(BCMDBG) #if defined(DEBUG)
/* pretty hex print a pkt buffer chain */ /* pretty hex print a pkt buffer chain */
void brcmu_prpkt(const char *msg, struct sk_buff *p0) void brcmu_prpkt(const char *msg, struct sk_buff *p0)
{ {
...@@ -253,4 +253,4 @@ void brcmu_prpkt(const char *msg, struct sk_buff *p0) ...@@ -253,4 +253,4 @@ void brcmu_prpkt(const char *msg, struct sk_buff *p0)
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len); print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len);
} }
EXPORT_SYMBOL(brcmu_prpkt); EXPORT_SYMBOL(brcmu_prpkt);
#endif /* defined(BCMDBG) */ #endif /* defined(DEBUG) */
...@@ -176,10 +176,10 @@ struct ipv4_addr; ...@@ -176,10 +176,10 @@ struct ipv4_addr;
/* externs */ /* externs */
/* format/print */ /* format/print */
#ifdef BCMDBG #ifdef DEBUG
extern void brcmu_prpkt(const char *msg, struct sk_buff *p0); extern void brcmu_prpkt(const char *msg, struct sk_buff *p0);
#else #else
#define brcmu_prpkt(a, b) #define brcmu_prpkt(a, b)
#endif /* BCMDBG */ #endif /* DEBUG */
#endif /* _BRCMU_UTILS_H_ */ #endif /* _BRCMU_UTILS_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment