net: wireless: bcmdhd: Fix SOFTAP compilation
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 13 Jun 2011 17:15:12 +0000 (10:15 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:08:36 +0000 (12:08 -0800)
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 97dcfd3..5c296bc 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 0bc2eb2..013d622 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 5022d0f..24fab74 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 8b58adc..dbe30b2 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