]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/staging/brcm80211/sys/wlc_rate.c
Staging: brcm80211: remove FALSE #define
[net-next-2.6.git] / drivers / staging / brcm80211 / sys / wlc_rate.c
index 9e9e4688e2ed21d313956feebcde5b123fa37a3c..d4dcd058c4166c9f28f3e7e83ba7932c14bb5d43 100644 (file)
@@ -17,6 +17,8 @@
 #include <wlc_cfg.h>
 #include <typedefs.h>
 #include <osl.h>
+#include <linux/kernel.h>
+#include <linuxver.h>
 #include <bcmutils.h>
 #include <siutils.h>
 #include <bcmendian.h>
@@ -29,7 +31,7 @@
 #include <wlc_pub.h>
 
 /* Rate info per rate: It tells whether a rate is ofdm or not and its phy_rate value */
-const uint8 rate_info[WLC_MAXRATE + 1] = {
+const u8 rate_info[WLC_MAXRATE + 1] = {
        /*  0     1     2     3     4     5     6     7     8     9 */
 /*   0 */ 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
 /*  10 */ 0x00, 0x37, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00,
@@ -151,8 +153,8 @@ const mcs_info_t mcs_table[MCS_TABLE_SIZE] = {
  *   other fields: refer to table 78 of section 17.3.2.2 of the original .11a standard
  */
 typedef struct legacy_phycfg {
-       uint32 rate_ofdm;       /* ofdm mac rate */
-       uint8 tx_phy_ctl3;      /* phy ctl byte 3, code rate, modulation type, # of streams */
+       u32 rate_ofdm;  /* ofdm mac rate */
+       u8 tx_phy_ctl3; /* phy ctl byte 3, code rate, modulation type, # of streams */
 } legacy_phycfg_t;
 
 #define LEGACY_PHYCFG_TABLE_SIZE       12      /* Number of legacy_rate_cfg entries in the table */
@@ -263,20 +265,20 @@ static bool wlc_rateset_valid(wlc_rateset_t *rs, bool check_brate)
        uint idx;
 
        if (!rs->count)
-               return FALSE;
+               return false;
 
        if (!check_brate)
-               return TRUE;
+               return true;
 
        /* error if no basic rates */
        for (idx = 0; idx < rs->count; idx++) {
                if (rs->rates[idx] & WLC_RATE_FLAG)
-                       return TRUE;
+                       return true;
        }
-       return FALSE;
+       return false;
 }
 
-void wlc_rateset_mcs_upd(wlc_rateset_t *rs, uint8 txstreams)
+void wlc_rateset_mcs_upd(wlc_rateset_t *rs, u8 txstreams)
 {
        int i;
        for (i = txstreams; i < MAX_STREAMS_SUPPORTED; i++)
@@ -289,10 +291,10 @@ void wlc_rateset_mcs_upd(wlc_rateset_t *rs, uint8 txstreams)
 bool
 wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
                                   const wlc_rateset_t *hw_rs,
-                                  bool check_brate, uint8 txstreams)
+                                  bool check_brate, u8 txstreams)
 {
-       uint8 rateset[WLC_MAXRATE + 1];
-       uint8 r;
+       u8 rateset[WLC_MAXRATE + 1];
+       u8 r;
        uint count;
        uint i;
 
@@ -324,13 +326,13 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
                rs->mcs[i] = (rs->mcs[i] & hw_rs->mcs[i]);
 
        if (wlc_rateset_valid(rs, check_brate))
-               return TRUE;
+               return true;
        else
-               return FALSE;
+               return false;
 }
 
 /* caluclate the rate of a rx'd frame and return it as a ratespec */
-ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, uint8 *plcp)
+ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
 {
        int phy_type;
        ratespec_t rspec = PHY_TXC1_BW_20MHZ << RSPEC_BW_SHIFT;
@@ -393,7 +395,7 @@ void wlc_rateset_copy(const wlc_rateset_t *src, wlc_rateset_t *dst)
  */
 void
 wlc_rateset_filter(wlc_rateset_t *src, wlc_rateset_t *dst, bool basic_only,
-                  uint8 rates, uint xmask, bool mcsallow)
+                  u8 rates, uint xmask, bool mcsallow)
 {
        uint i;
        uint r;
@@ -425,7 +427,7 @@ wlc_rateset_filter(wlc_rateset_t *src, wlc_rateset_t *dst, bool basic_only,
 void
 wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
                    uint phy_type, int bandtype, bool cck_only, uint rate_mask,
-                   bool mcsallow, uint8 bw, uint8 txstreams)
+                   bool mcsallow, u8 bw, u8 txstreams)
 {
        const wlc_rateset_t *rs_dflt;
        wlc_rateset_t rs_sel;
@@ -458,14 +460,14 @@ wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
 
        wlc_rateset_copy(rs_dflt, &rs_sel);
        wlc_rateset_mcs_upd(&rs_sel, txstreams);
-       wlc_rateset_filter(&rs_sel, rs_tgt, FALSE,
+       wlc_rateset_filter(&rs_sel, rs_tgt, false,
                           cck_only ? WLC_RATES_CCK : WLC_RATES_CCK_OFDM,
                           rate_mask, mcsallow);
-       wlc_rate_hwrs_filter_sort_validate(rs_tgt, rs_hw, FALSE,
+       wlc_rate_hwrs_filter_sort_validate(rs_tgt, rs_hw, false,
                                           mcsallow ? txstreams : 1);
 }
 
-int16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate)
+s16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate)
 {
        uint i;
        for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE; i++)
@@ -482,14 +484,14 @@ void wlc_rateset_mcs_clear(wlc_rateset_t *rateset)
                rateset->mcs[i] = 0;
 }
 
-void wlc_rateset_mcs_build(wlc_rateset_t *rateset, uint8 txstreams)
+void wlc_rateset_mcs_build(wlc_rateset_t *rateset, u8 txstreams)
 {
        bcopy(&cck_ofdm_mimo_rates.mcs[0], &rateset->mcs[0], MCSSET_LEN);
        wlc_rateset_mcs_upd(rateset, txstreams);
 }
 
 /* Based on bandwidth passed, allow/disallow MCS 32 in the rateset */
-void wlc_rateset_bw_mcs_filter(wlc_rateset_t *rateset, uint8 bw)
+void wlc_rateset_bw_mcs_filter(wlc_rateset_t *rateset, u8 bw)
 {
        if (bw == WLC_40_MHZ)
                setbit(rateset->mcs, 32);