staging: brcm80211: move debug console related code to dhd_sdio.c
Debug console functionality is provided by dhd_sdio.c. So the related
variables and iovars should go there as well.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index aeef2dc..b79e5cd 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -659,6 +659,12 @@
uint brcmf_watchdog_ms = 10;
module_param(brcmf_watchdog_ms, uint, 0);
+#ifdef BCMDBG
+/* Console poll interval */
+uint brcmf_console_ms;
+module_param(brcmf_console_ms, uint, 0);
+#endif /* DHD_DEBUG */
+
/* Tx/Rx bounds */
uint brcmf_txbound;
uint brcmf_rxbound;
@@ -757,6 +763,8 @@
#endif
#ifdef BCMDBG
+static int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
+ uint msglen);
static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size);
static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus);
#endif /* BCMDBG */
@@ -1665,6 +1673,8 @@
IOV_MEMSIZE,
#ifdef BCMDBG
IOV_CHECKDIED,
+ IOV_CONS,
+ IOV_DCONSOLE_POLL,
#endif
IOV_DOWNLOAD,
IOV_FORCEEVEN,
@@ -1710,6 +1720,10 @@
{"devreset", IOV_DEVRESET, 0, IOVT_BOOL, 0},
{"wdtick", IOV_WDTICK, 0, IOVT_UINT32, 0},
#ifdef BCMDBG
+ {"cons", IOV_CONS, 0, IOVT_BUFFER, 0}
+ ,
+ {"dconpoll", IOV_DCONSOLE_POLL, 0, IOVT_UINT32, 0}
+ ,
{"sdreg", IOV_SDREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
,
{"sbreg", IOV_SBREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
@@ -2559,6 +2573,21 @@
#endif /* BCMDBG */
#ifdef BCMDBG
+ case IOV_GVAL(IOV_DCONSOLE_POLL):
+ int_val = (s32) brcmf_console_ms;
+ memcpy(arg, &int_val, val_size);
+ break;
+
+ case IOV_SVAL(IOV_DCONSOLE_POLL):
+ brcmf_console_ms = (uint) int_val;
+ break;
+
+ case IOV_SVAL(IOV_CONS):
+ if (len > 0)
+ bcmerror = brcmf_sdbrcm_bus_console_in(bus->dhd,
+ arg, len - 1);
+ break;
+
case IOV_GVAL(IOV_SDREG):
{
struct brcmf_sdreg *sd_ptr;
@@ -5100,7 +5129,7 @@
}
#ifdef BCMDBG
-extern int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
+static int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
uint msglen)
{
dhd_bus_t *bus = dhdp->bus;