]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: brcm80211: cleaned up more softmac macro's
authorRoland Vossen <rvossen@broadcom.com>
Fri, 2 Sep 2011 14:00:35 +0000 (16:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:46:28 +0000 (16:46 -0700)
Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/main.c
drivers/staging/brcm80211/brcmsmac/main.h
drivers/staging/brcm80211/brcmsmac/otp.c
drivers/staging/brcm80211/brcmsmac/otp.h
drivers/staging/brcm80211/brcmsmac/pmu.h
drivers/staging/brcm80211/brcmsmac/pub.h

index 9e73b429cf42314d29cbfedfaa914b8d373e554d..fff3ba9dc5ba64d1959331b6c4b30a497f865d77 100644 (file)
 #define APHY_SLOT_TIME         9
 #define BPHY_SLOT_TIME         20
 
+#define        WL_SPURAVOID_OFF        0
+#define        WL_SPURAVOID_ON1        1
+#define        WL_SPURAVOID_ON2        2
+
+/*
+ * 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.
+ */
+#define SSID_FMT_BUF_LEN       ((4 * IEEE80211_MAX_SSID_LEN) + 1)
+
+/* defaults for the HT (MIMO) bss */
+#define HT_CAP (IEEE80211_HT_CAP_SM_PS |\
+       IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_GRN_FLD |\
+       IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
+
 /*
  * The following table lists the buffer memory allocated to xmt fifos in HW.
  * the size is in units of 256bytes(one block), total size is HW dependent
 #define IS_MBAND_UNLOCKED(wlc) \
        ((wlc->pub->_nbands > 1) && !(wlc)->bandlocked)
 
+#define CHSPEC_WLC_BW(chanspec)        (CHSPEC_IS40(chanspec) ? BRCMS_40_MHZ : \
+                                CHSPEC_IS20(chanspec) ? BRCMS_20_MHZ : \
+                                                        BRCMS_10_MHZ)
+
 /* dup state between BMAC(struct brcms_hardware) and HIGH(struct brcms_c_info)
    driver */
 struct brcms_b_state {
index e8a854bfb12de8f3ceb45070fce393f024e5c1c4..047c422174d9a630172a4a827ef88ec1ed7742e5 100644 (file)
@@ -23,7 +23,6 @@
 #include "types.h"
 #include "d11.h"
 
-#define MA_WINDOW_SZ           8       /* moving average window size */
 #define        INVCHANNEL              255     /* invalid channel */
 
 /* max # brcms_c_module_register() calls */
index 1e0093c71ca317ec75b09f988edf94db64417528..05c78c7f33c76a19d9edeb4df6ca4c743ef157bf 100644 (file)
@@ -64,6 +64,9 @@
 
 #define MAXNUMRDES             9       /* Maximum OTP redundancy entries */
 
+/* Fixed size subregions sizes in words */
+#define OTPGU_CI_SZ            2
+
 /* OTP function struct */
 struct otp_fn_s {
        int (*size)(struct otpinfo *oi);
@@ -111,8 +114,6 @@ static struct otpinfo otpinfo;
  *
  */
 
-#define HWSW_RGN(rgn)          (((rgn) == OTP_HW_RGN) ? "h/w" : "s/w")
-
 /* OTP layout */
 /* CC revs 21, 24 and 27 OTP General Use Region word offset */
 #define REVA4_OTPGU_BASE       12
index 938100e254821a51f4524cb30bf7bc283d0b0964..bf2f76f96ac76995083332e6c64bb28948074d68 100644 (file)
 /* OTP Size */
 #define OTP_SZ_MAX             (6144/8)        /* maximum bytes in one CIS */
 
-/* Fixed size subregions sizes in words */
-#define OTPGU_CI_SZ            2
-
-/* OTP usage */
-#define OTP4325_FM_DISABLED_OFFSET     188
-
 struct otpinfo;
 
 /* Exported functions */
index 0c7e48c4bcd8f5c5bc250adb3a28599632ebfa9f..2917e6ff8626d00dec305229b24279c163352bcc 100644 (file)
 #define _BRCM_PMU_H_
 
 #include "types.h"
-/*
- * LDO selections used in si_pmu_set_ldo_voltage
- */
-#define SET_LDO_VOLTAGE_LDO1   1
-#define SET_LDO_VOLTAGE_LDO2   2
-#define SET_LDO_VOLTAGE_LDO3   3
-#define SET_LDO_VOLTAGE_PAREF  4
-#define SET_LDO_VOLTAGE_CLDO_PWM       5
-#define SET_LDO_VOLTAGE_CLDO_BURST     6
-#define SET_LDO_VOLTAGE_CBUCK_PWM      7
-#define SET_LDO_VOLTAGE_CBUCK_BURST    8
-#define SET_LDO_VOLTAGE_LNLDO1 9
-#define SET_LDO_VOLTAGE_LNLDO2_SEL     10
 
 extern u16 si_pmu_fast_pwrup_delay(struct si_pub *sih);
 extern void si_pmu_sprom_enable(struct si_pub *sih, bool enable);
index 5bca2fbc6d4eb719d58499425361c9cb7c6229dc..ab2fb119f235770b4c3b81018efa6cb22f892d32 100644 (file)
 #define BRCMS_20_MHZ   20      /* 20Mhz nphy channel bandwidth */
 #define BRCMS_40_MHZ   40      /* 40Mhz nphy channel bandwidth */
 
-#define CHSPEC_WLC_BW(chanspec)        (CHSPEC_IS40(chanspec) ? BRCMS_40_MHZ : \
-                                CHSPEC_IS20(chanspec) ? BRCMS_20_MHZ : \
-                                                        BRCMS_10_MHZ)
-
 #define        BRCMS_RSSI_MINVAL       -200    /* Low value, e.g. for forcing roam */
 #define        BRCMS_RSSI_NO_SIGNAL    -91     /* NDIS RSSI link quality cutoffs */
 #define        BRCMS_RSSI_VERY_LOW     -80     /* Very low quality cutoffs */
 #define        BRCMS_RSSI_VERY_GOOD    -58     /* Very good quality cutoffs */
 #define        BRCMS_RSSI_EXCELLENT    -57     /* Excellent quality cutoffs */
 
-/* macro to perform PHY -> D11 PHY TYPE, currently 1:1 */
-#define BRCMS_PHYTYPE(_x) (_x)
-
-#define MA_WINDOW_SZ           8       /* moving average window size */
-
-#define BRCMS_SNR_INVALID              0       /* invalid SNR value */
-
 /* a large TX Power as an init value to factor out of min() calculations,
  * keep low enough to fit in an s8, units are .25 dBm
  */
@@ -87,9 +76,6 @@
 /* driver's default tx antenna setting */
 #define ANT_TX_DEF             3
 
-/* use all available core for transmit */
-#define TXCORE_POLICY_ALL      0x1
-
 /* Tx Chain values */
 /* def bitmap of txchain */
 #define TXCHAIN_DEF            0x1
 #define ANTSWITCH_TYPE_3       3
 
 #define RXBUFSZ                PKTBUFSZ
-/* aid bitmap size in bytes */
-#define AIDMAPSZ       (roundup(MAXSCB, NBBY)/NBBY)
 
 #define MAX_STREAMS_SUPPORTED  4       /* max number of streams supported */
 
-#define        WL_SPURAVOID_OFF        0
-#define        WL_SPURAVOID_ON1        1
-#define        WL_SPURAVOID_ON2        2
-
 struct brcms_tunables {
        int ntxd;       /* size of tx descriptor table */
        int nrxd;       /* size of rx descriptor table */
@@ -158,24 +138,11 @@ struct rsn_parms {
        u8 PAD[4];              /* padding for future growth */
 };
 
-/*
- * 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.
- */
-#define SSID_FMT_BUF_LEN       ((4 * IEEE80211_MAX_SSID_LEN) + 1)
-
-#define RSN_FLAGS_SUPPORTED            0x1     /* Flag for rsn_params */
-#define RSN_FLAGS_PREAUTH              0x2     /* Flag for WPA2 rsn_params */
-
 /* All the HT-specific default advertised capabilities (including AMPDU)
  * should be grouped here at one place
  */
 #define AMPDU_DEF_MPDU_DENSITY 6       /* default mpdu density (110 ==> 4us) */
 
-/* defaults for the HT (MIMO) bss */
-#define HT_CAP (IEEE80211_HT_CAP_SM_PS |\
-       IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_GRN_FLD |\
-       IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
-
 /* wlc internal bss_info */
 struct brcms_bss_info {
        u8 BSSID[ETH_ALEN];     /* network BSSID */
@@ -202,22 +169,6 @@ struct brcms_bss_info {
        u8 wpacfg;              /* wpa config index */
 };
 
-/* IOVar flags for common error checks */
-#define IOVF_MFG       (1<<3)  /* flag for mfgtest iovars */
-#define IOVF_WHL       (1<<4)  /* value must be whole (0-max) */
-#define IOVF_NTRL      (1<<5)  /* value must be natural (1-max) */
-
-#define IOVF_SET_UP    (1<<6)  /* set requires driver be up */
-#define IOVF_SET_DOWN  (1<<7)  /* set requires driver be down */
-#define IOVF_SET_CLK   (1<<8)  /* set requires core clock */
-#define IOVF_SET_BAND  (1<<9)  /* set requires fixed band */
-
-#define IOVF_GET_UP    (1<<10) /* get requires driver be up */
-#define IOVF_GET_DOWN  (1<<11) /* get requires driver be down */
-#define IOVF_GET_CLK   (1<<12) /* get requires core clock */
-#define IOVF_GET_BAND  (1<<13) /* get requires fixed band */
-#define IOVF_OPEN_ALLOW        (1<<14) /* set allowed iovar for opensrc */
-
 #define MAC80211_PROMISC_BCNS  (1 << 0)
 #define MAC80211_SCAN          (1 << 1)