diff options
-rw-r--r-- | bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c | 10 | ||||
-rw-r--r-- | bcm4329/src/dhd/linux/Makefile | 20 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd.h | 17 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_linux.c | 99 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_sdio.c | 5 | ||||
-rw-r--r-- | bcm4329/src/include/epivers.h | 12 | ||||
-rw-r--r-- | bcm4329/src/include/sbchipc.h | 111 | ||||
-rw-r--r-- | bcm4329/src/include/siutils.h | 3 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.c | 73 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.h | 3 |
10 files changed, 139 insertions, 214 deletions
diff --git a/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c b/bcm4329/src/bcmsdio/sys/bcmsdh_sdmmc.c index 075d770..48d3f37 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.28 2009/11/04 20:36:52 Exp $ + * $Id: bcmsdh_sdmmc.c,v 1.1.2.5.6.29 2010/03/19 17:16:08 Exp $ */ #include <typedefs.h> @@ -228,9 +228,8 @@ sdioh_enable_func_intr(void) return SDIOH_API_RC_FAIL; } - reg |= 1 << 1; /* enable function-1 interrupt */ - reg |= 2 << 1; /* enable function-2 interrupt */ - reg |= 1; /* Master interrupt enable */ + /* Enable F1 and F2 interrupts, set master enable */ + reg |= (INTR_CTL_FUNC1_EN | INTR_CTL_FUNC2_EN | INTR_CTL_MASTER_EN); sdio_writeb(gInstance->func[0], reg, SDIOD_CCCR_INTEN, &err); sdio_release_host(gInstance->func[0]); @@ -259,8 +258,7 @@ sdioh_disable_func_intr(void) return SDIOH_API_RC_FAIL; } - reg &= ~(1 << 1); - reg &= ~(1 << 2); + reg &= ~(INTR_CTL_FUNC1_EN | INTR_CTL_FUNC2_EN); /* Disable master interrupt with the last function interrupt */ if (!(reg & 0xFE)) reg = 0; diff --git a/bcm4329/src/dhd/linux/Makefile b/bcm4329/src/dhd/linux/Makefile index 19d81d2..768dd51 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.27 2010/02/24 02:54:05 Exp $ +# $Id: Makefile,v 1.55.2.6.2.10.6.28 2010/03/26 21:49:31 Exp $ # # Try a couple of places for LINUXDIR if not specified @@ -160,10 +160,16 @@ ifeq ($(WLTEST),1) endif ifeq ($(CONFIG_NET_RADIO),y) -CFILES += wl_iw.c bcmwifi.c +CFILES += bcmwifi.c + ifeq ($(findstring -cfg-,-$(TARGET)-),) + CFILES += wl_iw.c + endif else ifeq ($(CONFIG_WIRELESS_EXT),y) - CFILES += wl_iw.c bcmwifi.c + CFILES += bcmwifi.c + ifeq ($(findstring -cfg-,-$(TARGET)-),) + CFILES += wl_iw.c + endif endif endif @@ -215,6 +221,10 @@ ifneq ($(findstring -softap-,-$(TARGET)-),) DFLAGS += -DSOFTAP CFILES += sha1.c md5.c endif +ifneq ($(findstring -cfg-,-$(TARGET)-),) +DFLAGS += -DWL_CFG80211 +CFILES += wl_cfg80211.c +endif ifneq ($(findstring -oob-,-$(TARGET)-),) DFLAGS += -DOOB_INTR_ONLY DFLAGS += -DHW_OOB @@ -277,8 +287,8 @@ TARGETS := \ dhd-cdc-sdspi-pci dhd-cdc-sdmmc-gpl dhd-cdc-sdmmc-oob-gpl \ dhd-cdc-usb-apsta dhd-cdc-usb-gpl \ dhd-cdc-sdstd-apsta \ - dhd-cdc-sdmmc-softap-gpl - + dhd-cdc-sdmmc-softap-gpl \ + dhd-cdc-sdmmc-cfg-gpl TARGETS += \ diff --git a/bcm4329/src/dhd/sys/dhd.h b/bcm4329/src/dhd/sys/dhd.h index 8aa33b3..231fe56 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.27 2010/01/19 06:42:55 Exp $ + * $Id: dhd.h,v 1.32.4.7.2.4.14.29 2010/02/23 06:58:21 Exp $ */ /**************** @@ -59,10 +59,6 @@ #include <wlioctl.h> -#if defined(NDIS60) -#include <wdf.h> -#include <WdfMiniport.h> -#endif /* Forward decls */ struct dhd_bus; @@ -149,17 +145,6 @@ typedef struct dhd_pub { uint8 country_code[WLC_CNTRY_BUF_SZ]; } dhd_pub_t; -#if defined(NDIS60) - -typedef struct _wdf_device_info { - dhd_pub_t *dhd; -} wdf_device_info_t; - -WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(wdf_device_info_t, dhd_get_wdf_device_info) - - -#endif /* NDIS60 && !UNDERC_CE */ - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP) #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a); diff --git a/bcm4329/src/dhd/sys/dhd_linux.c b/bcm4329/src/dhd/sys/dhd_linux.c index ec211ac..33ef2a9 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.60.4.4 2010/03/25 05:07:49 Exp $ + * $Id: dhd_linux.c,v 1.65.4.9.2.12.2.66 2010/04/01 17:01:25 Exp $ */ #ifdef CONFIG_WIFI_CONTROL_FUNC @@ -63,7 +63,7 @@ #endif #include <linux/freezer.h> #if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC) -#include <linux/wifi_tiwlan.h> +#include <linux/wlan_plat.h> struct semaphore wifi_control_sem; @@ -203,9 +203,9 @@ print_tainted() #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 15) */ /* Linux wireless extension support */ -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) #include <wl_iw.h> -#endif /* CONFIG_WIRELESS_EXT */ +#endif #if defined(CONFIG_HAS_EARLYSUSPEND) #include <linux/earlysuspend.h> @@ -228,9 +228,9 @@ typedef struct dhd_if { /* Local private structure (extension of pub) */ typedef struct dhd_info { -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) wl_iw_t iw; /* wireless extensions state (must be first) */ -#endif /* CONFIG_WIRELESS_EXT */ +#endif dhd_pub_t pub; @@ -284,7 +284,7 @@ typedef struct dhd_info { char firmware_path[MOD_PARAM_PATHLEN]; char nvram_path[MOD_PARAM_PATHLEN]; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && 1 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) struct semaphore dhd_registration_sem; #endif /* load firmware and/or nvram values from the filesystem */ @@ -395,9 +395,9 @@ static char dhd_version[] = "Dongle Host Driver, version " EPI_VERSION_STR ; -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) struct iw_statistics *dhd_get_wireless_stats(struct net_device *dev); -#endif /* CONFIG_WIRELESS_EXT */ +#endif static void dhd_dpc(ulong data); /* forward decl */ @@ -696,6 +696,7 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, struct ether_addr *addr) wl_ioctl_t ioc; int ret; + DHD_TRACE(("%s enter\n", __FUNCTION__)); if (!bcm_mkiovar("cur_etheraddr", (char*)addr, ETHER_ADDR_LEN, buf, 32)) { DHD_ERROR(("%s: mkiovar failed for cur_etheraddr\n", dhd_ifname(&dhd->pub, ifidx))); return -1; @@ -739,6 +740,8 @@ dhd_op_if(dhd_if_t *ifp) * in case we missed the WLC_E_IF_DEL event. */ if (ifp->net != NULL) { + DHD_ERROR(("%s: ERROR: netdev:%s already exists, try free & unregister \n", + __FUNCTION__, ifp->net->name)); netif_stop_queue(ifp->net); unregister_netdev(ifp->net); free_netdev(ifp->net); @@ -803,6 +806,9 @@ _dhd_sysioc_thread(void *data) { dhd_info_t *dhd = (dhd_info_t *)data; int i; +#ifdef SOFTAP + bool in_ap = FALSE; +#endif set_freezable(); @@ -813,12 +819,10 @@ _dhd_sysioc_thread(void *data) for (i = 0; i < DHD_MAX_IFS; i++) { if (dhd->iflist[i]) { #ifdef SOFTAP - bool in_ap = (ap_net_dev != NULL); + in_ap = (ap_net_dev != NULL); #endif /* SOFTAP */ - if (dhd->iflist[i]->state) dhd_op_if(dhd->iflist[i]); - #ifdef SOFTAP if (dhd->iflist[i] == NULL) { DHD_TRACE(("%s: interface %d just been removed!\n\n", __FUNCTION__, i)); @@ -827,15 +831,16 @@ _dhd_sysioc_thread(void *data) if (in_ap && dhd->set_macaddress) { DHD_TRACE(("attempt to set MAC for %s in AP Mode blocked.\n", dhd->iflist[i]->net->name)); - dhd->set_multicast = FALSE; + dhd->set_macaddress = FALSE; continue; - } else if (in_ap && dhd->set_multicast) { + } + + if (in_ap && dhd->set_multicast) { DHD_TRACE(("attempt to set MULTICAST list for %s in AP Mode blocked.\n", dhd->iflist[i]->net->name)); - dhd->set_macaddress = FALSE; + dhd->set_multicast = FALSE; continue; } #endif /* SOFTAP */ - if (dhd->set_multicast) { dhd->set_multicast = FALSE; _dhd_set_multicast_list(dhd, i); @@ -947,6 +952,7 @@ dhd_start_xmit(struct sk_buff *skb, struct net_device *net) ifidx = dhd_net2idx(dhd, net); if (ifidx == DHD_BAD_IF) { DHD_ERROR(("%s: bad ifidx %d\n", __FUNCTION__, ifidx)); + netif_stop_queue(net); return -ENODEV; } @@ -1527,13 +1533,13 @@ dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd) if (ifidx == DHD_BAD_IF) return -1; -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) /* linux wireless extensions */ if ((cmd >= SIOCIWFIRST) && (cmd <= SIOCIWLAST)) { /* may recurse, do NOT lock */ return wl_iw_ioctl(net, ifr, cmd); } -#endif /* CONFIG_WIRELESS_EXT */ +#endif #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 2) if (cmd == SIOCETHTOOL) @@ -1593,8 +1599,8 @@ dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd) } /* send to dongle (must be up, and wl) */ - if (!dhd->pub.up || (dhd->pub.busstate != DHD_BUS_DATA)) { - DHD_TRACE(("DONGLE_DOWN\n")); + if (dhd->pub.busstate != DHD_BUS_DATA) { + DHD_ERROR(("%s DONGLE_DOWN,__FUNCTION__\n", __FUNCTION__)); bcmerror = BCME_DONGLE_DOWN; goto done; } @@ -1667,9 +1673,11 @@ dhd_open(struct net_device *net) ifidx = dhd_net2idx(dhd, net); DHD_TRACE(("%s: ifidx %d\n", __FUNCTION__, ifidx)); - ASSERT(ifidx == 0); + /* ASSERT(ifidx == 0); */ + + if (ifidx == 0) { /* do it only for primary eth0 */ - atomic_set(&dhd->pend_8021x_cnt, 0); + atomic_set(&dhd->pend_8021x_cnt, 0); memcpy(net->dev_addr, dhd->pub.mac.octet, ETHER_ADDR_LEN); @@ -1680,7 +1688,7 @@ dhd_open(struct net_device *net) else dhd->iflist[ifidx]->net->features &= ~NETIF_F_IP_CSUM; #endif - + } /* Allow transmit calls */ netif_start_queue(net); dhd->pub.up = 1; @@ -1846,7 +1854,7 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) DHD_ERROR(("dhd_prot_attach failed\n")); goto fail; } -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) /* Attach and link in the iw */ if (wl_iw_attach(net, (void *)&dhd->pub) != 0) { DHD_ERROR(("wl_iw_attach failed\n")); @@ -2054,22 +2062,25 @@ dhd_net_attach(dhd_pub_t *dhdp, int ifidx) net->netdev_ops = &dhd_ops_virt; #endif - /* Ok, link into the network layer... */ - if (ifidx == 0) { - /* - * device functions for the primary interface only - */ #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31)) net->open = dhd_open; net->stop = dhd_stop; #else net->netdev_ops = &dhd_ops_pri; #endif - } else { - /* - * We have to use the primary MAC for virtual interfaces - */ - memcpy(temp_addr, dhd->iflist[ifidx]->mac_addr, ETHER_ADDR_LEN); + + /* + * We have to use the primary MAC for virtual interfaces + */ + if (ifidx != 0) { + /* for virtual interfaces use the primary MAC */ + memcpy(temp_addr, dhd->pub.mac.octet, ETHER_ADDR_LEN); + } + + if (ifidx == 1) { + DHD_TRACE(("%s ACCESS POINT MAC: \n", __FUNCTION__)); + /* ACCESSPOINT INTERFACE CASE */ + temp_addr[0] |= 0X02; /* set bit 2 , - Locally Administered address */ } net->hard_header_len = ETH_HLEN + dhd->pub.hdrlen; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) @@ -2090,14 +2101,20 @@ dhd_net_attach(dhd_pub_t *dhdp, int ifidx) memcpy(net->dev_addr, temp_addr, ETHER_ADDR_LEN); if (register_netdev(net) != 0) { - DHD_ERROR(("couldn't register the net device\n")); + DHD_ERROR(("%s: couldn't register the net device\n", __FUNCTION__)); goto fail; } printf("%s: Broadcom Dongle Host Driver mac=%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", net->name, dhd->pub.mac.octet[0], dhd->pub.mac.octet[1], dhd->pub.mac.octet[2], dhd->pub.mac.octet[3], dhd->pub.mac.octet[4], dhd->pub.mac.octet[5]); - wl_iw_iscan_set_scan_broadcast_prep(net, 1); +#ifdef SOFTAP + if (ifidx == 0) + /* Don't call for SOFTAP Interface in SOFTAP MODE */ + wl_iw_iscan_set_scan_broadcast_prep(net, 1); +#else + wl_iw_iscan_set_scan_broadcast_prep(net, 1); +#endif /* SOFTAP */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) up(&dhd_registration_sem); @@ -2155,7 +2172,7 @@ dhd_detach(dhd_pub_t *dhdp) #if defined(CONFIG_HAS_EARLYSUSPEND) unregister_early_suspend(&dhd->early_suspend); #endif /* defined(CONFIG_HAS_EARLYSUSPEND) */ -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) /* Attach and link in the iw */ wl_iw_detach(); #endif @@ -2545,7 +2562,7 @@ return MALLOC(0, size); #endif /* #if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC) */ } #endif /* DHD_USE_STATIC_BUF */ -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) struct iw_statistics * dhd_get_wireless_stats(struct net_device *dev) { @@ -2559,7 +2576,7 @@ dhd_get_wireless_stats(struct net_device *dev) else return NULL; } -#endif /* CONFIG_WIRELESS_EXT */ +#endif static int dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata, @@ -2573,11 +2590,11 @@ dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata, if (bcmerror != BCME_OK) return (bcmerror); -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) ASSERT(dhd->iflist[*ifidx] != NULL); wl_iw_event(dhd->iflist[*ifidx]->net, event, *data); -#endif /* CONFIG_WIRELESS_EXT */ +#endif return (bcmerror); } diff --git a/bcm4329/src/dhd/sys/dhd_sdio.c b/bcm4329/src/dhd/sys/dhd_sdio.c index e571671..d9aca24 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.98 2010/02/01 05:22:19 Exp $ + * $Id: dhd_sdio.c,v 1.157.2.27.2.33.2.102 2010/03/30 02:22:02 Exp $ */ #include <typedefs.h> @@ -3752,8 +3752,9 @@ dhdsdio_dpc(dhd_bus_t *bus) if (err) { DHD_ERROR(("%s: error reading DEVCTL: %d\n", __FUNCTION__, err)); bus->dhd->busstate = DHD_BUS_DOWN; - } else + } else { ASSERT(devctl & SBSDIO_DEVCTL_CA_INT_ONLY); + } #endif /* DHD_DEBUG */ /* Read CSR, if clock on switch to AVAIL, else ignore */ diff --git a/bcm4329/src/include/epivers.h b/bcm4329/src/include/epivers.h index 4957e1a..20f5e47 100644 --- a/bcm4329/src/include/epivers.h +++ b/bcm4329/src/include/epivers.h @@ -31,18 +31,18 @@ #define EPI_MINOR_VERSION 218 -#define EPI_RC_NUMBER 204 +#define EPI_RC_NUMBER 209 -#define EPI_INCREMENTAL_NUMBER 3 +#define EPI_INCREMENTAL_NUMBER 0 #define EPI_BUILD_NUMBER 0 -#define EPI_VERSION 4, 218, 204, 3 +#define EPI_VERSION 4, 218, 209, 0 -#define EPI_VERSION_NUM 0x04dacc03 +#define EPI_VERSION_NUM 0x04dad100 -#define EPI_VERSION_STR "4.218.204.3" -#define EPI_ROUTER_VERSION_STR "4.219.204.3" +#define EPI_VERSION_STR "4.218.209.0" +#define EPI_ROUTER_VERSION_STR "4.219.209.0" #endif diff --git a/bcm4329/src/include/sbchipc.h b/bcm4329/src/include/sbchipc.h index 8c8be26..39e5c8d 100644 --- a/bcm4329/src/include/sbchipc.h +++ b/bcm4329/src/include/sbchipc.h @@ -823,70 +823,11 @@ typedef volatile struct { -#define PMU1_PLL0_PLLCTL0 0 -#define PMU1_PLL0_PC0_P1DIV_MASK 0x00f00000 -#define PMU1_PLL0_PC0_P1DIV_SHIFT 20 -#define PMU1_PLL0_PC0_P2DIV_MASK 0x0f000000 -#define PMU1_PLL0_PC0_P2DIV_SHIFT 24 -#define PMU1_PLL0_PC0_BYPASS_SDMOD_MASK 0x10000000 -#define PMU1_PLL0_PC0_BYPASS_SDMOD_SHIFT 28 - - - -#define PMU1_PLL0_PLLCTL1 1 -#define PMU1_PLL0_PC1_M1DIV_MASK 0x000000ff -#define PMU1_PLL0_PC1_M1DIV_SHIFT 0 -#define PMU1_PLL0_PC1_M2DIV_MASK 0x0000ff00 -#define PMU1_PLL0_PC1_M2DIV_SHIFT 8 -#define PMU1_PLL0_PC1_M3DIV_MASK 0x00ff0000 -#define PMU1_PLL0_PC1_M3DIV_SHIFT 16 -#define PMU1_PLL0_PC1_M4DIV_MASK 0xff000000 -#define PMU1_PLL0_PC1_M4DIV_SHIFT 24 - #define DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT 8 #define DOT11MAC_880MHZ_CLK_DIVISOR_MASK (0xFF << DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT) #define DOT11MAC_880MHZ_CLK_DIVISOR_VAL (0xE << DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT) -#define PMU1_PLL0_PLLCTL2 2 -#define PMU1_PLL0_PC2_M5DIV_MASK 0x000000ff -#define PMU1_PLL0_PC2_M5DIV_SHIFT 0 -#define PMU1_PLL0_PC2_M6DIV_MASK 0x0000ff00 -#define PMU1_PLL0_PC2_M6DIV_SHIFT 8 -#define PMU1_PLL0_PC2_NDIV_MODE_MASK 0x000e0000 -#define PMU1_PLL0_PC2_NDIV_MODE_SHIFT 17 -#define PMU1_PLL0_PC2_NDIV_MODE_INT 0 - -#define PMU1_PLL0_PC2_NDIV_MODE_MASH 1 -#define PMU1_PLL0_PC2_NDIV_MODE_MFB 2 -#define PMU1_PLL0_PC2_NDIV_MODE_MASH_1BY8 3 -#define PMU1_PLL0_PC2_NDIV_MODE_MFB_1BY8 4 - -#define PMU1_PLL0_PC2_NDIV_INT_MASK 0x1ff00000 -#define PMU1_PLL0_PC2_NDIV_INT_SHIFT 20 - - -#define PMU1_PLL0_PLLCTL3 3 -#define PMU1_PLL0_PC3_NDIV_FRAC_MASK 0x00ffffff -#define PMU1_PLL0_PC3_NDIV_FRAC_SHIFT 0 - - -#define PMU1_PLL0_PLLCTL4 4 -#define PMU1_PLL0_PC4_KVCO_XS_MASK 0x38000000 -#define PMU1_PLL0_PC4_KVCO_XS_SHIFT 27 - - - -#define PMU1_PLL0_PLLCTL5 5 -#define PMU1_PLL0_PC5_CLK_DRV_MASK 0xffffff00 -#define PMU1_PLL0_PC5_CLK_DRV_SHIFT 8 -#define PMU1_PLL0_PC5_PLL_CTRL_37_32_MASK 0x0000003f -#define PMU1_PLL0_PC5_PLL_CTRL_37_32_SHIFT 0 -#define PMU1_PLL0_PC5_VCO_RNG_MASK 0x000000C0 -#define PMU1_PLL0_PC5_VCO_RNG_SHIFT 6 - - - #define PMU2_PHY_PLL_PLLCTL 4 #define PMU2_SI_PLL_PLLCTL 10 @@ -1060,58 +1001,6 @@ typedef volatile struct { #define CST4315_CBUCK_MODE_BURST 0x00000400 #define CST4315_CBUCK_MODE_LPBURST 0x00000c00 - -#define RES4319_CBUCK_LPOM 1 -#define RES4319_CBUCK_BURST 2 -#define RES4319_CBUCK_PWM 3 -#define RES4319_CLDO_PU 4 -#define RES4319_PALDO_PU 5 -#define RES4319_ILP_REQUEST 6 -#define RES4319_LNLDO1_PU 9 -#define RES4319_OTP_PU 10 -#define RES4319_LNLDO2_PU 12 -#define RES4319_XTAL_PU 13 -#define RES4319_ALP_AVAIL 14 -#define RES4319_RX_PWRSW_PU 15 -#define RES4319_TX_PWRSW_PU 16 -#define RES4319_RFPLL_PWRSW_PU 17 -#define RES4319_LOGEN_PWRSW_PU 18 -#define RES4319_AFE_PWRSW_PU 19 -#define RES4319_BBPLL_PWRSW_PU 20 -#define RES4319_HT_AVAIL 21 - -#define CST4319_SPI_CPULESSUSB 0x00000001 -#define CST4319_SPI_CLK_POL 0x00000002 -#define CST4319_SPI_CLK_PH 0x00000008 -#define CST4319_SPROM_OTP_SEL_MASK 0x000000c0 -#define CST4319_SPROM_OTP_SEL_SHIFT 6 -#define CST4319_DEFCIS_SEL 0x00000000 -#define CST4319_SPROM_SEL 0x00000040 -#define CST4319_OTP_SEL 0x00000080 -#define CST4319_OTP_PWRDN 0x000000c0 -#define CST4319_SDIO_USB_MODE 0x00000100 -#define CST4319_REMAP_SEL_MASK 0x00000600 -#define CST4319_ILPDIV_EN 0x00000800 -#define CST4319_XTAL_PD_POL 0x00001000 -#define CST4319_LPO_SEL 0x00002000 -#define CST4319_RES_INIT_MODE 0x0000c000 -#define CST4319_PALDO_EXTPNP 0x00010000 -#define CST4319_CBUCK_MODE_MASK 0x00060000 -#define CST4319_CBUCK_MODE_BURST 0x00020000 -#define CST4319_CBUCK_MODE_LPBURST 0x00060000 -#define CST4319_RCAL_VALID 0x01000000 -#define CST4319_RCAL_VALUE_MASK 0x3e000000 -#define CST4319_RCAL_VALUE_SHIFT 25 - -#define PMU1_PLL0_CHIPCTL0 0 -#define PMU1_PLL0_CHIPCTL1 1 -#define PMU1_PLL0_CHIPCTL2 2 -#define CCTL_4319USB_XTAL_SEL_MASK 0x00180000 -#define CCTL_4319USB_XTAL_SEL_SHIFT 19 -#define CCTL_4319USB_48MHZ_PLL_SEL 1 -#define CCTL_4319USB_24MHZ_PLL_SEL 2 - - #define PMU_MAX_TRANSITION_DLY 15000 diff --git a/bcm4329/src/include/siutils.h b/bcm4329/src/include/siutils.h index b2a4ae3..c55293b 100644 --- a/bcm4329/src/include/siutils.h +++ b/bcm4329/src/include/siutils.h @@ -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: siutils.h,v 13.197.4.2.4.3.8.13 2010/03/10 21:34:34 Exp $ + * $Id: siutils.h,v 13.197.4.2.4.3.8.14 2010/03/19 18:31:43 Exp $ */ @@ -225,7 +225,6 @@ extern void si_pci_up(si_t *sih); extern void si_pcie_war_ovr_disable(si_t *sih); extern void si_pcie_extendL1timer(si_t *sih, bool extend); extern int si_pci_fixcfg(si_t *sih); -void si_pmu_res_4319_swctrl_war(si_t *sih, osl_t *osh, bool enable); diff --git a/bcm4329/src/wl/sys/wl_iw.c b/bcm4329/src/wl/sys/wl_iw.c index f44fba9..cf6bf80 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.84.2.10 2010/03/25 07:22:21 Exp $ + * $Id: wl_iw.c,v 1.51.4.9.2.6.4.90 2010/03/31 18:03:04 Exp $ */ @@ -56,6 +56,9 @@ typedef const struct si_pub si_t; #include <wl_iw.h> + +#define IW_WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) + #include <linux/rtnetlink.h> #include <linux/mutex.h> @@ -68,6 +71,9 @@ static struct net_device *priv_dev; static bool ap_cfg_running = FALSE; static bool ap_fw_loaded = FALSE; static int ap_mode = 0; +struct net_device *ap_net_dev = NULL; +struct semaphore ap_eth_sema; +static int wl_iw_set_ap_security(struct net_device *dev, struct ap_profile *ap); #endif #define WL_IW_IOCTL_CALL(func_call) \ @@ -4200,6 +4206,20 @@ wl_iw_set_wpaauth( val |= iw->pwsec; } + if (iw->privacy_invoked && !val) { + WL_WSEC(("%s: %s: 'Privacy invoked' TRUE but clearing wsec, assuming " + "we're a WPS enrollee\n", dev->name, __FUNCTION__)); + if ((error = dev_wlc_intvar_set(dev, "is_WPS_enrollee", TRUE))) { + WL_WSEC(("Failed to set iovar is_WPS_enrollee\n")); + return error; + } + } else if (val) { + if ((error = dev_wlc_intvar_set(dev, "is_WPS_enrollee", FALSE))) { + WL_WSEC(("Failed to clear iovar is_WPS_enrollee\n")); + return error; + } + } + if ((error = dev_wlc_intvar_set(dev, "wsec", val))) return error; @@ -4278,20 +4298,35 @@ wl_iw_set_wpaauth( WL_INFORM(("%s: IW_AUTH_ROAMING_CONTROL\n", __FUNCTION__)); break; - case IW_AUTH_PRIVACY_INVOKED: - WL_INFORM(("%s: IW_AUTH_PRIVACY_INVOKED\n", __FUNCTION__)); - /* if paramval is zero, allow association to AP with encryption while - * wsec is not set in the driver. If set to 1, restore default wsec_restrict value - */ - WL_INFORM(("%s: IW_AUTH_PRIVACY_INVOKED %u\n", __FUNCTION__, - paramval)); - - if ((error = dev_wlc_intvar_set(dev, "wsec_restrict", !paramval))) { - WL_ERROR(("%s: FAILED IW_AUTH_PRIVACY_INVOKED %u\n", __FUNCTION__, - paramval)); - return error; + case IW_AUTH_PRIVACY_INVOKED: { + int wsec; + + if (paramval == 0) { + iw->privacy_invoked = FALSE; + if ((error = dev_wlc_intvar_set(dev, "is_WPS_enrollee", FALSE))) { + WL_WSEC(("Failed to clear iovar is_WPS_enrollee\n")); + return error; + } + } else { + iw->privacy_invoked = TRUE; + if ((error = dev_wlc_intvar_get(dev, "wsec", &wsec))) + return error; + + if (!(IW_WSEC_ENABLED(wsec))) { + + if ((error = dev_wlc_intvar_set(dev, "is_WPS_enrollee", TRUE))) { + WL_WSEC(("Failed to set iovar is_WPS_enrollee\n")); + return error; + } + } else { + if ((error = dev_wlc_intvar_set(dev, "is_WPS_enrollee", FALSE))) { + WL_WSEC(("Failed to clear iovar is_WPS_enrollee\n")); + return error; + } + } } break; + } #endif default: break; @@ -4400,7 +4435,7 @@ wl_iw_get_wpaauth( break; case IW_AUTH_PRIVACY_INVOKED: - WL_ERROR(("%s: IW_AUTH_PRIVACY_INVOKED\n", __FUNCTION__)); + paramval = iw->privacy_invoked; break; #endif } @@ -4572,11 +4607,6 @@ int get_user_params(char *user_params, struct iw_point *dwrq) #ifdef SOFTAP -struct net_device *ap_net_dev = NULL; -struct semaphore ap_eth_sema; -static int wl_iw_set_ap_security(struct net_device *dev, struct ap_profile *ap); - - static int thr_wait_for_2nd_eth_dev(void *data) { @@ -5022,7 +5052,6 @@ static int iwpriv_softap_stop(struct net_device *dev, char *ext) { int res = 0; - char buf[128]; WL_SOFTAP(("got iwpriv AP_BSS_STOP\n")); @@ -5031,10 +5060,6 @@ static int iwpriv_softap_stop(struct net_device *dev, return res; } - /* Make sure that interface is UP */ - strcpy(buf, "cur_etheraddr"); - dev_wlc_ioctl(dev, WLC_GET_VAR, buf, sizeof(buf)); - res = wl_iw_softap_deassoc_stations(ap_net_dev); bcm_mdelay(200); diff --git a/bcm4329/src/wl/sys/wl_iw.h b/bcm4329/src/wl/sys/wl_iw.h index 2afbcbc..c22dc72 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.13 2010/03/10 03:55:02 Exp $ + * $Id: wl_iw.h,v 1.5.34.1.6.15 2010/03/29 23:51:17 Exp $ */ @@ -82,6 +82,7 @@ typedef struct wl_iw { int spy_num; uint32 pwsec; uint32 gwsec; + bool privacy_invoked; struct ether_addr spy_addr[IW_MAX_SPY]; struct iw_quality spy_qual[IW_MAX_SPY]; |