net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 13 Jun 2011 16:59:51 +0000 (09:59 -0700)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:10:08 +0000 (09:10 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/Makefile
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
drivers/net/wireless/bcmdhd/dhd_linux.c

index 73502ff8390a9bf9300ee331988537a573c55e0f..13a140ba72a06ef5b83cf463f45f50679086463c 100644 (file)
@@ -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
index d5a403eaa8825040884a782a2562da8728d906fe..baee3e6cf64c21a8927dfb42ecba8f8ff1d77707 100644 (file)
@@ -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;
index 6886544a4b333c01338786102fe8ab4add31dc2e..6191449d88802c925838154debb881393ef1fb9b 100644 (file)
@@ -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 <linux/platform_device.h>
-#endif
 #include <typedefs.h>
 #include <linuxver.h>
 #include <osl.h>
@@ -104,7 +101,7 @@ extern bool ap_cfg_running;
 #include <dhd_wlfc.h>
 #endif
 #if defined(CONFIG_WIFI_CONTROL_FUNC)
-
+#include <linux/platform_device.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
 #include <linux/wlan_plat.h>
@@ -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) */