diff options
author | Howard Harte <hharte@broadcom.com> | 2010-05-18 14:23:47 -0700 |
---|---|---|
committer | root <hharte@broadcom.com> | 2010-05-18 14:27:06 -0700 |
commit | 73680bc37befc14743b56cba6e8f838476fc4f9c (patch) | |
tree | c066cd75dc874055fd3a30d4127ecb25774439b9 | |
parent | e10efcc0c020caa486fa9d8cd05c986fd86f7c44 (diff) | |
download | broadcom-73680bc37befc14743b56cba6e8f838476fc4f9c.tar.gz |
Update to 4.218.223.1
Change-Id: Idaefc6257981e6aa0493810f9072a5b6f622d202
-rw-r--r-- | bcm4329/firmware/fw_bcm4329.bin | bin | 246696 -> 246724 bytes | |||
-rw-r--r-- | bcm4329/firmware/fw_bcm4329_apsta.bin | bin | 247584 -> 247620 bytes | |||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd.h | 7 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_linux.c | 19 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_sdio.c | 132 | ||||
-rw-r--r-- | bcm4329/src/include/epivers.h | 10 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.c | 4 |
7 files changed, 161 insertions, 11 deletions
diff --git a/bcm4329/firmware/fw_bcm4329.bin b/bcm4329/firmware/fw_bcm4329.bin Binary files differindex a4403ea..0fd8382 100644 --- a/bcm4329/firmware/fw_bcm4329.bin +++ b/bcm4329/firmware/fw_bcm4329.bin diff --git a/bcm4329/firmware/fw_bcm4329_apsta.bin b/bcm4329/firmware/fw_bcm4329_apsta.bin Binary files differindex 024b4ab..ad4dda1 100644 --- a/bcm4329/firmware/fw_bcm4329_apsta.bin +++ b/bcm4329/firmware/fw_bcm4329_apsta.bin diff --git a/bcm4329/src/dhd/sys/dhd.h b/bcm4329/src/dhd/sys/dhd.h index aeb872c..08e0fb8 100644 --- a/bcm4329/src/dhd/sys/dhd.h +++ b/bcm4329/src/dhd/sys/dhd.h @@ -24,7 +24,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: dhd.h,v 1.32.4.7.2.4.14.35 2010/04/20 05:30:07 Exp $ + * $Id: dhd.h,v 1.32.4.7.2.4.14.35.4.2 2010/05/18 03:54:02 Exp $ */ /**************** @@ -409,6 +409,7 @@ typedef enum cust_gpio_modes { WLAN_POWER_OFF } cust_gpio_modes_t; extern int wl_iw_iscan_set_scan_broadcast_prep(struct net_device *dev, uint flag); +extern int wl_iw_send_priv_event(struct net_device *dev, char *flag); /* * Insmod parameters for debug/test */ @@ -416,6 +417,10 @@ extern int wl_iw_iscan_set_scan_broadcast_prep(struct net_device *dev, uint flag /* Watchdog timer interval */ extern uint dhd_watchdog_ms; +#if defined(DHD_DEBUG) +/* Console output poll interval */ +extern uint dhd_console_ms; +#endif /* Use interrupts */ extern uint dhd_intr; diff --git a/bcm4329/src/dhd/sys/dhd_linux.c b/bcm4329/src/dhd/sys/dhd_linux.c index 25bd316..d8cbbda 100644 --- a/bcm4329/src/dhd/sys/dhd_linux.c +++ b/bcm4329/src/dhd/sys/dhd_linux.c @@ -22,7 +22,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: dhd_linux.c,v 1.65.4.9.2.12.2.79 2010/04/19 22:28:50 Exp $ + * $Id: dhd_linux.c,v 1.65.4.9.2.12.2.79.2.2 2010/05/18 01:39:35 Exp $ */ #ifdef CONFIG_WIFI_CONTROL_FUNC @@ -294,6 +294,11 @@ module_param(dhd_sysioc, uint, 0); uint dhd_watchdog_ms = 10; module_param(dhd_watchdog_ms, uint, 0); +#ifdef DHD_DEBUG +/* Console poll interval */ +uint dhd_console_ms = 0; +module_param(dhd_console_ms, uint, 0); +#endif /* ARP offload agent mode */ uint dhd_arp_mode = 0; @@ -1034,6 +1039,11 @@ dhd_start_xmit(struct sk_buff *skb, struct net_device *net) DHD_ERROR(("%s: xmit rejected pub.up=%d busstate=%d \n", __FUNCTION__, dhd->pub.up, dhd->pub.busstate)); netif_stop_queue(net); + /* Send Event when bus down detected during data session */ + if (dhd->pub.busstate == DHD_BUS_DOWN) { + DHD_ERROR(("%s: Event RELOAD send up\n", __FUNCTION__)); + wl_iw_send_priv_event(net, "RELOAD"); + } return -ENODEV; } @@ -1712,6 +1722,10 @@ dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd) WAKE_UNLOCK(&dhd->pub, WAKE_LOCK_IOCTL); WAKE_LOCK_DESTROY(&dhd->pub, WAKE_LOCK_IOCTL); + if (bcmerror == -ETIMEDOUT) { + DHD_ERROR(("%s: Event RELOAD send up\n", __FUNCTION__)); + wl_iw_send_priv_event(net, "RELOAD"); + } done: if (!bcmerror && buf && ioc.buf) { if (copy_to_user(ioc.buf, buf, buflen)) @@ -2534,6 +2548,9 @@ dhd_os_wd_timer(void *bus, uint wdtick) static uint save_dhd_watchdog_ms = 0; dhd_info_t *dhd = (dhd_info_t *)pub->info; + /* don't start the wd until fw is loaded */ + if (pub->busstate == DHD_BUS_DOWN) + return; /* Totally stop the timer */ if (!wdtick && dhd->wd_timer_valid == TRUE) { del_timer(&dhd->timer); diff --git a/bcm4329/src/dhd/sys/dhd_sdio.c b/bcm4329/src/dhd/sys/dhd_sdio.c index 6ad2c17..aa938de 100644 --- a/bcm4329/src/dhd/sys/dhd_sdio.c +++ b/bcm4329/src/dhd/sys/dhd_sdio.c @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: dhd_sdio.c,v 1.157.2.27.2.33.2.109 2010/04/22 05:52:46 Exp $ + * $Id: dhd_sdio.c,v 1.157.2.27.2.33.2.109.2.2 2010/05/18 01:13:11 Exp $ */ #include <typedefs.h> @@ -40,7 +40,10 @@ #include <siutils.h> #include <hndpmu.h> #include <hndsoc.h> +#ifdef DHD_DEBUG #include <hndrte_armtrap.h> +#include <hndrte_cons.h> +#endif /* DHD_DEBUG */ #include <sbchipc.h> #include <sbhnddma.h> @@ -146,6 +149,17 @@ DHD_SPINWAIT_SLEEP_INIT(sdioh_spinwait_sleep); extern int dhdcdc_set_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len); +#ifdef DHD_DEBUG +/* Device console log buffer state */ +typedef struct dhd_console { + uint count; /* Poll interval msec counter */ + uint log_addr; /* Log struct address (fixed) */ + hndrte_log_t log; /* Log struct (host copy) */ + uint bufsize; /* Size of log buffer */ + uint8 *buf; /* Log buffer (host copy) */ + uint last; /* Last buffer read index */ +} dhd_console_t; +#endif /* DHD_DEBUG */ /* Private data for SDIO bus interaction */ typedef struct dhd_bus { @@ -213,6 +227,10 @@ typedef struct dhd_bus { uint polltick; /* Tick counter */ uint pollcnt; /* Count of active polls */ +#ifdef DHD_DEBUG + dhd_console_t console; /* Console output polling support */ + uint console_addr; /* Console address from shared struct */ +#endif /* DHD_DEBUG */ uint regfails; /* Count of R_REG/W_REG failures */ @@ -409,7 +427,10 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, void *pkt, uint seq); static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start); #endif +#ifdef DHD_DEBUG static int dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size); +static int dhdsdio_mem_dump(dhd_bus_t *bus); +#endif /* DHD_DEBUG */ static int dhdsdio_download_state(dhd_bus_t *bus, bool enter); static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh); @@ -1339,17 +1360,21 @@ dhd_bus_rxctl(struct dhd_bus *bus, uchar *msg, uint msglen) __FUNCTION__, rxlen, msglen)); } else if (timeleft == 0) { DHD_ERROR(("%s: resumed on timeout\n", __FUNCTION__)); +#ifdef DHD_DEBUG dhd_os_sdlock(bus->dhd); dhdsdio_checkdied(bus, NULL, 0); dhd_os_sdunlock(bus->dhd); +#endif /* DHD_DEBUG */ } else if (pending == TRUE) { DHD_CTL(("%s: cancelled\n", __FUNCTION__)); return -ERESTARTSYS; } else { DHD_CTL(("%s: resumed for unknown reason?\n", __FUNCTION__)); +#ifdef DHD_DEBUG dhd_os_sdlock(bus->dhd); dhdsdio_checkdied(bus, NULL, 0); dhd_os_sdunlock(bus->dhd); +#endif /* DHD_DEBUG */ } if (rxlen) @@ -1369,7 +1394,9 @@ enum { IOV_SDCIS, IOV_MEMBYTES, IOV_MEMSIZE, +#ifdef DHD_DEBUG IOV_CHECKDIED, +#endif IOV_DOWNLOAD, IOV_FORCEEVEN, IOV_SDIOD_DRIVE, @@ -1420,7 +1447,9 @@ const bcm_iovar_t dhdsdio_iovars[] = { {"rxbound", IOV_RXBOUND, 0, IOVT_UINT32, 0 }, {"txminmax", IOV_TXMINMAX, 0, IOVT_UINT32, 0 }, {"cpu", IOV_CPU, 0, IOVT_BOOL, 0 }, +#ifdef DHD_DEBUG {"checkdied", IOV_CHECKDIED, 0, IOVT_BUFFER, 0 }, +#endif /* DHD_DEBUG */ #endif /* DHD_DEBUG */ #ifdef SDTEST {"extloop", IOV_EXTLOOP, 0, IOVT_BOOL, 0 }, @@ -1650,6 +1679,7 @@ xfer_done: return bcmerror; } +#ifdef DHD_DEBUG static int dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh) { @@ -1697,6 +1727,78 @@ dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh) return BCME_OK; } +#define CONSOLE_LINE_MAX 192 + +static int +dhdsdio_readconsole(dhd_bus_t *bus) +{ + dhd_console_t *c = &bus->console; + uint8 line[CONSOLE_LINE_MAX], ch; + uint32 n, idx, addr; + int rv; + + /* Don't do anything until FWREADY updates console address */ + if (bus->console_addr == 0) + return 0; + + /* Read console log struct */ + addr = bus->console_addr + OFFSETOF(hndrte_cons_t, log); + if ((rv = dhdsdio_membytes(bus, FALSE, addr, (uint8 *)&c->log, sizeof(c->log))) < 0) + return rv; + + /* Allocate console buffer (one time only) */ + if (c->buf == NULL) { + c->bufsize = ltoh32(c->log.buf_size); + if ((c->buf = MALLOC(bus->dhd->osh, c->bufsize)) == NULL) + return BCME_NOMEM; + } + + idx = ltoh32(c->log.idx); + + /* Protect against corrupt value */ + if (idx > c->bufsize) + return BCME_ERROR; + + /* Skip reading the console buffer if the index pointer has not moved */ + if (idx == c->last) + return BCME_OK; + + /* Read the console buffer */ + addr = ltoh32(c->log.buf); + if ((rv = dhdsdio_membytes(bus, FALSE, addr, c->buf, c->bufsize)) < 0) + return rv; + + while (c->last != idx) { + for (n = 0; n < CONSOLE_LINE_MAX - 2; n++) { + if (c->last == idx) { + /* This would output a partial line. Instead, back up + * the buffer pointer and output this line next time around. + */ + if (c->last >= n) + c->last -= n; + else + c->last = c->bufsize - n; + goto break2; + } + ch = c->buf[c->last]; + c->last = (c->last + 1) % c->bufsize; + if (ch == '\n') + break; + line[n] = ch; + } + + if (n > 0) { + if (line[n - 1] == '\r') + n--; + line[n] = 0; + printf("CONSOLE: %s\n", line); + } + } +break2: + + return BCME_OK; +} + static int dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size) { @@ -1789,7 +1891,7 @@ dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size) goto done; bcm_bprintf(&strbuf, - "Dongle trap type 0x%x @ epc 0x%x, cpsr 0x%x, spsr 0x%x, sp 0x%x," + "Dongle trap type 0x%x @ pc 0x%x, cpsr 0x%x, spsr 0x%x, sp 0x%x," "lp 0x%x, rpc 0x%x Trap offset 0x%x, " "r0 0x%x, r1 0x%x, r2 0x%x, r3 0x%x, r4 0x%x, r5 0x%x, r6 0x%x, r7 0x%x\n", tr.type, tr.epc, tr.cpsr, tr.spsr, tr.r13, tr.r14, tr.pc, @@ -1802,6 +1904,11 @@ dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size) DHD_ERROR(("%s: %s\n", __FUNCTION__, strbuf.origbuf)); } + if (sdpcm_shared.flags & SDPCM_SHARED_TRAP) { + /* Mem dump to a file on device */ + dhdsdio_mem_dump(bus); + } + done: if (mbuffer) MFREE(bus->dhd->osh, mbuffer, msize); @@ -1811,6 +1918,14 @@ done: return bcmerror; } +static int +dhdsdio_mem_dump(dhd_bus_t *bus) +{ + int ret = 0; + return ret; +} +#endif + int dhdsdio_downloadvars(dhd_bus_t *bus, void *arg, int len) { @@ -4492,6 +4607,19 @@ dhd_bus_watchdog(dhd_pub_t *dhdp) bus->lastintrs = bus->intrcount; } +#ifdef DHD_DEBUG + /* Poll for console output periodically */ + if (dhdp->busstate == DHD_BUS_DATA && dhd_console_ms != 0) { + bus->console.count += dhd_watchdog_ms; + if (bus->console.count >= dhd_console_ms) { + bus->console.count -= dhd_console_ms; + /* Make sure backplane clock is on */ + dhdsdio_clkctl(bus, CLK_AVAIL, FALSE); + if (dhdsdio_readconsole(bus) < 0) + dhd_console_ms = 0; /* On error, stop trying */ + } + } +#endif /* DHD_DEBUG */ #ifdef SDTEST /* Generate packets if configured */ diff --git a/bcm4329/src/include/epivers.h b/bcm4329/src/include/epivers.h index 3ab7ad7..a76ea3f 100644 --- a/bcm4329/src/include/epivers.h +++ b/bcm4329/src/include/epivers.h @@ -33,16 +33,16 @@ #define EPI_RC_NUMBER 223 -#define EPI_INCREMENTAL_NUMBER 0 +#define EPI_INCREMENTAL_NUMBER 1 #define EPI_BUILD_NUMBER 0 -#define EPI_VERSION 4, 218, 223, 0 +#define EPI_VERSION 4, 218, 223, 1 -#define EPI_VERSION_NUM 0x04dadf00 +#define EPI_VERSION_NUM 0x04dadf01 -#define EPI_VERSION_STR "4.218.223.0" -#define EPI_ROUTER_VERSION_STR "4.219.223.0" +#define EPI_VERSION_STR "4.218.223.1" +#define EPI_ROUTER_VERSION_STR "4.219.223.1" #endif diff --git a/bcm4329/src/wl/sys/wl_iw.c b/bcm4329/src/wl/sys/wl_iw.c index 018c2b1..ad138bf 100644 --- a/bcm4329/src/wl/sys/wl_iw.c +++ b/bcm4329/src/wl/sys/wl_iw.c @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: wl_iw.c,v 1.51.4.9.2.6.4.104 2010/04/21 23:21:00 Exp $ + * $Id: wl_iw.c,v 1.51.4.9.2.6.4.104.2.1 2010/05/18 00:12:00 Exp $ */ @@ -868,7 +868,7 @@ wl_iw_get_rssi( return error; } -static int +int wl_iw_send_priv_event( struct net_device *dev, char *flag |