Skip to content

Commit

Permalink
staging: brcm80211: replace DHD_DEBUG macro with BCMDBG
Browse files Browse the repository at this point in the history
The common Makefile for both brcm80211 drivers defines the macro
BCMDBG upon select Kconfig item BRCMDBG. The fullmac source add
another macro DHD_DEBUG with the same meaning. This is removed
and all conditional code now checks for BCMDBG definition.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent ca9c786 commit 762c2a3
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 89 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ccflags-y := \
-DBRCMF_SDALIGN=64 \
-DMAX_HDR_READ=64

ccflags-$(CONFIG_BRCMDBG) += -DDHD_DEBUG -DSHOW_EVENTS
ccflags-$(CONFIG_BRCMDBG) += -DSHOW_EVENTS

ccflags-y += \
-Idrivers/staging/brcm80211/brcmfmac \
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/bcmsdbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ brcmf_sdioh_interrupt_query(struct sdioh_info *si, bool *onoff);
extern int
brcmf_sdioh_interrupt_set(struct sdioh_info *si, bool enable_disable);

#if defined(DHD_DEBUG)
#if defined(BCMDBG)
extern bool brcmf_sdioh_interrupt_pending(struct sdioh_info *si);
#endif

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int brcmf_sdcard_intr_dereg(void *sdh)
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
}

#if defined(DHD_DEBUG)
#if defined(BCMDBG)
bool brcmf_sdcard_intr_pending(void *sdh)
{
struct brcmf_sdio *bcmsdh = (struct brcmf_sdio *) sdh;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ brcmf_sdioh_interrupt_query(struct sdioh_info *sd, bool *onoff)
return SDIOH_API_RC_SUCCESS;
}

#if defined(DHD_DEBUG)
#if defined(BCMDBG)
extern bool brcmf_sdioh_interrupt_pending(struct sdioh_info *sd)
{
return 0;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,10 @@ extern atomic_t brcmf_mmc_suspend;
/* Watchdog timer interval */
extern uint brcmf_watchdog_ms;

#if defined(DHD_DEBUG)
#if defined(BCMDBG)
/* Console output poll interval */
extern uint brcmf_console_ms;
#endif /* defined(DHD_DEBUG) */
#endif /* defined(BCMDBG) */

/* Use interrupts */
extern uint brcmf_intr;
Expand Down Expand Up @@ -933,9 +933,9 @@ extern int brcmf_custom_get_mac_address(unsigned char *buf);
extern void brcmf_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
extern void brcmf_os_sdlock_eventq(dhd_pub_t *pub);
extern void brcmf_os_sdunlock_eventq(dhd_pub_t *pub);
#ifdef DHD_DEBUG
#ifdef BCMDBG
extern int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
#endif /* DHD_DEBUG */
#endif /* BCMDBG */
#if defined(OOB_INTR_ONLY)
extern int brcmf_customer_oob_irq_map(unsigned long *irq_flags_ptr);
#endif /* defined(OOB_INTR_ONLY) */
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ brcmf_sdbrcm_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
/* Watchdog timer function */
extern bool brcmf_sdbrcm_bus_watchdog(dhd_pub_t *dhd);

#ifdef DHD_DEBUG
#ifdef BCMDBG
/* Device console input function */
extern int
brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
#endif /* DHD_DEBUG */
#endif /* BCMDBG */

/* Deferred processing for the bus, return true requests reschedule */
extern bool dhd_bus_dpc(struct dhd_bus *bus);
Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ char brcmf_nv_path[MOD_PARAM_PATHLEN];
#define EPI_VERSION_STR "4.218.248.5"
#define MSGTRACE_VERSION 1

#ifdef DHD_DEBUG
#ifdef BCMDBG
const char brcmf_version[] =
"Dongle Host Driver, version " EPI_VERSION_STR "\nCompiled on " __DATE__
" at " __TIME__;
Expand All @@ -55,7 +55,7 @@ enum {
IOV_BCMERROR,
IOV_WDTICK,
IOV_DUMP,
#ifdef DHD_DEBUG
#ifdef BCMDBG
IOV_CONS,
IOV_DCONSOLE_POLL,
#endif
Expand All @@ -71,10 +71,10 @@ enum {
const struct brcmu_iovar brcmf_iovars[] = {
{"version", IOV_VERSION, 0, IOVT_BUFFER, sizeof(brcmf_version)}
,
#ifdef DHD_DEBUG
#ifdef BCMDBG
{"msglevel", IOV_MSGLEVEL, 0, IOVT_UINT32, 0}
,
#endif /* DHD_DEBUG */
#endif /* BCMDBG */
{"bcmerrorstr", IOV_BCMERRORSTR, 0, IOVT_BUFFER, BCME_STRLEN}
,
{"bcmerror", IOV_BCMERROR, 0, IOVT_INT8, 0}
Expand All @@ -83,7 +83,7 @@ const struct brcmu_iovar brcmf_iovars[] = {
,
{"dump", IOV_DUMP, 0, IOVT_BUFFER, DHD_IOCTL_MAXLEN}
,
#ifdef DHD_DEBUG
#ifdef BCMDBG
{"dconpoll", IOV_DCONSOLE_POLL, 0, IOVT_UINT32, 0}
,
{"cons", IOV_CONS, 0, IOVT_BUFFER, 0}
Expand Down Expand Up @@ -255,7 +255,7 @@ brcmf_c_doiovar(dhd_pub_t *dhd_pub, const struct brcmu_iovar *vi, u32 actionid,
bcmerror = brcmf_c_dump(dhd_pub, arg, len);
break;

#ifdef DHD_DEBUG
#ifdef BCMDBG
case IOV_GVAL(IOV_DCONSOLE_POLL):
int_val = (s32) brcmf_console_ms;
memcpy(arg, &int_val, val_size);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/brcm80211/brcmfmac/dhd_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef _dhd_dbg_
#define _dhd_dbg_

#if defined(DHD_DEBUG)
#if defined(BCMDBG)

#define DHD_ERROR(args) \
do {if ((brcmf_msg_level & DHD_ERROR_VAL) && (net_ratelimit())) \
Expand Down Expand Up @@ -61,7 +61,7 @@
#define DHD_BTA_ON() (brcmf_msg_level & DHD_BTA_VAL)
#define DHD_ISCAN_ON() (brcmf_msg_level & DHD_ISCAN_VAL)

#else /* (defined BCMDBG) || (defined DHD_DEBUG) */
#else /* (defined BCMDBG) || (defined BCMDBG) */

#define DHD_ERROR(args) do {if (net_ratelimit()) printk args; } while (0)
#define DHD_TRACE(args)
Expand Down Expand Up @@ -90,7 +90,7 @@
#define DHD_EVENT_ON() 0
#define DHD_BTA_ON() 0
#define DHD_ISCAN_ON() 0
#endif /* defined(DHD_DEBUG) */
#endif /* defined(BCMDBG) */

#define DHD_LOG(args)

Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ module_param(brcmf_sysioc, uint, 0);
uint brcmf_watchdog_ms = 10;
module_param(brcmf_watchdog_ms, uint, 0);

#ifdef DHD_DEBUG
#ifdef BCMDBG
/* Console poll interval */
uint brcmf_console_ms;
module_param(brcmf_console_ms, uint, 0);
#endif /* DHD_DEBUG */
#endif /* BCMDBG */

/* ARP offload agent mode : Enable ARP Host Auto-Reply
and ARP Peer Auto-Reply */
Expand Down Expand Up @@ -357,7 +357,7 @@ module_param(brcmf_pktgen_len, uint, 0);
#endif

/* Version string to report */
#ifdef DHD_DEBUG
#ifdef BCMDBG
#define DHD_COMPILED "\nCompiled in " SRCBASE
#else
#define DHD_COMPILED
Expand Down Expand Up @@ -2632,7 +2632,7 @@ void brcmf_netdev_os_wd_timer(struct net_device *ndev, uint wdtick)
brcmf_os_wd_timer(&dhd->pub, wdtick);
}

#ifdef DHD_DEBUG
#ifdef BCMDBG
int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size)
{
int ret = 0;
Expand Down Expand Up @@ -2666,7 +2666,7 @@ int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size)

return ret;
}
#endif /* DHD_DEBUG */
#endif /* BCMDBG */

#if defined(BCMDBG)
void osl_assert(char *exp, char *file, int line)
Expand Down
Loading

0 comments on commit 762c2a3

Please sign in to comment.