From: Dmitry Shmidt Date: Mon, 13 Jun 2011 16:59:51 +0000 (-0700) Subject: net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code X-Git-Tag: firefly_0821_release~7613^2~614 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fdfcb12df1d152d062348c2a37b554a7ce2baebb;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/Makefile b/drivers/net/wireless/bcmdhd/Makefile index 73502ff8390a..13a140ba72a0 100644 --- a/drivers/net/wireless/bcmdhd/Makefile +++ b/drivers/net/wireless/bcmdhd/Makefile @@ -2,7 +2,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Werror -Dlinux -DBCMDRIVER \ -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DWLBTAMP -DBCMFILEIMAGE \ -DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DDHD_DEBUG -DSDTEST -DBDC -DTOE \ - -DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DOEM_ANDROID -DBCMDBG \ + -DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DBCMDBG \ -DCUSTOMER_HW2 -DCUSTOM_OOB_GPIO_NUM=2 -DOOB_INTR_ONLY -DHW_OOB \ -DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWLP2P \ -DNEW_COMPAT_WIRELESS -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \ @@ -23,5 +23,8 @@ ifneq ($(CONFIG_CFG80211),) bcmdhd-objs += wl_cfg80211.o wl_cfgp2p.o wldev_common.o DHDCFLAGS += -DWL_CFG80211 endif +ifneq ($(CONFIG_ANDROID),) +DHDCFLAGS += -DANDROID +endif EXTRA_CFLAGS = $(DHDCFLAGS) EXTRA_LDFLAGS += --strip-debug diff --git a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c index d5a403eaa882..baee3e6cf64c 100644 --- a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c @@ -677,10 +677,10 @@ sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable) else data = SDIO_SEPINT_ACT_HI; /* disable hw oob interrupt */ -#if 1 && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) +#if defined(ANDROID) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) /* Needed for Android Linux Kernel 2.6.35 */ data |= SDIO_SEPINT_ACT_HI; /* Active HIGH */ -#endif /* OEM_ANDROID */ +#endif /* ANDROID */ status = sdioh_request_byte(sd, SDIOH_WRITE, 0, SDIOD_CCCR_BRCM_SEPINT, &data); return status; diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 6886544a4b33..6191449d8880 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -25,9 +25,6 @@ * $Id: dhd_linux.c,v 1.131.2.55 2011-02-09 05:31:56 Exp $ */ -#ifdef CONFIG_WIFI_CONTROL_FUNC -#include -#endif #include #include #include @@ -104,7 +101,7 @@ extern bool ap_cfg_running; #include #endif #if defined(CONFIG_WIFI_CONTROL_FUNC) - +#include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) #include @@ -113,7 +110,6 @@ extern bool ap_cfg_running; #endif struct semaphore wifi_control_sem; -struct dhd_bus *g_bus; static struct wifi_platform_data *wifi_control_data = NULL; static struct resource *wifi_irqres = NULL; @@ -2627,9 +2623,6 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) */ memcpy(netdev_priv(net), &dhd, sizeof(dhd)); -#if defined(CONFIG_WIFI_CONTROL_FUNC) - g_bus = bus; -#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP) && 1 register_pm_notifier(&dhd_sleep_pm_notifier); #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP) */