| # bcmdhd |
| # 1. WL_IFACE_COMB_NUM_CHANNELS must be added if Android version is 4.4 with Kernel version 3.0~3.4, |
| # otherwise please remove it. |
| |
| # if not confiure pci mode, we use sdio mode as default |
| ifeq ($(CONFIG_BCMDHD_PCIE),) |
| $(info bcm SDIO driver configured) |
| CONFIG_DHD_USE_STATIC_BUF := y |
| endif |
| #CONFIG_BCMDHD_SDIO := y |
| #CONFIG_BCMDHD_PCIE := y |
| #CONFIG_BCMDHD_USB := y |
| CONFIG_BCMDHD_PROPTXSTATUS := y |
| |
| CONFIG_MACH_PLATFORM := y |
| #CONFIG_BCMDHD_DTS := y |
| |
| export CONFIG_BCMDHD = m |
| export CONFIG_BCMDHD_OOB = y |
| export CONFIG_VTS_SUPPORT = y |
| |
| DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \ |
| -Wno-maybe-uninitialized -Werror \ |
| -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \ |
| -DDHDTHREAD -DDHD_DEBUG -DSHOW_EVENTS -DBCMDBG -DGET_OTP_MAC_ENABLE \ |
| -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT -DSUPPORT_PM2_ONLY \ |
| -DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DDHDTCPACK_SUPPRESS \ |
| -DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT \ |
| -DMULTIPLE_SUPPLICANT -DTSQ_MULTIPLIER -DMFP \ |
| -DWL_EXT_IAPSTA \ |
| -DENABLE_INSMOD_NO_FW_LOAD \ |
| -I$(src) -I$(src)/include |
| |
| DHDOFILES = aiutils.o siutils.o sbutils.o bcmutils.o bcmwifi_channels.o \ |
| dhd_linux.o dhd_linux_platdev.o dhd_linux_sched.o dhd_pno.o \ |
| dhd_common.o dhd_ip.o dhd_linux_wq.o dhd_custom_gpio.o \ |
| bcmevent.o hndpmu.o linux_osl.o wldev_common.o wl_android.o \ |
| dhd_debug_linux.o dhd_debug.o dhd_mschdbg.o dhd_dbg_ring.o \ |
| hnd_pktq.o hnd_pktpool.o bcmxtlv.o linux_pkt.o bcmstdlib_s.o \ |
| dhd_config.o wl_android_ext.o |
| |
| #BCMDHD_SDIO |
| ifneq ($(CONFIG_BCMDHD_SDIO),) |
| DHDCFLAGS += -DBCMSDIO -DMMC_SDIO_ABORT -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR \ |
| -DSDTEST -DBDC -DDHD_USE_IDLECOUNT -DCUSTOM_SDIO_F2_BLKSIZE=256 \ |
| -DBCMSDIOH_TXGLOM -DBCMSDIOH_TXGLOM_EXT -DRXFRAME_THREAD |
| ifeq ($(CONFIG_BCMDHD_OOB),y) |
| DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB |
| ifeq ($(CONFIG_BCMDHD_DISABLE_WOWLAN),y) |
| DHDCFLAGS += -DDISABLE_WOWLAN |
| endif |
| else |
| DHDCFLAGS += -DSDIO_ISR_THREAD |
| endif |
| |
| DHDOFILES += bcmsdh.o bcmsdh_linux.o bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o \ |
| dhd_sdio.o dhd_cdc.o dhd_wlfc.o |
| endif |
| |
| #BCMDHD_PCIE |
| ifneq ($(CONFIG_BCMDHD_PCIE),) |
| DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1 \ |
| -DDONGLE_ENABLE_ISOLATION |
| ifneq ($(CONFIG_PCI_MSI),) |
| DHDCFLAGS += -DDHD_USE_MSI |
| endif |
| |
| DHDOFILES += dhd_pcie.o dhd_pcie_linux.o pcie_core.o dhd_flowring.o \ |
| dhd_msgbuf.o |
| endif |
| |
| #BCMDHD_USB |
| ifneq ($(CONFIG_BCMDHD_USB),) |
| DHDCFLAGS += -DUSBOS_TX_THREAD -DBCMDBUS -DBCMTRXV2 -DDBUS_USB_LOOPBACK \ |
| -DBDC |
| DHDCFLAGS += -DBCM_REQUEST_FW -DEXTERNAL_FW_PATH |
| DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS)) |
| ifneq ($(CONFIG_BCMDHD_CUSB),) |
| DHDCFLAGS += -DBCMUSBDEV_COMPOSITE |
| DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS)) |
| endif |
| |
| DHDOFILES += dbus.o dbus_usb.o dbus_usb_linux.o dhd_cdc.o dhd_wlfc.o |
| endif |
| |
| #PROPTXSTATUS |
| ifeq ($(CONFIG_BCMDHD_PROPTXSTATUS),y) |
| ifneq ($(CONFIG_BCMDHD_USB),) |
| DHDCFLAGS += -DPROP_TXSTATUS |
| endif |
| ifneq ($(CONFIG_BCMDHD_SDIO),) |
| DHDCFLAGS += -DPROP_TXSTATUS |
| endif |
| ifneq ($(CONFIG_CFG80211),) |
| DHDCFLAGS += -DPROP_TXSTATUS_VSDB |
| endif |
| endif |
| |
| #VTS_SUPPORT |
| ifeq ($(CONFIG_VTS_SUPPORT),y) |
| ifneq ($(CONFIG_CFG80211),) |
| DHDCFLAGS += -DGSCAN_SUPPORT -DRTT_SUPPORT -DCUSTOM_FORCE_NODFS_FLAG \ |
| -DLINKSTAT_SUPPORT -DDEBUGABILITY -DDBG_PKT_MON -DPKT_FILTER_SUPPORT \ |
| -DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT -DDHD_WAKE_STATUS \ |
| -DCUSTOM_COUNTRY_CODE -DDHD_FW_COREDUMP -DEXPLICIT_DISCIF_CLEANUP |
| |
| DHDOFILES += dhd_rtt.o bcm_app_utils.o |
| endif |
| endif |
| |
| # MESH support for kernel 3.10 later |
| ifeq ($(CONFIG_WL_MESH),y) |
| DHDCFLAGS += -DWLMESH |
| ifneq ($(CONFIG_BCMDHD_PCIE),) |
| DHDCFLAGS += -DBCM_HOST_BUF -DDMA_HOST_BUFFER_LEN=0x80000 |
| endif |
| DHDCFLAGS += -DDHD_UPDATE_INTF_MAC |
| DHDCFLAGS :=$(filter-out -DDHD_FW_COREDUMP,$(DHDCFLAGS)) |
| DHDCFLAGS :=$(filter-out -DSET_RANDOM_MAC_SOFTAP,$(DHDCFLAGS)) |
| endif |
| |
| ifeq ($(CONFIG_BCMDHD_SDIO),y) |
| obj-$(CONFIG_BCMDHD) += dhd.o |
| dhd-objs += $(DHDOFILES) |
| else |
| obj-$(CONFIG_BCMDHD) += bcmdhd.o |
| bcmdhd-objs += $(DHDOFILES) |
| endif |
| |
| ifeq ($(CONFIG_MACH_PLATFORM),y) |
| DHDOFILES += dhd_gpio.o |
| ifeq ($(CONFIG_BCMDHD_DTS),y) |
| DHDCFLAGS += -DCONFIG_DTS |
| else |
| DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT |
| endif |
| DHDCFLAGS += -DCUSTOMER_HW_AMLOGIC |
| # DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI |
| endif |
| |
| ifeq ($(CONFIG_BCMDHD_AG),y) |
| DHDCFLAGS += -DBAND_AG |
| endif |
| |
| ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y) |
| # obj-m += dhd_static_buf.o |
| DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT -DENHANCED_STATIC_BUF |
| DHDCFLAGS += -DDHD_USE_STATIC_MEMDUMP -DCONFIG_DHD_USE_STATIC_BUF |
| endif |
| |
| ifneq ($(CONFIG_WIRELESS_EXT),) |
| DHDOFILES += wl_iw.o wl_escan.o |
| DHDCFLAGS += -DSOFTAP -DWL_WIRELESS_EXT -DUSE_IW -DWL_ESCAN |
| endif |
| ifneq ($(CONFIG_CFG80211),) |
| DHDOFILES += wl_cfg80211.o wl_cfgp2p.o wl_linux_mon.o wl_cfg_btcoex.o wl_cfgvendor.o |
| DHDOFILES += dhd_cfg80211.o |
| DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_CFG80211_STA_EVENT |
| DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS |
| DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-65 |
| DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=15 |
| DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000 |
| DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=7 |
| DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL |
| DHDCFLAGS += -DWL_SUPPORT_BACKPORTED_KPATCHES |
| DHDCFLAGS += -DESCAN_RESULT_PATCH -DESCAN_BUF_OVERFLOW_MGMT |
| DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST |
| DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8 |
| DHDCFLAGS += -DWL_VIRTUAL_APSTA |
| DHDCFLAGS += -DPNO_SUPPORT |
| endif |
| EXTRA_CFLAGS = $(DHDCFLAGS) |
| ifeq ($(CONFIG_BCMDHD),m) |
| EXTRA_LDFLAGS += --strip-debug |
| endif |
| |
| ARCH ?= arm64 |
| CROSS_COMPILE ?=aarch64-linux-gnu- |
| KDIR ?=../../../../../../common |
| |
| all: bcmdhd_sdio bcmdhd_usb |
| |
| bcmdhd_sdio: |
| $(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules CONFIG_BCMDHD_SDIO=y |
| mv dhd.ko dhd_sdio.ko |
| |
| bcmdhd_usb: |
| $(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules CONFIG_BCMDHD_USB=y |
| mv dhd.ko dhd_usb.ko |
| |
| clean: |
| $(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) clean |
| $(RM) Module.markers |
| $(RM) modules.order |