net: wireless: bcmdhd: Fix SOFTAP compilation
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 13 Jun 2011 17:15:12 +0000 (10:15 -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/dhd_common.c
drivers/net/wireless/bcmdhd/wl_iw.c
drivers/net/wireless/bcmdhd/wl_iw.h

index 97dcfd379077b60b6fe2b87da0416d9d530591b1..5c296bc00fd06aa1f19255d135c8d2711c353445 100644 (file)
@@ -18,6 +18,7 @@ obj-$(CONFIG_BCMDHD) += bcmdhd.o
 bcmdhd-objs += $(DHDOFILES)
 ifneq ($(CONFIG_WIRELESS_EXT),)
 bcmdhd-objs += wl_iw.o
+DHDCFLAGS += -DSOFTAP
 endif
 ifneq ($(CONFIG_CFG80211),)
 bcmdhd-objs += wl_cfg80211.o wl_cfgp2p.o wldev_common.o
index 0bc2eb2a8655c092cb1607191220ffc6a5126b9e..013d62236f742d8230347cb0c30ccdb1d9bf483a 100644 (file)
@@ -88,7 +88,8 @@ void dhd_iscan_lock(void);
 void dhd_iscan_unlock(void);
 extern int dhd_change_mtu(dhd_pub_t *dhd, int new_mtu, int ifidx);
 #if defined(SOFTAP)
-extern bool ap_fw_loaded;
+bool ap_cfg_running = FALSE;
+bool ap_fw_loaded = FALSE;
 #endif 
 
 #if defined(KEEP_ALIVE)
@@ -1665,11 +1666,12 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        /* Set Keep Alive : be sure to use FW with -keepalive */
        int res;
 
-       if (ap_fw_loaded == FALSE) {
+#if defined(SOFTAP)
+       if (ap_fw_loaded == FALSE)
+#endif
                if ((res = dhd_keep_alive_onoff(dhd, 1)) < 0)
                        DHD_ERROR(("%s set keeplive failed %d\n",
                        __FUNCTION__, res));
-               }
        }
 #endif
 
index 5022d0fcf3a7cb889c5870903d9bb8fa0fe2b279..24fab74141986c18f2414cbc7c9a34b6213d83a7 100644 (file)
@@ -104,10 +104,10 @@ bool g_set_essid_before_scan = TRUE;
 #if defined(SOFTAP)
 #define WL_SOFTAP(x)
 static struct net_device *priv_dev;
-bool           ap_cfg_running = FALSE;
-bool           ap_fw_loaded = FALSE;
+extern bool ap_cfg_running;
+extern bool ap_fw_loaded;
 struct net_device *ap_net_dev = NULL;
-tsk_ctl_t      ap_eth_ctl;  
+tsk_ctl_t ap_eth_ctl;
 static int wl_iw_set_ap_security(struct net_device *dev, struct ap_profile *ap);
 static int wl_iw_softap_deassoc_stations(struct net_device *dev, u8 *mac);
 #endif 
index 8b58adcd27112416e300dde1e34a5b96ef73e03d..dbe30b20df067a766dd5efa458edcfe9e4c4371b 100644 (file)
@@ -68,7 +68,6 @@ struct cntry_locales_custom {
        char custom_locale[WLC_CNTRY_BUF_SZ];   
        int32 custom_locale_rev;                
 };
-#define SOFTAP 1
 
 
 #define        WL_IW_RSSI_MINVAL               -200