From 4535cedefdc0628c132711f2eca85e5c3baa5e33 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Mon, 13 Jun 2011 10:15:12 -0700 Subject: [PATCH] net: wireless: bcmdhd: Fix SOFTAP compilation Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcmdhd/Makefile | 1 + drivers/net/wireless/bcmdhd/dhd_common.c | 8 +++++--- drivers/net/wireless/bcmdhd/wl_iw.c | 6 +++--- drivers/net/wireless/bcmdhd/wl_iw.h | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/bcmdhd/Makefile b/drivers/net/wireless/bcmdhd/Makefile index 97dcfd3..5c296bc 100644 --- a/drivers/net/wireless/bcmdhd/Makefile +++ b/drivers/net/wireless/bcmdhd/Makefile @@ -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 diff --git a/drivers/net/wireless/bcmdhd/dhd_common.c b/drivers/net/wireless/bcmdhd/dhd_common.c index 0bc2eb2..013d622 100644 --- a/drivers/net/wireless/bcmdhd/dhd_common.c +++ b/drivers/net/wireless/bcmdhd/dhd_common.c @@ -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 diff --git a/drivers/net/wireless/bcmdhd/wl_iw.c b/drivers/net/wireless/bcmdhd/wl_iw.c index 5022d0f..24fab74 100644 --- a/drivers/net/wireless/bcmdhd/wl_iw.c +++ b/drivers/net/wireless/bcmdhd/wl_iw.c @@ -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 diff --git a/drivers/net/wireless/bcmdhd/wl_iw.h b/drivers/net/wireless/bcmdhd/wl_iw.h index 8b58adc..dbe30b2 100644 --- a/drivers/net/wireless/bcmdhd/wl_iw.h +++ b/drivers/net/wireless/bcmdhd/wl_iw.h @@ -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 -- 2.7.4