summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Harte <hharte@broadcom.com>2009-05-07 09:59:52 -0700
committerHoward Harte <hharte@broadcom.com>2009-05-07 09:59:52 -0700
commit3b7f77aedb196d171a2c54007800882b2ce2a4ff (patch)
tree3fa986d0426209f86f4c5073ba6d87aaf5dc2450
parentf42f81d9f222732884ecf14adfeaee6a58e8a534 (diff)
downloadbroadcom-3b7f77aedb196d171a2c54007800882b2ce2a4ff.tar.gz
Update start/stop behavior.
-rw-r--r--src/Android.mk4
-rw-r--r--src/GNUmakefile.inc46
-rw-r--r--src/Makerules4
-rwxr-xr-xsrc/bcmsdio/linux/Makefile4
-rw-r--r--src/bcmsdio/linux/makefile.264
-rw-r--r--src/bcmsdio/sys/bcmpcispi.c4
-rw-r--r--src/bcmsdio/sys/bcmsdh.c22
-rw-r--r--src/bcmsdio/sys/bcmsdh_linux.c17
-rw-r--r--src/bcmsdio/sys/bcmsdh_sdmmc.c42
-rw-r--r--src/bcmsdio/sys/bcmsdh_sdmmc_linux.c4
-rw-r--r--src/bcmsdio/sys/bcmsdspi.c29
-rw-r--r--src/bcmsdio/sys/bcmsdspi_linux.c4
-rw-r--r--src/bcmsdio/sys/bcmsdstd.c30
-rw-r--r--src/bcmsdio/sys/bcmsdstd_linux.c4
-rw-r--r--src/branding.inc4
-rw-r--r--src/dhd/exe/GNUmakefile4
-rw-r--r--src/dhd/exe/dhdu.c20
-rw-r--r--src/dhd/exe/dhdu.h4
-rw-r--r--src/dhd/exe/dhdu_cmd.h4
-rw-r--r--src/dhd/exe/dhdu_linux.c4
-rwxr-xr-xsrc/dhd/linux/Makefile8
-rw-r--r--src/dhd/linux/makefile.264
-rw-r--r--src/dhd/sys/dhd.h16
-rw-r--r--src/dhd/sys/dhd_bus.h8
-rw-r--r--src/dhd/sys/dhd_cdc.c24
-rw-r--r--src/dhd/sys/dhd_common.c15
-rw-r--r--src/dhd/sys/dhd_custom_gpio.c49
-rw-r--r--src/dhd/sys/dhd_dbg.h4
-rw-r--r--src/dhd/sys/dhd_linux.c149
-rw-r--r--src/dhd/sys/dhd_linux_sched.c4
-rw-r--r--src/dhd/sys/dhd_proto.h4
-rw-r--r--src/dhd/sys/dhd_sdio.c227
-rw-r--r--src/dongle/dngl_stats.h4
-rw-r--r--src/include/aidmp.h4
-rw-r--r--src/include/bcmcdc.h4
-rw-r--r--src/include/bcmdefs.h15
-rw-r--r--src/include/bcmdevs.h30
-rw-r--r--src/include/bcmendian.h4
-rw-r--r--src/include/bcmpcispi.h4
-rw-r--r--src/include/bcmperf.h4
-rw-r--r--src/include/bcmsdbus.h10
-rw-r--r--src/include/bcmsdh.h13
-rw-r--r--src/include/bcmsdh_sdmmc.h9
-rw-r--r--src/include/bcmsdspi.h4
-rw-r--r--src/include/bcmsdstd.h4
-rw-r--r--src/include/bcmspi.h4
-rw-r--r--src/include/bcmutils.h4
-rw-r--r--src/include/bcmwifi.h4
-rw-r--r--src/include/dhdioctl.h4
-rw-r--r--src/include/epivers.h14
-rw-r--r--src/include/hndpmu.h4
-rw-r--r--src/include/hndsoc.h4
-rw-r--r--src/include/linux_osl.h4
-rw-r--r--src/include/linuxver.h4
-rw-r--r--src/include/miniopt.h4
-rw-r--r--src/include/msgtrace.h4
-rw-r--r--src/include/osl.h4
-rw-r--r--src/include/packed_section_end.h4
-rw-r--r--src/include/packed_section_start.h4
-rw-r--r--src/include/pcicfg.h4
-rw-r--r--src/include/proto/802.11.h4
-rw-r--r--src/include/proto/802.11e.h4
-rw-r--r--src/include/proto/802.1d.h4
-rw-r--r--src/include/proto/bcmeth.h4
-rw-r--r--src/include/proto/bcmevent.h4
-rw-r--r--src/include/proto/bcmip.h4
-rw-r--r--src/include/proto/eapol.h4
-rw-r--r--src/include/proto/ethernet.h4
-rw-r--r--src/include/proto/sdspi.h4
-rw-r--r--src/include/proto/vlan.h4
-rw-r--r--src/include/proto/wpa.h4
-rw-r--r--src/include/sbchipc.h4
-rw-r--r--src/include/sbconfig.h4
-rw-r--r--src/include/sbhnddma.h4
-rw-r--r--src/include/sbpcmcia.h4
-rw-r--r--src/include/sbsdio.h4
-rw-r--r--src/include/sbsdpcmdev.h4
-rw-r--r--src/include/sbsocram.h4
-rw-r--r--src/include/sdio.h4
-rw-r--r--src/include/sdioh.h4
-rw-r--r--src/include/sdiovar.h4
-rw-r--r--src/include/siutils.h4
-rw-r--r--src/include/trxhdr.h4
-rw-r--r--src/include/typedefs.h4
-rw-r--r--src/include/wlioctl.h4
-rw-r--r--src/shared/aiutils.c4
-rw-r--r--src/shared/bcmutils.c4
-rw-r--r--src/shared/bcmwifi.c4
-rw-r--r--src/shared/hndpmu.c7
-rw-r--r--src/shared/linux_osl.c4
-rw-r--r--src/shared/miniopt.c4
-rw-r--r--src/shared/sbutils.c4
-rw-r--r--src/shared/siutils.c4
-rw-r--r--src/shared/siutils_priv.h4
-rw-r--r--src/wl/sys/wl_iw.c373
-rw-r--r--src/wl/sys/wl_iw.h23
96 files changed, 890 insertions, 594 deletions
diff --git a/src/Android.mk b/src/Android.mk
index cda5d7c..044e111 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -1,7 +1,7 @@
#
# Copyright (C) 2008 Broadcom Corporation
#
-# $Id: Android.mk,v 2.1.2.1 2009/01/26 19:12:39 Exp $
+# $Id: Android.mk,v 2.1.2.3 2009/04/10 23:59:52 Exp $
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ LOCAL_SRC_FILES := \
shared/miniopt.c
LOCAL_MODULE := dhdarm_android
-LOCAL_CFLAGS := -DSDTEST -DTARGETENV_android
+LOCAL_CFLAGS := -DSDTEST -DTARGETENV_android -Dlinux -DLINUX
LOCAL_C_INCLUDES +=$(LOCAL_PATH)/include $(LOCAL_PATH)/../../../../kernel/include
LOCAL_FORCE_STATIC_EXECUTABLE := true
diff --git a/src/GNUmakefile.inc b/src/GNUmakefile.inc
index f31bb39..6e810cc 100644
--- a/src/GNUmakefile.inc
+++ b/src/GNUmakefile.inc
@@ -4,7 +4,7 @@
# and sources(windows style makefile). it doesn't depend on
# Makerules.env except to get SRCBASE if not yet defined.
#
-# $Id: GNUmakefile.inc,v 1.103 2007/11/07 19:05:35 Exp $
+# $Id: GNUmakefile.inc,v 1.103.76.1 2009/04/01 01:02:07 Exp $
SHELL=bash
export SHELL
@@ -184,10 +184,18 @@ endef
all ::
$(print-warnings)
- @echo "make version is $(MAKE_VERSION)"
-ifneq ($(WLTUNEFILE),wltunable_sample.h)
- @echo "wl config tunefile = $(WLTUNEFILE)"
-endif
+ifdef SHOWBUILDINFO
+ @echo " -------------------------------------------"
+ @echo " SRCFILE = $(SRCFILE)"
+ @echo " SOURCES = $(SOURCES)"
+ @echo " C_DEFINES = $(C_DEFINES)"
+ @echo " WLTUNEFILE = $(WLTUNEFILE)"
+ @echo " TARGETPATH = $(TARGETPATH)"
+ @echo " TARGETTYPE = $(TARGETTYPE)"
+ @echo " MAKE_VERSION = $(MAKE_VERSION)"
+ @echo " TTYPE = $(subst OPT,OPT(free),$(subst DBG,DBG(checked),$(TTYPE)))"
+ @echo " -------------------------------------------"
+endif # SHOWBUILDINFO
all ::
$(print-errors)
@@ -338,48 +346,54 @@ DEPS_OBJ = $(patsubst %,$(OUTDIR_$(TTYPE))/%,$(SOURCES.OBJ))
DEPS_RES = $(patsubst %,$(OUTDIR_$(TTYPE))/%,$(SOURCES.RES))
DEPS_TLB = $(patsubst %,$(OUTDIR_$(TTYPE))/%,$(SOURCES.TLB))
DEPS_MSG = $(patsubst %,$(OUTDIR_$(TTYPE))/%,$(SOURCES.MSG))
+# Finally generate DEPENDENCIES list that are made as explicit dependencies
+# in src/makefile/<obj-type>.mk file
DEPENDENCIES = $(DEPS_TLB) $(DEPS_MSG) $(DEPS_OBJ) $(DEPS_RES)
DOS_DEPS= $(shell echo $(filter-out %.tlb %.TLB %.h %.H %.def %.DEF,$^) | sed 's%//\(.\)/%\1:/%g')
$(OUTDIR_$(TTYPE))/%.i : %.c
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(CC) -E -P $(C$(TTYPE)FLAGS) $(CPPFLAGS) $(F$(TTYPE)) $< >$@
$(OUTDIR_$(TTYPE))/%.i : %.cpp
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(CC) -E -P $(C$(TTYPE)FLAGS) $(CPPFLAGS) $(F$(TTYPE)) $< >$@
$(OUTDIR_$(TTYPE))/%.d : %.c
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(calculate_dependencies)
$(OUTDIR_$(TTYPE))/%.d : %.C
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(calculate_dependencies)
$(OUTDIR_$(TTYPE))/%.d : %.cpp
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(calculate_dependencies)
$(OUTDIR_$(TTYPE))/%.d : %.CPP
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(calculate_dependencies)
$(OUTDIR_$(TTYPE))/%.obj : %.c
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(c-obj-command)
$(OUTDIR_$(TTYPE))/%.obj : $(OUTDIR_$(TTYPE))/%.c
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(OUTDIR_$(TTYPE))/$(notdir $@)"
$(c-obj-command)
$(OUTDIR_$(TTYPE))/%.obj : %.C
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(c-obj-command)
$(OUTDIR_$(TTYPE))/%.obj : %.cpp
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(cpp-obj-command)
$(OUTDIR_$(TTYPE))/%.obj : %.CPP
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(cpp-obj-command)
ifdef ECLOUD_BUILD_ID
@@ -387,19 +401,21 @@ $(OUTDIR_$(TTYPE))/%.res : RC = rc
endif # ECLOUD_BUILD_ID
$(OUTDIR_$(TTYPE))/%.res : %.rc
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(rc-res-command)
# build rule for IDL files.
$(OUTDIR_$(TTYPE))/%.tlb $(OUTDIR_$(TTYPE))/%.h $(OUTDIR_$(TTYPE))/%_i.c : %.idl
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(MTL) /I $(MSSDK)/include /nologo /Oicf /out $(OUTDIR_$(TTYPE)) $<
# Build rule for message file
$(OUTDIR_$(TTYPE))/%.rc $(OUTDIR_$(TTYPE))/%.h : %.mc
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(MC) -h $(OUTDIR_$(TTYPE)) -r $(OUTDIR_$(TTYPE)) $(MC_FLAGS) $<
$(OUTDIR_$(TTYPE))/%.obj: %.asm
- @echo "Compiling - $(notdir $<)"
+ @echo "Compiling $(notdir $<) -> $(notdir $@)"
$(asm-obj-command)
FORCE:
@@ -526,7 +542,7 @@ endef
ifdef OTHER_SOURCES
all clean :: $(OTHER_SOURCES)
- @echo "go through OTHER_SOURCES"
+ @echo "Go through OTHER_SOURCES: $(OTHER_SOURCES)"
$(foreach SRCFILE,$(OTHER_SOURCES),$(MAKE) SRCFILE=$(SRCFILE) TTYPE=$(TTYPE) $@; )
endif
diff --git a/src/Makerules b/src/Makerules
index 8af621a..c21c750 100644
--- a/src/Makerules
+++ b/src/Makerules
@@ -2,11 +2,11 @@
# Top level Makerules
# it uses Makerules.env for build env vars and optional branding.inc
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/bcmsdio/linux/Makefile b/src/bcmsdio/linux/Makefile
index 9f5de37..6825c80 100755
--- a/src/bcmsdio/linux/Makefile
+++ b/src/bcmsdio/linux/Makefile
@@ -1,11 +1,11 @@
# GNU Makefile for Broadcom BCMSDH Lower-level Driver
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/bcmsdio/linux/makefile.26 b/src/bcmsdio/linux/makefile.26
index ec486a2..ffbde11 100644
--- a/src/bcmsdio/linux/makefile.26
+++ b/src/bcmsdio/linux/makefile.26
@@ -2,11 +2,11 @@
# Makefile fragment for Linux 2.6
# Broadcom BCMSDH Driver
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/bcmsdio/sys/bcmpcispi.c b/src/bcmsdio/sys/bcmpcispi.c
index 6ce8f7b..ba3e0c5 100644
--- a/src/bcmsdio/sys/bcmpcispi.c
+++ b/src/bcmsdio/sys/bcmpcispi.c
@@ -1,11 +1,11 @@
/*
* Broadcom SPI over PCI-SPI Host Controller, low-level hardware driver
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/bcmsdio/sys/bcmsdh.c b/src/bcmsdio/sys/bcmsdh.c
index afbf5e0..0735757 100644
--- a/src/bcmsdio/sys/bcmsdh.c
+++ b/src/bcmsdio/sys/bcmsdh.c
@@ -2,11 +2,11 @@
* BCMSDH interface glue
* implement bcmsdh API for SDIOH driver
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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: bcmsdh.c,v 1.35.2.1.4.8.16.4 2009/03/19 04:09:04 Exp $
+ * $Id: bcmsdh.c,v 1.35.2.1.4.8.16.5 2009/04/13 18:54:43 Exp $
*/
/* ****************** BCMSDH Interface Functions *************************** */
@@ -570,6 +570,22 @@ bcmsdh_abort(void *sdh, uint fn)
return sdioh_abort(bcmsdh->sdioh, fn);
}
+int
+bcmsdh_start(void *sdh, int stage)
+{
+ bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)sdh;
+
+ return sdioh_start(bcmsdh->sdioh, stage);
+}
+
+int
+bcmsdh_stop(void *sdh)
+{
+ bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *)sdh;
+
+ return sdioh_stop(bcmsdh->sdioh);
+}
+
int
bcmsdh_query_device(void *sdh)
diff --git a/src/bcmsdio/sys/bcmsdh_linux.c b/src/bcmsdio/sys/bcmsdh_linux.c
index 84b5210..343989c 100644
--- a/src/bcmsdio/sys/bcmsdh_linux.c
+++ b/src/bcmsdio/sys/bcmsdh_linux.c
@@ -1,11 +1,11 @@
/*
* SDIO access interface for drivers - linux specific (pci only)
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.11.4.3 2008/12/17 04:22:21 Exp $
+ * $Id: bcmsdh_linux.c,v 1.42.10.11.4.5 2009/04/14 00:52:26 Exp $
*/
/**
@@ -93,8 +93,8 @@ bcmsdh_chipmatch(uint16 vendor, uint16 device)
if (device == BCM27XX_SDIOH_ID && vendor == VENDOR_BROADCOM) {
return (TRUE);
}
- /* Check for BRCM SDHCI Standard host controller */
- if (device == SDHCI_FPGA_ID && vendor == VENDOR_BROADCOM) {
+ /* Check for BRCM Standard host controller */
+ if (device == SDIOH_FPGA_ID && vendor == VENDOR_BROADCOM) {
return (TRUE);
}
/* Check for TI PCIxx21 Standard host controller */
@@ -128,7 +128,7 @@ bcmsdh_chipmatch(uint16 vendor, uint16 device)
#if defined(BCMPLATFORM_BUS)
#if defined(BCMLXSDMMC)
-/* forward declaraions */
+/* forward declarations */
int bcmsdh_probe(struct device *dev);
int bcmsdh_remove(struct device *dev);
@@ -136,7 +136,7 @@ EXPORT_SYMBOL(bcmsdh_probe);
EXPORT_SYMBOL(bcmsdh_remove);
#else
-/* forward declaraions */
+/* forward declarations */
static int __devinit bcmsdh_probe(struct device *dev);
static int __devexit bcmsdh_remove(struct device *dev);
#endif /* BCMLXSDMMC */
@@ -280,7 +280,7 @@ int bcmsdh_remove(struct device *dev)
#else /* BCMPLATFORM_BUS */
#if !defined(BCMLXSDMMC)
-/* forward declaraions for PCI probe and remove functions. */
+/* forward declarations for PCI probe and remove functions. */
static int __devinit bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev);
@@ -300,7 +300,6 @@ static struct pci_device_id bcmsdh_pci_devid[] __devinitdata = {
};
MODULE_DEVICE_TABLE(pci, bcmsdh_pci_devid);
-
/**
* SDIO Host Controller pci driver info
*/
diff --git a/src/bcmsdio/sys/bcmsdh_sdmmc.c b/src/bcmsdio/sys/bcmsdh_sdmmc.c
index c6f5de2..685e449 100644
--- a/src/bcmsdio/sys/bcmsdh_sdmmc.c
+++ b/src/bcmsdio/sys/bcmsdh_sdmmc.c
@@ -1,11 +1,11 @@
/*
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.8.6.10 2009/03/24 23:07:13 Exp $
+ * $Id: bcmsdh_sdmmc.c,v 1.1.2.8.6.16 2009/04/17 05:22:09 Exp $
*/
#include <typedefs.h>
@@ -1078,9 +1078,8 @@ sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, uint32 regaddr, int regsiz
}
#endif /* NOTUSED */
-
-void
-sdioh_start(int stage)
+int
+sdioh_start(sdioh_info_t *si, int stage)
{
int ret;
sdioh_info_t *sd = gInstance->sd;
@@ -1090,8 +1089,7 @@ sdioh_start(int stage)
sdio access will come in way
*/
if (gInstance->func[0]) {
- if (stage == 0) {
-
+ if (stage == 0) {
/* Since the power to the chip is killed, we will have
re enumerate the device again. Set the block size
and enable the fucntion 1 for in preparation for
@@ -1110,7 +1108,7 @@ sdioh_start(int stage)
sd->client_block_size[0] = 64;
/* Claim host controller */
- SDIO_CLAIM_HOST(1);
+ sdio_claim_host(gInstance->func[1]);
sd->client_block_size[1] = 64;
if (sdio_set_block_size(gInstance->func[1], 64)) {
@@ -1118,11 +1116,11 @@ sdioh_start(int stage)
}
/* Release host controller F1 */
- SDIO_RELEASE_HOST(1);
+ sdio_release_host(gInstance->func[1]);
if (gInstance->func[2]) {
/* Claim host controller F2 */
- SDIO_CLAIM_HOST(2);
+ sdio_claim_host(gInstance->func[2]);
sd->client_block_size[2] = sd_f2_blocksize;
if (sdio_set_block_size(gInstance->func[2],
@@ -1132,26 +1130,29 @@ sdioh_start(int stage)
}
/* Release host controller F2 */
- SDIO_RELEASE_HOST(2);
+ sdio_release_host(gInstance->func[2]);
}
sdioh_sdmmc_card_enablefuncs(sd);
}
- }
- else if (stage == 1) {
- SDIO_CLAIM_HOST(0);
+ } else {
+ sdio_claim_host(gInstance->func[0]);
sdio_claim_irq(gInstance->func[2], IRQHandlerF2);
sdio_claim_irq(gInstance->func[1], IRQHandler);
- SDIO_RELEASE_HOST(0);
+ sdio_release_host(gInstance->func[0]);
+
}
}
else
sd_err(("%s Failed\n", __FUNCTION__));
+
+ return (0);
}
-void
-sdioh_stop(void)
+int
+sdioh_stop(sdioh_info_t *si)
{
+
/* MSM7201A Android sdio stack has bug with interrupt
So internaly within SDIO stack they are polling
which cause issue when device is turned off. So
@@ -1159,11 +1160,12 @@ sdioh_stop(void)
polling
*/
if (gInstance->func[0]) {
- SDIO_CLAIM_HOST(0);
+ sdio_claim_host(gInstance->func[0]);
sdio_release_irq(gInstance->func[1]);
sdio_release_irq(gInstance->func[2]);
- SDIO_RELEASE_HOST(0);
+ sdio_release_host(gInstance->func[0]);
}
else
sd_err(("%s Failed\n", __FUNCTION__));
+ return (0);
}
diff --git a/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c b/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c
index b3b3bfc..efaf490 100644
--- a/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c
+++ b/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c
@@ -1,11 +1,11 @@
/*
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/bcmsdio/sys/bcmsdspi.c b/src/bcmsdio/sys/bcmsdspi.c
index d22fbb2..208c6ed 100644
--- a/src/bcmsdio/sys/bcmsdspi.c
+++ b/src/bcmsdio/sys/bcmsdspi.c
@@ -1,11 +1,11 @@
/*
* Broadcom BCMSDH to SPI Protocol Conversion Layer
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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: bcmsdspi.c,v 1.14.4.2.4.4.20.1 2008/12/17 04:59:50 Exp $
+ * $Id: bcmsdspi.c,v 1.14.4.2.4.4.20.3 2009/04/13 18:54:43 Exp $
*/
#include <typedefs.h>
@@ -695,6 +695,17 @@ sdioh_abort(sdioh_info_t *sd, uint fnum)
return ret;
}
+int
+sdioh_start(sdioh_info_t *sd, int stage)
+{
+ return SUCCESS;
+}
+
+int
+sdioh_stop(sdioh_info_t *sd)
+{
+ return SUCCESS;
+}
/*
@@ -1387,9 +1398,9 @@ sdspi_cmd_issue(sdioh_info_t *sd, bool use_dma, uint32 cmd, uint32 arg,
recv_crc = spi_rspbuf[i+j] << 8 | spi_rspbuf[i+j+1];
dat_crc = sdspi_crc16((uint8 *)data, datalen);
if (dat_crc != recv_crc) {
- sd_err(("%s: Incorrect data CRC: expected 0x%04x," \
- "received 0x%04x\n",
- __FUNCTION__, dat_crc, recv_crc));
+ sd_err(("%s: Incorrect data CRC: expected 0x%04x, "
+ "received 0x%04x\n",
+ __FUNCTION__, dat_crc, recv_crc));
}
}
}
@@ -1540,7 +1551,8 @@ sdioh_sdio_reset(sdioh_info_t *si)
#define CRC7_POLYNOM 0x09
#define CRC7_CRCHIGHBIT 0x40
-static uint8 sdspi_crc7(unsigned char* p, uint32 len) {
+static uint8 sdspi_crc7(unsigned char* p, uint32 len)
+{
uint8 c, j, bit, crc = 0;
uint32 i;
@@ -1563,7 +1575,8 @@ static uint8 sdspi_crc7(unsigned char* p, uint32 len) {
#define CRC16_POLYNOM 0x1021
#define CRC16_CRCHIGHBIT 0x8000
-static uint16 sdspi_crc16(unsigned char* p, uint32 len) {
+static uint16 sdspi_crc16(unsigned char* p, uint32 len)
+{
uint32 i;
uint16 j, c, bit;
uint16 crc = 0;
diff --git a/src/bcmsdio/sys/bcmsdspi_linux.c b/src/bcmsdio/sys/bcmsdspi_linux.c
index 056e5eb..1046a17 100644
--- a/src/bcmsdio/sys/bcmsdspi_linux.c
+++ b/src/bcmsdio/sys/bcmsdspi_linux.c
@@ -1,11 +1,11 @@
/*
* Broadcom SPI Host Controller Driver - Linux Per-port
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/bcmsdio/sys/bcmsdstd.c b/src/bcmsdio/sys/bcmsdstd.c
index 0f13b13..09794f2 100644
--- a/src/bcmsdio/sys/bcmsdstd.c
+++ b/src/bcmsdio/sys/bcmsdstd.c
@@ -1,11 +1,11 @@
/*
* 'Standard' SDIO HOST CONTROLLER driver
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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: bcmsdstd.c,v 1.64.4.1.4.6.4.2 2008/12/17 04:59:50 Exp $
+ * $Id: bcmsdstd.c,v 1.64.4.1.4.6.4.4 2009/04/13 18:54:43 Exp $
*/
#include <typedefs.h>
@@ -1065,6 +1065,18 @@ sdioh_abort(sdioh_info_t *sd, uint fnum)
return ret;
}
+int
+sdioh_start(sdioh_info_t *sd, int stage)
+{
+ return SUCCESS;
+}
+
+int
+sdioh_stop(sdioh_info_t *sd)
+{
+ return SUCCESS;
+}
+
static int
sdstd_check_errs(sdioh_info_t *sdioh_info, uint32 cmd, uint32 arg)
{
@@ -1626,14 +1638,18 @@ sdstd_start_clock(sdioh_info_t *sd, uint16 new_sd_divisor)
sd_info(("Primary Clock Freq = %d MHz\n", GFIELD(sd->caps, CAP_TO_CLKFREQ)));
- if (GFIELD(sd->caps, CAP_TO_CLKFREQ) == 48) {
+ if (GFIELD(sd->caps, CAP_TO_CLKFREQ) == 50) {
+ sd_info(("%s: Resulting SDIO clock is %d %s\n", __FUNCTION__,
+ ((50 % new_sd_divisor) ? (50000 / new_sd_divisor) : (50 / new_sd_divisor)),
+ ((50 % new_sd_divisor) ? "KHz" : "MHz")));
+ } else if (GFIELD(sd->caps, CAP_TO_CLKFREQ) == 48) {
sd_info(("%s: Resulting SDIO clock is %d %s\n", __FUNCTION__,
((48 % new_sd_divisor) ? (48000 / new_sd_divisor) : (48 / new_sd_divisor)),
((48 % new_sd_divisor) ? "KHz" : "MHz")));
} else if (GFIELD(sd->caps, CAP_TO_CLKFREQ) == 33) {
sd_info(("%s: Resulting SDIO clock is %d %s\n", __FUNCTION__,
- ((48 % new_sd_divisor) ? (33000 / new_sd_divisor) : (33 / new_sd_divisor)),
- ((48 % new_sd_divisor) ? "KHz" : "MHz")));
+ ((33 % new_sd_divisor) ? (33000 / new_sd_divisor) : (33 / new_sd_divisor)),
+ ((33 % new_sd_divisor) ? "KHz" : "MHz")));
} else if (sd->controller_type == SDIOH_TYPE_BCM27XX) {
} else {
@@ -2705,7 +2721,7 @@ set_client_block_size(sdioh_info_t *sd, int func, int block_size)
(block_size >> 8) & 0xff);
}
- /* Do not set the block size in the SDIO Host register, that
+ /* Do not set the block size in the SDIO Host register, that
* is func dependent and will get done on an individual
* transaction basis
*/
diff --git a/src/bcmsdio/sys/bcmsdstd_linux.c b/src/bcmsdio/sys/bcmsdstd_linux.c
index 022fa0e..5746b08 100644
--- a/src/bcmsdio/sys/bcmsdstd_linux.c
+++ b/src/bcmsdio/sys/bcmsdstd_linux.c
@@ -1,11 +1,11 @@
/*
* 'Standard' SDIO HOST CONTROLLER driver - linux portion
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/branding.inc b/src/branding.inc
index 417c5aa..8491edd 100644
--- a/src/branding.inc
+++ b/src/branding.inc
@@ -1,8 +1,8 @@
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/dhd/exe/GNUmakefile b/src/dhd/exe/GNUmakefile
index 0b90015..bbd0076 100644
--- a/src/dhd/exe/GNUmakefile
+++ b/src/dhd/exe/GNUmakefile
@@ -2,11 +2,11 @@
# GNUmakefile for dhd/exe
# (Basically a copy of wl/exe linux portion.)
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/dhd/exe/dhdu.c b/src/dhd/exe/dhdu.c
index b4bcbdd..2101323 100644
--- a/src/dhd/exe/dhdu.c
+++ b/src/dhd/exe/dhdu.c
@@ -1,11 +1,11 @@
/*
* Common code for dhd utility, hacked from wl utility
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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: dhdu.c,v 1.52.2.10.2.6.16.9 2009/03/12 21:33:24 Exp $
+ * $Id: dhdu.c,v 1.52.2.10.2.6.16.10 2009/04/28 00:12:25 Exp $
*/
/* For backwards compatibility, the absense of the define 'BWL_NO_FILESYSTEM_SUPPORT'
@@ -147,20 +147,6 @@ cmd_t dhd_cmds[] = {
"get/set maximum number of rx frames per scheduling"},
{ "txminmax", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
"get/set maximum number of tx frames per scheduling while rx frames outstanding"},
- { "dpcprio", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd dpc thread priority"},
- { "rxdpcprio", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd rx dpc thread priority"},
- { "sendupprio", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd sendup thread priority"},
- { "watchdogprio", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd watchdog thread priority"},
- { "dpctq", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd tx dpc thread quantum"},
- { "senduptq", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd sendup thread time quantum"},
- { "rxflow", dhd_varint, DHD_GET_VAR, DHD_SET_VAR,
- "get/set dhd rx flow control enable flag"},
{ "dump", dhd_varstr, DHD_GET_VAR, -1,
"dump information"},
{ "clearcounts", dhd_var_void, -1, DHD_SET_VAR,
diff --git a/src/dhd/exe/dhdu.h b/src/dhd/exe/dhdu.h
index 5de2452..fd019d4 100644
--- a/src/dhd/exe/dhdu.h
+++ b/src/dhd/exe/dhdu.h
@@ -1,11 +1,11 @@
/*
* Common code for dhd utility, hacked from wl utility
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/exe/dhdu_cmd.h b/src/dhd/exe/dhdu_cmd.h
index 78f6a9e..8e1f642 100644
--- a/src/dhd/exe/dhdu_cmd.h
+++ b/src/dhd/exe/dhdu_cmd.h
@@ -1,11 +1,11 @@
/*
* Command structure for dhd command line utility, copied from wl utility
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/exe/dhdu_linux.c b/src/dhd/exe/dhdu_linux.c
index 3bf1dd9..a69a2ba 100644
--- a/src/dhd/exe/dhdu_linux.c
+++ b/src/dhd/exe/dhdu_linux.c
@@ -1,11 +1,11 @@
/*
* Linux port of dhd command line utility, hacked from wl utility.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/linux/Makefile b/src/dhd/linux/Makefile
index 3418513..90950d8 100755
--- a/src/dhd/linux/Makefile
+++ b/src/dhd/linux/Makefile
@@ -1,11 +1,11 @@
# GNU Makefile for Broadcom Dongle Host Driver
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
@@ -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.12.20 2009/03/24 23:07:15 Exp $
+# $Id: Makefile,v 1.55.2.6.2.10.12.21 2009/04/09 22:43:42 Exp $
#
# Try a couple of places for LINUXDIR if not specified
@@ -105,7 +105,7 @@ ifeq (,$(findstring 2.4.18,$(LINUXVER)))
WFLAGS += -Werror
endif
-CFILES:= dhd_linux.c linux_osl.c bcmutils.c dhd_common.c
+CFILES:= dhd_linux.c linux_osl.c bcmutils.c dhd_common.c dhd_custom_gpio.c
CFILES += siutils.c sbutils.c aiutils.c hndpmu.c
# threading options
diff --git a/src/dhd/linux/makefile.26 b/src/dhd/linux/makefile.26
index 1b01d90..86c220b 100644
--- a/src/dhd/linux/makefile.26
+++ b/src/dhd/linux/makefile.26
@@ -2,11 +2,11 @@
# Makefile fragment for Linux 2.6
# Broadcom DHD Driver
#
-# Copyright (C) 1999-2008, Broadcom Corporation
+# Copyright (C) 1999-2009, 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”),
+# 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:
#
diff --git a/src/dhd/sys/dhd.h b/src/dhd/sys/dhd.h
index 74c4ae1..61c30ad 100644
--- a/src/dhd/sys/dhd.h
+++ b/src/dhd/sys/dhd.h
@@ -4,11 +4,11 @@
* Provides type definitions and function prototypes used to link the
* DHD OS, bus, and protocol modules.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.28.18 2009/03/06 21:20:39 Exp $
+ * $Id: dhd.h,v 1.32.4.7.2.4.28.23 2009/04/28 01:51:56 Exp $
*/
/****************
@@ -193,6 +193,8 @@ extern void dhd_os_sdlock_txq(dhd_pub_t * pub);
extern void dhd_os_sdunlock_txq(dhd_pub_t * pub);
extern void dhd_os_sdlock_rxq(dhd_pub_t * pub);
extern void dhd_os_sdunlock_rxq(dhd_pub_t * pub);
+extern void dhd_os_sdlock_sndup_rxq(dhd_pub_t * pub);
+extern void dhd_os_sdunlock_sndup_rxq(dhd_pub_t * pub);
int setScheduler(struct task_struct *p, int policy, struct sched_param *param);
@@ -211,6 +213,10 @@ extern int dhd_sendpkt(dhd_pub_t *dhdp, uint ifidx, void *pkt);
/* Send event to host */
extern void dhd_sendup_event(dhd_pub_t *dhdp, wl_event_msg_t *event, void *data);
+extern int dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag);
+extern uint dhd_bus_status(dhd_pub_t *dhdp);
+extern int dhd_bus_start(dhd_pub_t *dhdp);
+
/*
@@ -248,8 +254,8 @@ extern uint dhd_pktgen_len;
/* optionally set by a module_param_string() */
#define MOD_PARAM_PATHLEN 2048
-extern char firmware_path[MOD_PARAM_PATHLEN];
-extern char nvram_path[MOD_PARAM_PATHLEN];
+extern char fw_path[MOD_PARAM_PATHLEN];
+extern char nv_path[MOD_PARAM_PATHLEN];
/* For supporting multiple interfaces */
#define DHD_MAX_IFS 16
diff --git a/src/dhd/sys/dhd_bus.h b/src/dhd/sys/dhd_bus.h
index ebc508b..3ec9e9a 100644
--- a/src/dhd/sys/dhd_bus.h
+++ b/src/dhd/sys/dhd_bus.h
@@ -4,11 +4,11 @@
* Provides type definitions and function prototypes used to link the
* DHD OS, bus, and protocol modules.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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_bus.h,v 1.4.6.3.2.3.20.4 2009/02/03 21:40:44 Exp $
+ * $Id: dhd_bus.h,v 1.4.6.3.2.3.20.5 2009/04/29 04:40:15 Exp $
*/
#ifndef _dhd_bus_h_
@@ -40,7 +40,7 @@ extern void dhd_bus_unregister(void);
/* Download firmware image and nvram image */
extern bool dhd_bus_download_firmware(struct dhd_bus *bus, osl_t *osh,
- char *firmware_path, char *nvram_path);
+ char *fw_path, char *nv_path);
/* Stop bus module: clear pending frames, disable data flow */
extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
diff --git a/src/dhd/sys/dhd_cdc.c b/src/dhd/sys/dhd_cdc.c
index 74a72a1..070d854 100644
--- a/src/dhd/sys/dhd_cdc.c
+++ b/src/dhd/sys/dhd_cdc.c
@@ -1,11 +1,11 @@
/*
* DHD Protocol Module for CDC and BDC.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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_cdc.c,v 1.22.4.2.4.8.2.9 2009/02/25 07:27:58 Exp $
+ * $Id: dhd_cdc.c,v 1.22.4.2.4.8.2.11 2009/04/17 05:34:23 Exp $
*
* BDC is like CDC, except it includes a header for data packets to convey
* packet priority over the bus, and flags (e.g. to indicate checksum status
@@ -480,10 +480,15 @@ dhd_prot_dstats(dhd_pub_t *dhd)
void
dhd_preinit_ioctls(dhd_pub_t *dhd)
{
+ char eventmask[WL_EVENTING_MASK_LEN];
+ char iovbuf[WLC_IOCTL_SMLEN]; /* Room for "event_msgs" + '\0' + bitvec */
uint up = 0;
uint roamvar = 1;
- char eventmask[WL_EVENTING_MASK_LEN];
- char iovbuf[WL_EVENTING_MASK_LEN + 12]; /* Room for "event_msgs" + '\0' + bitvec */
+
+ /* Get the device MAC address */
+ strcpy(iovbuf, "cur_etheraddr");
+ dhdcdc_query_ioctl(dhd, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
+ memcpy(dhd->mac.octet, iovbuf, ETHER_ADDR_LEN);
/* Force STA UP */
dhdcdc_set_ioctl(dhd, 0, WLC_UP, (char *)&up, sizeof(up));
@@ -492,6 +497,10 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
bcm_mkiovar("roam_off", (char *)&roamvar, 4, iovbuf, sizeof(iovbuf));
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
+ bcm_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, sizeof(iovbuf));
+ dhdcdc_set_ioctl(dhd, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
+ bcopy(iovbuf, eventmask, WL_EVENTING_MASK_LEN);
+
/* Setup event_msgs */
bzero(eventmask, sizeof(eventmask));
setbit(eventmask, WLC_E_SET_SSID);
@@ -520,13 +529,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
void
dhd_prot_init(dhd_pub_t *dhd)
{
- char buf[128];
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
- /* Get the device MAC address */
- strcpy(buf, "cur_etheraddr");
- dhdcdc_query_ioctl(dhd, 0, WLC_GET_VAR, buf, sizeof(buf));
- memcpy(dhd->mac.octet, buf, ETHER_ADDR_LEN);
dhd_preinit_ioctls(dhd);
diff --git a/src/dhd/sys/dhd_common.c b/src/dhd/sys/dhd_common.c
index d6e2ee0..49e65b5 100644
--- a/src/dhd/sys/dhd_common.c
+++ b/src/dhd/sys/dhd_common.c
@@ -1,11 +1,11 @@
/*
* Broadcom Dongle Host Driver (DHD), common DHD core.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.8.2.21 2009/02/11 01:23:12 Exp $
+ * $Id: dhd_common.c,v 1.5.6.8.2.8.2.23 2009/04/29 23:58:32 Exp $
*/
#include <typedefs.h>
#include <osl.h>
@@ -39,11 +39,8 @@
int dhd_msg_level;
- /* Definitions to provide path to the firmware and nvram
- *example nvram_path[MOD_PARAM_PATHLEN]="/projects/wlan/nvram.txt"
- */
-char firmware_path[MOD_PARAM_PATHLEN];
-char nvram_path[MOD_PARAM_PATHLEN];
+char fw_path[MOD_PARAM_PATHLEN];
+char nv_path[MOD_PARAM_PATHLEN];
/* Last connection success/failure status */
uint32 dhd_conn_event;
@@ -103,6 +100,8 @@ dhd_common_init(void)
* first time that the driver is initialized vs subsequent initializations.
*/
dhd_msg_level = DHD_ERROR_VAL;
+ fw_path[0] = '\0';
+ nv_path[0] = '\0';
}
static int
diff --git a/src/dhd/sys/dhd_custom_gpio.c b/src/dhd/sys/dhd_custom_gpio.c
new file mode 100644
index 0000000..b985f9e
--- /dev/null
+++ b/src/dhd/sys/dhd_custom_gpio.c
@@ -0,0 +1,49 @@
+/*
+* Customer code to add GPIO control during WLAN start/stop
+* Copyright (C) 1999-2009, 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: dhd_custom_gpio.c,v 1.1.2.2 2009/04/13 07:39:23 Exp $
+*/
+
+#include <typedefs.h>
+#include <linuxver.h>
+#include <osl.h>
+#include <bcmutils.h>
+
+
+#include <wlioctl.h>
+#include <wl_iw.h>
+
+#define WL_ERROR(x) printf x
+
+/* Customer specific function to insert/remove wlan reset gpio pin */
+void
+dhd_customer_gpio_wlan_reset(bool onoff)
+{
+ if (onoff == G_WLAN_SET_OFF) {
+ WL_ERROR(("%s: call customer specific GPIO to insert WLAN RESET\n", __FUNCTION__));
+ WL_ERROR(("=========== WLAN placed in RESET ========\n"));
+ }
+ else {
+ WL_ERROR(("%s: callc customer specific GPIO to remove WLAN RESET\n", __FUNCTION__));
+ WL_ERROR(("=========== WLAN goin back to live ========\n"));
+ }
+}
diff --git a/src/dhd/sys/dhd_dbg.h b/src/dhd/sys/dhd_dbg.h
index c2040e3..f14f744 100644
--- a/src/dhd/sys/dhd_dbg.h
+++ b/src/dhd/sys/dhd_dbg.h
@@ -1,11 +1,11 @@
/*
* Debug/trace/assert driver definitions for Dongle Host Driver.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/sys/dhd_linux.c b/src/dhd/sys/dhd_linux.c
index 968c474..4cd063c 100644
--- a/src/dhd/sys/dhd_linux.c
+++ b/src/dhd/sys/dhd_linux.c
@@ -2,11 +2,11 @@
* Broadcom Dongle Host Driver (DHD), Linux-specific network interface
* Basically selected code segments from usb-cdc.c and usb-rndis.c
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.13.6.29 2009/02/11 23:00:23 Exp $
+ * $Id: dhd_linux.c,v 1.65.4.9.2.13.6.35 2009/04/30 00:02:55 Exp $
*/
#include <typedefs.h>
@@ -125,6 +125,12 @@ typedef struct dhd_info {
atomic_t pend_8021x_cnt;
} dhd_info_t;
+/* Definitions to provide path to the firmware and nvram
+* example nvram_path[MOD_PARAM_PATHLEN]="/projects/wlan/nvram.txt"
+*/
+char firmware_path[MOD_PARAM_PATHLEN];
+char nvram_path[MOD_PARAM_PATHLEN];
+
/* load firmware and/or nvram values from the filesystem */
module_param_string(firmware_path, firmware_path, MOD_PARAM_PATHLEN, 0);
module_param_string(nvram_path, nvram_path, MOD_PARAM_PATHLEN, 0);
@@ -1263,16 +1269,6 @@ dhd_stop(struct net_device *net)
dhd->pub.up = 0;
netif_stop_queue(net);
- /* Stop the protocol module */
- dhd_prot_stop(&dhd->pub);
-
- /* Stop the bus module */
- dhd_bus_stop(dhd->pub.bus, TRUE);
-
- /* Clear the watchdog timer */
- del_timer(&dhd->timer);
- dhd->wd_timer_valid = FALSE;
-
OLD_MOD_DEC_USE_COUNT;
return 0;
}
@@ -1280,7 +1276,6 @@ dhd_stop(struct net_device *net)
static int
dhd_open(struct net_device *net)
{
- int ret;
dhd_info_t *dhd = (dhd_info_t *)net->priv;
#ifdef TOE
uint32 toe_ol;
@@ -1292,33 +1287,9 @@ dhd_open(struct net_device *net)
ASSERT(ifidx == 0);
- /* download image and nvram to the dongle */
- if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
- firmware_path, nvram_path))) {
- DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s\n",
- __FUNCTION__, firmware_path, nvram_path));
- return -1;
- }
-
- /* Start the watchdog timer */
- dhd->pub.tickcnt = 0;
- dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
+ /* try to bring up bus */
+ dhd_bus_start(&dhd->pub);
- /* Bring up the bus */
- if ((ret = dhd_bus_init(&dhd->pub, TRUE)) != 0)
- return ret;
-
- atomic_set(&dhd->pend_8021x_cnt, 0);
-
- /* If bus is not ready, can't come up */
- if (dhd->pub.busstate != DHD_BUS_DATA) {
- del_timer(&dhd->timer);
- dhd->wd_timer_valid = FALSE;
- return -ENODEV;
- }
-
- /* Bus is ready, do any protocol initialization */
- dhd_prot_init(&dhd->pub);
memcpy(net->dev_addr, dhd->pub.mac.octet, ETHER_ADDR_LEN);
#ifdef TOE
@@ -1515,6 +1486,53 @@ fail:
return NULL;
}
+
+int
+dhd_bus_start(dhd_pub_t *dhdp)
+{
+ int ret = -1;
+ dhd_info_t *dhd = (dhd_info_t*)dhdp->info;
+
+ ASSERT(dhd);
+
+ DHD_TRACE(("%s: \n", __FUNCTION__));
+
+ /* try to download image and nvram to the dongle */
+ if (dhd->pub.busstate == DHD_BUS_DOWN) {
+ if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
+ fw_path, nv_path))) {
+ DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s\n",
+ __FUNCTION__, fw_path, nv_path));
+ return -1;
+ }
+ }
+
+ /* Start the watchdog timer */
+ dhd->pub.tickcnt = 0;
+ dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
+
+ /* Bring up the bus */
+ if ((ret = dhd_bus_init(&dhd->pub, TRUE)) != 0) {
+ DHD_ERROR(("%s, dhd_bus_init failed %d\n", __FUNCTION__, ret));
+ return ret;
+ }
+
+ atomic_set(&dhd->pend_8021x_cnt, 0);
+
+ /* If bus is not ready, can't come up */
+ if (dhd->pub.busstate != DHD_BUS_DATA) {
+ del_timer(&dhd->timer);
+ dhd->wd_timer_valid = FALSE;
+ DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
+ return -ENODEV;
+ }
+
+ /* Bus is ready, do any protocol initialization */
+ dhd_prot_init(&dhd->pub);
+
+ return 0;
+}
+
int
dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
{
@@ -1568,6 +1586,17 @@ dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
printf("%s: Broadcom Dongle Host Driver\n", net->name);
+ /* updates firmware nvram path if it was provided as module paramters */
+ if ((firmware_path != NULL) && (firmware_path[0] != '\0'))
+ strcpy(fw_path, firmware_path);
+ if ((nvram_path != NULL) && (nvram_path[0] != '\0'))
+ strcpy(nv_path, nvram_path);
+
+ /* if firmware path present try to download and bring up bus */
+ if (dhd_bus_start(dhdp) != 0) {
+ DHD_TRACE(("%s: warning : check if firmware was provided\n", __FUNCTION__));
+ }
+
return 0;
fail:
@@ -1576,6 +1605,24 @@ fail:
}
void
+dhd_bus_detach(dhd_pub_t *dhdp)
+{
+ dhd_info_t *dhd = (dhd_info_t *)dhdp->info;
+
+ DHD_TRACE(("%s: Enter\n", __FUNCTION__));
+
+ /* Stop the protocol module */
+ dhd_prot_stop(&dhd->pub);
+
+ /* Stop the bus module */
+ dhd_bus_stop(dhd->pub.bus, TRUE);
+
+ /* Clear the watchdog timer */
+ del_timer(&dhd->timer);
+ dhd->wd_timer_valid = FALSE;
+}
+
+void
dhd_detach(dhd_pub_t *dhdp)
{
dhd_info_t *dhd = (dhd_info_t *)dhdp->info;
@@ -1597,7 +1644,6 @@ dhd_detach(dhd_pub_t *dhdp)
unregister_netdev(ifp->net);
}
-
if (dhd->watchdog_pid >= 0)
{
KILL_PROC(dhd->watchdog_pid, SIGTERM);
@@ -1617,6 +1663,8 @@ dhd_detach(dhd_pub_t *dhdp)
wait_for_completion(&dhd->sysioc_exited);
}
+ dhd_bus_detach(dhdp);
+
if (dhdp->prot)
dhd_prot_detach(dhdp);
@@ -1938,3 +1986,22 @@ dhd_wait_pend8021x(struct net_device *dev)
}
return pend;
}
+int
+dhd_dev_reset(struct net_device *dev, uint8 flag)
+{
+ dhd_info_t *dhd = (dhd_info_t *)dev->priv;
+
+ dhd_bus_devreset(&dhd->pub, flag);
+
+ DHD_ERROR(("%s: WLAN OFF DONE\n", __FUNCTION__));
+
+ return 1;
+}
+
+void
+dhd_dev_init_ioctl(struct net_device *dev)
+{
+ dhd_info_t *dhd = (dhd_info_t *)dev->priv;
+
+ dhd_preinit_ioctls(&dhd->pub);
+}
diff --git a/src/dhd/sys/dhd_linux_sched.c b/src/dhd/sys/dhd_linux_sched.c
index 372c8cc..3075dd3 100644
--- a/src/dhd/sys/dhd_linux_sched.c
+++ b/src/dhd/sys/dhd_linux_sched.c
@@ -1,11 +1,11 @@
/*
* Expose some of the kernel scheduler routines
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/sys/dhd_proto.h b/src/dhd/sys/dhd_proto.h
index e76788f..22db75d 100644
--- a/src/dhd/sys/dhd_proto.h
+++ b/src/dhd/sys/dhd_proto.h
@@ -4,11 +4,11 @@
* Provides type definitions and function prototypes used to link the
* DHD OS, bus, and protocol modules.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/dhd/sys/dhd_sdio.c b/src/dhd/sys/dhd_sdio.c
index 73ae9cf..aaa5750 100644
--- a/src/dhd/sys/dhd_sdio.c
+++ b/src/dhd/sys/dhd_sdio.c
@@ -1,11 +1,11 @@
/*
* DHD Bus Module for SDIO
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.36.4.39 2009/03/24 22:37:18 Exp $
+ * $Id: dhd_sdio.c,v 1.157.2.27.2.36.4.47 2009/04/29 17:46:28 Exp $
*/
#include <typedefs.h>
@@ -164,8 +164,8 @@ typedef struct dhd_bus {
bool fcstate; /* State of dongle flow-control */
uint16 cl_devid; /* cached devid for dhdsdio_probe_attach() */
- char *firmware_path; /* module_param: path to firmware image */
- char *nvram_path; /* module_param: path to nvram vars file */
+ char *fw_path; /* module_param: path to firmware image */
+ char *nv_path; /* module_param: path to nvram vars file */
const char *nvram_params; /* user specified nvram params. */
uint blocksize; /* Block size of SDIO transfers */
@@ -218,7 +218,7 @@ typedef struct dhd_bus {
uint32 sd_rxchain; /* If bcmsdh api accepts PKT chains */
bool use_rxchain; /* If dhd should use PKT chains */
bool sleeping; /* Is SDIO bus sleeping? */
- bool rxflow_enable; /* Is the rx flow control mechanism enable */
+ bool rxflow_mode; /* Is the rx flow control mechanism enable */
bool rxflow; /* Is rx flow control on */
uint prev_rxlim_hit; /* Is the previous rx limit exceeded (per dpc schedule) */
bool alp_only; /* Don't use HT clock (ALP only) */
@@ -392,10 +392,12 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start);
static int dhdsdio_download_state(dhd_bus_t *bus, bool enter);
static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh);
+static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh);
static void dhdsdio_disconnect(void *ptr);
static bool dhdsdio_chipmatch(uint16 chipid);
static bool dhdsdio_probe_attach(dhd_bus_t *bus, osl_t *osh, void *sdh,
void * regsva, uint16 devid);
+static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh);
static bool dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh);
static void dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh);
@@ -2010,57 +2012,8 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, uint32 actionid, const ch
ASSERT(bus->dhd->osh);
/* ASSERT(bus->cl_devid); */
- if (bool_val == TRUE) {
- if (bus->dhd->dongle_reset)
- break;
- /* Expect app to have torn down any connection before calling */
- /* Stop the bus, disable F2 */
- dhd_bus_stop(bus, FALSE);
-
- /* Release tx/rx buffer, detach from the dongle */
- dhdsdio_release_dongle(bus, bus->dhd->osh);
-
- bus->dhd->dongle_reset = TRUE;
- bus->dhd->up = FALSE;
-
- DHD_TRACE(("%s: WLAN OFF DONE\n", __FUNCTION__));
- /* App can now remove power from device */
- } else {
- /* App must have restored power to device before calling */
-
- DHD_TRACE(("\n\n%s: == WLAN ON ==\n", __FUNCTION__));
-
- if (!bus->dhd->dongle_reset) {
- bcmerror = BCME_NOTDOWN;
- DHD_ERROR(("%s: Set DEVRESET=FALSE invoked when device is on\n",
- __FUNCTION__));
- break;
- }
-
- /* Turn on WLAN */
- /* Reset SD client */
- bcmsdh_reset(bus->sdh);
+ dhd_bus_devreset(bus->dhd, (uint8)bool_val);
- /* Attempt to re-attach & download */
- if (dhdsdio_probe_attach(bus, bus->dhd->osh, bus->sdh,
- (uint32 *)SI_ENUM_BASE,
- bus->cl_devid)) {
- /* Attempt to download binary to the dongle */
- if (dhdsdio_probe_init(bus, bus->dhd->osh, bus->sdh) &&
- dhdsdio_download_firmware(bus, bus->dhd->osh, bus->sdh)) {
-
- /* Re-init bus, enable F2 transfer */
- dhd_bus_init((dhd_pub_t *) bus->dhd, FALSE);
-
- bus->dhd->dongle_reset = FALSE;
- bus->dhd->up = TRUE;
- DHD_TRACE(("%s: == WLAN ON DONE ===\n",
- __FUNCTION__));
- } else
- bcmerror = BCME_SDIO_ERROR;
- } else
- bcmerror = BCME_SDIO_ERROR;
- }
break;
case IOV_GVAL(IOV_DEVRESET):
@@ -2085,9 +2038,6 @@ exit:
dhd_os_sdunlock(bus->dhd);
- if (actionid == IOV_SVAL(IOV_DEVRESET) && bool_val == FALSE)
- dhd_preinit_ioctls((dhd_pub_t *) bus->dhd);
-
return bcmerror;
}
@@ -2233,6 +2183,8 @@ dhdsdio_download_state(dhd_bus_t *bus, bool enter)
/* Allow HT Clock now that the ARM is running. */
bus->alp_only = FALSE;
+
+ bus->dhd->busstate = DHD_BUS_LOAD;
}
fail:
/* Always return to SDIOD core */
@@ -2366,7 +2318,7 @@ dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
/* Enable clock for device interrupts */
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
- /* Disable interrupts at the chip level also */
+ /* Disable and clear interrupts at the chip level also */
W_SDREG(0, &bus->regs->hostintmask, retries);
local_hostintmask = bus->hostintmask;
bus->hostintmask = 0;
@@ -2730,7 +2682,7 @@ dhdsdio_rxglom(dhd_bus_t *bus, uint8 rxseq)
break;
}
if (sublen % DHD_SDALIGN) {
- DHD_GLOM(("%s: sublen %d not a multiple of %d\n",
+ DHD_ERROR(("%s: sublen %d not a multiple of %d\n",
__FUNCTION__, sublen, DHD_SDALIGN));
usechain = FALSE;
}
@@ -3052,10 +3004,11 @@ dhdsdio_rxglom(dhd_bus_t *bus, uint8 rxseq)
#endif /* DHD_DEBUG */
}
dhd_os_sdunlock_rxq(bus->dhd);
- dhd_os_sdunlock(bus->dhd);
- dhd_rx_frame(bus->dhd, ifidx, save_pfirst, num);
- dhd_os_sdlock(bus->dhd);
-
+ if (num) {
+ dhd_os_sdunlock(bus->dhd);
+ dhd_rx_frame(bus->dhd, ifidx, save_pfirst, num);
+ dhd_os_sdlock(bus->dhd);
+ }
bus->rxglomframes++;
bus->rxglompkts += num;
}
@@ -3300,7 +3253,7 @@ dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
}
bus->dhd->rx_readahead_cnt ++;
- /* Handle Flow Control - Brett */
+ /* Handle Flow Control */
fcbits = SDPCM_FCMASK_VALUE(&bus->rxhdr[SDPCM_FRAMETAG_LEN]);
delta = 0;
@@ -3620,9 +3573,6 @@ deliver:
continue;
}
- /* XXXX Release the lock around the rx delivery: an OS (like Windows)
- * might call tx in the same thread context, resulting in deadlock.
- */
/* Unlock during rx call */
dhd_os_sdunlock(bus->dhd);
@@ -3633,7 +3583,7 @@ deliver:
#ifdef DHD_DEBUG
/* Message if we hit the limit */
if (!rxleft && !sdtest)
- DHD_ERROR(("%s: hit rx limit of %d frames\n", __FUNCTION__, maxframes));
+ DHD_DATA(("%s: hit rx limit of %d frames\n", __FUNCTION__, maxframes));
else
#endif /* DHD_DEBUG */
DHD_DATA(("%s: processed %d frames\n", __FUNCTION__, rxcount));
@@ -3842,7 +3792,7 @@ dhdsdio_dpc(dhd_bus_t *bus)
/* Would be active due to wake-wlan in gSPI */
if (intstatus & I_CHIPACTIVE) {
- DHD_ERROR(("Dongle reports CHIPACTIVE\n"));
+ DHD_INFO(("Dongle reports CHIPACTIVE\n"));
intstatus &= ~I_CHIPACTIVE;
}
@@ -4457,6 +4407,11 @@ dhdsdio_probe(uint16 venid, uint16 devid, uint16 bus_no, uint16 slot,
}
/* Allocate buffers */
+ if (!(dhdsdio_probe_malloc(bus, osh, sdh))) {
+ DHD_ERROR(("%s: dhdsdio_probe_malloc failed\n", __FUNCTION__));
+ goto fail;
+ }
+
if (!(dhdsdio_probe_init(bus, osh, sdh))) {
DHD_ERROR(("%s: dhdsdio_probe_init failed\n", __FUNCTION__));
goto fail;
@@ -4480,6 +4435,8 @@ dhdsdio_probe(uint16 venid, uint16 devid, uint16 bus_no, uint16 slot,
DHD_ERROR(("%s: Net attach failed!!\n", __FUNCTION__));
goto fail;
}
+
+
return bus;
fail:
@@ -4637,10 +4594,8 @@ fail:
}
static bool
-dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh)
+dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh)
{
- int32 fnum;
-
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
if (bus->dhd->maxctl) {
@@ -4656,6 +4611,8 @@ dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh)
if (!(bus->databuf = MALLOC(osh, MAX_DATA_BUF))) {
DHD_ERROR(("%s: MALLOC of %d-byte databuf failed\n",
__FUNCTION__, MAX_DATA_BUF));
+ /* release rxbuf which was already located as above */
+ if (!bus->rxblen) MFREE(osh, bus->rxbuf, bus->rxblen);
goto fail;
}
@@ -4665,6 +4622,20 @@ dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh)
else
bus->dataptr = bus->databuf;
+ return TRUE;
+
+fail:
+ return FALSE;
+}
+
+
+static bool
+dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh)
+{
+ int32 fnum;
+
+ DHD_TRACE(("%s: Enter\n", __FUNCTION__));
+
#ifdef SDTEST
dhdsdio_pktgen_init(bus);
#endif /* SDTEST */
@@ -4729,18 +4700,15 @@ dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh)
bus->use_rxchain = (bool)bus->sd_rxchain;
return TRUE;
-
-fail:
- return FALSE;
}
bool
dhd_bus_download_firmware(struct dhd_bus *bus, osl_t *osh,
- char *firmware_path, char *nvram_path)
+ char *fw_path, char *nv_path)
{
bool ret;
- bus->firmware_path = firmware_path;
- bus->nvram_path = nvram_path;
+ bus->fw_path = fw_path;
+ bus->nv_path = nv_path;
ret = dhdsdio_download_firmware(bus, osh, bus->sdh);
@@ -4776,8 +4744,9 @@ dhdsdio_release(dhd_bus_t *bus, osl_t *osh)
bus->dhd = NULL;
}
- dhdsdio_release_dongle(bus, osh);
+ dhdsdio_release_malloc(bus, osh);
+ dhdsdio_release_dongle(bus, osh);
/* De-register interrupt handler */
bcmsdh_intr_dereg(bus->sdh);
@@ -4791,7 +4760,7 @@ dhdsdio_release(dhd_bus_t *bus, osl_t *osh)
}
static void
-dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh)
+dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh)
{
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
@@ -4808,6 +4777,16 @@ dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh)
MFREE(osh, bus->databuf, MAX_DATA_BUF);
bus->databuf = NULL;
}
+}
+
+
+static void
+dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh)
+{
+ DHD_TRACE(("%s: Enter\n", __FUNCTION__));
+
+ if (bus->dhd && bus->dhd->dongle_reset)
+ return;
if (bus->sih) {
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
@@ -4902,7 +4881,7 @@ err:
#endif /* BCMEMBEDIMAGE */
static int
-dhdsdio_download_code_file(struct dhd_bus *bus, char *firmware_path)
+dhdsdio_download_code_file(struct dhd_bus *bus, char *fw_path)
{
int bcmerror = -1;
int offset = 0;
@@ -4910,9 +4889,9 @@ dhdsdio_download_code_file(struct dhd_bus *bus, char *firmware_path)
void * image = NULL;
uint8 * memblock = NULL, * memptr;
- DHD_INFO(("%s: download firmware %s\n", __FUNCTION__, firmware_path));
+ DHD_INFO(("%s: download firmware %s\n", __FUNCTION__, fw_path));
- image = dhd_os_open_image(firmware_path);
+ image = dhd_os_open_image(fw_path);
if (image == NULL)
goto err;
@@ -5023,17 +5002,17 @@ dhdsdio_download_nvram(struct dhd_bus *bus)
void * image = NULL;
char * memblock = NULL;
char *bufp;
- char *nvram_path;
+ char *nv_path;
bool nvram_file_exists;
- nvram_path = bus->nvram_path;
+ nv_path = bus->nv_path;
- nvram_file_exists = ((nvram_path != NULL) && (nvram_path[0] != '\0'));
+ nvram_file_exists = ((nv_path != NULL) && (nv_path[0] != '\0'));
if (!nvram_file_exists && (bus->nvram_params == NULL))
return (0);
if (nvram_file_exists) {
- image = dhd_os_open_image(nvram_path);
+ image = dhd_os_open_image(nv_path);
if (image == NULL)
goto err;
}
@@ -5093,11 +5072,11 @@ _dhdsdio_download_firmware(struct dhd_bus *bus)
bool dlok = FALSE; /* download firmware succeeded */
/* Out immediately if no image to download */
- if ((bus->firmware_path == NULL) || (bus->firmware_path[0] == '\0')) {
+ if ((bus->fw_path == NULL) || (bus->fw_path[0] == '\0')) {
#ifdef BCMEMBEDIMAGE
embed = TRUE;
#else
- return 0;
+ return bcmerror;
#endif
}
@@ -5108,8 +5087,8 @@ _dhdsdio_download_firmware(struct dhd_bus *bus)
}
/* External image takes precedence if specified */
- if ((bus->firmware_path != NULL) && (bus->firmware_path[0] != '\0')) {
- if (dhdsdio_download_code_file(bus, bus->firmware_path)) {
+ if ((bus->fw_path != NULL) && (bus->fw_path[0] != '\0')) {
+ if (dhdsdio_download_code_file(bus, bus->fw_path)) {
DHD_ERROR(("%s: dongle image file download failed\n", __FUNCTION__));
#ifdef BCMEMBEDIMAGE
embed = TRUE;
@@ -5201,3 +5180,65 @@ dhd_bus_hdrlen(struct dhd_bus *bus)
{
return SDPCM_HDRLEN;
}
+
+int
+dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
+{
+ int bcmerror = 0;
+ dhd_bus_t *bus;
+
+ bus = dhdp->bus;
+
+ if (flag == TRUE) {
+ if (!bus->dhd->dongle_reset) {
+ /* Expect app to have torn down any connection before calling */
+ /* Stop the bus, disable F2 */
+ dhd_bus_stop(bus, FALSE);
+
+ /* Clean tx/rx buffer pointers, detach from the dongle */
+ dhdsdio_release_dongle(bus, bus->dhd->osh);
+
+ bus->dhd->dongle_reset = TRUE;
+ bus->dhd->up = FALSE;
+
+ DHD_TRACE(("%s: WLAN OFF DONE\n", __FUNCTION__));
+ /* App can now remove power from device */
+ } else
+ bcmerror = BCME_SDIO_ERROR;
+ } else {
+ /* App must have restored power to device before calling */
+
+ DHD_TRACE(("\n\n%s: == WLAN ON ==\n", __FUNCTION__));
+
+ if (bus->dhd->dongle_reset) {
+ /* Turn on WLAN */
+ /* Reset SD client */
+ bcmsdh_reset(bus->sdh);
+
+ /* Attempt to re-attach & download */
+ if (dhdsdio_probe_attach(bus, bus->dhd->osh, bus->sdh,
+ (uint32 *)SI_ENUM_BASE,
+ bus->cl_devid)) {
+ /* Attempt to download binary to the dongle */
+ if (dhdsdio_probe_init(bus, bus->dhd->osh, bus->sdh) &&
+ dhdsdio_download_firmware(bus, bus->dhd->osh, bus->sdh)) {
+
+ /* Re-init bus, enable F2 transfer */
+ dhd_bus_init((dhd_pub_t *) bus->dhd, FALSE);
+
+ bus->dhd->dongle_reset = FALSE;
+ bus->dhd->up = TRUE;
+ DHD_TRACE(("%s: WLAN ON DONE\n", __FUNCTION__));
+ } else
+ bcmerror = BCME_SDIO_ERROR;
+ } else
+ bcmerror = BCME_SDIO_ERROR;
+ } else {
+ bcmerror = BCME_NOTDOWN;
+ DHD_ERROR(("%s: Set DEVRESET=FALSE invoked when device is on\n",
+ __FUNCTION__));
+ bcmerror = BCME_SDIO_ERROR;
+ }
+ }
+ return bcmerror;
+}
diff --git a/src/dongle/dngl_stats.h b/src/dongle/dngl_stats.h
index 712ed73..c1776a8 100644
--- a/src/dongle/dngl_stats.h
+++ b/src/dongle/dngl_stats.h
@@ -2,11 +2,11 @@
* Common stats definitions for clients of dongle
* ports
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/aidmp.h b/src/include/aidmp.h
index 2cc6502..44b3de8 100644
--- a/src/include/aidmp.h
+++ b/src/include/aidmp.h
@@ -1,11 +1,11 @@
/*
* Broadcom AMBA Interconnect definitions.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmcdc.h b/src/include/bcmcdc.h
index 6fba8e9..56d9f13 100644
--- a/src/include/bcmcdc.h
+++ b/src/include/bcmcdc.h
@@ -4,11 +4,11 @@
*
* Definitions subject to change without notice.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmdefs.h b/src/include/bcmdefs.h
index 5c9dde9..d7811b4 100644
--- a/src/include/bcmdefs.h
+++ b/src/include/bcmdefs.h
@@ -1,11 +1,11 @@
/*
* Misc system wide definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -34,7 +34,18 @@
#define bcmreclaimed 0
+#define _data _data
+#define _fn _fn
+#define _data _data
+#define _fn _fn
+#define _fn _fn
#define CONST const
+
+
+
+#define _data _data
+#define _fn _fn
+#define _fn _fn
#define STATIC static
diff --git a/src/include/bcmdevs.h b/src/include/bcmdevs.h
index c907b20..81a74f1 100644
--- a/src/include/bcmdevs.h
+++ b/src/include/bcmdevs.h
@@ -1,15 +1,27 @@
/*
* Broadcom device-specific manifest constants.
*
- * Copyright (C) 2008, Broadcom Corporation
- * All Rights Reserved.
+ * Copyright (C) 1999-2009, 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.
*
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id: bcmdevs.h,v 13.172.4.5.4.11.4.5 2009/01/21 18:50:52 Exp $
+ * $Id: bcmdevs.h,v 13.172.4.5.4.11.4.6 2009/04/10 19:14:12 Exp $
*/
@@ -51,8 +63,8 @@
#define BCM4315_D11A_ID 0x4336
+#define SDIOH_FPGA_ID 0x43f2
#define SPIH_FPGA_ID 0x43f5
-#define SDHCI_FPGA_ID 0x43fa
#define BCM4710_DEVICE_ID 0x4710
#define BCM27XX_SDIOH_ID 0x2702
#define PCIXX21_FLASHMEDIA0_ID 0x8033
diff --git a/src/include/bcmendian.h b/src/include/bcmendian.h
index a34d44f..17637fa 100644
--- a/src/include/bcmendian.h
+++ b/src/include/bcmendian.h
@@ -1,11 +1,11 @@
/*
* Byte order utilities
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmpcispi.h b/src/include/bcmpcispi.h
index dcaf6e0..e3be826 100644
--- a/src/include/bcmpcispi.h
+++ b/src/include/bcmpcispi.h
@@ -1,11 +1,11 @@
/*
* Broadcom PCI-SPI Host Controller Register Definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmperf.h b/src/include/bcmperf.h
index e0cb2a0..dfc3f44 100644
--- a/src/include/bcmperf.h
+++ b/src/include/bcmperf.h
@@ -1,11 +1,11 @@
/*
* Performance counters software interface.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmsdbus.h b/src/include/bcmsdbus.h
index c649ba3..ad2c173 100644
--- a/src/include/bcmsdbus.h
+++ b/src/include/bcmsdbus.h
@@ -5,11 +5,11 @@
* Definitions for API from sdio common code (bcmsdh) to individual
* host controller drivers.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -25,7 +25,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: bcmsdbus.h,v 13.11.14.2.16.2 2009/03/19 04:07:42 Exp $
+ * $Id: bcmsdbus.h,v 13.11.14.2.16.3 2009/04/13 18:54:22 Exp $
*/
/*
@@ -112,6 +112,10 @@ extern int sdioh_iovar_op(sdioh_info_t *si, const char *name,
/* Issue abort to the specified function and clear controller as needed */
extern int sdioh_abort(sdioh_info_t *si, uint fnc);
+/* Start and Stop SDIO without re-enumerating the SD card. */
+extern int sdioh_start(sdioh_info_t *si, int stage);
+extern int sdioh_stop(sdioh_info_t *si);
+
/* Reset and re-initialize the device */
extern int sdioh_sdio_reset(sdioh_info_t *si);
diff --git a/src/include/bcmsdh.h b/src/include/bcmsdh.h
index c8f04b4..5886019 100644
--- a/src/include/bcmsdh.h
+++ b/src/include/bcmsdh.h
@@ -3,11 +3,11 @@
* export functions to client drivers
* abstract OS and BUS specific details of SDIO
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -23,7 +23,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.h,v 13.35.14.7.16.3 2009/03/19 04:07:42 Exp $
+ * $Id: bcmsdh.h,v 13.35.14.7.16.4 2009/04/13 18:54:22 Exp $
*/
#ifndef _bcmsdh_h_
@@ -37,7 +37,6 @@ extern const uint bcmsdh_msglevel;
#define BCMSDH_INFO(x)
/* forward declarations */
-
typedef struct bcmsdh_info bcmsdh_info_t;
typedef void (*bcmsdh_cb_fn_t)(void *);
@@ -152,6 +151,12 @@ extern int bcmsdh_rwdata(void *sdh, uint rw, uint32 addr, uint8 *buf, uint nbyte
/* Issue an abort to the specified function */
extern int bcmsdh_abort(void *sdh, uint fn);
+/* Start SDIO Host Controller communication */
+extern int bcmsdh_start(void *sdh, int stage);
+
+/* Stop SDIO Host Controller communication */
+extern int bcmsdh_stop(void *sdh);
+
/* Returns the "Device ID" of target device on the SDIO bus. */
extern int bcmsdh_query_device(void *sdh);
diff --git a/src/include/bcmsdh_sdmmc.h b/src/include/bcmsdh_sdmmc.h
index e900971..a135fae 100644
--- a/src/include/bcmsdh_sdmmc.h
+++ b/src/include/bcmsdh_sdmmc.h
@@ -1,11 +1,11 @@
/*
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.h,v 13.1.2.2.6.1 2009/03/19 04:07:42 Exp $
+ * $Id: bcmsdh_sdmmc.h,v 13.1.2.2.6.2 2009/04/09 17:21:36 Exp $
*/
#ifndef __BCMSDH_SDMMC_H__
@@ -38,6 +38,7 @@
#define sd_init_dma(sd)
#define sd_ack_intr(sd)
#define sd_wakeup(sd);
+
/* Allocate/init/free per-OS private data */
extern int sdioh_sdmmc_osinit(sdioh_info_t *sd);
extern void sdioh_sdmmc_osfree(sdioh_info_t *sd);
@@ -115,7 +116,7 @@ extern void sdioh_sdmmc_free_irq(uint irq, sdioh_info_t *sd);
typedef struct _BCMSDH_SDMMC_INSTANCE {
sdioh_info_t *sd;
- struct sdio_func *func[3];
+ struct sdio_func *func[SDIOD_MAX_IOFUNCS];
uint32 host_claimed;
} BCMSDH_SDMMC_INSTANCE, *PBCMSDH_SDMMC_INSTANCE;
diff --git a/src/include/bcmsdspi.h b/src/include/bcmsdspi.h
index 338244e..b1e2be9 100644
--- a/src/include/bcmsdspi.h
+++ b/src/include/bcmsdspi.h
@@ -1,11 +1,11 @@
/*
* SD-SPI Protocol Conversion - BCMSDH->SPI Translation Layer
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmsdstd.h b/src/include/bcmsdstd.h
index 28b89e9..6bbc358 100644
--- a/src/include/bcmsdstd.h
+++ b/src/include/bcmsdstd.h
@@ -1,11 +1,11 @@
/*
* 'Standard' SDIO HOST CONTROLLER driver
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmspi.h b/src/include/bcmspi.h
index 1687e7d..0c46538 100644
--- a/src/include/bcmspi.h
+++ b/src/include/bcmspi.h
@@ -1,11 +1,11 @@
/*
* Broadcom SPI Low-Level Hardware Driver API
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmutils.h b/src/include/bcmutils.h
index 567a31d..b7a58f9 100644
--- a/src/include/bcmutils.h
+++ b/src/include/bcmutils.h
@@ -1,11 +1,11 @@
/*
* Misc useful os-independent macros and functions.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/bcmwifi.h b/src/include/bcmwifi.h
index dd92183..f5a5874 100644
--- a/src/include/bcmwifi.h
+++ b/src/include/bcmwifi.h
@@ -3,11 +3,11 @@
* This header file housing the define and function prototype use by
* both the wl driver, tools & Apps.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/dhdioctl.h b/src/include/dhdioctl.h
index 981a5a4..41c5974 100644
--- a/src/include/dhdioctl.h
+++ b/src/include/dhdioctl.h
@@ -5,11 +5,11 @@
*
* Definitions subject to change without notice.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/epivers.h b/src/include/epivers.h
index 1298982..6399a8f 100644
--- a/src/include/epivers.h
+++ b/src/include/epivers.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -31,18 +31,18 @@
#define EPI_MINOR_VERSION 217
-#define EPI_RC_NUMBER 24
+#define EPI_RC_NUMBER 28
#define EPI_INCREMENTAL_NUMBER 0
#define EPI_BUILD_NUMBER 0
-#define EPI_VERSION 4, 217, 24, 0
+#define EPI_VERSION 4, 217, 28, 0
-#define EPI_VERSION_NUM 0x04d91800
+#define EPI_VERSION_NUM 0x04d91c00
-#define EPI_VERSION_STR "4.217.24.0"
-#define EPI_ROUTER_VERSION_STR "4.217.24.0"
+#define EPI_VERSION_STR "4.217.28.0"
+#define EPI_ROUTER_VERSION_STR "4.217.28.0"
#endif
diff --git a/src/include/hndpmu.h b/src/include/hndpmu.h
index 0c9fcc0..ad40d4a 100644
--- a/src/include/hndpmu.h
+++ b/src/include/hndpmu.h
@@ -1,11 +1,11 @@
/*
* HND SiliconBackplane PMU support.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/hndsoc.h b/src/include/hndsoc.h
index f83870c..dcbab43 100644
--- a/src/include/hndsoc.h
+++ b/src/include/hndsoc.h
@@ -1,11 +1,11 @@
/*
* Broadcom HND chip & on-chip-interconnect-related definitions.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/linux_osl.h b/src/include/linux_osl.h
index b15615a..251a93a 100644
--- a/src/include/linux_osl.h
+++ b/src/include/linux_osl.h
@@ -1,11 +1,11 @@
/*
* Linux OS Independent Layer
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/linuxver.h b/src/include/linuxver.h
index 9883e6c..a3dadda 100644
--- a/src/include/linuxver.h
+++ b/src/include/linuxver.h
@@ -2,11 +2,11 @@
* Linux-specific abstractions to gain some independence from linux kernel versions.
* Pave over some 2.2 versus 2.4 versus 2.6 kernel differences.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/miniopt.h b/src/include/miniopt.h
index 361c447..b37550e 100644
--- a/src/include/miniopt.h
+++ b/src/include/miniopt.h
@@ -1,11 +1,11 @@
/*
* Command line options parser.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/msgtrace.h b/src/include/msgtrace.h
index e99ce31..f676144 100644
--- a/src/include/msgtrace.h
+++ b/src/include/msgtrace.h
@@ -1,11 +1,11 @@
/*
* Trace messages sent over HBUS
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/osl.h b/src/include/osl.h
index 01375af..1fbc6f4 100644
--- a/src/include/osl.h
+++ b/src/include/osl.h
@@ -1,11 +1,11 @@
/*
* OS Abstraction Layer
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/packed_section_end.h b/src/include/packed_section_end.h
index fd26590..903bdfb 100644
--- a/src/include/packed_section_end.h
+++ b/src/include/packed_section_end.h
@@ -15,11 +15,11 @@
* #include <packed_section_end.h>
*
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/packed_section_start.h b/src/include/packed_section_start.h
index ef014f0..c2aecfd 100644
--- a/src/include/packed_section_start.h
+++ b/src/include/packed_section_start.h
@@ -15,11 +15,11 @@
* #include <packed_section_end.h>
*
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/pcicfg.h b/src/include/pcicfg.h
index 0608adb..61c2f4a 100644
--- a/src/include/pcicfg.h
+++ b/src/include/pcicfg.h
@@ -1,11 +1,11 @@
/*
* pcicfg.h: PCI configuration constants and structures.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/802.11.h b/src/include/proto/802.11.h
index 4d3562b..c1709da 100644
--- a/src/include/proto/802.11.h
+++ b/src/include/proto/802.11.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/802.11e.h b/src/include/proto/802.11e.h
index 7538fd1..2d6d287 100644
--- a/src/include/proto/802.11e.h
+++ b/src/include/proto/802.11e.h
@@ -1,11 +1,11 @@
/*
* 802.11e protocol header file
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/802.1d.h b/src/include/proto/802.1d.h
index 9648667..efd7117 100644
--- a/src/include/proto/802.1d.h
+++ b/src/include/proto/802.1d.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/bcmeth.h b/src/include/proto/bcmeth.h
index 139d216..7769dfb 100644
--- a/src/include/proto/bcmeth.h
+++ b/src/include/proto/bcmeth.h
@@ -1,11 +1,11 @@
/*
* Broadcom Ethernettype protocol definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/bcmevent.h b/src/include/proto/bcmevent.h
index 13d8210..62641ef 100644
--- a/src/include/proto/bcmevent.h
+++ b/src/include/proto/bcmevent.h
@@ -1,11 +1,11 @@
/*
* Broadcom Event protocol definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/bcmip.h b/src/include/proto/bcmip.h
index b29404f..268eb60 100644
--- a/src/include/proto/bcmip.h
+++ b/src/include/proto/bcmip.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/eapol.h b/src/include/proto/eapol.h
index bbc4172..ec65229 100644
--- a/src/include/proto/eapol.h
+++ b/src/include/proto/eapol.h
@@ -7,7 +7,7 @@
*
* Copyright (C) 2002 Broadcom Corporation
*
- * $Id: eapol.h,v 9.18.260.1.2.1.20.4 2009/02/03 01:26:12 Exp $
+ * $Id: eapol.h,v 9.18.260.1.2.1.20.6 2009/04/08 05:01:46 Exp $
*/
#ifndef _eapol_h_
@@ -20,7 +20,7 @@
/* This marks the start of a packed structure section. */
#include <packed_section_start.h>
-#include <bcmcrypto/aeskeywrap.h>
+#define AKW_BLOCK_LEN 8 /* The only def we need here */
/* EAPOL for 802.3/Ethernet */
typedef struct {
diff --git a/src/include/proto/ethernet.h b/src/include/proto/ethernet.h
index a8ae465..a0cbffe 100644
--- a/src/include/proto/ethernet.h
+++ b/src/include/proto/ethernet.h
@@ -1,11 +1,11 @@
/*
* From FreeBSD 2.2.7: Fundamental constants relating to ethernet.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/sdspi.h b/src/include/proto/sdspi.h
index 6750f02..3c7bcf3 100644
--- a/src/include/proto/sdspi.h
+++ b/src/include/proto/sdspi.h
@@ -1,11 +1,11 @@
/*
* SD-SPI Protocol Standard
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/vlan.h b/src/include/proto/vlan.h
index 6b9886b..fc842cb 100644
--- a/src/include/proto/vlan.h
+++ b/src/include/proto/vlan.h
@@ -1,11 +1,11 @@
/*
* 802.1Q VLAN protocol definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/proto/wpa.h b/src/include/proto/wpa.h
index 3e294de..4db3a72 100644
--- a/src/include/proto/wpa.h
+++ b/src/include/proto/wpa.h
@@ -1,11 +1,11 @@
/*
* Fundamental types and constants relating to WPA
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbchipc.h b/src/include/sbchipc.h
index f6456b9..37e5e55 100644
--- a/src/include/sbchipc.h
+++ b/src/include/sbchipc.h
@@ -7,11 +7,11 @@
*
* $Id: sbchipc.h,v 13.103.2.5.4.7.4.1 2009/01/21 23:56:57 Exp $
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbconfig.h b/src/include/sbconfig.h
index e999dce..edf497c 100644
--- a/src/include/sbconfig.h
+++ b/src/include/sbconfig.h
@@ -1,11 +1,11 @@
/*
* Broadcom SiliconBackplane hardware register definitions.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbhnddma.h b/src/include/sbhnddma.h
index 2da0902..4ccc36f 100644
--- a/src/include/sbhnddma.h
+++ b/src/include/sbhnddma.h
@@ -2,11 +2,11 @@
* Generic Broadcom Home Networking Division (HND) DMA engine HW interface
* This supports the following chips: BCM42xx, 44xx, 47xx .
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbpcmcia.h b/src/include/sbpcmcia.h
index 0e10e4b..80c61b5 100644
--- a/src/include/sbpcmcia.h
+++ b/src/include/sbpcmcia.h
@@ -1,11 +1,11 @@
/*
* BCM43XX Sonics SiliconBackplane PCMCIA core hardware definitions.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbsdio.h b/src/include/sbsdio.h
index 2aabc02..4388727 100644
--- a/src/include/sbsdio.h
+++ b/src/include/sbsdio.h
@@ -4,11 +4,11 @@
*
* SDIO core support 1bit, 4 bit SDIO mode as well as SPI mode.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbsdpcmdev.h b/src/include/sbsdpcmdev.h
index 93eec37..ff508cd 100644
--- a/src/include/sbsdpcmdev.h
+++ b/src/include/sbsdpcmdev.h
@@ -2,11 +2,11 @@
* Broadcom SiliconBackplane SDIO/PCMCIA hardware-specific
* device core support
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sbsocram.h b/src/include/sbsocram.h
index 7344dc5..91aff8b 100644
--- a/src/include/sbsocram.h
+++ b/src/include/sbsocram.h
@@ -1,11 +1,11 @@
/*
* BCM47XX Sonics SiliconBackplane embedded ram core
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sdio.h b/src/include/sdio.h
index cc32f89..e849267 100644
--- a/src/include/sdio.h
+++ b/src/include/sdio.h
@@ -2,11 +2,11 @@
* SDIO spec header file
* Protocol and standard (common) device definitions
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sdioh.h b/src/include/sdioh.h
index 9bee113..e350e5e 100644
--- a/src/include/sdioh.h
+++ b/src/include/sdioh.h
@@ -2,11 +2,11 @@
* SDIO Host Controller Spec header file
* Register map and definitions for the Standard Host Controller
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/sdiovar.h b/src/include/sdiovar.h
index 97b4845..d1832d9 100644
--- a/src/include/sdiovar.h
+++ b/src/include/sdiovar.h
@@ -2,11 +2,11 @@
* Structure used by apps whose drivers access SDIO drivers.
* Pulled out separately so dhdu and wlu can both use it.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/siutils.h b/src/include/siutils.h
index 7668bdc..d076d4b 100644
--- a/src/include/siutils.h
+++ b/src/include/siutils.h
@@ -2,11 +2,11 @@
* Misc utility routines for accessing the SOC Interconnects
* of Broadcom HNBU chips.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/trxhdr.h b/src/include/trxhdr.h
index 11fb152..b79ac35 100644
--- a/src/include/trxhdr.h
+++ b/src/include/trxhdr.h
@@ -1,11 +1,11 @@
/*
* TRX image file header format.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/typedefs.h b/src/include/typedefs.h
index 716839a..7b986f4 100644
--- a/src/include/typedefs.h
+++ b/src/include/typedefs.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/include/wlioctl.h b/src/include/wlioctl.h
index 9f9dd04..dd9cb80 100644
--- a/src/include/wlioctl.h
+++ b/src/include/wlioctl.h
@@ -4,11 +4,11 @@
*
* Definitions subject to change without notice.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/aiutils.c b/src/shared/aiutils.c
index f4eb13b..e69deed 100644
--- a/src/shared/aiutils.c
+++ b/src/shared/aiutils.c
@@ -2,11 +2,11 @@
* Misc utility routines for accessing chip-specific features
* of the SiliconBackplane-based Broadcom chips.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/bcmutils.c b/src/shared/bcmutils.c
index a250185..dedbdbd 100644
--- a/src/shared/bcmutils.c
+++ b/src/shared/bcmutils.c
@@ -1,11 +1,11 @@
/*
* Driver O/S-independent utility routines
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/bcmwifi.c b/src/shared/bcmwifi.c
index a3b24a6..b460d7f 100644
--- a/src/shared/bcmwifi.c
+++ b/src/shared/bcmwifi.c
@@ -3,11 +3,11 @@
* Contents are wifi-specific, used by any kernel or app-level
* software that might want wifi things as it grows.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/hndpmu.c b/src/shared/hndpmu.c
index d8ab43c..991dfd9 100644
--- a/src/shared/hndpmu.c
+++ b/src/shared/hndpmu.c
@@ -2,11 +2,11 @@
* Misc utility routines for accessing PMU corerev specific features
* of the SiliconBackplane-based Broadcom chips.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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: hndpmu.c,v 1.95.2.17.4.13.4.8 2009/01/22 00:00:07 Exp $
+ * $Id: hndpmu.c,v 1.95.2.17.4.13.4.10 2009/04/29 20:48:26 Exp $
*/
#include <typedefs.h>
@@ -41,7 +41,6 @@
#define PMU_MSG(args)
-
/* SDIO Pad drive strength to select value mappings */
typedef struct {
uint8 strength; /* Pad Drive Strength in mA */
diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
index 5451018..be03d63 100644
--- a/src/shared/linux_osl.c
+++ b/src/shared/linux_osl.c
@@ -1,11 +1,11 @@
/*
* Linux OS Independent Layer
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/miniopt.c b/src/shared/miniopt.c
index b9c0ba2..579005f 100644
--- a/src/shared/miniopt.c
+++ b/src/shared/miniopt.c
@@ -1,11 +1,11 @@
/*
* Description.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/sbutils.c b/src/shared/sbutils.c
index 93e80d6..cbe4438 100644
--- a/src/shared/sbutils.c
+++ b/src/shared/sbutils.c
@@ -2,11 +2,11 @@
* Misc utility routines for accessing chip-specific features
* of the SiliconBackplane-based Broadcom chips.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/siutils.c b/src/shared/siutils.c
index 29cd398..3858b1b 100644
--- a/src/shared/siutils.c
+++ b/src/shared/siutils.c
@@ -2,11 +2,11 @@
* Misc utility routines for accessing chip-specific features
* of the SiliconBackplane-based Broadcom chips.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/shared/siutils_priv.h b/src/shared/siutils_priv.h
index c351267..1192168 100644
--- a/src/shared/siutils_priv.h
+++ b/src/shared/siutils_priv.h
@@ -1,11 +1,11 @@
/*
* Include file private to the SOC Interconnect support files.
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
index 51d5289..483c6e7 100644
--- a/src/wl/sys/wl_iw.c
+++ b/src/wl/sys/wl_iw.c
@@ -1,11 +1,11 @@
/*
* Linux Wireless Extensions support
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.8.6.33 2009/03/12 17:56:57 Exp $
+ * $Id: wl_iw.c,v 1.51.4.9.2.8.6.44 2009/04/17 06:09:57 Exp $
*/
@@ -53,18 +53,22 @@ typedef const struct si_pub si_t;
#include <linux/rtnetlink.h>
-#define WL_IW_USE_ISCAN 1
+#define WL_IW_USE_ISCAN 1
+#define ENABLE_ACTIVE_PASSIVE_SCAN_SUPPRESS 1
#define WL_IW_IOCTL_CALL(func_call) \
do { \
func_call; \
} while (0)
+static int g_onoff = G_WLAN_SET_ON;
+
extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
uint32 reason, char* stringBuf, uint buflen);
-static int dev_dhd_ioctl(struct net_device *dev, int cmd, void *arg, int len);
-extern void sdioh_start(int);
-extern void sdioh_stop(void);
+#include <bcmsdbus.h>
+extern void dhd_customer_gpio_wlan_reset(bool onoff);
+extern uint dhd_dev_reset(struct net_device *dev, uint8 flag);
+extern void dhd_dev_init_ioctl(struct net_device *dev);
uint wl_msg_level = WL_ERROR_VAL;
@@ -100,11 +104,8 @@ extern int dhd_wait_pend8021x(struct net_device *dev);
#endif
static void *g_scan = NULL;
-#define G_SCAN_RESULTS 8*1024
-#define WE_ADD_EVENT_FIX 0x80
static uint g_scan_specified_ssid;
-
static wlc_ssid_t g_ssid;
@@ -153,7 +154,7 @@ typedef struct iscan_info {
} iscan_info_t;
iscan_info_t *g_iscan = NULL;
static void wl_iw_timerfunc(ulong data);
-static void wl_iw_event_mask(struct net_device *dev, int set);
+static void wl_iw_set_event_mask(struct net_device *dev);
static int
wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action);
#endif
@@ -230,38 +231,7 @@ dev_wlc_ioctl(
return ret;
}
-static int
-dev_dhd_ioctl(
- struct net_device *dev,
- int cmd,
- void *arg,
- int len
-)
-{
- struct ifreq ifr;
- dhd_ioctl_t ioc;
- mm_segment_t fs;
- int ret;
-
- memset(&ioc, 0, sizeof(ioc));
- ioc.cmd = cmd;
- ioc.buf = arg;
- ioc.len = len;
- ioc.driver = DHD_IOCTL_MAGIC;
-
- strcpy(ifr.ifr_name, dev->name);
- ifr.ifr_data = (caddr_t) &ioc;
-
-
- dev_open(dev);
-
- fs = get_fs();
- set_fs(get_ds());
- ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
- set_fs(fs);
- return ret;
-}
@@ -500,13 +470,15 @@ wl_iw_get_link_speed(
char *extra
)
{
- int link_speed;
- int error;
+ int error = 0;
char *p = extra;
+ static int link_speed;
- error = dev_wlc_ioctl(dev, WLC_GET_RATE, &link_speed, sizeof(link_speed));
-
- link_speed *= 500000;
+
+ if (g_onoff == G_WLAN_SET_ON) {
+ error = dev_wlc_ioctl(dev, WLC_GET_RATE, &link_speed, sizeof(link_speed));
+ link_speed *= 500000;
+ }
p += snprintf(p, MAX_WX_STRING, "LinkSpeed %d", link_speed/1000000);
@@ -523,23 +495,27 @@ wl_iw_get_rssi(
char *extra
)
{
- int rssi;
- int error;
+ static int rssi = 0;
+ int error = 0;
wlc_ssid_t ssid;
char *p = extra;
- char ssidbuf[SSID_FMT_BUF_LEN];
+ static char ssidbuf[SSID_FMT_BUF_LEN];
scb_val_t scb_val;
scb_val.val = 0;
- error = dev_wlc_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
- rssi = dtoh32(scb_val.val);
- error = dev_wlc_ioctl(dev, WLC_GET_SSID, &ssid, sizeof(ssid));
+ if (g_onoff == G_WLAN_SET_ON) {
+ error = dev_wlc_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
+ rssi = dtoh32(scb_val.val);
- ssid.SSID_len = dtoh32(ssid.SSID_len);
+ error = dev_wlc_ioctl(dev, WLC_GET_SSID, &ssid, sizeof(ssid));
- if (!ssid.SSID_len)
+ ssid.SSID_len = dtoh32(ssid.SSID_len);
+ }
+
+ if (!ssid.SSID_len) {
return 0;
+ }
wl_format_ssid(ssidbuf, ssid.SSID, dtoh32(ssid.SSID_len));
p += snprintf(p, MAX_WX_STRING, "%s rssi %d ", ssidbuf, rssi);
@@ -548,56 +524,61 @@ wl_iw_get_rssi(
return error;
}
-struct wl_ctrl {
- struct timer_list *timer;
- struct net_device *dev;
- long sysioc_pid;
- struct semaphore sysioc_sem;
- struct completion sysioc_exited;
-};
+static int
+wl_iw_send_priv_event(
+ struct net_device *dev,
+ char *flag
+)
+{
+ union iwreq_data wrqu;
+ char extra[IW_CUSTOM_MAX + 1];
+ int cmd;
-int g_onoff = 0;
+ cmd = IWEVCUSTOM;
+ memset(&wrqu, 0, sizeof(wrqu));
+ if (strlen(flag) > sizeof(extra))
+ return -1;
+
+ strcpy(extra, flag);
+ wrqu.data.length = strlen(extra);
+ wireless_send_event(dev, cmd, &wrqu, extra);
+ WL_TRACE(("Send IWEVCUSTOM Event as %s\n", extra));
+
+ return 0;
+}
static int
-_wl_control_sysioc_thread(void *data)
+_wl_control_sysioc_thread_wl_off(void *data)
{
struct wl_ctrl *wl_ctl = (struct wl_ctrl *)data;
- char buffer[20];
- int len, onoff = 1;
DAEMONIZE("wlcontrol_sysioc");
WL_TRACE(("%s Entered\n", __FUNCTION__));
- while (down_interruptible(&wl_ctl->sysioc_sem) == 0) {
+ while (down_interruptible(&wl_ctl->timer_sem) == 0) {
- WL_TRACE(("%s Turning off wifi dev = 0x%x\n", __FUNCTION__,
- (unsigned int)wl_ctl->dev));
+ WL_TRACE(("%s Turning off wifi dev\n", __FUNCTION__));
- len = strlen("devreset") + 1;
- strcpy(buffer, "devreset");
- memcpy(&buffer[len], &onoff, sizeof(onoff));
+ g_onoff = G_WLAN_SET_OFF;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_lock();
+#if defined(WL_IW_USE_ISCAN)
+ g_iscan->iscan_state = ISCAN_STATE_IDLE;
#endif
-
- dev_dhd_ioctl(wl_ctl->dev, DHD_SET_VAR, buffer, len + sizeof(onoff));
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_unlock();
-#endif
+ dhd_dev_reset(wl_ctl->dev, 1);
-
-
-
+#if defined(BCMLXSDMMC)
+ sdioh_stop(NULL);
+#endif
-
+ dhd_customer_gpio_wlan_reset(G_WLAN_SET_OFF);
- g_onoff = 1;
+ wl_iw_send_priv_event(wl_ctl->dev, "STOP");
break;
}
+
WL_TRACE(("%s Exited\n", __FUNCTION__));
complete_and_exit(&wl_ctl->sysioc_exited, 0);
@@ -613,68 +594,78 @@ wl_iw_stop_timerfunc(ulong data)
del_timer(wl_ctl->timer);
- up(&wl_ctl->sysioc_sem);
+ up(&wl_ctl->timer_sem);
}
static int
-wl_iw_control_wl(
+wl_iw_control_wl_off(
struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra,
- int onoff
+ struct iw_request_info *info
)
{
- char buffer[20];
+ int ret = 0;
+ static struct wl_ctrl ctl;
static struct timer_list timer;
- int len, ret = 0;
- static struct wl_ctrl wl_ctl;
- WL_TRACE(("%s -- onoff = %d, dev = 0x%x\n", __FUNCTION__, onoff, (unsigned int)dev));
+ WL_TRACE(("Enter %s\n", __FUNCTION__));
- if (onoff)
- {
-
-
- wl_ctl.timer = &timer;
- wl_ctl.dev = dev;
- sema_init(&wl_ctl.sysioc_sem, 0);
- init_completion(&wl_ctl.sysioc_exited);
+
+
+ ctl.timer = &timer;
+ ctl.dev = dev;
+ sema_init(&ctl.timer_sem, 0);
+ init_completion(&ctl.sysioc_exited);
-
- wl_ctl.sysioc_pid = kernel_thread(_wl_control_sysioc_thread, &wl_ctl, 0);
+
+ ctl.sysioc_pid = kernel_thread(_wl_control_sysioc_thread_wl_off, &ctl, 0);
- if (wl_ctl.sysioc_pid < 0)
- return -ENOMEM;
+ timer.data = (ulong)&ctl;
+ timer.function = wl_iw_stop_timerfunc;
+ init_timer(&timer);
+ timer.expires = jiffies + 2000 * HZ / 1000;
+ add_timer(&timer);
- timer.data = (ulong)&wl_ctl;
- timer.function = wl_iw_stop_timerfunc;
- init_timer(&timer);
- timer.expires = jiffies + 2000 * HZ / 1000;
- add_timer(&timer);
- }
- else
- {
-
+ WL_TRACE(("Exited %s\n", __FUNCTION__));
-
-
-
+ return ret;
+}
-
- len = strlen("devreset") + 1;
- strcpy(buffer, "devreset");
- memcpy(&buffer[len], &onoff, sizeof(onoff));
+static int
+wl_iw_control_wl_on(
+ struct net_device *dev,
+ struct iw_request_info *info
+)
+{
+ int ret = 0;
- ret = dev_dhd_ioctl(dev, DHD_SET_VAR, buffer, len + sizeof(onoff));
+ WL_TRACE(("Enter %s \n", __FUNCTION__));
-
-
-
+ if (g_onoff == G_WLAN_SET_OFF) {
+ dhd_customer_gpio_wlan_reset(G_WLAN_SET_ON);
+
+#if defined(BCMLXSDMMC)
+ sdioh_start(NULL, 0);
+#endif
+
+ dhd_dev_reset(dev, 0);
+
+#if defined(BCMLXSDMMC)
+ sdioh_start(NULL, 1);
+#endif
+
+ dhd_dev_init_ioctl(dev);
+
+ g_onoff = G_WLAN_SET_ON;
}
+ wl_iw_send_priv_event(dev, "START");
+
+ WL_TRACE(("Exited %s \n", __FUNCTION__));
+
return ret;
}
+
+
#endif
#if WIRELESS_EXT < 13
@@ -1144,7 +1135,7 @@ wl_iw_mlme(
scb_val_t scbval;
int error = -EINVAL;
- WL_TRACE(("%s: SIOCSIWMLME\n", dev->name));
+ WL_TRACE(("%s: SIOCSIWMLME DISASSOC/DEAUTH\n", dev->name));
mlme = (struct iw_mlme *)extra;
if (mlme == NULL) {
@@ -1384,20 +1375,16 @@ wl_iw_timerfunc(ulong data)
up(&iscan->sysioc_sem);
}
}
-static void wl_iw_event_mask(struct net_device *dev, int set)
+static void wl_iw_set_event_mask(struct net_device *dev)
{
char eventmask[WL_EVENTING_MASK_LEN];
char iovbuf[WL_EVENTING_MASK_LEN + 12];
dev_iw_iovar_getbuf(dev, "event_msgs", "", 0, iovbuf, sizeof(iovbuf));
bcopy(iovbuf, eventmask, WL_EVENTING_MASK_LEN);
- if (set)
- setbit(eventmask, WLC_E_SCAN_COMPLETE);
- else
- clrbit(eventmask, WLC_E_SCAN_COMPLETE);
+ setbit(eventmask, WLC_E_SCAN_COMPLETE);
dev_iw_iovar_setbuf(dev, "event_msgs", eventmask, WL_EVENTING_MASK_LEN,
iovbuf, sizeof(iovbuf));
-
}
static uint32
@@ -1456,6 +1443,18 @@ wl_iw_iscan_get(iscan_info_t *iscan)
return status;
}
+static void wl_iw_send_scan_complete(iscan_info_t *iscan)
+{
+#ifndef SANDGATE2G
+ union iwreq_data wrqu;
+ char extra[IW_CUSTOM_MAX + 1];
+
+ memset(&wrqu, 0, sizeof(wrqu));
+ memset(extra, 0, sizeof(extra));
+ wireless_send_event(iscan->dev, SIOCGIWSCAN, &wrqu, extra);
+ WL_TRACE(("Send Event SCAN complete\n"));
+#endif
+}
static int
_iscan_sysioc_thread(void *data)
{
@@ -1498,13 +1497,7 @@ _iscan_sysioc_thread(void *data)
case WL_SCAN_RESULTS_SUCCESS:
WL_TRACE(("iscanresults complete\n"));
iscan->iscan_state = ISCAN_STATE_IDLE;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_lock();
-#endif
- wl_iw_event_mask(iscan->dev, 0);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_unlock();
-#endif
+ wl_iw_send_scan_complete(iscan);
break;
case WL_SCAN_RESULTS_PENDING:
WL_TRACE(("iscanresults pending\n"));
@@ -1516,13 +1509,7 @@ _iscan_sysioc_thread(void *data)
case WL_SCAN_RESULTS_ABORTED:
WL_TRACE(("iscanresults aborted\n"));
iscan->iscan_state = ISCAN_STATE_IDLE;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_lock();
-#endif
- wl_iw_event_mask(iscan->dev, 0);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
- rtnl_unlock();
-#endif
+ wl_iw_send_scan_complete(iscan);
break;
default:
WL_TRACE(("iscanresults returned unknown status %d\n", status));
@@ -1546,6 +1533,10 @@ wl_iw_set_scan(
WL_TRACE(("%s: SIOCSIWSCAN\n", dev->name));
+ if (g_onoff == G_WLAN_SET_OFF)
+ return 0;
+
+
memset(&ssid, 0, sizeof(ssid));
g_scan_specified_ssid = 0;
@@ -1583,6 +1574,10 @@ wl_iw_iscan_set_scan(
WL_TRACE(("%s: SIOCSIWSCAN\n", dev->name));
+ if (g_onoff == G_WLAN_SET_OFF)
+ return 0;
+
+
if ((!iscan) || (iscan->sysioc_pid < 0)) {
return wl_iw_set_scan(dev, info, wrqu, extra);
}
@@ -1613,7 +1608,7 @@ wl_iw_iscan_set_scan(
iscan->list_cur = iscan->list_hdr;
iscan->iscan_state = ISCAN_STATE_SCANING;
dev_wlc_ioctl(dev, WLC_SET_PASSIVE_SCAN, &iscan->scan_flag, sizeof(iscan->scan_flag));
- wl_iw_event_mask(dev, 1);
+ wl_iw_set_event_mask(dev);
wl_iw_iscan(iscan, &ssid, WL_SCAN_ACTION_START);
iscan->timer.expires = jiffies + iscan->timer_ms*HZ/1000;
add_timer(&iscan->timer);
@@ -1795,7 +1790,7 @@ done:
WL_ERROR(("==> Wrong size\n"));
ret = 0;
}
- WL_TRACE(("%s: size=%d bytes prepared\n", __FUNCTION__, event - extra));
+ WL_TRACE(("%s: size=%d bytes prepared \n", __FUNCTION__, (unsigned int)(event - extra)));
return ret;
}
@@ -1820,8 +1815,7 @@ wl_iw_get_scan(
iscan_buf_t * p_buf;
#endif
- WL_TRACE(("%s: wl_iw_get_scan\n", dev->name));
- WL_TRACE(("%d: buflen_from_user\n", buflen_from_user));
+ WL_TRACE(("%s: buflen_from_user %d: \n", dev->name, buflen_from_user));
if (!extra) {
WL_TRACE(("%s: wl_iw_get_scan return -EINVAL\n", dev->name));
@@ -1895,7 +1889,7 @@ wl_iw_get_scan(
dwrq->length = len;
dwrq->flags = 0;
- WL_TRACE(("%s return to WE dwrq->length=%d bytes\n", __FUNCTION__, dwrq->length));
+ WL_TRACE(("%s return to WE %d bytes APs=%d\n", __FUNCTION__, dwrq->length, list->count));
return 0;
}
@@ -1916,8 +1910,9 @@ wl_iw_iscan_get_scan(
char *event = extra, *end = extra + dwrq->length, *value;
iscan_info_t *iscan = g_iscan;
iscan_buf_t * p_buf;
+ uint32 counter = 0;
- WL_TRACE(("%s: SIOCGIWSCAN GET\n", dev->name));
+ WL_TRACE(("%s %s buflen_from_user %d:\n", dev->name, __FUNCTION__, dwrq->length));
if (!extra) {
WL_TRACE(("%s: SIOCGIWSCAN GET bad parameter\n", dev->name));
@@ -1942,6 +1937,8 @@ wl_iw_iscan_get_scan(
while (p_buf != iscan->list_cur) {
list = &((wl_iscan_results_t*)p_buf->iscan_buf)->results;
+ counter += list->count;
+
if (list->version != WL_BSS_INFO_VERSION) {
WL_ERROR(("list->version %d != WL_BSS_INFO_VERSION\n", list->version));
}
@@ -2071,7 +2068,7 @@ done:
dwrq->length = event - extra;
dwrq->flags = 0;
- WL_TRACE(("%s return to WE dwrq->length=%d bytes\n", __FUNCTION__, dwrq->length));
+ WL_TRACE(("%s return to WE %d bytes APs=%d\n", __FUNCTION__, dwrq->length, counter));
return 0;
}
@@ -3128,20 +3125,33 @@ wl_iw_set_priv(
return -EFAULT;
}
- WL_TRACE(("%s: SIOCSIWPRIV, requst = %s ==> ",
+ WL_TRACE(("%s: SIOCSIWPRIV requst = %s\n",
dev->name, extra));
- if (g_onoff) {
- g_onoff = 0;
- wl_iw_control_wl(dev, info, (union iwreq_data *)dwrq, extra, 0);
- }
-
if (dwrq->length && extra) {
- if (strnicmp(extra, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0)
+
+ if (g_onoff == G_WLAN_SET_OFF) {
+ wl_iw_control_wl_on(dev, info);
+ if (strnicmp(extra, "START", strlen("START")) != 0)
+ WL_TRACE(("%s, missing START, simulate START\n", __FUNCTION__));
+ else
+ WL_TRACE(("%s, Received regular START command\n", __FUNCTION__));
+ }
+
+ if (strnicmp(extra, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) {
+#ifdef ENABLE_ACTIVE_PASSIVE_SCAN_SUPPRESS
+ WL_TRACE(("%s: active scan setting supppressed\n", dev->name));
+#else
ret = wl_iw_set_active_scan(dev, info, (union iwreq_data *)dwrq, extra);
+#endif
+ }
else if (strnicmp(extra, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0)
+#ifdef ENABLE_ACTIVE_PASSIVE_SCAN_SUPPRESS
+ WL_TRACE(("%s: passive scan setting supppressed\n", dev->name));
+#else
ret = wl_iw_set_passive_scan(dev, info, (union iwreq_data *)dwrq, extra);
+#endif
else if (strnicmp(extra, "RSSI", strlen("RSSI")) == 0)
ret = wl_iw_get_rssi(dev, info, (union iwreq_data *)dwrq, extra);
else if (strnicmp(extra, "LINKSPEED", strlen("LINKSPEED")) == 0)
@@ -3149,7 +3159,13 @@ wl_iw_set_priv(
else if (strnicmp(extra, "MACADDR", strlen("MACADDR")) == 0)
ret = wl_iw_get_macaddr(dev, info, (union iwreq_data *)dwrq, extra);
else if (strnicmp(extra, "STOP", strlen("STOP")) == 0)
- ret = wl_iw_control_wl(dev, info, (union iwreq_data *)dwrq, extra, 1);
+ ret = wl_iw_control_wl_off(dev, info);
+ else {
+ snprintf(extra, MAX_WX_STRING, "OK");
+ dwrq->length = strlen("OK") + 1;
+ WL_TRACE(("Unkown PRIVATE command , ignored\n"));
+ }
+
}
if (extra) {
@@ -3160,7 +3176,6 @@ wl_iw_set_priv(
kfree(extra);
}
- WL_TRACE(("\n"));
return ret;
}
@@ -3259,7 +3274,11 @@ static const iw_handler wl_iw_priv_handler[] = {
NULL,
(iw_handler)wl_iw_get_link_speed,
NULL,
- (iw_handler)wl_iw_get_macaddr
+ (iw_handler)wl_iw_get_macaddr,
+ NULL,
+ (iw_handler)wl_iw_control_wl_off,
+ NULL,
+ (iw_handler)wl_iw_control_wl_on
};
static const struct iw_priv_args wl_iw_priv_args[] = {
@@ -3292,6 +3311,18 @@ static const struct iw_priv_args wl_iw_priv_args[] = {
0,
IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING,
"Macaddr"
+ },
+ {
+ WL_IW_SET_STOP,
+ 0,
+ IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING,
+ "STOP"
+ },
+ {
+ WL_IW_SET_START,
+ 0,
+ IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING,
+ "START"
}
};
@@ -3526,7 +3557,6 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data)
memset(extra, 0, sizeof(extra));
-
switch (event_type) {
case WLC_E_TXFAIL:
cmd = IWEVTXDROP;
@@ -3609,18 +3639,21 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data)
#endif
#endif
-#if defined(WL_IW_USE_ISCAN)
case WLC_E_SCAN_COMPLETE:
- cmd = SIOCGIWSCAN;
- WL_TRACE(("event WLC_E_SCAN_COMPLETE\n"));
+#if defined(WL_IW_USE_ISCAN)
if ((g_iscan) && (g_iscan->sysioc_pid >= 0))
up(&g_iscan->sysioc_sem);
- break;
-
+#else
+ cmd = SIOCGIWSCAN;
+ cmd = SIOCGIWSCAN;
+ wrqu.data.length = strlen(extra);
+ WL_TRACE(("Event WLC_E_SCAN_COMPLETE\n"));
#endif
+ break;
default:
+ WL_TRACE(("Unknown Event %d: ignoring\n", event_type));
break;
}
#ifndef SANDGATE2G
diff --git a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h
index aff061c..1ecf007 100644
--- a/src/wl/sys/wl_iw.h
+++ b/src/wl/sys/wl_iw.h
@@ -1,11 +1,11 @@
/*
* Linux Wireless Extensions support
*
- * Copyright (C) 1999-2008, Broadcom Corporation
+ * Copyright (C) 1999-2009, 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”),
+ * 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:
*
@@ -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.20.4 2009/02/20 05:22:23 Exp $
+ * $Id: wl_iw.h,v 1.5.34.1.20.7 2009/04/17 05:59:56 Exp $
*/
@@ -51,6 +51,14 @@
#define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5)
#define WL_IW_GET_LINK_SPEED (SIOCIWFIRSTPRIV+7)
#define WL_IW_GET_CURR_MACADDR (SIOCIWFIRSTPRIV+9)
+#define WL_IW_SET_STOP (SIOCIWFIRSTPRIV+11)
+#define WL_IW_SET_START (SIOCIWFIRSTPRIV+13)
+
+#define G_SCAN_RESULTS 8*1024
+#define WE_ADD_EVENT_FIX 0x80
+#define G_WLAN_SET_ON 0
+#define G_WLAN_SET_OFF 1
+
typedef struct wl_iw {
char nickname[IW_ESSID_MAX_SIZE];
@@ -66,6 +74,15 @@ typedef struct wl_iw {
void *wlinfo;
} wl_iw_t;
+struct wl_ctrl {
+ struct timer_list *timer;
+ struct net_device *dev;
+ long sysioc_pid;
+ struct semaphore timer_sem;
+ struct completion sysioc_exited;
+};
+
+
#if WIRELESS_EXT > 12
#include <net/iw_handler.h>
extern const struct iw_handler_def wl_iw_handler_def;