Skip to content

Commit

Permalink
staging: brcm80211: remove unnecessary cflag, CONFIG_CFG80211
Browse files Browse the repository at this point in the history
remove unnecessary cflag, CONFIG_CFG80211

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
nohee ko authored and Greg Kroah-Hartman committed Oct 9, 2010
1 parent 5e33a02 commit 1e8dd5b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ccflags-y := \
-DBCMSDIO \
-DBDC \
-DBRCM_FULLMAC \
-DCONFIG_CFG80211 \
-DDHD_DEBUG \
-DDHD_FIRSTREAD=64 \
-DDHD_SCHED \
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@
#include <bcmsdh_sdmmc.h>

#include <dhd_dbg.h>
#ifdef CONFIG_CFG80211
#include <wl_cfg80211.h>
#endif

extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
extern void sdioh_sdmmc_devintr_on(sdioh_info_t *sd);
Expand Down Expand Up @@ -99,9 +97,7 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
gInstance->func[func->num] = func;

if (func->num == 2) {
#ifdef CONFIG_CFG80211
wl_cfg80211_sdio_func(func);
#endif
sd_trace(("F2 found, calling bcmsdh_probe...\n"));
ret = bcmsdh_probe(&sdmmc_dev);
}
Expand Down
32 changes: 1 addition & 31 deletions drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
#include <dhd_proto.h>
#include <dhd_dbg.h>

#ifdef CONFIG_CFG80211
#include <wl_cfg80211.h>
#endif

#define EPI_VERSION_STR "4.218.248.5"

Expand Down Expand Up @@ -359,11 +357,9 @@ module_param(dhd_idletime, int, 0);
uint dhd_poll = FALSE;
module_param(dhd_poll, uint, 0);

#ifdef CONFIG_CFG80211
/* Use cfg80211 */
uint dhd_cfg80211 = TRUE;
module_param(dhd_cfg80211, uint, 0);
#endif

/* Use interrupts */
uint dhd_intr = TRUE;
Expand Down Expand Up @@ -393,12 +389,10 @@ uint dhd_pktgen_len;
module_param(dhd_pktgen_len, uint, 0);
#endif

#ifdef CONFIG_CFG80211
#define FAVORITE_WIFI_CP (!!dhd_cfg80211)
#define IS_CFG80211_FAVORITE() FAVORITE_WIFI_CP
#define DBG_CFG80211_GET() ((dhd_cfg80211 & WL_DBG_MASK) >> 1)
#define NO_FW_REQ() (dhd_cfg80211 & 0x80)
#endif

/* Version string to report */
#ifdef DHD_DEBUG
Expand Down Expand Up @@ -1771,11 +1765,9 @@ static int dhd_stop(struct net_device *net)
dhd_info_t *dhd = *(dhd_info_t **) netdev_priv(net);

DHD_TRACE(("%s: Enter\n", __func__));
#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE()) {
wl_cfg80211_down();
}
#endif
if (dhd->pub.up == 0)
return 0;

Expand Down Expand Up @@ -1825,15 +1817,13 @@ static int dhd_open(struct net_device *net)
/* Allow transmit calls */
netif_start_queue(net);
dhd->pub.up = 1;
#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE()) {
if (unlikely(wl_cfg80211_up())) {
DHD_ERROR(("%s: failed to bring up cfg80211\n",
__func__));
return -1;
}
}
#endif

return ret;
}
Expand Down Expand Up @@ -1984,9 +1974,8 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
DHD_ERROR(("wl_iw_attach failed\n"));
goto fail;
}
#endif /* defined(CONFIG_WIRELESS_EXT) */
#endif /* defined(CONFIG_WIRELESS_EXT) */

#ifdef CONFIG_CFG80211
/* Attach and link in the cfg80211 */
if (IS_CFG80211_FAVORITE()) {
if (unlikely(wl_cfg80211_attach(net, &dhd->pub))) {
Expand All @@ -1999,7 +1988,6 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
}
wl_cfg80211_dbg_level(DBG_CFG80211_GET());
}
#endif

/* Set up the watchdog timer */
init_timer(&dhd->timer);
Expand Down Expand Up @@ -2263,19 +2251,15 @@ int dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
net->ethtool_ops = &dhd_ethtool_ops;

#if defined(CONFIG_WIRELESS_EXT)
#if defined(CONFIG_CFG80211)
if (!IS_CFG80211_FAVORITE()) {
#endif
#if WIRELESS_EXT < 19
net->get_wireless_stats = dhd_get_wireless_stats;
#endif /* WIRELESS_EXT < 19 */
#if WIRELESS_EXT > 12
net->wireless_handlers =
(struct iw_handler_def *)&wl_iw_handler_def;
#endif /* WIRELESS_EXT > 12 */
#if defined(CONFIG_CFG80211)
}
#endif
#endif /* defined(CONFIG_WIRELESS_EXT) */

dhd->pub.rxsz = net->mtu + net->hard_header_len + dhd->pub.hdrlen;
Expand Down Expand Up @@ -2375,10 +2359,8 @@ void dhd_detach(dhd_pub_t *dhdp)
wl_iw_detach();
#endif /* (CONFIG_WIRELESS_EXT) */

#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE())
wl_cfg80211_detach();
#endif /* CONFIG_CFG80211 */

#if defined(CONFIG_PM_SLEEP)
unregister_pm_notifier(&dhd_sleep_pm_notifier);
Expand Down Expand Up @@ -2588,10 +2570,8 @@ void *dhd_os_open_image(char *filename)
{
struct file *fp;

#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE() && !NO_FW_REQ())
return wl_cfg80211_request_fw(filename);
#endif

fp = filp_open(filename, O_RDONLY, 0);
/*
Expand All @@ -2611,10 +2591,8 @@ int dhd_os_get_image_block(char *buf, int len, void *image)
struct file *fp = (struct file *)image;
int rdlen;

#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE() && !NO_FW_REQ())
return wl_cfg80211_read_fw(buf, len);
#endif

if (!image)
return 0;
Expand All @@ -2628,10 +2606,8 @@ int dhd_os_get_image_block(char *buf, int len, void *image)

void dhd_os_close_image(void *image)
{
#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE() && !NO_FW_REQ())
return wl_cfg80211_release_fw();
#endif
if (image)
filp_close((struct file *)image, NULL);
}
Expand Down Expand Up @@ -2743,9 +2719,7 @@ dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
return bcmerror;

#if defined(CONFIG_WIRELESS_EXT)
#if defined(CONFIG_CFG80211)
if (!IS_CFG80211_FAVORITE()) {
#endif
if ((dhd->iflist[*ifidx] == NULL)
|| (dhd->iflist[*ifidx]->net == NULL)) {
DHD_ERROR(("%s Exit null pointer\n", __func__));
Expand All @@ -2754,20 +2728,16 @@ dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,

if (dhd->iflist[*ifidx]->net)
wl_iw_event(dhd->iflist[*ifidx]->net, event, *data);
#if defined(CONFIG_CFG80211)
}
#endif
#endif /* defined(CONFIG_WIRELESS_EXT) */

#ifdef CONFIG_CFG80211
if (IS_CFG80211_FAVORITE()) {
ASSERT(dhd->iflist[*ifidx] != NULL);
ASSERT(dhd->iflist[*ifidx]->net != NULL);
if (dhd->iflist[*ifidx]->net)
wl_cfg80211_event(dhd->iflist[*ifidx]->net, event,
*data);
}
#endif

return bcmerror;
}
Expand Down

0 comments on commit 1e8dd5b

Please sign in to comment.