staging: brcm80211: removed unused #ifdef sections
authorRoland Vossen <rvossen@broadcom.com>
Fri, 26 Aug 2011 13:19:39 +0000 (15:19 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 26 Aug 2011 17:53:15 +0000 (10:53 -0700)
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 files changed:
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_proto.h
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmsmac/aiutils.c
drivers/staging/brcm80211/brcmsmac/aiutils.h
drivers/staging/brcm80211/brcmsmac/channel.c
drivers/staging/brcm80211/brcmsmac/d11.h
drivers/staging/brcm80211/brcmsmac/mac80211_if.h
drivers/staging/brcm80211/brcmsmac/main.c
drivers/staging/brcm80211/brcmsmac/pub.h
drivers/staging/brcm80211/brcmsmac/types.h
drivers/staging/brcm80211/include/brcmu_utils.h
drivers/staging/brcm80211/include/defs.h
drivers/staging/brcm80211/include/soc.h

index 0b92cef5bb645e8e3b5addb20cfc72bd397c18d9..a15765b6d88ce00fbccf1bd906dc66f582d129b0 100644 (file)
 #include "dhd_dbg.h"
 #include "wl_cfg80211.h"
 
-#if !defined(SDIO_VENDOR_ID_BROADCOM)
 #define SDIO_VENDOR_ID_BROADCOM                0x02d0
-#endif                         /* !defined(SDIO_VENDOR_ID_BROADCOM) */
 
 #define DMA_ALIGN_MASK 0x03
 
-#if !defined(SDIO_DEVICE_ID_BROADCOM_4329)
 #define SDIO_DEVICE_ID_BROADCOM_4329   0x4329
-#endif         /* !defined(SDIO_DEVICE_ID_BROADCOM_4329) */
 
 static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr);
 static int brcmf_ops_sdio_probe(struct sdio_func *func,
index 2c633fa54c4c7e25437f94e72ece67c04b2e4f36..46f75b7f7befe737567f6ba8927adb8a7291472c 100644 (file)
@@ -120,18 +120,6 @@ uint brcmf_radio_up = 1;
 char iface_name[IFNAMSIZ] = "wlan";
 module_param_string(iface_name, iface_name, IFNAMSIZ, 0);
 
-/* The following are specific to the SDIO dongle */
-
-#ifdef SDTEST
-/* Echo packet generator (pkts/s) */
-uint brcmf_pktgen;
-module_param(brcmf_pktgen, uint, 0);
-
-/* Echo packet len (0 => sawtooth, max 2040) */
-uint brcmf_pktgen_len;
-module_param(brcmf_pktgen_len, uint, 0);
-#endif
-
 static int brcmf_toe_get(struct brcmf_info *drvr_priv, int idx, u32 *toe_ol);
 static int brcmf_toe_set(struct brcmf_info *drvr_priv, int idx, u32 toe_ol);
 static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx,
@@ -1065,7 +1053,6 @@ done:
 
 static int brcmf_netdev_stop(struct net_device *net)
 {
-#if !defined(IGNORE_ETH0_DOWN)
        struct brcmf_info *drvr_priv = *(struct brcmf_info **) netdev_priv(net);
 
        brcmf_dbg(TRACE, "Enter\n");
@@ -1076,9 +1063,6 @@ static int brcmf_netdev_stop(struct net_device *net)
        /* Set state and stop OS transmissions */
        drvr_priv->pub.up = 0;
        netif_stop_queue(net);
-#else
-       brcmf_dbg(ERROR, "BYPASSed due to BRCM compilation: under investigation\n");
-#endif                         /* !defined(IGNORE_ETH0_DOWN) */
 
        return 0;
 }
index ff788b37afdcba4417bb96b26e08a158ce8407a8..2ce5feabbef3575b0f71453f6c52fdf93df970a7 100644 (file)
 #ifndef _BRCMF_PROTO_H_
 #define _BRCMF_PROTO_H_
 
-#ifndef IOCTL_RESP_TIMEOUT
 #define IOCTL_RESP_TIMEOUT  2000       /* In milli second */
-#endif
-
-#ifndef IOCTL_CHIP_ACTIVE_TIMEOUT
 #define IOCTL_CHIP_ACTIVE_TIMEOUT  10  /* In milli second */
-#endif
 
 /*
  * Exported from the brcmf protocol module (brcmf_cdc)
index 9b41891b1911424bec2cdd74304590dcb60ff99e..c1647ebafb5e311fe7bfa660536e918436ce3bed 100644 (file)
@@ -368,10 +368,8 @@ struct rte_console {
  * for HT availability, it could take a couple hundred ms more, so
  * max out at a 1 second (1000000us).
  */
-#if (PMU_MAX_TRANSITION_DLY <= 1000000)
 #undef PMU_MAX_TRANSITION_DLY
 #define PMU_MAX_TRANSITION_DLY 1000000
-#endif
 
 /* Value for ChipClockCSR during initial setup */
 #define BRCMF_INIT_CLKCTL1     (SBSDIO_FORCE_HW_CLKREQ_OFF |   \
@@ -3145,19 +3143,6 @@ int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex)
        brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_1,
                               SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err);
 
-#if defined(OOB_INTR_ONLY)
-       /* Host registration for OOB interrupt */
-       if (brcmf_sdio_register_oob_intr(bus->dhd)) {
-               brcmf_sdbrcm_wd_timer(bus, 0);
-               brcmf_dbg(ERROR, "Host failed to resgister for OOB\n");
-               ret = -ENODEV;
-               goto exit;
-       }
-
-       /* Enable oob at firmware */
-       brcmf_sdbrcm_enable_oob_intr(bus, true);
-#endif         /* defined(OOB_INTR_ONLY) */
-
        /* If we didn't come up, turn off backplane clock */
        if (drvr->busstate != BRCMF_BUS_DATA)
                brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
@@ -4533,15 +4518,8 @@ void brcmf_sdbrcm_isr(void *arg)
        if (!bus->intr)
                brcmf_dbg(ERROR, "isr w/o interrupt configured!\n");
 
-#if defined(SDIO_ISR_THREAD)
-       brcmf_dbg(TRACE, "Calling brcmf_sdbrcm_dpc()\n");
-       while (brcmf_sdbrcm_dpc(bus))
-               ;
-#else
        bus->dpc_sched = true;
        brcmf_sdbrcm_sched_dpc(bus);
-#endif
-
 }
 
 extern bool brcmf_sdbrcm_bus_watchdog(struct brcmf_pub *drvr)
index 4f7b0816af7b6fed4775dbec0e6a60771adf8d13..9010ce73b31c2d999d6d8e8e563a57330dafcb68 100644 (file)
@@ -2337,14 +2337,10 @@ static struct wireless_dev *brcmf_alloc_wdev(s32 sizeof_iface,
        wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
        wdev->wiphy->cipher_suites = __wl_cipher_suites;
        wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
-#ifndef WL_POWERSAVE_DISABLED
        wdev->wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;      /* enable power
                                                                 * save mode
                                                                 * by default
                                                                 */
-#else
-       wdev->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
-#endif                         /* !WL_POWERSAVE_DISABLED */
        err = wiphy_register(wdev->wiphy);
        if (unlikely(err < 0)) {
                WL_ERR("Couldn not register wiphy device (%d)\n", err);
@@ -3409,9 +3405,7 @@ static s32 wl_init_priv(struct brcmf_cfg80211_priv *cfg_priv)
        s32 err = 0;
 
        cfg_priv->scan_request = NULL;
-#ifndef WL_POWERSAVE_DISABLED
        cfg_priv->pwr_save = true;
-#endif /* WL_POWERSAVE_DISABLED */
        cfg_priv->iscan_on = true;      /* iscan on & off switch.
                                 we enable iscan per default */
        cfg_priv->roam_on = true;       /* roam on & off switch.
index c9c41a5327b422a59a15c68ea920258bc452cf26..62186b7db69a016126c296bf9d40ded249626046 100644 (file)
@@ -23,6 +23,7 @@
 #include <chipcommon.h>
 #include <brcmu_utils.h>
 #include <brcm_hw_ids.h>
+#include <soc.h>
 #include "types.h"
 #include "pub.h"
 #include "pmu.h"
index 375c06f7c0250a48afd4e86f1f2556da1063a7f0..5dee80ffd83d054205bcfaee828685871f389e5a 100644 (file)
 /* Region 2 for sdram (512 MB) */
 #define SI_SDRAM_R2            0x80000000
 
-#ifdef SI_ENUM_BASE_VARIABLE
-#define SI_ENUM_BASE           (sii->pub.si_enum_base)
-#else
-#define SI_ENUM_BASE           0x18000000      /* Enumeration space base */
-#endif                         /* SI_ENUM_BASE_VARIABLE */
-
 /* Wrapper space base */
 #define SI_WRAP_BASE           0x18100000
 /* each core gets 4Kbytes for registers */
 #define DEFAULT_GPIO_ONTIME    10      /* Default: 10% on */
 #define DEFAULT_GPIO_OFFTIME   90      /* Default: 10% on */
 
-#ifndef DEFAULT_GPIOTIMERVAL
 #define DEFAULT_GPIOTIMERVAL \
        ((DEFAULT_GPIO_ONTIME << GPIO_ONTIME_SHIFT) | DEFAULT_GPIO_OFFTIME)
-#endif
 
 /*
  * Data structure to export all chip specific common variables
@@ -412,20 +404,11 @@ struct si_pub {
 #define SI_PCIUP       3
 
 /* PMU clock/power control */
-#if defined(BCMPMUCTL)
-#define PMUCTL_ENAB(sih)       (BCMPMUCTL)
-#else
 #define PMUCTL_ENAB(sih)       ((sih)->cccaps & CC_CAP_PMU)
-#endif
 
 /* chipcommon clock/power control (exclusive with PMU's) */
-#if defined(BCMPMUCTL) && BCMPMUCTL
-#define CCCTL_ENAB(sih)                (0)
-#define CCPLL_ENAB(sih)                (0)
-#else
 #define CCCTL_ENAB(sih)                ((sih)->cccaps & CC_CAP_PWR_CTL)
 #define CCPLL_ENAB(sih)                ((sih)->cccaps & CC_CAP_PLL_MASK)
-#endif
 
 /* External PA enable mask */
 #define GPIO_CTRL_EPA_EN_MASK 0x40
index 1aad680c7f62e2872303f2437d051fc272a6ea26..89d8fa7330b5fae93a025c64eef73d3bb5ae1ad8 100644 (file)
@@ -107,9 +107,6 @@ static const struct locale_mimo_info *brcms_c_get_mimo_2g(u8 locale_idx);
 static const struct locale_mimo_info *brcms_c_get_mimo_5g(u8 locale_idx);
 
 /* QDB() macro takes a dB value and converts to a quarter dB value */
-#ifdef QDB
-#undef QDB
-#endif
 #define QDB(n) ((n) * BRCMS_TXPWR_DB_FACTOR)
 
 /* Regulatory Matrix Spreadsheet (CLM) MIMO v3.7.9 */
@@ -489,19 +486,10 @@ static const struct locale_mimo_info *g_mimo_5g_table[] = {
        &locale_11n
 };
 
-#ifdef LC
-#undef LC
-#endif
 #define LC(id) LOCALE_MIMO_IDX_ ## id
 
-#ifdef LC_2G
-#undef LC_2G
-#endif
 #define LC_2G(id)      LOCALE_2G_IDX_ ## id
 
-#ifdef LC_5G
-#undef LC_5G
-#endif
 #define LC_5G(id)      LOCALE_5G_IDX_ ## id
 
 #define LOCALES(band2, band5, mimo2, mimo5) \
index 96f487aed9b32b2301f6f9260d6e9efea5de7f8f..f0c3f5a75a2c8a7411d420ebfc96cd8700280626 100644 (file)
 #define        TX_DATA_FIFO            TX_AC_BE_FIFO
 #define        TX_CTL_FIFO             TX_AC_VO_FIFO
 
-#ifndef WL_RSSI_ANT_MAX
 #define WL_RSSI_ANT_MAX                4       /* max possible rx antennas */
-#elif WL_RSSI_ANT_MAX != 4
-#error "WL_RSSI_ANT_MAX does not match"
-#endif
 
 struct intctrlregs {
        u32 intstatus;
index 7f290d7c0c418d63963d6a76f52dcd08d7ab0bad..1d528036019388979fffac9a583d6caee1739ec0 100644 (file)
@@ -75,9 +75,6 @@ struct brcms_info {
 
        struct tasklet_struct tasklet;  /* dpc tasklet */
        bool resched;           /* dpc needs to be and is rescheduled */
-#ifdef LINUXSTA_PS
-       u32 pci_psstate[16];    /* pci ps-state save/restore */
-#endif
        struct brcms_firmware fw;
        struct wiphy *wiphy;
 };
index 339ab28477a1c8ade4b4df6b4045b0b26116a41f..3aa03090b0189dbe183ee458a31dba504a59ed87 100644 (file)
@@ -3540,11 +3540,6 @@ void brcms_c_set_bssid(struct brcms_bss_cfg *cfg)
        /* if primary config, we need to update BSSID in RXE match registers */
        if (cfg == wlc->cfg)
                brcms_c_set_addrmatch(wlc, RCM_BSSID_OFFSET, cfg->BSSID);
-#ifdef SUPPORT_HWKEYS
-       else if (BSSCFG_STA(cfg) && cfg->BSS)
-               brcms_c_rcmta_add_bssid(wlc, cfg);
-
-#endif
 }
 
 void brcms_b_set_shortslot(struct brcms_hardware *wlc_hw, bool shortslot)
@@ -3774,7 +3769,7 @@ u32 brcms_c_lowest_basic_rspec(struct brcms_c_info *wlc,
                        break;
                }
        }
-#if NCONF
+
        /*
         * pick siso/cdd as default for OFDM (note no basic
         * rate MCSs are supported yet)
@@ -3782,8 +3777,6 @@ u32 brcms_c_lowest_basic_rspec(struct brcms_c_info *wlc,
        if (IS_OFDM(lowest_basic_rspec))
                lowest_basic_rspec |= (wlc->stf->ss_opmode << RSPEC_STF_SHIFT);
 
-#endif
-
        return lowest_basic_rspec;
 }
 
@@ -4236,12 +4229,6 @@ void brcms_c_info_init(struct brcms_c_info *wlc, int unit)
 
        /* WME QoS mode is Auto by default */
        wlc->pub->_wme = AUTO;
-
-#ifdef BCMSDIODEV_ENABLED
-       /* enable priority flow control for sdio dongle */
-       wlc->pub->_priofc = true;
-#endif
-
        wlc->pub->_ampdu = AMPDU_AGG_HOST;
        wlc->pub->bcmerror = 0;
        wlc->pub->_coex = ON;
@@ -7457,16 +7444,8 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
                        else
                                rspec[k] |= (mimo_ctlchbw << RSPEC_BW_SHIFT);
 
-                       /* Set Short GI */
-#ifdef NOSGIYET
-                       if (IS_MCS(rspec[k])
-                           && (txrate[k]->flags & IEEE80211_TX_RC_SHORT_GI))
-                               rspec[k] |= RSPEC_SHORT_GI;
-                       else if (!(txrate[k]->flags & IEEE80211_TX_RC_SHORT_GI))
-                               rspec[k] &= ~RSPEC_SHORT_GI;
-#else
+                       /* Disable short GI, not supported yet */
                        rspec[k] &= ~RSPEC_SHORT_GI;
-#endif
 
                        mimo_preamble_type = BRCMS_MM_PREAMBLE;
                        if (txrate[k]->flags & IEEE80211_TX_RC_GREEN_FIELD)
@@ -9582,15 +9561,7 @@ static void
 brcms_c_txflowcontrol_signal(struct brcms_c_info *wlc,
                             struct brcms_txq_info *qi, bool on, int prio)
 {
-#ifdef NON_FUNCTIONAL
-       /* wlcif_list is never filled so this function is not functional */
-       struct brcms_c_if *wlcif;
-
-       for (wlcif = wlc->wlcif_list; wlcif != NULL; wlcif = wlcif->next) {
-               if (wlcif->qi == qi && wlcif->flags & BRCMS_IF_LINKED)
-                       brcms_txflowcontrol(wlc->wl, wlcif->wlif, on, prio);
-       }
-#endif
+       /* wlcif_list is never filled so this function is not functional yet */
 }
 
 static struct brcms_txq_info *brcms_c_txq_alloc(struct brcms_c_info *wlc)
index c2ab1a3e288c84d197ec520493faa29e864fe675..f4e47e8487cbd30d80d4ea5868896dcce900a3fe 100644 (file)
 #define ANTSWITCH_TYPE_3       3
 
 #define RXBUFSZ                PKTBUFSZ
-#ifndef AIDMAPSZ
 /* aid bitmap size in bytes */
 #define AIDMAPSZ       (roundup(MAXSCB, NBBY)/NBBY)
-#endif                         /* AIDMAPSZ */
 
 #define MAX_STREAMS_SUPPORTED  4       /* max number of streams supported */
 
@@ -353,22 +351,10 @@ enum wlc_par_id {
 #define SUPPORT_11N    (ENAB_1x1|ENAB_2x2)
 #define SUPPORT_HT     (ENAB_1x1|ENAB_2x2|ENAB_3x3)
 /* WL11N Support */
-#if ((defined(NCONF) && (NCONF != 0)) || \
-       (defined(LCNCONF) && (LCNCONF != 0)) || \
-       (defined(HTCONF) && (HTCONF != 0)) || \
-       (defined(SSLPNCONF) && (SSLPNCONF != 0)))
 #define N_ENAB(pub) ((pub)->_n_enab & SUPPORT_11N)
 #define N_REQD(pub) ((pub)->_n_reqd)
-#else
-#define N_ENAB(pub)    0
-#define N_REQD(pub)    0
-#endif
-
-#if (defined(HTCONF) && (HTCONF != 0))
-#define HT_ENAB(pub) (((pub)->_n_enab & SUPPORT_HT) == SUPPORT_HT)
-#else
+
 #define HT_ENAB(pub) 0
-#endif
 
 #define AMPDU_AGG_HOST 1
 #define AMPDU_ENAB(pub) ((pub)->_ampdu)
index d44db5674b315d381f8b1a88b33e93faca61bef4..6d17d7fa9b7b6190fb49735d5990949f4a9d0dc2 100644 (file)
 #include <linux/types.h>
 #include <linux/io.h>
 
-#if 0
-/* Bus types */
-#define SDIO_BUS               3       /* SDIO target */
-#define USB_BUS                        5       /* USB (does not support R/W REG) */
-#define SPI_BUS                        6       /* gSPI target */
-#define RPC_BUS                        7       /* RPC target */
-#endif
-
 #define WL_CHAN_FREQ_RANGE_2G      0
 #define WL_CHAN_FREQ_RANGE_5GL     1
 #define WL_CHAN_FREQ_RANGE_5GM     2
index ff8f3634d282f6686e17dc5fbbc0973a30d184ca..de627c211f66ca136d4e84ebe15547b1fd0d90df 100644 (file)
@@ -45,12 +45,8 @@ struct brcmu_strbuf {
 }
 
 /* osl multi-precedence packet queue */
-#ifndef PKTQ_LEN_DEFAULT
 #define PKTQ_LEN_DEFAULT        128    /* Max 128 packets */
-#endif
-#ifndef PKTQ_MAX_PREC
 #define PKTQ_MAX_PREC           16     /* Maximum precedence levels */
-#endif
 
 struct pktq_prec {
        struct sk_buff *head;   /* first packet to dequeue */
@@ -192,9 +188,7 @@ extern int brcmu_iovar_lencheck(const struct brcmu_iovar *table, void *arg,
 
 #define BCME_STRLEN            64      /* Max string length for BCM errors */
 
-#ifndef ABS
 #define        ABS(a)                  (((a) < 0) ? -(a) : (a))
-#endif                         /* ABS */
 
 #define CEIL(x, y)             (((x) + ((y)-1)) / (y))
 #define        ISPOWEROF2(x)           ((((x)-1)&(x)) == 0)
index 8e0c559398c1db5676801239da6fb3081fa30412..c745b7e59227302b277f4e5688fa112b7d36f193 100644 (file)
 #define USB_BUS                        5
 #define SPI_BUS                        6
 
-#ifndef OFF
 #define        OFF     0
-#endif
-
-#ifndef ON
 #define        ON      1               /* ON = 1 */
-#endif
-
 #define        AUTO    (-1)            /* Auto = -1 */
 
 /*
index f23edc5d30724c0230ef732de72054eec7906ac1..4fcb956ad9e03633ed01589e4adade6f05919eb0 100644 (file)
 #ifndef        _BRCM_SOC_H
 #define        _BRCM_SOC_H
 
-#ifdef SI_ENUM_BASE_VARIABLE
-#define SI_ENUM_BASE           (sii->pub.si_enum_base)
-#else
 #define SI_ENUM_BASE           0x18000000      /* Enumeration space base */
-#endif                         /* SI_ENUM_BASE_VARIABLE */
 
 /* core codes */
 #define        NODEV_CORE_ID           0x700   /* Invalid coreid */