diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-09-17 16:01:41 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2010-09-17 16:01:41 -0700 |
commit | c5a3286e8dd68f07873f41003544372c1841d227 (patch) | |
tree | 97c5edd98a4b372fd466fc610d9f26a9acdd26a9 /bcm4329 | |
parent | 68a277239f7c0154f020c02b2765b4cdd272439f (diff) | |
download | hardware_broadcom_wlan-c5a3286e8dd68f07873f41003544372c1841d227.zip hardware_broadcom_wlan-c5a3286e8dd68f07873f41003544372c1841d227.tar.gz hardware_broadcom_wlan-c5a3286e8dd68f07873f41003544372c1841d227.tar.bz2 |
bcm4329: Update to version 4.218.248.6
Change-Id: Ic344cb96822b85a313eed98a286544a95d6953f0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'bcm4329')
-rw-r--r-- | bcm4329/src/bcmsdio/linux/Makefile | 2 | ||||
-rw-r--r-- | bcm4329/src/bcmsdio/sys/bcmsdh_linux.c | 12 | ||||
-rw-r--r-- | bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c | 8 | ||||
-rw-r--r-- | bcm4329/src/dhd/linux/Makefile | 5 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_common.c | 50 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_custom_gpio.c | 4 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_linux.c | 35 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_sdio.c | 10 | ||||
-rw-r--r-- | bcm4329/src/include/epivers.h | 10 | ||||
-rw-r--r-- | bcm4329/src/include/epivers.h.in | 48 | ||||
-rw-r--r-- | bcm4329/src/include/epivers.sh | 121 | ||||
-rw-r--r-- | bcm4329/src/shared/linux_osl.c | 4 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.c | 120 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.h | 12 |
14 files changed, 194 insertions, 247 deletions
diff --git a/bcm4329/src/bcmsdio/linux/Makefile b/bcm4329/src/bcmsdio/linux/Makefile index 0b507ff..41ed016 100644 --- a/bcm4329/src/bcmsdio/linux/Makefile +++ b/bcm4329/src/bcmsdio/linux/Makefile @@ -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: Makefile,v 1.5.8.4.6.2 2010/04/09 23:54:38 Exp $ +# $Id: Makefile,v 1.5.8.4.6.1 2009/01/26 20:28:33 Exp $ # # Try a couple of places for LINUXDIR if not specified diff --git a/bcm4329/src/bcmsdio/sys/bcmsdh_linux.c b/bcm4329/src/bcmsdio/sys/bcmsdh_linux.c index 644d6be..559f481 100644 --- a/bcm4329/src/bcmsdio/sys/bcmsdh_linux.c +++ b/bcm4329/src/bcmsdio/sys/bcmsdh_linux.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: bcmsdh_linux.c,v 1.42.10.10.2.14 2010/08/17 16:34:23 Exp $ + * $Id: bcmsdh_linux.c,v 1.42.10.10.2.14.4.2 2010/09/15 00:30:11 Exp $ */ /** @@ -180,7 +180,7 @@ int bcmsdh_probe(struct device *dev) #endif /* BCMLXSDMMC */ int irq = 0; uint32 vendevid; - unsigned long irq_flags = IRQF_TRIGGER_FALLING; + unsigned long irq_flags = 0; #if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS) pdev = to_platform_device(dev); @@ -191,6 +191,12 @@ int bcmsdh_probe(struct device *dev) #endif /* BCMLXSDMMC */ #if defined(OOB_INTR_ONLY) +#ifdef HW_OOB + irq_flags = \ + IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE; +#else + irq_flags = IRQF_TRIGGER_FALLING; +#endif /* HW_OOB */ irq = dhd_customer_oob_irq_map(&irq_flags); if (irq < 0) { SDLX_MSG(("%s: Host irq is not defined\n", __FUNCTION__)); @@ -621,6 +627,8 @@ int bcmsdh_register_oob_intr(void * dhdp) dev_set_drvdata(sdhcinfo->dev, dhdp); if (!sdhcinfo->oob_irq_registered) { + SDLX_MSG(("%s IRQ=%d Type=%X \n", __FUNCTION__, \ + (int)sdhcinfo->oob_irq, (int)sdhcinfo->oob_flags)); /* Refer to customer Host IRQ docs about proper irqflags definition */ error = request_irq(sdhcinfo->oob_irq, wlan_oob_irq, sdhcinfo->oob_flags, "bcmsdh_sdmmc", NULL); diff --git a/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c b/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c index 5a3ca3d..bda9193 100644 --- a/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c +++ b/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.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: bcmsdh_sdmmc.c,v 1.1.2.5.6.29 2010/03/19 17:16:08 Exp $ + * $Id: bcmsdh_sdmmc.c,v 1.1.2.5.6.30.4.1 2010/09/02 23:12:21 Exp $ */ #include <typedefs.h> @@ -55,7 +55,7 @@ extern void sdio_function_cleanup(void); #if !defined(OOB_INTR_ONLY) static void IRQHandler(struct sdio_func *func); static void IRQHandlerF2(struct sdio_func *func); -#endif +#endif /* !defined(OOB_INTR_ONLY) */ static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr); extern int sdio_reset_comm(struct mmc_card *card); @@ -1066,11 +1066,13 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, u return (Status); } +/* this function performs "abort" for both of host & device */ extern int sdioh_abort(sdioh_info_t *sd, uint func) { +#if defined(MMC_SDIO_ABORT) char t_func = (char) func; - +#endif /* defined(MMC_SDIO_ABORT) */ sd_trace(("%s: Enter\n", __FUNCTION__)); #if defined(MMC_SDIO_ABORT) diff --git a/bcm4329/src/dhd/linux/Makefile b/bcm4329/src/dhd/linux/Makefile index 7ce3fed..4d5a957 100644 --- a/bcm4329/src/dhd/linux/Makefile +++ b/bcm4329/src/dhd/linux/Makefile @@ -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: Makefile,v 1.55.2.6.2.10.6.40 2010/04/29 23:29:33 Exp $ +# $Id: Makefile,v 1.55.2.6.2.10.6.42 2010/08/20 00:15:16 Exp $ # # Try a couple of places for LINUXDIR if not specified @@ -229,7 +229,7 @@ CFILES += sha1.c md5.c endif ifneq ($(findstring -nexus-,-$(TARGET)-),) DFLAGS += -DOEM_ANDROID -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT -DFLAGS += -DOEM_ANDROID +DFLAGS += -Dlinux DFLAGS += -DBCMDBG DFLAGS += -DDHD_USE_STATIC_BUF DFLAGS += -DCUSTOMER_HW2 @@ -237,6 +237,7 @@ DFLAGS += -DCUSTOM_OOB_GPIO_NUM=152 DFLAGS += -DOOB_INTR_ONLY DFLAGS += -DMMC_SDIO_ABORT DFLAGS += -DSOFTAP +DFLAGS += -DPNO_SUPPORT else ifneq ($(findstring -oob-,-$(TARGET)-),) DFLAGS += -DOOB_INTR_ONLY diff --git a/bcm4329/src/dhd/sys/dhd_common.c b/bcm4329/src/dhd/sys/dhd_common.c index e3e8dcc..bea33b6 100644 --- a/bcm4329/src/dhd/sys/dhd_common.c +++ b/bcm4329/src/dhd/sys/dhd_common.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_common.c,v 1.5.6.8.2.6.6.69 2010/08/20 00:39:21 Exp $ + * $Id: dhd_common.c,v 1.5.6.8.2.6.6.69.4.3 2010/09/10 21:30:16 Exp $ */ #include <typedefs.h> #include <osl.h> @@ -1312,6 +1312,52 @@ dhd_preinit_ioctls(dhd_pub_t *dhd) bcm_mkiovar("roam_off", (char *)&dhd_roam, 4, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); + if (dhd_roam == 0) + { + /* set internal roaming roaming parameters */ + int roam_scan_period = 30; /* in sec */ + int roam_fullscan_period = 120; /* in sec */ + int roam_trigger = -85; + int roam_delta = 15; + int band; + int band_temp_set = WLC_BAND_2G; + + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_ROAM_SCAN_PERIOD, \ + (char *)&roam_scan_period, sizeof(roam_scan_period)) < 0) + DHD_ERROR(("%s: roam scan setup failed\n", __FUNCTION__)); + + bcm_mkiovar("fullroamperiod", (char *)&roam_fullscan_period, \ + 4, iovbuf, sizeof(iovbuf)); + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, \ + iovbuf, sizeof(iovbuf)) < 0) + DHD_ERROR(("%s: roam fullscan setup failed\n", __FUNCTION__)); + + if (dhdcdc_query_ioctl(dhd, 0, WLC_GET_BAND, \ + (char *)&band, sizeof(band)) < 0) + DHD_ERROR(("%s: roam delta setting failed\n", __FUNCTION__)); + else { + if ((band == WLC_BAND_AUTO) || (band == WLC_BAND_ALL)) + { + /* temp set band to insert new roams values */ + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_BAND, \ + (char *)&band_temp_set, sizeof(band_temp_set)) < 0) + DHD_ERROR(("%s: local band seting failed\n", __FUNCTION__)); + } + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_ROAM_DELTA, \ + (char *)&roam_delta, sizeof(roam_delta)) < 0) + DHD_ERROR(("%s: roam delta setting failed\n", __FUNCTION__)); + + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_ROAM_TRIGGER, \ + (char *)&roam_trigger, sizeof(roam_trigger)) < 0) + DHD_ERROR(("%s: roam trigger setting failed\n", __FUNCTION__)); + + /* Restore original band settinngs */ + if (dhdcdc_set_ioctl(dhd, 0, WLC_SET_BAND, \ + (char *)&band, sizeof(band)) < 0) + DHD_ERROR(("%s: Original band restore failed\n", __FUNCTION__)); + } + } + /* Force STA UP */ if (dhd_radio_up) dhdcdc_set_ioctl(dhd, 0, WLC_UP, (char *)&up, sizeof(up)); @@ -1790,7 +1836,7 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled) /* Function to execute combined scan */ int -dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, uchar scan_fr) +dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, ushort scan_fr) { int err = -1; char iovbuf[128]; diff --git a/bcm4329/src/dhd/sys/dhd_custom_gpio.c b/bcm4329/src/dhd/sys/dhd_custom_gpio.c index dc53233..8c6ec47 100644 --- a/bcm4329/src/dhd/sys/dhd_custom_gpio.c +++ b/bcm4329/src/dhd/sys/dhd_custom_gpio.c @@ -20,7 +20,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_custom_gpio.c,v 1.1.4.7 2010/06/03 21:27:48 Exp $ +* $Id: dhd_custom_gpio.c,v 1.1.4.8.4.1 2010/09/02 23:13:16 Exp $ */ @@ -78,7 +78,7 @@ int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr) dhd_oob_gpio_num = CUSTOM_OOB_GPIO_NUM; } #endif - *irq_flags_ptr = IRQF_TRIGGER_FALLING; + if (dhd_oob_gpio_num < 0) { WL_ERROR(("%s: ERROR customer specific Host GPIO is NOT defined \n", __FUNCTION__)); diff --git a/bcm4329/src/dhd/sys/dhd_linux.c b/bcm4329/src/dhd/sys/dhd_linux.c index eb00dbd..2eff469 100644 --- a/bcm4329/src/dhd/sys/dhd_linux.c +++ b/bcm4329/src/dhd/sys/dhd_linux.c @@ -359,7 +359,7 @@ module_param(dhd_dpc_prio, int, 0); extern int dhd_dongle_memsize; module_param(dhd_dongle_memsize, int, 0); -/* Contorl fw roaming */ +/* Control fw roaming */ #ifdef CUSTOMER_HW2 uint dhd_roam = 0; #else @@ -556,7 +556,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) 4, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); #ifdef CUSTOMER_HW2 - /* Disable build-in roaming to allowed ext supplicant to take of romaing */ + /* Disable build-in roaming to allowed ext supplicant to take of roaming */ bcm_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); #endif /* CUSTOMER_HW2 */ @@ -578,7 +578,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd) dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); #ifdef CUSTOMER_HW2 - roamvar = 0; + roamvar = dhd_roam; bcm_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); #endif /* CUSTOMER_HW2 */ @@ -1387,11 +1387,6 @@ dhd_watchdog_thread(void *data) } /* Count the tick for reference */ dhd->pub.tickcnt++; - - /* Reschedule the watchdog */ - if (dhd->wd_timer_valid) { - mod_timer(&dhd->timer, jiffies + dhd_watchdog_ms * HZ / 1000); - } dhd_os_wake_unlock(&dhd->pub); } else @@ -1406,8 +1401,15 @@ dhd_watchdog(ulong data) { dhd_info_t *dhd = (dhd_info_t *)data; + dhd_os_wake_lock(&dhd->pub); if (dhd->watchdog_pid >= 0) { up(&dhd->watchdog_sem); + + /* Reschedule the watchdog */ + if (dhd->wd_timer_valid) { + mod_timer(&dhd->timer, jiffies + dhd_watchdog_ms * HZ / 1000); + } + dhd_os_wake_unlock(&dhd->pub); return; } @@ -1420,6 +1422,7 @@ dhd_watchdog(ulong data) /* Reschedule the watchdog */ if (dhd->wd_timer_valid) mod_timer(&dhd->timer, jiffies + dhd_watchdog_ms * HZ / 1000); + dhd_os_wake_unlock(&dhd->pub); } static int @@ -1873,7 +1876,11 @@ dhd_open(struct net_device *net) ifidx = dhd_net2idx(dhd, net); DHD_TRACE(("%s: ifidx %d\n", __FUNCTION__, ifidx)); - /* ASSERT(ifidx == 0); */ + if ((dhd->iflist[ifidx]) && (dhd->iflist[ifidx]->state == WLC_E_IF_DEL)) { + DHD_ERROR(("%s: Error: called when IF already deleted\n", __FUNCTION__)); + return -1; + } + if (ifidx == 0) { /* do it only for primary eth0 */ @@ -2841,6 +2848,14 @@ dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata, #if defined(CONFIG_WIRELESS_EXT) ASSERT(dhd->iflist[*ifidx] != NULL); + + if (ntoh32(event->event_type) == WLC_E_IF) { + DHD_INFO(("<0> interface:%d OP:%d don't pass to wext," + "net_device might not be created yet\n", + *ifidx, ntoh32(event->event_type))); + return bcmerror; + } + ASSERT(dhd->iflist[*ifidx]->net != NULL); if (dhd->iflist[*ifidx]->net) @@ -2990,7 +3005,7 @@ dhd_dev_pno_enable(struct net_device *dev, int pfn_enabled) /* Linux wrapper to call common dhd_pno_set */ int -dhd_dev_pno_set(struct net_device *dev, wlc_ssid_t* ssids_local, int nssid, uchar scan_fr) +dhd_dev_pno_set(struct net_device *dev, wlc_ssid_t* ssids_local, int nssid, ushort scan_fr) { dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev); diff --git a/bcm4329/src/dhd/sys/dhd_sdio.c b/bcm4329/src/dhd/sys/dhd_sdio.c index 7b54f60..bd73556 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.129 2010/08/19 20:36:22 Exp $ + * $Id: dhd_sdio.c,v 1.157.2.27.2.33.2.129.4.1 2010/09/02 23:13:16 Exp $ */ #include <typedefs.h> @@ -4218,11 +4218,6 @@ dhdsdio_dpc(dhd_bus_t *bus) bus->intstatus = intstatus; clkwait: - -#if defined(OOB_INTR_ONLY) - bcmsdh_oob_intr_set(1); -#endif - /* Re-enable interrupts to detect new device events (mailbox, rx frame) * or clock availability. (Allows tx loop to check ipend if desired.) * (Unless register access seems hosed, as we may not be able to ACK...) @@ -4231,6 +4226,9 @@ clkwait: DHD_INTR(("%s: enable SDIO interrupts, rxdone %d framecnt %d\n", __FUNCTION__, rxdone, framecnt)); bus->intdis = FALSE; +#if defined(OOB_INTR_ONLY) + bcmsdh_oob_intr_set(1); +#endif /* (OOB_INTR_ONLY) */ bcmsdh_intr_enable(sdh); } diff --git a/bcm4329/src/include/epivers.h b/bcm4329/src/include/epivers.h index caceabd..92dc326 100644 --- a/bcm4329/src/include/epivers.h +++ b/bcm4329/src/include/epivers.h @@ -33,16 +33,16 @@ #define EPI_RC_NUMBER 248 -#define EPI_INCREMENTAL_NUMBER 0 +#define EPI_INCREMENTAL_NUMBER 6 #define EPI_BUILD_NUMBER 0 -#define EPI_VERSION 4, 218, 248, 0 +#define EPI_VERSION 4, 218, 248, 6 -#define EPI_VERSION_NUM 0x04daf800 +#define EPI_VERSION_NUM 0x04daf806 -#define EPI_VERSION_STR "4.218.248.0" -#define EPI_ROUTER_VERSION_STR "4.219.248.0" +#define EPI_VERSION_STR "4.218.248.6" +#define EPI_ROUTER_VERSION_STR "4.219.248.6" #endif diff --git a/bcm4329/src/include/epivers.h.in b/bcm4329/src/include/epivers.h.in deleted file mode 100644 index fef9636..0000000 --- a/bcm4329/src/include/epivers.h.in +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 1999-2010, Broadcom Corporation - * - * Unless you and Broadcom execute a separate written software license - * agreement governing use of this software, this software is licensed to you - * under the terms of the GNU General Public License version 2 (the "GPL"), - * available at http://www.broadcom.com/licenses/GPLv2.php, with the - * following added to such license: - * - * As a special exception, the copyright holders of this software give you - * permission to link this software with independent modules, and to copy and - * distribute the resulting executable under terms of your choice, provided that - * you also meet, for each linked independent module, the terms and conditions of - * the license of that module. An independent module is a module which is not - * derived from this software. The special exception does not apply to any - * modifications of the software. - * - * Notwithstanding the above, under no circumstances may you combine this - * 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: epivers.h.in,v 13.25 2005/10/28 18:35:33 Exp $ - * -*/ - - -#ifndef _epivers_h_ -#define _epivers_h_ - -#define EPI_MAJOR_VERSION @EPI_MAJOR_VERSION@ - -#define EPI_MINOR_VERSION @EPI_MINOR_VERSION@ - -#define EPI_RC_NUMBER @EPI_RC_NUMBER@ - -#define EPI_INCREMENTAL_NUMBER @EPI_INCREMENTAL_NUMBER@ - -#define EPI_BUILD_NUMBER @EPI_BUILD_NUMBER@ - -#define EPI_VERSION @EPI_VERSION@ - -#define EPI_VERSION_NUM @EPI_VERSION_NUM@ - - -#define EPI_VERSION_STR "@EPI_VERSION_STR@" -#define EPI_ROUTER_VERSION_STR "@EPI_ROUTER_VERSION_STR@" - -#endif diff --git a/bcm4329/src/include/epivers.sh b/bcm4329/src/include/epivers.sh deleted file mode 100644 index 2d0bdd9..0000000 --- a/bcm4329/src/include/epivers.sh +++ /dev/null @@ -1,121 +0,0 @@ -#! /bin/bash -# -# Create the epivers.h file from epivers.h.in -# -# $Id: epivers.sh,v 13.19 2008/01/04 03:47:32 Exp $ - -# Check for the in file, if not there we're probably in the wrong directory -if [ ! -f epivers.h.in ]; then - echo No epivers.h.in found - exit 1 -fi - -if [ -f epivers.h ]; then - # If the out file already exists, increment its build number - build=`grep EPI_BUILD_NUMBER epivers.h | sed -e "s,.*BUILD_NUMBER[ ]*,,"` - build=`expr ${build} + 1` - echo build=${build} - sed -e "s,.*_BUILD_NUMBER.*,#define EPI_BUILD_NUMBER ${build}," \ - < epivers.h > epivers.h.new - mv epivers.h epivers.h.prev - mv epivers.h.new epivers.h -else - # Otherwise create a new file. - - # CVS will insert the cvs tag name when this file is checked out. - # If this is a tagged build, use the tag to supply the numbers - # Tag should be in the form - # <NAME>_REL_<MAJ>_<MINOR> - # or - # <NAME>_REL_<MAJ>_<MINOR>_RC<RCNUM> - # or - # <NAME>_REL_<MAJ>_<MINOR>_RC<RCNUM>_<INCREMENTAL> - # - - CVSTAG="$Name: ROMTERM_REL_4_218_246 $" - - # Remove leading cvs "Name: " and trailing " $" - CVSTAG=${CVSTAG/#*: /} - CVSTAG=${CVSTAG/% $/} - - # TAG env var is supplied by calling makefile or build process - # - # If the checkout is from a branch tag, cvs checkout or export does - # not replace rcs keywords. In such instances TAG env variable can - # be used (by uncommenting following line). TAG env variable format - # itself needs to be validated for number of fields before being used. - # (e.g: HEAD is not a valid tag, which results in all '0' values below) - # - # TAG=${TAG:-${CVSTAG}} - - TAG=${CVSTAG/HEAD/} - - # Split the tag into an array on underbar or whitespace boundaries. - IFS="_ " tag=(${TAG}) - unset IFS - - tagged=1 - if [ ${#tag[*]} -eq 0 ]; then - tag=(`date '+TOT REL %Y %m %d 0 %y'`); - tagged=0 - fi - - # Allow environment variable to override values. - # Missing values default to 0 - # - maj=${EPI_MAJOR_VERSION:-${tag[2]:-0}} - min=${EPI_MINOR_VERSION:-${tag[3]:-0}} - rcnum=${EPI_RC_NUMBER:-${tag[4]:-0}} - incremental=${EPI_INCREMENTAL_NUMBER:-${tag[5]:-0}} - build=${EPI_BUILD_NUMBER:-0} - - # Strip 'RC' from front of rcnum if present - rcnum=${rcnum/#RC/} - - # strip leading zero off the number (otherwise they look like octal) - maj=${maj/#0/} - min=${min/#0/} - min_router=${min} - rcnum=${rcnum/#0/} - incremental=${incremental/#0/} - build=${build/#0/} - - # some numbers may now be null. replace with with zero. - maj=${maj:-0} - min=${min:-0} - rcnum=${rcnum:-0} - incremental=${incremental:-0} - build=${build:-0} - - if [ ${tagged} -eq 1 ]; then - vernum=`printf "0x%02x%02x%02x%02x" ${maj} ${min} ${rcnum} ${incremental}` - else - vernum=`printf "0x00%02x%02x%02x" ${tag[7]} ${min} ${rcnum}` - fi - - - # PR17029: increment minor number for tagged router builds - # with an even minor revision - if [ ${tagged} -eq 1 -a `expr \( \( ${min} + 1 \) % 2 \)` -eq 1 ]; then - min_router=`expr ${min} + 1` - fi - - - # OK, go do it - - echo "maj=${maj}, min=${min}, rc=${rcnum}, inc=${incremental}, build=${build}" - echo "Router maj=${maj}, min=${min_router}, rc=${rcnum}, inc=${incremental}, build=${build}" - - sed \ - -e "s;@EPI_MAJOR_VERSION@;${maj};" \ - -e "s;@EPI_MINOR_VERSION@;${min};" \ - -e "s;@EPI_RC_NUMBER@;${rcnum};" \ - -e "s;@EPI_INCREMENTAL_NUMBER@;${incremental};" \ - -e "s;@EPI_BUILD_NUMBER@;${build};" \ - -e "s;@EPI_VERSION@;${maj}, ${min}, ${rcnum}, ${incremental};" \ - -e "s;@EPI_VERSION_STR@;${maj}.${min}.${rcnum}.${incremental};" \ - -e "s;@EPI_ROUTER_VERSION_STR@;${maj}.${min_router}.${rcnum}.${incremental};" \ - -e "s;@EPI_VERSION_NUM@;${vernum};" \ - < epivers.h.in > epivers.h - -fi diff --git a/bcm4329/src/shared/linux_osl.c b/bcm4329/src/shared/linux_osl.c index d00bd1c..6383e00 100644 --- a/bcm4329/src/shared/linux_osl.c +++ b/bcm4329/src/shared/linux_osl.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: linux_osl.c,v 1.125.12.3.8.7 2010/05/04 21:10:04 Exp $ + * $Id: linux_osl.c,v 1.125.12.3.8.6 2009/12/09 01:29:03 Exp $ */ @@ -511,7 +511,7 @@ osl_mfree(osl_t *osh, void *addr, uint size) #ifdef DHD_USE_STATIC_BUF if (bcm_static_buf) { - if ((addr > (void *)bcm_static_buf) && ((unsigned char *)addr + if ((addr > (void *)bcm_static_buf) && ((unsigned char *)addr \ <= ((unsigned char *)bcm_static_buf + STATIC_BUF_TOTAL_LEN))) { int buf_idx = 0; diff --git a/bcm4329/src/wl/sys/wl_iw.c b/bcm4329/src/wl/sys/wl_iw.c index c6b2e8a..2cd629c 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.142 2010/08/20 19:12:47 Exp $ + * $Id: wl_iw.c,v 1.51.4.9.2.6.4.142.4.13 2010/09/15 03:34:56 Exp $ */ @@ -161,7 +161,9 @@ static wlc_ssid_t g_specific_ssid; static wlc_ssid_t g_ssid; static wl_iw_ss_cache_ctrl_t g_ss_cache_ctrl; -static volatile uint g_first_broadcast_scan; +static volatile uint g_first_broadcast_scan; +static volatile uint g_first_counter_scans; +#define MAX_ALLOWED_BLOCK_SCAN_FROM_FIRST_SCAN 3 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)) @@ -257,6 +259,8 @@ wl_iw_set_scan( union iwreq_data *wrqu, char *extra ); + +#ifndef CSCAN static int wl_iw_get_scan( struct net_device *dev, @@ -272,7 +276,7 @@ wl_iw_get_scan_prep( char *extra, short max_size ); - +#endif static void swap_key_from_BE( wl_wsec_key_t *key @@ -1169,7 +1173,7 @@ wl_iw_set_pno_set( #ifdef PNO_SET_DEBUG int i; char pno_in_example[] = {'P', 'N', 'O', 'S', 'E', 'T', 'U', 'P', ' ', \ - 'S', 0x01, 0x00, 0x00, + 'S', 0x01, 0x01, 0x00, 'S', 0x04, 'B', 'R', 'C', 'M', @@ -1177,7 +1181,8 @@ wl_iw_set_pno_set( 0x04, 'G', 'O', 'O', 'G', 'T', - 0x0A, + 0x00, + 0x0A }; #endif @@ -1243,7 +1248,7 @@ wl_iw_set_pno_set( if ((res = wl_iw_parse_data_tlv(&str_ptr, \ &pno_time, \ sizeof(pno_time), \ - type, sizeof(char), &tlv_size_left)) == -1) { + type, sizeof(short), &tlv_size_left)) == -1) { WL_ERROR(("%s return %d\n", \ __FUNCTION__, res)); goto exit_proc; @@ -1416,6 +1421,7 @@ wl_iw_control_wl_off( g_scan_specified_ssid = 0; g_first_broadcast_scan = BROADCAST_SCAN_FIRST_IDLE; + g_first_counter_scans = 0; #endif #if defined(BCMLXSDMMC) @@ -2370,6 +2376,7 @@ wl_iw_mlme( } #endif +#ifndef WL_IW_USE_ISCAN static int wl_iw_get_aplist( struct net_device *dev, @@ -2445,6 +2452,7 @@ wl_iw_get_aplist( } return 0; } +#endif #ifdef WL_IW_USE_ISCAN static int @@ -2470,7 +2478,8 @@ wl_iw_iscan_get_aplist( return -EINVAL; if ((!iscan) || (iscan->sysioc_pid < 0)) { - return wl_iw_get_aplist(dev, info, dwrq, extra); + WL_ERROR(("%s error\n", __FUNCTION__)); + return 0; } buf = iscan->list_hdr; @@ -2561,8 +2570,11 @@ wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action) WL_SCAN(("bss_type=%d\n", iscan->iscan_ex_params_p->params.bss_type)); - (void) dev_iw_iovar_setbuf(iscan->dev, "iscan", iscan->iscan_ex_params_p, \ - iscan->iscan_ex_param_size, iscan->ioctlbuf, sizeof(iscan->ioctlbuf)); + if ((err = dev_iw_iovar_setbuf(iscan->dev, "iscan", iscan->iscan_ex_params_p, \ + iscan->iscan_ex_param_size, iscan->ioctlbuf, sizeof(iscan->ioctlbuf)))) { + WL_ERROR(("Set ISCAN for %s failed with %d\n", __FUNCTION__, err)); + err = -1; + } return err; } @@ -3195,9 +3207,7 @@ wl_iw_iscan_set_scan( #endif if ((!iscan) || (iscan->sysioc_pid < 0)) { - WL_TRACE(("%s use backup if iscan thread is not successful\n", \ - __FUNCTION__)); - ret = wl_iw_set_scan(dev, info, wrqu, extra); + WL_ERROR(("%s error\n", __FUNCTION__)); goto set_scan_end; } @@ -3216,14 +3226,6 @@ wl_iw_iscan_set_scan( if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { int as = 0; struct iw_scan_req *req = (struct iw_scan_req *)extra; -#if !defined(CSCAN) - if (g_first_broadcast_scan < BROADCAST_SCAN_FIRST_RESULT_CONSUMED) { - WL_TRACE(("%s First ISCAN in progress : ignoring SC = %s\n", \ - __FUNCTION__, req->essid)); - ret = -EBUSY; - goto set_scan_end; - } -#endif ssid.SSID_len = MIN(sizeof(ssid.SSID), req->essid_len); memcpy(ssid.SSID, req->essid, ssid.SSID_len); ssid.SSID_len = htod32(ssid.SSID_len); @@ -3243,6 +3245,23 @@ wl_iw_iscan_set_scan( } #endif +#if !defined(CSCAN) + if (g_first_broadcast_scan < BROADCAST_SCAN_FIRST_RESULT_CONSUMED) { + if (++g_first_counter_scans == MAX_ALLOWED_BLOCK_SCAN_FROM_FIRST_SCAN) { + + WL_ERROR(("%s Clean up First scan flag which is %d\n", \ + __FUNCTION__, g_first_broadcast_scan)); + g_first_broadcast_scan = BROADCAST_SCAN_FIRST_RESULT_CONSUMED; + } + else { + WL_ERROR(("%s Ignoring Broadcast Scan:First Scan is not done yet %d\n", \ + __FUNCTION__, g_first_counter_scans)); + ret = -EBUSY; + goto set_scan_end; + } + } +#endif + wl_iw_iscan_set_scan_broadcast_prep(dev, 0); set_scan_end: @@ -3399,6 +3418,7 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end, return 0; } +#ifndef CSCAN static uint wl_iw_get_scan_prep( wl_scan_results_t *list, @@ -3555,7 +3575,6 @@ wl_iw_get_scan( } #endif - if (g_scan_specified_ssid) { list = kmalloc(len, GFP_KERNEL); @@ -3569,10 +3588,12 @@ wl_iw_get_scan( memset(list, 0, len); list->buflen = htod32(len); if ((error = dev_wlc_ioctl(dev, WLC_SCAN_RESULTS, list, len))) { - WL_TRACE(("%s: %s : Scan_results ERROR %d\n", dev->name, __FUNCTION__, len)); + WL_ERROR(("%s: %s : Scan_results ERROR %d\n", dev->name, __FUNCTION__, error)); dwrq->length = len; - if (g_scan_specified_ssid) + if (g_scan_specified_ssid) { + g_scan_specified_ssid = 0; kfree(list); + } return 0; } list->buflen = dtoh32(list->buflen); @@ -3671,6 +3692,7 @@ wl_iw_get_scan( WL_TRACE(("%s return to WE %d bytes APs=%d\n", __FUNCTION__, dwrq->length, list->count)); return 0; } +#endif #if defined(WL_IW_USE_ISCAN) static int @@ -3717,8 +3739,8 @@ wl_iw_iscan_get_scan( } if ((!iscan) || (iscan->sysioc_pid < 0)) { - WL_TRACE(("%ssysioc_pid\n", __FUNCTION__)); - return wl_iw_get_scan(dev, info, dwrq, extra); + WL_ERROR(("%ssysioc_pid\n", __FUNCTION__)); + return -EAGAIN; } #if !defined(CSCAN) @@ -3851,9 +3873,6 @@ wl_iw_iscan_get_scan( WL_TRACE(("%s return to WE %d bytes APs=%d\n", __FUNCTION__, dwrq->length, counter)); - if (!dwrq->length) - return -EAGAIN; - return 0; } #endif @@ -5414,7 +5433,7 @@ wl_iw_combined_scan_set(struct net_device *dev, wlc_ssid_t* ssids_local, int nss if ((err = dev_iw_iovar_setbuf(dev, "iscan", iscan->iscan_ex_params_p, \ iscan->iscan_ex_param_size, \ iscan->ioctlbuf, sizeof(iscan->ioctlbuf)))) { - WL_TRACE(("Set ISCAN for %s failed with %d\n", __FUNCTION__, err)); + WL_ERROR(("Set ISCAN for %s failed with %d\n", __FUNCTION__, err)); err = -1; } @@ -5698,9 +5717,18 @@ wl_iw_set_cscan( } if (g_first_broadcast_scan < BROADCAST_SCAN_FIRST_RESULT_CONSUMED) { - WL_ERROR(("%s First ISCAN in progress : ignoring\n", __FUNCTION__)); - res = -EBUSY; - goto exit_proc; + if (++g_first_counter_scans == MAX_ALLOWED_BLOCK_SCAN_FROM_FIRST_SCAN) { + + WL_ERROR(("%s Clean up First scan flag which is %d\n", \ + __FUNCTION__, g_first_broadcast_scan)); + g_first_broadcast_scan = BROADCAST_SCAN_FIRST_RESULT_CONSUMED; + } + else { + WL_ERROR(("%s Ignoring CSCAN : First Scan is not done yet %d\n", \ + __FUNCTION__, g_first_counter_scans)); + res = -EBUSY; + goto exit_proc; + } } res = wl_iw_combined_scan_set(dev, ssids_local, nssid, nchan); @@ -5869,6 +5897,7 @@ static int set_ap_cfg(struct net_device *dev, struct ap_profile *ap) if (ap_cfg_running == FALSE) { #ifndef AP_ONLY + sema_init(&ap_eth_sema, 0); mpc = 0; @@ -7217,6 +7246,8 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data) uint32 datalen = ntoh32(e->datalen); uint32 status = ntoh32(e->status); uint32 toto; + static uint32 roam_no_success = 0; + static bool roam_no_success_send = FALSE; memset(&wrqu, 0, sizeof(wrqu)); memset(extra, 0, sizeof(extra)); @@ -7282,12 +7313,24 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data) break; case WLC_E_ROAM: if (status != WLC_E_STATUS_SUCCESS) { - WL_ERROR(("ROAMING did not succeeded, keep status Quo\n")); - goto wl_iw_event_end; + roam_no_success++; + if ((roam_no_success == 3) && (roam_no_success_send == FALSE)) { + + roam_no_success_send = TRUE; + bzero(wrqu.addr.sa_data, ETHER_ADDR_LEN); + bzero(&extra, ETHER_ADDR_LEN); + cmd = SIOCGIWAP; + WL_ERROR(("%s ROAMING did not succeeded , send Link Down\n", \ + __FUNCTION__)); + } else { + WL_TRACE(("##### ROAMING did not succeeded %d\n", roam_no_success)); + goto wl_iw_event_end; + } + } else { + memcpy(wrqu.addr.sa_data, &e->addr.octet, ETHER_ADDR_LEN); + wrqu.addr.sa_family = ARPHRD_ETHER; + cmd = SIOCGIWAP; } - memcpy(wrqu.addr.sa_data, &e->addr.octet, ETHER_ADDR_LEN); - wrqu.addr.sa_family = ARPHRD_ETHER; - cmd = SIOCGIWAP; break; case WLC_E_DEAUTH_IND: case WLC_E_DISASSOC_IND: @@ -7343,6 +7386,8 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data) wl_iw_send_priv_event(priv_dev, "AP_UP"); } else { WL_TRACE(("STA_LINK_UP\n")); + roam_no_success_send = FALSE; + roam_no_success = 0; } #endif WL_TRACE(("Link UP\n")); @@ -7750,6 +7795,7 @@ int wl_iw_attach(struct net_device *dev, void * dhdp) iscan->dev = dev; iscan->iscan_state = ISCAN_STATE_IDLE; g_first_broadcast_scan = BROADCAST_SCAN_FIRST_IDLE; + g_first_counter_scans = 0; g_iscan->scan_flag = 0; iscan->timer_ms = 8000; diff --git a/bcm4329/src/wl/sys/wl_iw.h b/bcm4329/src/wl/sys/wl_iw.h index 866fbd5..43088cf 100644 --- a/bcm4329/src/wl/sys/wl_iw.h +++ b/bcm4329/src/wl/sys/wl_iw.h @@ -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.h,v 1.5.34.1.6.35 2010/08/20 02:42:33 Exp $ + * $Id: wl_iw.h,v 1.5.34.1.6.36.4.1 2010/09/10 19:24:30 Exp $ */ @@ -47,9 +47,9 @@ #define BAND_SET_CMD "SETBAND" #define DTIM_SKIP_GET_CMD "DTIMSKIPGET" #define DTIM_SKIP_SET_CMD "DTIMSKIPSET" -#define SETSUSPEND_CMD "SETSUSPEND" +#define SETSUSPEND_CMD "SETSUSPENDOPT" #define PNOSSIDCLR_SET_CMD "PNOSSIDCLR" -#define PNOSETUP_SET_CMD "PNOSETUP" +#define PNOSETUP_SET_CMD "PNOSETUP " #define PNOENABLE_SET_CMD "PNOFORCE" #define PNODEBUG_SET_CMD "PNODEBUG" @@ -216,17 +216,17 @@ extern int net_os_send_hang_message(struct net_device *dev); extern int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled); extern int dhd_pno_clean(dhd_pub_t *dhd); -extern int dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, uchar scan_fr); +extern int dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, ushort scan_fr); extern int dhd_pno_get_status(dhd_pub_t *dhd); extern int dhd_dev_pno_reset(struct net_device *dev); extern int dhd_dev_pno_set(struct net_device *dev, wlc_ssid_t* ssids_local, \ - int nssid, uchar scan_fr); + int nssid, ushort scan_fr); extern int dhd_dev_pno_enable(struct net_device *dev, int pfn_enabled); extern int dhd_dev_get_pno_status(struct net_device *dev); #define PNO_TLV_PREFIX 'S' #define PNO_TLV_VERSION 1 -#define PNO_TLV_SUBVERSION 0 +#define PNO_TLV_SUBVERSION 1 #define PNO_TLV_RESERVED 0 #define PNO_TLV_TYPE_SSID_IE 'S' #define PNO_TLV_TYPE_TIME 'T' |