forked from CyanogenMod/android_kernel_htc_msm8960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: net: wireless: add HTC's bcmdhd_4335_mcc
From m7stockui-3.4.10-gef77362. Modifications from stock HTC driver: * Remove poorly commented-out CFLAGS section from Makefile * Make CONFIG_BCMDHD_4335_MCC select WIRELESS_EXT, WEXT_PRIV * Fix msm_watchdog.h include in dhd_sdio.c * Our kernel does not need OLD_CFG_80211; removing this flag also required the following fixes in wl_cfg80211.c - L292: ifdef out used_default_ssid - L6698-6702: ifdef out usage of wl_cfg80211_hostapd_sec() Changes outside of driver: Make necessary additions (and block with CONFIG_BCMDHD_4335_MCC where appropriate) in: * drivers/mmc/host/msm_sdcc.c * include/linux/ieee80211.h * include/linux/nl80211.h * include/linux/wlan_plat.h Change-Id: I405010d3ae0fc3586de2a2aa3ffaab01909ddcde
- Loading branch information
Showing
104 changed files
with
92,253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
config BCMDHD_4335_MCC | ||
tristate "Broadcom 4329/30 wireless cards support" | ||
depends on MMC | ||
select WIRELESS_EXT | ||
select WEXT_PRIV | ||
---help--- | ||
This module adds support for wireless adapters based on | ||
Broadcom 4329/30 chipset. | ||
|
||
This driver uses the kernel's wireless extensions subsystem. | ||
|
||
If you choose to build a module, it'll be called dhd. Say M if | ||
unsure. | ||
|
||
config BCMDHD_FW_PATH | ||
depends on BCMDHD_4335_MCC | ||
string "Firmware path" | ||
default "/system/etc/firmware/fw_bcm4335.bin" | ||
---help--- | ||
Path to the firmware file. | ||
|
||
config BCMDHD_NVRAM_PATH | ||
depends on BCMDHD_4335_MCC | ||
string "NVRAM path" | ||
default "/proc/calibration" | ||
---help--- | ||
Path to the calibration file. | ||
|
||
config BCMDHD_WEXT | ||
bool "Enable WEXT support" | ||
depends on BCMDHD_4335_MCC && CFG80211 = n | ||
select WIRELESS_EXT | ||
select WEXT_PRIV | ||
help | ||
Enables WEXT support | ||
|
||
config DHD_USE_STATIC_BUF | ||
bool "Enable memory preallocation" | ||
depends on BCMDHD | ||
default n | ||
---help--- | ||
Use memory preallocated in platform | ||
|
||
config DHD_USE_SCHED_SCAN | ||
bool "Use CFG80211 sched scan" | ||
depends on BCMDHD && CFG80211 | ||
default n | ||
---help--- | ||
Use CFG80211 sched scan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#bcm4335_mcc | ||
|
||
DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 \ | ||
-DBCMFILEIMAGE -Dlinux -DDHD_FIRSTREAD=128 -DMAX_HDR_READ=128 \ | ||
-DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DBDC -DBCMCCX \ | ||
-DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DOEM_ANDROID \ | ||
-DBCMDBG -DCONFIG_FIRST_SCAN -DHW_OOB -DAPSTA_CONCURRENT -DBRCM_WPSAP -DWL_CFG80211_STA_EVENT \ | ||
-DCUSTOM_OOB_GPIO_NUM=46 -DOOB_INTR_ONLY -DMMC_SDIO_ABORT -DEMBEDDED_PLATFORM -DCUSTOMER_HW2 -DDHD_PRINT_DEBUG \ | ||
-DPNO_SUPPORT -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWIFI_ACT_FRAME -DKEEP_ALIVE -DWL_ENABLE_P2P_IF\ | ||
-DDHD_USE_IDLECOUNT -DCSCAN -DHTC_KlocWork -DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS -DENABLE_INSMOD_NO_FW_LOAD -DBCMWAPI_WAI -DBCMWAPI_WPI \ | ||
-DCONFIG_DHD_USE_STATIC_BUF -DHAVE_FREE_NETDEV \ | ||
-DSUPPORT_MULTIPLE_REVISION -DENABLE_BCN_LI_BCN_WAKEUP -DWL11U -DVSDB -DHT40_GO -DWLTDLS -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST -DSUPPORT_MULTIPLE_REVISION -DUSE_CID_CHECK -DCONFIG_CONTROL_PM \ | ||
-DWL_SUPPORT_BACKPORTED_KPATCHES \ | ||
-DWLLXIW -DUSE_IW \ | ||
-Wall -Wstrict-prototypes -Werror \ | ||
-I$(M) -I$(M)/include \ | ||
-Idrivers/net/wireless/bcmdhd_4335_mcc -Idrivers/net/wireless/bcmdhd_4335_mcc/include | ||
# CFG 80211 and P2P compile flag | ||
#-DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS -DBCMWAPI_WAI -DBCMWAPI_WPI -DAP_ONLY\ | ||
|
||
#DHDCFLAGS += -DCUSTOMER_HW4 | ||
DHDCFLAGS += -DDHD_ENABLE_LPC | ||
DHDCFLAGS += -DUSE_DYNAMIC_MAXPKT_RXGLOM | ||
DHDCFLAGS += -DCUSTOM_RXF_PRIO_SETTING=0 | ||
DHDCFLAGS += -DCUSTOM_DPC_PRIO_SETTING=0 | ||
DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS | ||
DHDCFLAGS += -DPROP_TXSTATUS | ||
DHDCFLAGS += -DWL_WIRELESS_EXT | ||
DHDCFLAGS += -DPROP_TXSTATUS_VSDB | ||
#DHDCFLAGS += -DAMPDU_HOSTREORDER | ||
DHDCFLAGS += -DDHD_DEBUG | ||
#DHDCFLAGS += -DDHD_USE_EARLYSUSPEND | ||
DHDCFLAGS += -DSOFTAP_ALIGN_PACKET | ||
DHDCFLAGS += -DROAM_ENABLE | ||
DHDCFLAGS += -DSOFTAP_DISABLE_VLAN | ||
DHDCFLAGS += -DSUPPORT_PM2_ONLY | ||
DHDCFLAGS += -DDISABLE_FW_ROAM_SUSPEND | ||
DHDCFLAGS += -DUSE_STAMAC_4SOFTAP | ||
DHDCFLAGS += -DBLOCK_IPV6_PACKET | ||
DHDCFLAGS += -DPASS_IPV4_SUSPEND | ||
DHDCFLAGS += -DSUPPORT_DEEP_SLEEP | ||
DHDCFLAGS += -DSUPPORT_HIDDEN_AP | ||
DHDCFLAGS += -DSUPPORT_AUTO_CHANNEL | ||
DHDCFLAGS += -DSUPPORT_SOFTAP_SINGL_DISASSOC | ||
DHDCFLAGS += -DSUPPORT_GET_NOA | ||
DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD | ||
DHDCFLAGS += -DPASS_ALL_MCAST_PKTS | ||
DHDCFLAGS += -DUSE_INITIAL_2G_SCAN | ||
DHDCFLAGS += -DSCB_TIMEOUT=10 | ||
DHDCFLAGS += -DWIFI_TURNOFF_DELAY=100 | ||
DHDCFLAGS += -DPKT_FILTER_SUPPORT | ||
DHDCFLAGS += -DMMC_ERROR_WAR | ||
DHDCFLAGS += -DUSE_KTHREAD_API | ||
DHDCFLAGS += -DARP_OFFLOAD_SUPPORT | ||
|
||
|
||
#Throughput fine tune | ||
DHDCFLAGS += -DBCMSDIOH_TXGLOM | ||
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 | ||
DHDCFLAGS += -DCUSTOM_TXGLOM=1 | ||
DHDCFLAGS += -DCUSTOM_RXCHAIN=1 | ||
DHDCFLAGS += -DBCMSDIOH_TXGLOM_HIGHSPEED | ||
DHDCFLAGS += -DDHD_SET_FW_HIGHSPEED | ||
DHDCFLAGS += -DSDIO_CRC_ERROR_FIX | ||
DHDCFLAGS += -DSDHOST3=1 | ||
DHDCFLAGS += -DRXFRAME_THREAD -DRXF_CHAIN | ||
DHDCFLAGS += -DDHDTCPACK_SUPPRESS | ||
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 | ||
DHDCFLAGS += -DREPEAT_READFRAME | ||
DHDCFLAGS += -DCUSTOMER_HW_ONE | ||
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=16 | ||
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=16 | ||
DHDCFLAGS += -DWIFI_TURNOFF_DELAY=100 | ||
|
||
#Define for BCM4335 specified settings | ||
DHDCFLAGS += -DBCM4335_CHIP | ||
DHDCFLAGS += -DWLCREDALL | ||
|
||
#ifdef P2P | ||
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS | ||
#endif | ||
|
||
#HTC TX TRACKING feature | ||
DHDCFLAGS += -DHTC_TX_TRACKING | ||
|
||
#HTC_REDUCE_FIRST_SCAN | ||
DHDCFLAGS += -DREDUCE_FIRST_SCAN | ||
|
||
ifdef COMPAT_WIRELESS | ||
NOSTDINC_FLAGS := -I$(COMPAT_WIRELESS)/include/ \ | ||
-include $(COMPAT_WIRELESS)/include/linux/compat-2.6.h | ||
endif | ||
|
||
DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \ | ||
siutils.o sbutils.o aiutils.o hndpmu.o dhd_sdio.o bcmwifi_channels.o \ | ||
dhd_linux_sched.o dhd_cdc.o bcmsdh_sdmmc.o bcmsdh.o bcmsdh_linux.o \ | ||
bcmsdh_sdmmc_linux.o bcmevent.o wl_android.o wldev_common.o wl_linux_mon.o wl_cfg80211.o wl_cfgp2p.o dhd_cfg80211.o dhd_wlfc.o dhd_ip.o dhd_pno.o | ||
|
||
#ifdef P2P | ||
DHDOFILES += wl_linux_mon.o wl_cfg80211.o wl_cfgp2p.o | ||
#endif | ||
|
||
|
||
obj-$(CONFIG_BCMDHD_4335_MCC) += bcmdhd.o | ||
bcmdhd-objs += $(DHDOFILES) | ||
#ifneq ($(CONFIG_WIRELESS_EXT),) | ||
bcmdhd-objs += wl_iw.o | ||
DHDCFLAGS += -DSOFTAP | ||
#endif | ||
EXTRA_CFLAGS = $(DHDCFLAGS) | ||
EXTRA_LDFLAGS += --strip-debug |
Oops, something went wrong.