diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-07 17:04:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-07 17:04:47 -0700 |
commit | 7d4df48eba4cea654ee6fe6e1a51a0600807ed7b (patch) | |
tree | 7c4e3cbb7d576ac3a0b273b5908bbed460eceb0a /drivers/staging/brcm80211/sys | |
parent | 4128dd9afb986321edf0baa8a3aaa3c7c5aa3730 (diff) | |
download | op-kernel-dev-7d4df48eba4cea654ee6fe6e1a51a0600807ed7b.zip op-kernel-dev-7d4df48eba4cea654ee6fe6e1a51a0600807ed7b.tar.gz |
Staging: brcm80211: s/uint16/u16/
Use the kernel types, don't invent your own.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/sys')
19 files changed, 406 insertions, 406 deletions
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c index 7c07808..d7094e0 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.c +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c @@ -765,7 +765,7 @@ static int wl_set_hint(wl_info_t *wl, char *abbrev) * a warning that this function is defined but not used if we declare * it as static. */ -static wl_info_t *wl_attach(uint16 vendor, uint16 device, unsigned long regs, +static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, uint bustype, void *btparam, uint irq) { wl_info_t *wl; diff --git a/drivers/staging/brcm80211/sys/wl_ucode.h b/drivers/staging/brcm80211/sys/wl_ucode.h index 2763b7c..7499cf5 100644 --- a/drivers/staging/brcm80211/sys/wl_ucode.h +++ b/drivers/staging/brcm80211/sys/wl_ucode.h @@ -16,8 +16,8 @@ #include <typedefs.h> typedef struct d11init { - uint16 addr; - uint16 size; + u16 addr; + u16 size; uint32 value; } d11init_t; diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.c b/drivers/staging/brcm80211/sys/wlc_ampdu.c index 1d68400..7fd7a0a 100644 --- a/drivers/staging/brcm80211/sys/wlc_ampdu.c +++ b/drivers/staging/brcm80211/sys/wlc_ampdu.c @@ -90,9 +90,9 @@ uint32 wl_ampdu_dbg = * how often and/or when the wlc counters are updated. */ typedef struct wlc_fifo_info { - uint16 ampdu_pld_size; /* number of bytes to be pre-loaded */ + u16 ampdu_pld_size; /* number of bytes to be pre-loaded */ u8 mcs2ampdu_table[FFPLD_MAX_MCS + 1]; /* per-mcs max # of mpdus in an ampdu */ - uint16 prev_txfunfl; /* num of underflows last read from the HW macstats counter */ + u16 prev_txfunfl; /* num of underflows last read from the HW macstats counter */ uint32 accum_txfunfl; /* num of underflows since we modified pld params */ uint32 accum_txampdu; /* num of tx ampdu since we modified pld params */ uint32 prev_txampdu; /* previous reading of tx ampdu */ @@ -158,7 +158,7 @@ static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, uint32 frmtxstatus, uint32 frmtxstatus2); -static inline uint16 pkt_txh_seqnum(wlc_info_t *wlc, void *p) +static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, void *p) { d11txh_t *txh; struct dot11_header *h; @@ -173,7 +173,7 @@ ampdu_info_t *BCMATTACHFN(wlc_ampdu_attach) (wlc_info_t *wlc) int i; /* some code depends on packed structures */ - ASSERT(DOT11_MAXNUMFRAGS == NBITS(uint16)); + ASSERT(DOT11_MAXNUMFRAGS == NBITS(u16)); ASSERT(ISPOWEROF2(AMPDU_TX_BA_MAX_WSIZE)); ASSERT(ISPOWEROF2(AMPDU_RX_BA_MAX_WSIZE)); ASSERT(wlc->pub->tunables->ampdunummpdu <= AMPDU_MAX_MPDU); @@ -339,17 +339,17 @@ static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int fid) uint32 txunfl_ratio; u8 max_mpdu; uint32 current_ampdu_cnt = 0; - uint16 max_pld_size; + u16 max_pld_size; uint32 new_txunfl; wlc_fifo_info_t *fifo = (ampdu->fifo_tb + fid); uint xmtfifo_sz; - uint16 cur_txunfl; + u16 cur_txunfl; /* return if we got here for a different reason than underflows */ cur_txunfl = wlc_read_shm(wlc, M_UCODE_MACSTAT + OFFSETOF(macstat_t, txfunfl[fid])); - new_txunfl = (uint16) (cur_txunfl - fifo->prev_txfunfl); + new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl); if (new_txunfl == 0) { WL_FFPLD(("check_txunfl : TX status FRAG set but no tx underflows\n")); return -1; @@ -516,7 +516,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) bool rr = TRUE, fbr = FALSE; uint i, count = 0, fifo, seg_cnt = 0; - uint16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0; + u16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0; uint32 ampdu_len, maxlen = 0; d11txh_t *txh = NULL; u8 *plcp; @@ -528,13 +528,13 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) bool use_rts = FALSE, use_cts = FALSE; ratespec_t rspec = 0, rspec_fallback = 0; ratespec_t rts_rspec = 0, rts_rspec_fallback = 0; - uint16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ; + u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ; struct dot11_rts_frame *rts; u8 rr_retry_limit; wlc_fifo_info_t *f; bool fbr_iscck; struct ieee80211_tx_info *tx_info; - uint16 qlen; + u16 qlen; wlc = ampdu->wlc; osh = wlc->osh; @@ -643,7 +643,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) * test whether need to break or change the epoch */ if (count == 0) { - uint16 fc; + u16 fc; mcl |= (TXC_AMPDU_FIRST << TXC_AMPDU_SHIFT); /* refill the bits since might be a retx mpdu */ mcl |= TXC_STARTMSDU; @@ -665,7 +665,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) len = ROUNDUP(len, 4); ampdu_len += (len + (ndelim + 1) * AMPDU_DELIMITER_LEN); - dma_len += (uint16) pkttotlen(osh, p); + dma_len += (u16) pkttotlen(osh, p); WL_AMPDU_TX(("wl%d: wlc_sendampdu: ampdu_len %d seg_cnt %d null delim %d\n", wlc->pub->unit, ampdu_len, seg_cnt, ndelim)); @@ -818,13 +818,13 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) /* reset the mixed mode header durations */ if (txh->MModeLen) { - uint16 mmodelen = + u16 mmodelen = wlc_calc_lsig_len(wlc, rspec, ampdu_len); txh->MModeLen = htol16(mmodelen); preamble_type = WLC_MM_PREAMBLE; } if (txh->MModeFbrLen) { - uint16 mmfbrlen = + u16 mmfbrlen = wlc_calc_lsig_len(wlc, rspec_fallback, ampdu_len); txh->MModeFbrLen = htol16(mmfbrlen); fbr_preamble_type = WLC_MM_PREAMBLE; @@ -841,7 +841,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) /* update RTS dur fields */ if (use_rts || use_cts) { - uint16 durid; + u16 durid; rts = (struct dot11_rts_frame *)&txh->rts_frame; if ((mch & TXC_PREAMBLE_RTS_MAIN_SHORT) == TXC_PREAMBLE_RTS_MAIN_SHORT) @@ -1026,13 +1026,13 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p, d11txh_t *txh; u8 *plcp; struct dot11_header *h; - uint16 seq, start_seq = 0, bindex, index, mcl; + u16 seq, start_seq = 0, bindex, index, mcl; u8 mcs = 0; bool ba_recd = FALSE, ack_recd = FALSE; u8 suc_mpdu = 0, tot_mpdu = 0; uint supr_status; bool update_rate = TRUE, retry = TRUE, tx_error = FALSE; - uint16 mimoantsel = 0; + u16 mimoantsel = 0; u8 antselid = 0; u8 retry_limit, rr_retry_limit; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.c b/drivers/staging/brcm80211/sys/wlc_antsel.c index e36347b..3013c82 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.c +++ b/drivers/staging/brcm80211/sys/wlc_antsel.c @@ -61,11 +61,11 @@ /* static functions */ static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel); static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id); -static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg); +static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg); static void wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel, bool auto_sel); -const uint16 mimo_2x4_div_antselpat_tbl[] = { +const u16 mimo_2x4_div_antselpat_tbl[] = { 0, 0, 0x9, 0xa, /* ant0: 0 ant1: 2,3 */ 0, 0, 0x5, 0x6, /* ant0: 1 ant1: 2,3 */ 0, 0, 0, 0, /* n.a. */ @@ -77,7 +77,7 @@ const u8 mimo_2x4_div_antselid_tbl[16] = { 0, 0, 1, 0, 0, 0, 0, 0 /* pat to antselid */ }; -const uint16 mimo_2x3_div_antselpat_tbl[] = { +const u16 mimo_2x3_div_antselpat_tbl[] = { 16, 0, 1, 16, /* ant0: 0 ant1: 1,2 */ 16, 16, 16, 16, /* n.a. */ 16, 2, 16, 16, /* ant0: 2 ant1: 1 */ @@ -116,13 +116,13 @@ antsel_info_t *BCMNMIATTACHFN(wlc_antsel_attach) (wlc_info_t *wlc, osl_t *osh, /* 4321/2 board with 2x3 switch logic */ asi->antsel_type = ANTSEL_2x3; /* Antenna selection availability */ - if (((uint16) getintvar(asi->pub->vars, "aa2g") == 7) || - ((uint16) getintvar(asi->pub->vars, "aa5g") == 7)) { + if (((u16) getintvar(asi->pub->vars, "aa2g") == 7) || + ((u16) getintvar(asi->pub->vars, "aa5g") == 7)) { asi->antsel_avail = TRUE; } else - if (((uint16) getintvar(asi->pub->vars, "aa2g") == + if (((u16) getintvar(asi->pub->vars, "aa2g") == 3) - || ((uint16) getintvar(asi->pub->vars, "aa5g") + || ((u16) getintvar(asi->pub->vars, "aa5g") == 3)) { asi->antsel_avail = FALSE; } else { @@ -135,8 +135,8 @@ antsel_info_t *BCMNMIATTACHFN(wlc_antsel_attach) (wlc_info_t *wlc, osl_t *osh, break; } } else if ((asi->pub->sromrev == 4) && - ((uint16) getintvar(asi->pub->vars, "aa2g") == 7) && - ((uint16) getintvar(asi->pub->vars, "aa5g") == 0)) { + ((u16) getintvar(asi->pub->vars, "aa2g") == 7) && + ((u16) getintvar(asi->pub->vars, "aa5g") == 0)) { /* hack to match old 4321CB2 cards with 2of3 antenna switch */ asi->antsel_type = ANTSEL_2x3; asi->antsel_avail = TRUE; @@ -235,7 +235,7 @@ wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel, } /* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */ -u8 wlc_antsel_antsel2id(antsel_info_t *asi, uint16 antsel) +u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel) { u8 antselid = 0; @@ -273,10 +273,10 @@ static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id) } /* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */ -static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg) +static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg) { u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg)); - uint16 mimo_antsel = 0; + u16 mimo_antsel = 0; if (asi->antsel_type == ANTSEL_2x4) { /* 2x4 antenna diversity board, 4 cfgs: 0-2 0-3 1-2 1-3 */ @@ -297,7 +297,7 @@ static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel) { wlc_info_t *wlc = asi->wlc; u8 ant_cfg; - uint16 mimo_antsel; + u16 mimo_antsel; ASSERT(asi->antsel_type != ANTSEL_NA); diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.h b/drivers/staging/brcm80211/sys/wlc_antsel.h index fea6f10..1d048bb 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.h +++ b/drivers/staging/brcm80211/sys/wlc_antsel.h @@ -24,5 +24,5 @@ extern void wlc_antsel_init(antsel_info_t *asi); extern void wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel, u8 id, u8 fbid, u8 *antcfg, u8 *fbantcfg); -extern u8 wlc_antsel_antsel2id(antsel_info_t *asi, uint16 antsel); +extern u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel); #endif /* _wlc_antsel_h_ */ diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c b/drivers/staging/brcm80211/sys/wlc_bmac.c index ad39cc4..53ac604 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.c +++ b/drivers/staging/brcm80211/sys/wlc_bmac.c @@ -106,7 +106,7 @@ #define XMTFIFOTBL_STARTREV 20 /* Starting corerev for the fifo size table */ -static uint16 xmtfifo_sz[][NFIFO] = { +static u16 xmtfifo_sz[][NFIFO] = { {20, 192, 192, 21, 17, 5}, /* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */ {9, 58, 22, 14, 14, 5}, /* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */ {20, 192, 192, 21, 17, 5}, /* corerev 22: 5120, 49152, 49152, 5376, 4352, 1280 */ @@ -134,14 +134,14 @@ static bool wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound); /* used by wlc_down() */ static void wlc_flushqueues(wlc_info_t *wlc); -static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, uint16 *mhfs); +static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, u16 *mhfs); static void wlc_mctrl_reset(wlc_hw_info_t *wlc_hw); static void wlc_corerev_fifofixup(wlc_hw_info_t *wlc_hw); /* Low Level Prototypes */ -static uint16 wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset, +static u16 wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset, uint32 sel); -static void wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, uint16 v, +static void wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, u16 v, uint32 sel); static bool wlc_bmac_attach_dmapio(wlc_info_t *wlc, uint j, bool wme); static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw); @@ -149,7 +149,7 @@ static void wlc_ucode_bsinit(wlc_hw_info_t *wlc_hw); static bool wlc_validboardtype(wlc_hw_info_t *wlc); static bool wlc_isgoodchip(wlc_hw_info_t *wlc_hw); static char *wlc_get_macaddr(wlc_hw_info_t *wlc_hw); -static void wlc_mhfdef(wlc_info_t *wlc, uint16 *mhfs, uint16 mhf2_init); +static void wlc_mhfdef(wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init); static void wlc_mctrl_write(wlc_hw_info_t *wlc_hw); static void wlc_ucode_mute_override_set(wlc_hw_info_t *wlc_hw); static void wlc_ucode_mute_override_clear(wlc_hw_info_t *wlc_hw); @@ -166,7 +166,7 @@ static void wlc_bmac_setband(wlc_hw_info_t *wlc_hw, uint bandunit, chanspec_t chanspec); static void wlc_bmac_update_slot_timing(wlc_hw_info_t *wlc_hw, bool shortslot); static void wlc_upd_ofdm_pctl1_table(wlc_hw_info_t *wlc_hw); -static uint16 wlc_bmac_ofdm_ratetable_offset(wlc_hw_info_t *wlc_hw, +static u16 wlc_bmac_ofdm_ratetable_offset(wlc_hw_info_t *wlc_hw, u8 rate); /* === Low Level functions === */ @@ -572,7 +572,7 @@ BCMATTACHFN(wlc_bmac_attach_dmapio) (wlc_info_t *wlc, uint j, bool wme) uint i; char name[8]; /* ucode host flag 2 needed for pio mode, independent of band and fifo */ - uint16 pio_mhf2 = 0; + u16 pio_mhf2 = 0; wlc_hw_info_t *wlc_hw = wlc->hw; uint unit = wlc_hw->unit; wlc_tunables_t *tune = wlc->pub->tunables; @@ -706,7 +706,7 @@ static void BCMATTACHFN(wlc_bmac_detach_dmapio) (wlc_hw_info_t *wlc_hw) */ int -BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, +BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, u16 vendor, u16 device, uint unit, bool piomode, osl_t *osh, void *regsva, uint bustype, void *btparam) { wlc_hw_info_t *wlc_hw; @@ -762,12 +762,12 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, var = getvar(vars, "vendid"); if (var) { - vendor = (uint16) simple_strtoul(var, NULL, 0); + vendor = (u16) simple_strtoul(var, NULL, 0); WL_ERROR(("Overriding vendor id = 0x%x\n", vendor)); } var = getvar(vars, "devid"); if (var) { - uint16 devid = (uint16) simple_strtoul(var, NULL, 0); + u16 devid = (u16) simple_strtoul(var, NULL, 0); if (devid != 0xffff) { device = devid; WL_ERROR(("Overriding device id = 0x%x\n", @@ -822,7 +822,7 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, /* promote srom boardrev of 0xFF to 1 */ if (j == BOARDREV_PROMOTABLE) j = BOARDREV_PROMOTED; - wlc_hw->boardrev = (uint16) j; + wlc_hw->boardrev = (u16) j; if (!wlc_validboardtype(wlc_hw)) { WL_ERROR(("wl%d: wlc_bmac_attach: Unsupported Broadcom board type (0x%x)" " or revision level (0x%x)\n", unit, wlc_hw->sih->boardtype, wlc_hw->boardrev)); err = 15; @@ -1458,11 +1458,11 @@ static void wlc_clkctl_clk(wlc_hw_info_t *wlc_hw, uint mode) /* set initial host flags value */ static void -BCMINITFN(wlc_mhfdef) (wlc_info_t *wlc, uint16 *mhfs, uint16 mhf2_init) +BCMINITFN(wlc_mhfdef) (wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init) { wlc_hw_info_t *wlc_hw = wlc->hw; - bzero(mhfs, sizeof(uint16) * MHFMAX); + bzero(mhfs, sizeof(u16) * MHFMAX); mhfs[MHF2] |= mhf2_init; @@ -1488,11 +1488,11 @@ BCMINITFN(wlc_mhfdef) (wlc_info_t *wlc, uint16 *mhfs, uint16 mhf2_init) * WLC_BAND_ALL <--- All bands */ void -wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, uint16 mask, uint16 val, +wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, u16 mask, u16 val, int bands) { - uint16 save; - uint16 addr[MHFMAX] = { + u16 save; + u16 addr[MHFMAX] = { M_HOST_FLAGS1, M_HOST_FLAGS2, M_HOST_FLAGS3, M_HOST_FLAGS4, M_HOST_FLAGS5 }; @@ -1531,7 +1531,7 @@ wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, uint16 mask, uint16 val, if (wlc_hw->clk && (band->mhfs[idx] != save) && (band == wlc_hw->band)) wlc_bmac_write_shm(wlc_hw, addr[idx], - (uint16) band->mhfs[idx]); + (u16) band->mhfs[idx]); } if (bands == WLC_BAND_ALL) { @@ -1542,7 +1542,7 @@ wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, uint16 mask, uint16 val, } } -uint16 wlc_bmac_mhf_get(wlc_hw_info_t *wlc_hw, u8 idx, int bands) +u16 wlc_bmac_mhf_get(wlc_hw_info_t *wlc_hw, u8 idx, int bands) { wlc_hwband_t *band; ASSERT(idx < MHFMAX); @@ -1568,10 +1568,10 @@ uint16 wlc_bmac_mhf_get(wlc_hw_info_t *wlc_hw, u8 idx, int bands) return band->mhfs[idx]; } -static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, uint16 *mhfs) +static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, u16 *mhfs) { u8 idx; - uint16 addr[] = { + u16 addr[] = { M_HOST_FLAGS1, M_HOST_FLAGS2, M_HOST_FLAGS3, M_HOST_FLAGS4, M_HOST_FLAGS5 }; @@ -1714,10 +1714,10 @@ wlc_bmac_set_rcmta(wlc_hw_info_t *wlc_hw, int idx, const struct ether_addr *addr) { d11regs_t *regs = wlc_hw->regs; - volatile uint16 *objdata16 = - (volatile uint16 *)(uintptr) & regs->objdata; + volatile u16 *objdata16 = + (volatile u16 *)(uintptr) & regs->objdata; uint32 mac_hm; - uint16 mac_l; + u16 mac_l; osl_t *osh; WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__)); @@ -1748,9 +1748,9 @@ wlc_bmac_set_addrmatch(wlc_hw_info_t *wlc_hw, int match_reg_offset, const struct ether_addr *addr) { d11regs_t *regs; - uint16 mac_l; - uint16 mac_m; - uint16 mac_h; + u16 mac_l; + u16 mac_m; + u16 mac_h; osl_t *osh; WL_TRACE(("wl%d: wlc_bmac_set_addrmatch\n", wlc_hw->unit)); @@ -1780,7 +1780,7 @@ wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len, uint32 word; bool be_bit; #ifdef IL_BIGENDIAN - volatile uint16 *dptr = NULL; + volatile u16 *dptr = NULL; #endif /* IL_BIGENDIAN */ osl_t *osh; @@ -1816,7 +1816,7 @@ wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len, } } -void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, uint16 newmin) +void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, u16 newmin) { osl_t *osh; @@ -1828,7 +1828,7 @@ void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, uint16 newmin) W_REG(osh, &wlc_hw->regs->objdata, newmin); } -void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, uint16 newmax) +void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, u16 newmax) { osl_t *osh; @@ -1840,7 +1840,7 @@ void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, uint16 newmax) W_REG(osh, &wlc_hw->regs->objdata, newmax); } -void wlc_bmac_bw_set(wlc_hw_info_t *wlc_hw, uint16 bw) +void wlc_bmac_bw_set(wlc_hw_info_t *wlc_hw, u16 bw) { bool fastclk; uint32 tmp; @@ -1873,7 +1873,7 @@ wlc_write_hw_bcntemplate0(wlc_hw_info_t *wlc_hw, void *bcn, int len) bcn); /* write beacon length to SCR */ ASSERT(len < 65536); - wlc_bmac_write_shm(wlc_hw, M_BCN0_FRM_BYTESZ, (uint16) len); + wlc_bmac_write_shm(wlc_hw, M_BCN0_FRM_BYTESZ, (u16) len); /* mark beacon0 valid */ OR_REG(wlc_hw->osh, ®s->maccommand, MCMD_BCN0VLD); } @@ -1887,7 +1887,7 @@ wlc_write_hw_bcntemplate1(wlc_hw_info_t *wlc_hw, void *bcn, int len) bcn); /* write beacon length to SCR */ ASSERT(len < 65536); - wlc_bmac_write_shm(wlc_hw, M_BCN1_FRM_BYTESZ, (uint16) len); + wlc_bmac_write_shm(wlc_hw, M_BCN1_FRM_BYTESZ, (u16) len); /* mark beacon1 valid */ OR_REG(wlc_hw->osh, ®s->maccommand, MCMD_BCN1VLD); } @@ -1917,7 +1917,7 @@ wlc_bmac_write_hw_bcntemplates(wlc_hw_info_t *wlc_hw, void *bcn, int len, static void WLBANDINITFN(wlc_bmac_upd_synthpu) (wlc_hw_info_t *wlc_hw) { - uint16 v; + u16 v; wlc_info_t *wlc = wlc_hw->wlc; /* update SYNTHPU_DLY */ @@ -1964,8 +1964,8 @@ WLBANDINITFN(wlc_bmac_bsinit) (wlc_info_t *wlc, chanspec_t chanspec) shortslot); /* write phytype and phyvers */ - wlc_bmac_write_shm(wlc_hw, M_PHYTYPE, (uint16) wlc_hw->band->phytype); - wlc_bmac_write_shm(wlc_hw, M_PHYVER, (uint16) wlc_hw->band->phyrev); + wlc_bmac_write_shm(wlc_hw, M_PHYTYPE, (u16) wlc_hw->band->phytype); + wlc_bmac_write_shm(wlc_hw, M_PHYVER, (u16) wlc_hw->band->phyrev); /* initialize the txphyctl1 rate table since shmem is shared between bands */ wlc_upd_ofdm_pctl1_table(wlc_hw); @@ -2302,7 +2302,7 @@ static bool wlc_dma_rxreset(wlc_hw_info_t *wlc_hw, uint fifo) if (D11REV_LT(wlc_hw->corerev, 12)) { bool rxidle = TRUE; - uint16 rcv_frm_cnt = 0; + u16 rcv_frm_cnt = 0; osh = wlc_hw->osh; @@ -2420,10 +2420,10 @@ void BCMINITFN(wlc_bmac_corereset) (wlc_hw_info_t *wlc_hw, uint32 flags) static void BCMINITFN(wlc_corerev_fifofixup) (wlc_hw_info_t *wlc_hw) { d11regs_t *regs = wlc_hw->regs; - uint16 fifo_nu; - uint16 txfifo_startblk = TXFIFO_START_BLK, txfifo_endblk; - uint16 txfifo_def, txfifo_def1; - uint16 txfifo_cmd; + u16 fifo_nu; + u16 txfifo_startblk = TXFIFO_START_BLK, txfifo_endblk; + u16 txfifo_def, txfifo_def1; + u16 txfifo_cmd; osl_t *osh; if (D11REV_LT(wlc_hw->corerev, 9)) @@ -2487,7 +2487,7 @@ static void BCMINITFN(wlc_coreinit) (wlc_info_t *wlc) bool fifosz_fixup = FALSE; osl_t *osh; int err = 0; - uint16 buf[NFIFO]; + u16 buf[NFIFO]; regs = wlc_hw->regs; osh = wlc_hw->osh; @@ -2629,14 +2629,14 @@ static void BCMINITFN(wlc_coreinit) (wlc_info_t *wlc) } /* tell the ucode the corerev */ - wlc_bmac_write_shm(wlc_hw, M_MACHW_VER, (uint16) wlc_hw->corerev); + wlc_bmac_write_shm(wlc_hw, M_MACHW_VER, (u16) wlc_hw->corerev); /* tell the ucode MAC capabilities */ if (D11REV_GE(wlc_hw->corerev, 13)) { wlc_bmac_write_shm(wlc_hw, M_MACHW_CAP_L, - (uint16) (wlc_hw->machwcap & 0xffff)); + (u16) (wlc_hw->machwcap & 0xffff)); wlc_bmac_write_shm(wlc_hw, M_MACHW_CAP_H, - (uint16) ((wlc_hw-> + (u16) ((wlc_hw-> machwcap >> 16) & 0xffff)); } @@ -2849,7 +2849,7 @@ static void wlc_write_inits(wlc_hw_info_t *wlc_hw, const d11init_t *inits) ASSERT((inits[i].size == 2) || (inits[i].size == 4)); if (inits[i].size == 2) - W_REG(osh, (uint16 *) (uintptr) (base + inits[i].addr), + W_REG(osh, (u16 *) (uintptr) (base + inits[i].addr), inits[i].value); else if (inits[i].size == 4) W_REG(osh, (uint32 *) (uintptr) (base + inits[i].addr), @@ -2859,9 +2859,9 @@ static void wlc_write_inits(wlc_hw_info_t *wlc_hw, const d11init_t *inits) static void wlc_ucode_txant_set(wlc_hw_info_t *wlc_hw) { - uint16 phyctl; - uint16 phytxant = wlc_hw->bmac_phytxant; - uint16 mask = PHY_TXC_ANT_MASK; + u16 phyctl; + u16 phytxant = wlc_hw->bmac_phytxant; + u16 mask = PHY_TXC_ANT_MASK; /* set the Probe Response frame phy control word */ phyctl = wlc_bmac_read_shm(wlc_hw, M_CTXPRS_BLK + C_CTX_PCTLWD_POS); @@ -2874,7 +2874,7 @@ static void wlc_ucode_txant_set(wlc_hw_info_t *wlc_hw) wlc_bmac_write_shm(wlc_hw, M_RSP_PCTLWD, phyctl); } -void wlc_bmac_txant_set(wlc_hw_info_t *wlc_hw, uint16 phytxant) +void wlc_bmac_txant_set(wlc_hw_info_t *wlc_hw, u16 phytxant) { /* update sw state */ wlc_hw->bmac_phytxant = phytxant; @@ -2886,9 +2886,9 @@ void wlc_bmac_txant_set(wlc_hw_info_t *wlc_hw, uint16 phytxant) } -uint16 wlc_bmac_get_txant(wlc_hw_info_t *wlc_hw) +u16 wlc_bmac_get_txant(wlc_hw_info_t *wlc_hw) { - return (uint16) wlc_hw->wlc->stf->txant; + return (u16) wlc_hw->wlc->stf->txant; } void wlc_bmac_antsel_type_set(wlc_hw_info_t *wlc_hw, u8 antsel_type) @@ -3081,8 +3081,8 @@ int wlc_bmac_xmtfifo_sz_set(wlc_hw_info_t *wlc_hw, uint fifo, uint blocks) if (fifo >= NFIFO || blocks > 299) return BCME_RANGE; - /* BMAC_NOTE, change blocks to uint16 */ - wlc_hw->xmtfifo_sz[fifo] = (uint16) blocks; + /* BMAC_NOTE, change blocks to u16 */ + wlc_hw->xmtfifo_sz[fifo] = (u16) blocks; return 0; } @@ -3587,8 +3587,8 @@ static void wlc_upd_ofdm_pctl1_table(wlc_hw_info_t *wlc_hw) WLC_RATE_6M, WLC_RATE_9M, WLC_RATE_12M, WLC_RATE_18M, WLC_RATE_24M, WLC_RATE_36M, WLC_RATE_48M, WLC_RATE_54M }; - uint16 entry_ptr; - uint16 pctl1; + u16 entry_ptr; + u16 pctl1; uint i; if (!WLC_PHY_11N_CAP(wlc_hw->band)) @@ -3614,7 +3614,7 @@ static void wlc_upd_ofdm_pctl1_table(wlc_hw_info_t *wlc_hw) } } -static uint16 wlc_bmac_ofdm_ratetable_offset(wlc_hw_info_t *wlc_hw, u8 rate) +static u16 wlc_bmac_ofdm_ratetable_offset(wlc_hw_info_t *wlc_hw, u8 rate) { uint i; u8 plcp_rate = 0; @@ -3672,7 +3672,7 @@ bool BCMATTACHFN(wlc_bmac_validate_chip_access) (wlc_hw_info_t *wlc_hw) { d11regs_t *regs; uint32 w, val; - volatile uint16 *reg16; + volatile u16 *reg16; osl_t *osh; WL_TRACE(("wl%d: validate_chip_access\n", wlc_hw->unit)); @@ -3719,7 +3719,7 @@ bool BCMATTACHFN(wlc_bmac_validate_chip_access) (wlc_hw_info_t *wlc_hw) /* if 32 bit writes are split into 16 bit writes, are they in the correct order * for our interface, low to high */ - reg16 = (volatile uint16 *)(uintptr) & regs->tsf_cfpstart; + reg16 = (volatile u16 *)(uintptr) & regs->tsf_cfpstart; /* write the CFPStart register low half explicitly, starting a buffered write */ W_REG(osh, reg16, 0xAAAA); @@ -3903,12 +3903,12 @@ static void wlc_flushqueues(wlc_info_t *wlc) dma_rxreclaim(wlc_hw->di[RX_TXSTATUS_FIFO]); } -uint16 wlc_bmac_read_shm(wlc_hw_info_t *wlc_hw, uint offset) +u16 wlc_bmac_read_shm(wlc_hw_info_t *wlc_hw, uint offset) { return wlc_bmac_read_objmem(wlc_hw, offset, OBJADDR_SHM_SEL); } -void wlc_bmac_write_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v) +void wlc_bmac_write_shm(wlc_hw_info_t *wlc_hw, uint offset, u16 v) { wlc_bmac_write_objmem(wlc_hw, offset, v, OBJADDR_SHM_SEL); } @@ -3917,7 +3917,7 @@ void wlc_bmac_write_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v) * SHM 'offset' needs to be an even address and * Buffer length 'len' must be an even number of bytes */ -void wlc_bmac_set_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v, int len) +void wlc_bmac_set_shm(wlc_hw_info_t *wlc_hw, uint offset, u16 v, int len) { int i; @@ -3933,14 +3933,14 @@ void wlc_bmac_set_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v, int len) } } -static uint16 +static u16 wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset, uint32 sel) { d11regs_t *regs = wlc_hw->regs; - volatile uint16 *objdata_lo = - (volatile uint16 *)(uintptr) & regs->objdata; - volatile uint16 *objdata_hi = objdata_lo + 1; - uint16 v; + volatile u16 *objdata_lo = + (volatile u16 *)(uintptr) & regs->objdata; + volatile u16 *objdata_hi = objdata_lo + 1; + u16 v; ASSERT((offset & 1) == 0); @@ -3956,12 +3956,12 @@ wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset, uint32 sel) } static void -wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, uint16 v, uint32 sel) +wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, u16 v, uint32 sel) { d11regs_t *regs = wlc_hw->regs; - volatile uint16 *objdata_lo = - (volatile uint16 *)(uintptr) & regs->objdata; - volatile uint16 *objdata_hi = objdata_lo + 1; + volatile u16 *objdata_lo = + (volatile u16 *)(uintptr) & regs->objdata; + volatile u16 *objdata_hi = objdata_lo + 1; ASSERT((offset & 1) == 0); @@ -3983,7 +3983,7 @@ void wlc_bmac_copyto_objmem(wlc_hw_info_t *wlc_hw, uint offset, const void *buf, int len, uint32 sel) { - uint16 v; + u16 v; const u8 *p = (const u8 *)buf; int i; @@ -4009,7 +4009,7 @@ void wlc_bmac_copyfrom_objmem(wlc_hw_info_t *wlc_hw, uint offset, void *buf, int len, uint32 sel) { - uint16 v; + u16 v; u8 *p = (u8 *) buf; int i; @@ -4036,7 +4036,7 @@ void wlc_bmac_copyfrom_vars(wlc_hw_info_t *wlc_hw, char **buf, uint *len) *len = wlc_hw->vars_size; } -void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, uint16 SRL, uint16 LRL) +void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, u16 SRL, u16 LRL) { wlc_hw->SRL = SRL; wlc_hw->LRL = LRL; @@ -4178,9 +4178,9 @@ bool wlc_bmac_radio_hw(wlc_hw_info_t *wlc_hw, bool enable) return TRUE; } -uint16 wlc_bmac_rate_shm_offset(wlc_hw_info_t *wlc_hw, u8 rate) +u16 wlc_bmac_rate_shm_offset(wlc_hw_info_t *wlc_hw, u8 rate) { - uint16 table_ptr; + u16 table_ptr; u8 phy_rate, index; /* get the phy specific rate encoding for the PLCP SIGNAL field */ diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.h b/drivers/staging/brcm80211/sys/wlc_bmac.h index 05fc15a..056d2e4 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.h +++ b/drivers/staging/brcm80211/sys/wlc_bmac.h @@ -130,7 +130,7 @@ typedef enum { WLCHW_STATE_LAST } wlc_bmac_state_id_t; -extern int wlc_bmac_attach(wlc_info_t *wlc, uint16 vendor, uint16 device, +extern int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit, bool piomode, osl_t *osh, void *regsva, uint bustype, void *btparam); extern int wlc_bmac_detach(wlc_info_t *wlc); @@ -175,24 +175,24 @@ extern void wlc_bmac_set_chanspec(wlc_hw_info_t *wlc_hw, chanspec_t chanspec, bool mute, struct txpwr_limits *txpwr); extern void wlc_bmac_txfifo(wlc_hw_info_t *wlc_hw, uint fifo, void *p, - bool commit, uint16 frameid, u8 txpktpend); + bool commit, u16 frameid, u8 txpktpend); extern int wlc_bmac_xmtfifo_sz_get(wlc_hw_info_t *wlc_hw, uint fifo, uint *blocks); -extern void wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, uint16 mask, - uint16 val, int bands); +extern void wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, u16 mask, + u16 val, int bands); extern void wlc_bmac_mctrl(wlc_hw_info_t *wlc_hw, uint32 mask, uint32 val); -extern uint16 wlc_bmac_mhf_get(wlc_hw_info_t *wlc_hw, u8 idx, int bands); +extern u16 wlc_bmac_mhf_get(wlc_hw_info_t *wlc_hw, u8 idx, int bands); extern int wlc_bmac_xmtfifo_sz_set(wlc_hw_info_t *wlc_hw, uint fifo, uint blocks); -extern void wlc_bmac_txant_set(wlc_hw_info_t *wlc_hw, uint16 phytxant); -extern uint16 wlc_bmac_get_txant(wlc_hw_info_t *wlc_hw); +extern void wlc_bmac_txant_set(wlc_hw_info_t *wlc_hw, u16 phytxant); +extern u16 wlc_bmac_get_txant(wlc_hw_info_t *wlc_hw); extern void wlc_bmac_antsel_type_set(wlc_hw_info_t *wlc_hw, u8 antsel_type); extern int wlc_bmac_revinfo_get(wlc_hw_info_t *wlc_hw, wlc_bmac_revinfo_t *revinfo); extern int wlc_bmac_state_get(wlc_hw_info_t *wlc_hw, wlc_bmac_state_t *state); -extern void wlc_bmac_write_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v); -extern uint16 wlc_bmac_read_shm(wlc_hw_info_t *wlc_hw, uint offset); -extern void wlc_bmac_set_shm(wlc_hw_info_t *wlc_hw, uint offset, uint16 v, +extern void wlc_bmac_write_shm(wlc_hw_info_t *wlc_hw, uint offset, u16 v); +extern u16 wlc_bmac_read_shm(wlc_hw_info_t *wlc_hw, uint offset); +extern void wlc_bmac_set_shm(wlc_hw_info_t *wlc_hw, uint offset, u16 v, int len); extern void wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len, void *buf); @@ -232,20 +232,20 @@ extern void wlc_bmac_write_hw_bcntemplates(wlc_hw_info_t *wlc_hw, void *bcn, extern void wlc_bmac_read_tsf(wlc_hw_info_t *wlc_hw, uint32 *tsf_l_ptr, uint32 *tsf_h_ptr); -extern void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, uint16 newmin); -extern void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, uint16 newmax); +extern void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, u16 newmin); +extern void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, u16 newmax); extern void wlc_bmac_set_noreset(wlc_hw_info_t *wlc, bool noreset_flag); extern void wlc_bmac_set_ucode_loaded(wlc_hw_info_t *wlc, bool ucode_loaded); -extern void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, uint16 SRL, - uint16 LRL); +extern void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, u16 SRL, + u16 LRL); extern void wlc_bmac_fifoerrors(wlc_hw_info_t *wlc_hw); #ifdef WLC_HIGH_ONLY extern void wlc_bmac_dngl_reboot(rpc_info_t *); -extern void wlc_bmac_dngl_rpc_agg(rpc_info_t *, uint16 agg); -extern void wlc_bmac_dngl_rpc_msglevel(rpc_info_t *, uint16 level); +extern void wlc_bmac_dngl_rpc_agg(rpc_info_t *, u16 agg); +extern void wlc_bmac_dngl_rpc_msglevel(rpc_info_t *, u16 level); extern void wlc_bmac_dngl_rpc_txq_wm_set(rpc_info_t *rpc, uint32 wm); extern void wlc_bmac_dngl_rpc_txq_wm_get(rpc_info_t *rpc, uint32 *wm); extern void wlc_bmac_dngl_rpc_agg_limit_set(rpc_info_t *rpc, uint32 val); @@ -255,7 +255,7 @@ extern int wlc_bmac_debug_template(wlc_hw_info_t *wlc_hw); /* API for BMAC driver (e.g. wlc_phy.c etc) */ -extern void wlc_bmac_bw_set(wlc_hw_info_t *wlc_hw, uint16 bw); +extern void wlc_bmac_bw_set(wlc_hw_info_t *wlc_hw, u16 bw); extern void wlc_bmac_pllreq(wlc_hw_info_t *wlc_hw, bool set, mbool req_bit); extern void wlc_bmac_set_clk(wlc_hw_info_t *wlc_hw, bool on); extern bool wlc_bmac_taclear(wlc_hw_info_t *wlc_hw, bool ta_ok); @@ -266,7 +266,7 @@ extern void wlc_bmac_dump(wlc_hw_info_t *wlc_hw, struct bcmstrbuf *b, extern void wlc_gpio_fast_deinit(wlc_hw_info_t *wlc_hw); extern bool wlc_bmac_radio_hw(wlc_hw_info_t *wlc_hw, bool enable); -extern uint16 wlc_bmac_rate_shm_offset(wlc_hw_info_t *wlc_hw, u8 rate); +extern u16 wlc_bmac_rate_shm_offset(wlc_hw_info_t *wlc_hw, u8 rate); extern void wlc_bmac_assert_type_set(wlc_hw_info_t *wlc_hw, uint32 type); extern void wlc_bmac_set_txpwr_percent(wlc_hw_info_t *wlc_hw, u8 val); diff --git a/drivers/staging/brcm80211/sys/wlc_bsscfg.h b/drivers/staging/brcm80211/sys/wlc_bsscfg.h index 9fd6788..b498bb7 100644 --- a/drivers/staging/brcm80211/sys/wlc_bsscfg.h +++ b/drivers/staging/brcm80211/sys/wlc_bsscfg.h @@ -78,7 +78,7 @@ struct wlc_bsscfg { int16 openshared; /* try Open auth first, then Shared Key */ bool wsec_restrict; /* drop unencrypted packets if wsec is enabled */ bool eap_restrict; /* restrict data until 802.1X auth succeeds */ - uint16 WPA_auth; /* WPA: authenticated key management */ + u16 WPA_auth; /* WPA: authenticated key management */ bool wpa2_preauth; /* default is TRUE, wpa_cap sets value */ bool wsec_portopen; /* indicates keys are plumbed */ wsec_iv_t wpa_none_txiv; /* global txiv for WPA_NONE, tkip and aes */ @@ -94,8 +94,8 @@ struct wlc_bsscfg { struct ether_addr BSSID; /* BSSID (associated) */ struct ether_addr cur_etheraddr; /* h/w address */ - uint16 bcmc_fid; /* the last BCMC FID queued to TX_BCMC_FIFO */ - uint16 bcmc_fid_shm; /* the last BCMC FID written to shared mem */ + u16 bcmc_fid; /* the last BCMC FID queued to TX_BCMC_FIFO */ + u16 bcmc_fid_shm; /* the last BCMC FID written to shared mem */ uint32 flags; /* WLC_BSSCFG flags; see below */ @@ -125,7 +125,7 @@ struct wlc_bsscfg { wsec_key_t *rcmta; /* 'unique' ID of this bsscfg, assigned at bsscfg allocation */ - uint16 ID; + u16 ID; uint txrspecidx; /* index into tx rate circular buffer */ ratespec_t txrspec[NTXRATE][2]; /* circular buffer of prev MPDUs tx rates */ diff --git a/drivers/staging/brcm80211/sys/wlc_event.h b/drivers/staging/brcm80211/sys/wlc_event.h index 23fd5b1..5921bba 100644 --- a/drivers/staging/brcm80211/sys/wlc_event.h +++ b/drivers/staging/brcm80211/sys/wlc_event.h @@ -44,8 +44,8 @@ extern void wlc_assign_event_msg(wlc_info_t *wlc, wl_event_msg_t *msg, #ifdef MSGTRACE extern void wlc_event_sendup_trace(struct wlc_info *wlc, hndrte_dev_t *bus, - u8 *hdr, uint16 hdrlen, u8 *buf, - uint16 buflen); + u8 *hdr, u16 hdrlen, u8 *buf, + u16 buflen); #endif #endif /* _WLC_EVENT_H_ */ diff --git a/drivers/staging/brcm80211/sys/wlc_key.h b/drivers/staging/brcm80211/sys/wlc_key.h index 3a9624a..ce251c0 100644 --- a/drivers/staging/brcm80211/sys/wlc_key.h +++ b/drivers/staging/brcm80211/sys/wlc_key.h @@ -81,7 +81,7 @@ struct wlc_bsscfg; typedef struct wsec_iv { uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ + u16 lo; /* lower 16 bits of IV */ } wsec_iv_t; #define WLC_NUMRXIVS 16 /* # rx IVs (one per 802.11e TID) */ @@ -92,7 +92,7 @@ typedef struct wsec_key { u8 id; /* key ID [0-3] */ u8 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ u8 rcmta; /* rcmta entry index, same as idx by default */ - uint16 flags; /* misc flags */ + u16 flags; /* misc flags */ u8 algo_hw; /* cache for hw register */ u8 aes_mode; /* cache for hw register */ s8 iv_len; /* IV length */ diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index f3d8d3a..46362d1 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c @@ -250,7 +250,7 @@ static const u8 acbitmap2maxprio[] = { /* local prototypes */ extern void wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec); -static uint16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc, +static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, void *p, struct scb *scb, uint frag, uint nfrags, uint queue, @@ -277,12 +277,12 @@ static void wlc_txq_free(wlc_info_t *wlc, osl_t *osh, wlc_txq_info_t *qi); static void wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, int prio); static void wlc_txflowcontrol_reset(wlc_info_t *wlc); -static uint16 wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, +static u16 wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length); static void wlc_compute_cck_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp); -static uint16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, +static u16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, uint next_frag_len); static void wlc_recvctl(wlc_info_t *wlc, osl_t *osh, d11rxhdr_t *rxh, void *p); @@ -348,7 +348,7 @@ void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr) addr->octet[3] = (u8) (v32 >> 24); W_REG(osh, ®s->objaddr, (OBJADDR_RCMTA_SEL | ((idx * 2) + 1))); (void)R_REG(osh, ®s->objaddr); - v32 = R_REG(osh, (volatile uint16 *)(uintptr) & regs->objdata); + v32 = R_REG(osh, (volatile u16 *)(uintptr) & regs->objdata); addr->octet[4] = (u8) v32; addr->octet[5] = (u8) (v32 >> 8); } @@ -559,7 +559,7 @@ void BCMINITFN(wlc_init) (wlc_info_t *wlc) /* read the ucode version if we have not yet done so */ if (wlc->ucode_rev == 0) { wlc->ucode_rev = - wlc_read_shm(wlc, M_BOM_REV_MAJOR) << NBITS(uint16); + wlc_read_shm(wlc, M_BOM_REV_MAJOR) << NBITS(u16); wlc->ucode_rev |= wlc_read_shm(wlc, M_BOM_REV_MINOR); } @@ -1153,9 +1153,9 @@ ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs) */ void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, ratespec_t bcn_rspec) { - uint16 phyctl; - uint16 phytxant = wlc->stf->phytxant; - uint16 mask = PHY_TXC_ANT_MASK; + u16 phyctl; + u16 phytxant = wlc->stf->phytxant; + u16 mask = PHY_TXC_ANT_MASK; /* for non-siso rates or default setting, use the available chains */ if (WLC_PHY_11N_CAP(wlc->band)) { @@ -1393,7 +1393,7 @@ void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend) { int i; shm_acparams_t acp_shm; - uint16 *shm_entry; + u16 *shm_entry; struct ieee80211_tx_queue_params *params = arg; ASSERT(wlc); @@ -1451,7 +1451,7 @@ void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend) acp_shm.status |= WME_STATUS_NEWAC; /* Fill in shm acparam table */ - shm_entry = (uint16 *) &acp_shm; + shm_entry = (u16 *) &acp_shm; for (i = 0; i < (int)sizeof(shm_acparams_t); i += 2) wlc_write_shm(wlc, M_EDCF_QINFO + @@ -1474,7 +1474,7 @@ void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend) uint aci, i, j; edcf_acparam_t *edcf_acp; shm_acparams_t acp_shm; - uint16 *shm_entry; + u16 *shm_entry; ASSERT(cfg); ASSERT(wlc); @@ -1538,7 +1538,7 @@ void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend) acp_shm.status |= WME_STATUS_NEWAC; /* Fill in shm acparam table */ - shm_entry = (uint16 *) &acp_shm; + shm_entry = (u16 *) &acp_shm; for (j = 0; j < (int)sizeof(shm_acparams_t); j += 2) wlc_write_shm(wlc, M_EDCF_QINFO + @@ -1760,7 +1760,7 @@ wlc_pub_t *wlc_pub(void *wlc) /* * The common driver entry routine. Error codes should be unique */ -void *BCMATTACHFN(wlc_attach) (void *wl, uint16 vendor, uint16 device, +void *BCMATTACHFN(wlc_attach) (void *wl, u16 vendor, u16 device, uint unit, bool piomode, osl_t *osh, void *regsva, uint bustype, void *btparam, uint *perr) { @@ -1869,9 +1869,9 @@ void *BCMATTACHFN(wlc_attach) (void *wl, uint16 vendor, uint16 device, /* set maximum allowed duty cycle */ wlc->tx_duty_cycle_ofdm = - (uint16) getintvar(pub->vars, "tx_duty_cycle_ofdm"); + (u16) getintvar(pub->vars, "tx_duty_cycle_ofdm"); wlc->tx_duty_cycle_cck = - (uint16) getintvar(pub->vars, "tx_duty_cycle_cck"); + (u16) getintvar(pub->vars, "tx_duty_cycle_cck"); wlc_stf_phy_chain_calc(wlc); @@ -2146,7 +2146,7 @@ static bool BCMATTACHFN(wlc_attach_stf_ant_init) (wlc_info_t *wlc) #ifdef WLC_HIGH_ONLY /* HIGH_ONLY bmac_attach, which sync over LOW_ONLY bmac_attach states */ int -BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, +BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, u16 vendor, u16 device, uint unit, bool piomode, osl_t *osh, void *regsva, uint bustype, void *btparam) { wlc_bmac_revinfo_t revinfo; @@ -2192,10 +2192,10 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, bzero(&revinfo, sizeof(wlc_bmac_revinfo_t)); if (wlc_bmac_revinfo_get(wlc->hw, &revinfo) != 0) return -1; - wlc->vendorid = (uint16) revinfo.vendorid; - wlc->deviceid = (uint16) revinfo.deviceid; + wlc->vendorid = (u16) revinfo.vendorid; + wlc->deviceid = (u16) revinfo.deviceid; - wlc->pub->boardrev = (uint16) revinfo.boardrev; + wlc->pub->boardrev = (u16) revinfo.boardrev; wlc->pub->corerev = revinfo.corerev; wlc->pub->sromrev = (u8) revinfo.sromrev; wlc->pub->sih->chiprev = revinfo.chiprev; @@ -2227,11 +2227,11 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device, wlc->bandstate[bandunit]->radiorev = (u8) revinfo.band[idx].radiorev; wlc->bandstate[bandunit]->phytype = - (uint16) revinfo.band[idx].phytype; + (u16) revinfo.band[idx].phytype; wlc->bandstate[bandunit]->phyrev = - (uint16) revinfo.band[idx].phyrev; + (u16) revinfo.band[idx].phyrev; wlc->bandstate[bandunit]->radioid = - (uint16) revinfo.band[idx].radioid; + (u16) revinfo.band[idx].radioid; wlc->bandstate[bandunit]->abgphy_encore = revinfo.band[idx].abgphy_encore; @@ -2838,7 +2838,7 @@ int BCMINITFN(wlc_up) (wlc_info_t *wlc) static void BCMINITFN(wlc_tx_prec_map_init) (wlc_info_t *wlc) { wlc->tx_prec_map = WLC_PREC_BMP_ALL; - bzero(wlc->fifo2prec_map, sizeof(uint16) * NFIFO); + bzero(wlc->fifo2prec_map, sizeof(u16) * NFIFO); /* For non-WME, both fifos have overlapping MAXPRIO. So just disable all precedences * if either is full. @@ -3449,13 +3449,13 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) if (bcmerror) break; - i = (uint16) val; + i = (u16) val; if (i >= MHFMAX) { bcmerror = BCME_RANGE; break; } - wlc_mhf(wlc, (u8) i, 0xffff, (uint16) (val >> NBITS(uint16)), + wlc_mhf(wlc, (u8) i, 0xffff, (u16) (val >> NBITS(u16)), WLC_BAND_AUTO); break; @@ -3477,7 +3477,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) break; } - *pval = wlc_read_shm(wlc, (uint16) val); + *pval = wlc_read_shm(wlc, (u16) val); break; case WLC_SET_SHMEM: @@ -3498,8 +3498,8 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) break; } - wlc_write_shm(wlc, (uint16) val, - (uint16) (val >> NBITS(uint16))); + wlc_write_shm(wlc, (u16) val, + (u16) (val >> NBITS(u16))); break; case WLC_R_REG: /* MAC registers */ @@ -3529,10 +3529,10 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) R_REG(osh, (uint32 *) ((unsigned char *) (uintptr) regs + r->byteoff)); - else if (r->size == sizeof(uint16)) + else if (r->size == sizeof(u16)) r->val = R_REG(osh, - (uint16 *) ((unsigned char *) (uintptr) regs + + (u16 *) ((unsigned char *) (uintptr) regs + r->byteoff)); else bcmerror = BCME_BADADDR; @@ -3564,9 +3564,9 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) W_REG(osh, (uint32 *) ((unsigned char *) (uintptr) regs + r->byteoff), r->val); - else if (r->size == sizeof(uint16)) + else if (r->size == sizeof(u16)) W_REG(osh, - (uint16 *) ((unsigned char *) (uintptr) regs + + (u16 *) ((unsigned char *) (uintptr) regs + r->byteoff), r->val); else bcmerror = BCME_BADADDR; @@ -3629,7 +3629,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) break; case WLC_GET_RX_ANT:{ /* get latest used rx antenna */ - uint16 rxstatus; + u16 rxstatus; if (!wlc->pub->up) { bcmerror = BCME_NOTUP; @@ -3637,7 +3637,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) } rxstatus = R_REG(wlc->osh, &wlc->regs->phyrxstatus0); - if (rxstatus == 0xdead || rxstatus == (uint16) -1) { + if (rxstatus == 0xdead || rxstatus == (u16) -1) { bcmerror = BCME_ERROR; break; } @@ -3689,7 +3689,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) case WLC_SET_SRL: if (val >= 1 && val <= RETRY_SHORT_MAX) { int ac; - wlc->SRL = (uint16) val; + wlc->SRL = (u16) val; wlc_bmac_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL); @@ -3708,7 +3708,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) case WLC_SET_LRL: if (val >= 1 && val <= 255) { int ac; - wlc->LRL = (uint16) val; + wlc->LRL = (u16) val; wlc_bmac_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL); @@ -3731,7 +3731,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) } if (val >= 1 && val <= 255) { - wlc_set_cwmin(wlc, (uint16) val); + wlc_set_cwmin(wlc, (u16) val); } else bcmerror = BCME_RANGE; break; @@ -3747,7 +3747,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) } if (val >= 255 && val <= 2047) { - wlc_set_cwmax(wlc, (uint16) val); + wlc_set_cwmax(wlc, (u16) val); } else bcmerror = BCME_RANGE; break; @@ -3759,7 +3759,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) case WLC_SET_RADIO:{ /* 32 bits input, higher 16 bits are mask, lower 16 bits are value to * set */ - uint16 radiomask, radioval; + u16 radiomask, radioval; uint validbits = WL_RADIO_SW_DISABLE | WL_RADIO_HW_DISABLE; mbool new = 0; @@ -3845,7 +3845,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) if ((val >= 0) && (val < WLC_MAX_WSEC_KEYS(wlc)) && (key != NULL)) { u8 seq[DOT11_WPA_KEY_RSC_LEN]; - uint16 lo; + u16 lo; uint32 hi; /* group keys in WPA-NONE (IBSS only, AES and TKIP) use a global TXIV */ if ((bsscfg->WPA_auth & WPA_AUTH_NONE) @@ -3961,7 +3961,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) /* range [1, 0xffff] */ if (val >= DOT11_MIN_BEACON_PERIOD && val <= DOT11_MAX_BEACON_PERIOD) { - wlc->default_bss->beacon_period = (uint16) val; + wlc->default_bss->beacon_period = (u16) val; } else bcmerror = BCME_RANGE; break; @@ -4085,9 +4085,9 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) case WLC_SET_WPA_AUTH: /* change of WPA_Auth modifies the PS_ALLOWED state */ if (BSSCFG_STA(bsscfg)) { - bsscfg->WPA_auth = (uint16) val; + bsscfg->WPA_auth = (u16) val; } else - bsscfg->WPA_auth = (uint16) val; + bsscfg->WPA_auth = (u16) val; break; #endif /* SUPPORT_HWKEY */ @@ -4320,7 +4320,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) bcmerror = BCME_RANGE; /* bad value */ break; } - wlc->prb_resp_timeout = (uint16) val; + wlc->prb_resp_timeout = (u16) val; break; case WLC_GET_KEY_PRIMARY:{ @@ -4900,7 +4900,7 @@ static const char *supr_reason[] = { "Lifetime Expiry", "Underflow" }; -static void wlc_print_txs_status(uint16 s) +static void wlc_print_txs_status(u16 s) { printf("[15:12] %d frame attempts\n", (s & TX_STATUS_FRM_RTX_MASK) >> TX_STATUS_FRM_RTX_SHIFT); @@ -4921,8 +4921,8 @@ static void wlc_print_txs_status(uint16 s) void wlc_print_txstatus(tx_status_t *txs) { #if defined(BCMDBG) - uint16 s = txs->status; - uint16 ackphyrxsh = txs->ackphyrxsh; + u16 s = txs->status; + u16 ackphyrxsh = txs->ackphyrxsh; printf("\ntxpkt (MPDU) Complete\n"); @@ -4949,9 +4949,9 @@ void wlc_statsupd(wlc_info_t *wlc) { int i; #ifdef BCMDBG - uint16 delta; - uint16 rxf0ovfl; - uint16 txfunfl[NFIFO]; + u16 delta; + u16 rxf0ovfl; + u16 txfunfl[NFIFO]; #endif /* BCMDBG */ /* if driver down, make no sense to update stats */ @@ -4969,7 +4969,7 @@ void wlc_statsupd(wlc_info_t *wlc) #ifdef BCMDBG /* check for rx fifo 0 overflow */ - delta = (uint16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); + delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); if (delta) WL_ERROR(("wl%d: %u rx fifo 0 overflows!\n", wlc->pub->unit, delta)); @@ -4977,7 +4977,7 @@ void wlc_statsupd(wlc_info_t *wlc) /* check for tx fifo underflows */ for (i = 0; i < NFIFO; i++) { delta = - (uint16) (wlc->core->macstat_snapshot->txfunfl[i] - + (u16) (wlc->core->macstat_snapshot->txfunfl[i] - txfunfl[i]); if (delta) WL_ERROR(("wl%d: %u tx fifo %d underflows!\n", @@ -5027,7 +5027,7 @@ void wlc_statsupd(wlc_info_t *wlc) WLCNTADD(wlc->pub->_cnt->rxerror, wlc->pub->_cnt->rxuflo[i]); } -bool wlc_chipmatch(uint16 vendor, uint16 device) +bool wlc_chipmatch(u16 vendor, u16 device) { if (vendor != VENDOR_BROADCOM) { WL_ERROR(("wlc_chipmatch: unknown vendor id %04x\n", vendor)); @@ -5049,32 +5049,32 @@ bool wlc_chipmatch(uint16 vendor, uint16 device) #if defined(BCMDBG) void wlc_print_txdesc(d11txh_t *txh) { - uint16 mtcl = ltoh16(txh->MacTxControlLow); - uint16 mtch = ltoh16(txh->MacTxControlHigh); - uint16 mfc = ltoh16(txh->MacFrameControl); - uint16 tfest = ltoh16(txh->TxFesTimeNormal); - uint16 ptcw = ltoh16(txh->PhyTxControlWord); - uint16 ptcw_1 = ltoh16(txh->PhyTxControlWord_1); - uint16 ptcw_1_Fbr = ltoh16(txh->PhyTxControlWord_1_Fbr); - uint16 ptcw_1_Rts = ltoh16(txh->PhyTxControlWord_1_Rts); - uint16 ptcw_1_FbrRts = ltoh16(txh->PhyTxControlWord_1_FbrRts); - uint16 mainrates = ltoh16(txh->MainRates); - uint16 xtraft = ltoh16(txh->XtraFrameTypes); + u16 mtcl = ltoh16(txh->MacTxControlLow); + u16 mtch = ltoh16(txh->MacTxControlHigh); + u16 mfc = ltoh16(txh->MacFrameControl); + u16 tfest = ltoh16(txh->TxFesTimeNormal); + u16 ptcw = ltoh16(txh->PhyTxControlWord); + u16 ptcw_1 = ltoh16(txh->PhyTxControlWord_1); + u16 ptcw_1_Fbr = ltoh16(txh->PhyTxControlWord_1_Fbr); + u16 ptcw_1_Rts = ltoh16(txh->PhyTxControlWord_1_Rts); + u16 ptcw_1_FbrRts = ltoh16(txh->PhyTxControlWord_1_FbrRts); + u16 mainrates = ltoh16(txh->MainRates); + u16 xtraft = ltoh16(txh->XtraFrameTypes); u8 *iv = txh->IV; u8 *ra = txh->TxFrameRA; - uint16 tfestfb = ltoh16(txh->TxFesTimeFallback); + u16 tfestfb = ltoh16(txh->TxFesTimeFallback); u8 *rtspfb = txh->RTSPLCPFallback; - uint16 rtsdfb = ltoh16(txh->RTSDurFallback); + u16 rtsdfb = ltoh16(txh->RTSDurFallback); u8 *fragpfb = txh->FragPLCPFallback; - uint16 fragdfb = ltoh16(txh->FragDurFallback); - uint16 mmodelen = ltoh16(txh->MModeLen); - uint16 mmodefbrlen = ltoh16(txh->MModeFbrLen); - uint16 tfid = ltoh16(txh->TxFrameID); - uint16 txs = ltoh16(txh->TxStatus); - uint16 mnmpdu = ltoh16(txh->MaxNMpdus); - uint16 mabyte = ltoh16(txh->MaxABytes_MRT); - uint16 mabyte_f = ltoh16(txh->MaxABytes_FBR); - uint16 mmbyte = ltoh16(txh->MinMBytes); + u16 fragdfb = ltoh16(txh->FragDurFallback); + u16 mmodelen = ltoh16(txh->MModeLen); + u16 mmodefbrlen = ltoh16(txh->MModeFbrLen); + u16 tfid = ltoh16(txh->TxFrameID); + u16 txs = ltoh16(txh->TxStatus); + u16 mnmpdu = ltoh16(txh->MaxNMpdus); + u16 mabyte = ltoh16(txh->MaxABytes_MRT); + u16 mabyte_f = ltoh16(txh->MaxABytes_FBR); + u16 mmbyte = ltoh16(txh->MinMBytes); u8 *rtsph = txh->RTSPhyHeader; struct dot11_rts_frame rts = txh->rts_frame; @@ -5134,13 +5134,13 @@ void wlc_print_txdesc(d11txh_t *txh) #if defined(BCMDBG) void wlc_print_rxh(d11rxhdr_t *rxh) { - uint16 len = rxh->RxFrameSize; - uint16 phystatus_0 = rxh->PhyRxStatus_0; - uint16 phystatus_1 = rxh->PhyRxStatus_1; - uint16 phystatus_2 = rxh->PhyRxStatus_2; - uint16 phystatus_3 = rxh->PhyRxStatus_3; - uint16 macstatus1 = rxh->RxStatus1; - uint16 macstatus2 = rxh->RxStatus2; + u16 len = rxh->RxFrameSize; + u16 phystatus_0 = rxh->PhyRxStatus_0; + u16 phystatus_1 = rxh->PhyRxStatus_1; + u16 phystatus_2 = rxh->PhyRxStatus_2; + u16 phystatus_3 = rxh->PhyRxStatus_3; + u16 macstatus1 = rxh->RxStatus1; + u16 macstatus2 = rxh->RxStatus2; char flagstr[64]; char lenbuf[20]; static const bcm_bit_desc_t macstat_flags[] = { @@ -5197,7 +5197,7 @@ int wlc_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len) } #endif /* defined(BCMDBG) */ -uint16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate) +u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate) { return wlc_bmac_rate_shm_offset(wlc->hw, rate); } @@ -5339,7 +5339,7 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw) void *pkt; struct scb *scb = &global_scb; struct dot11_header *d11_header = (struct dot11_header *)PKTDATA(sdu); - uint16 type, fc; + u16 type, fc; ASSERT(sdu); @@ -5371,7 +5371,7 @@ void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi) { void *pkt[DOT11_MAXNUMFRAGS]; int prec; - uint16 prec_map; + u16 prec_map; int err = 0, i, count; uint fifo; struct pktq *q = &qi->q; @@ -5441,10 +5441,10 @@ void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi) * Generate frame ID for a BCMC packet. The frag field is not used * for MC frames so is used as part of the sequence number. */ -static inline uint16 +static inline u16 bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh) { - uint16 frameid; + u16 frameid; frameid = ltoh16(txh->TxFrameID) & ~(TXFID_SEQ_MASK | TXFID_QUEUE_MASK); frameid |= @@ -5458,7 +5458,7 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh) void BCMFASTPATH wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit, s8 txpktpend) { - uint16 frameid = INVALIDFID; + u16 frameid = INVALIDFID; d11txh_t *txh; ASSERT(fifo < NFIFO); @@ -5502,10 +5502,10 @@ wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit, s8 txpktpend) #endif /* WLC_HIGH_ONLY */ } -static uint16 +static u16 wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length) { - uint16 usec = 0; + u16 usec = 0; uint mac_rate = RSPEC2RATE(rspec); uint nsyms; @@ -5521,7 +5521,7 @@ wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length) nsyms = CEIL((length * 8), (mac_rate * 2)); /* usec = symbols * usec/symbol */ - usec = (uint16) (nsyms * APHY_SYMBOL_TIME); + usec = (u16) (nsyms * APHY_SYMBOL_TIME); return usec; } else { switch (mac_rate) { @@ -5609,7 +5609,7 @@ wlc_compute_ofdm_plcp(ratespec_t rspec, uint32 length, u8 *plcp) static void wlc_cck_plcp_set(int rate_500, uint length, u8 *plcp) { - uint16 usec = 0; + u16 usec = 0; u8 le = 0; switch (rate_500) { @@ -5643,7 +5643,7 @@ static void wlc_cck_plcp_set(int rate_500, uint length, u8 *plcp) plcp[0] = rate_500 * 5; /* r (500kbps) * 5 == r (100kbps) */ /* PLCP service byte */ plcp[1] = (u8) (le | D11B_PLCP_SIGNAL_LOCKED); - /* PLCP length uint16, little endian */ + /* PLCP length u16, little endian */ plcp[2] = usec & 0xff; plcp[3] = (usec >> 8) & 0xff; /* PLCP CRC16 */ @@ -5671,16 +5671,16 @@ static void wlc_compute_cck_plcp(ratespec_t rspec, uint length, u8 *plcp) * next_frag_len next MPDU length in bytes * preamble_type use short/GF or long/MM PLCP header */ -static uint16 BCMFASTPATH +static u16 BCMFASTPATH wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, uint next_frag_len) { - uint16 dur, sifs; + u16 dur, sifs; sifs = SIFS(wlc->band); dur = sifs; - dur += (uint16) wlc_calc_ack_time(wlc, rate, preamble_type); + dur += (u16) wlc_calc_ack_time(wlc, rate, preamble_type); if (next_frag_len) { /* Double the current DUR to get 2 SIFS + 2 ACKs */ @@ -5688,7 +5688,7 @@ wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, /* add another SIFS and the frag time */ dur += sifs; dur += - (uint16) wlc_calc_frame_time(wlc, rate, preamble_type, + (u16) wlc_calc_frame_time(wlc, rate, preamble_type, next_frag_len); } return dur; @@ -5705,39 +5705,39 @@ wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, * rate next MPDU rate in unit of 500kbps * frame_len next MPDU frame length in bytes */ -uint16 BCMFASTPATH +u16 BCMFASTPATH wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, ratespec_t rts_rate, ratespec_t frame_rate, u8 rts_preamble_type, u8 frame_preamble_type, uint frame_len, bool ba) { - uint16 dur, sifs; + u16 dur, sifs; sifs = SIFS(wlc->band); if (!cts_only) { /* RTS/CTS */ dur = 3 * sifs; dur += - (uint16) wlc_calc_cts_time(wlc, rts_rate, + (u16) wlc_calc_cts_time(wlc, rts_rate, rts_preamble_type); } else { /* CTS-TO-SELF */ dur = 2 * sifs; } dur += - (uint16) wlc_calc_frame_time(wlc, frame_rate, frame_preamble_type, + (u16) wlc_calc_frame_time(wlc, frame_rate, frame_preamble_type, frame_len); if (ba) dur += - (uint16) wlc_calc_ba_time(wlc, frame_rate, + (u16) wlc_calc_ba_time(wlc, frame_rate, WLC_SHORT_PREAMBLE); else dur += - (uint16) wlc_calc_ack_time(wlc, frame_rate, + (u16) wlc_calc_ack_time(wlc, frame_rate, frame_preamble_type); return dur; } -static bool wlc_phy_rspec_check(wlc_info_t *wlc, uint16 bw, ratespec_t rspec) +static bool wlc_phy_rspec_check(wlc_info_t *wlc, u16 bw, ratespec_t rspec) { if (IS_MCS(rspec)) { uint mcs = rspec & RSPEC_RATE_MASK; @@ -5763,10 +5763,10 @@ static bool wlc_phy_rspec_check(wlc_info_t *wlc, uint16 bw, ratespec_t rspec) return TRUE; } -uint16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec) +u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec) { - uint16 phyctl1 = 0; - uint16 bw; + u16 phyctl1 = 0; + u16 bw; if (WLCISLCNPHY(wlc->band)) { bw = PHY_TXC1_BW_20MHZ; @@ -5823,7 +5823,7 @@ uint16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec) ratespec_t BCMFASTPATH wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec, - uint16 mimo_ctlchbw) + u16 mimo_ctlchbw) { ratespec_t rts_rspec = 0; @@ -5877,7 +5877,7 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec, * headroom == D11_PHY_HDR_LEN + D11_TXH_LEN (D11_TXH_LEN is now 104 bytes) * */ -static uint16 BCMFASTPATH +static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, void *p, struct scb *scb, uint frag, uint nfrags, uint queue, uint next_frag_len, @@ -5888,8 +5888,8 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, u8 *plcp, plcp_fallback[D11_PHY_HDR_LEN]; osl_t *osh; int len, phylen, rts_phylen; - uint16 fc, type, frameid, mch, phyctl, xfts, mainrates; - uint16 seq = 0, mcl = 0, status = 0; + u16 fc, type, frameid, mch, phyctl, xfts, mainrates; + u16 seq = 0, mcl = 0, status = 0; ratespec_t rspec[2] = { WLC_RATE_1M, WLC_RATE_1M }, rts_rspec[2] = { WLC_RATE_1M, WLC_RATE_1M}; bool use_rts = FALSE; @@ -5904,19 +5904,19 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, uint ac; uint32 rate_val[2]; bool hwtkmic = FALSE; - uint16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ; + u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ; #ifdef WLANTSEL #define ANTCFG_NONE 0xFF u8 antcfg = ANTCFG_NONE; u8 fbantcfg = ANTCFG_NONE; #endif uint phyctl1_stf = 0; - uint16 durid = 0; + u16 durid = 0; struct ieee80211_tx_rate *txrate[2]; int k; struct ieee80211_tx_info *tx_info; bool is_mcs[2]; - uint16 mimo_txbw; + u16 mimo_txbw; u8 mimo_preamble_type; frameid = 0; @@ -6218,7 +6218,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, } else if (use_rifs) { /* NAV protect to end of next max packet size */ durid = - (uint16) wlc_calc_frame_time(wlc, rspec[0], + (u16) wlc_calc_frame_time(wlc, rspec[0], preamble_type[0], DOT11_MAX_FRAG_LEN); durid += RIFS_11N_TIME; @@ -6268,7 +6268,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, } /* MacFrameControl */ - bcopy((char *)&h->fc, (char *)&txh->MacFrameControl, sizeof(uint16)); + bcopy((char *)&h->fc, (char *)&txh->MacFrameControl, sizeof(u16)); txh->TxFesTimeNormal = htol16(0); @@ -6331,7 +6331,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, } /* RTS PLCP header */ - ASSERT(ISALIGNED((uintptr) txh->RTSPhyHeader, sizeof(uint16))); + ASSERT(ISALIGNED((uintptr) txh->RTSPhyHeader, sizeof(u16))); rts_plcp = txh->RTSPhyHeader; if (use_cts) rts_phylen = DOT11_CTS_LEN + DOT11_FCS_LEN; @@ -6364,7 +6364,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, rts->fc = htol16(FC_CTS); bcopy((char *)&h->a2, (char *)&rts->ra, ETHER_ADDR_LEN); } else { - rts->fc = htol16((uint16) FC_RTS); + rts->fc = htol16((u16) FC_RTS); bcopy((char *)&h->a1, (char *)&rts->ra, 2 * ETHER_ADDR_LEN); } @@ -6423,7 +6423,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, /* PhyTxControlWord_1 */ if (WLC_PHY_11N_CAP(wlc->band)) { - uint16 phyctl1 = 0; + u16 phyctl1 = 0; phyctl1 = wlc_phytxctl1_calc(wlc, rspec[0]); txh->PhyTxControlWord_1 = htol16(phyctl1); @@ -6443,13 +6443,13 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, * it will be unnecessary if they are separated */ if (IS_MCS(rspec[0]) && (preamble_type[0] == WLC_MM_PREAMBLE)) { - uint16 mmodelen = + u16 mmodelen = wlc_calc_lsig_len(wlc, rspec[0], phylen); txh->MModeLen = htol16(mmodelen); } if (IS_MCS(rspec[1]) && (preamble_type[1] == WLC_MM_PREAMBLE)) { - uint16 mmodefbrlen = + u16 mmodefbrlen = wlc_calc_lsig_len(wlc, rspec[1], phylen); txh->MModeFbrLen = htol16(mmodefbrlen); } @@ -6506,9 +6506,9 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, preamble_type[1], 0); } /* NEED to set TxFesTimeNormal (hard) */ - txh->TxFesTimeNormal = htol16((uint16) dur); + txh->TxFesTimeNormal = htol16((u16) dur); /* NEED to set fallback rate version of TxFesTimeNormal (hard) */ - txh->TxFesTimeFallback = htol16((uint16) dur_fallback); + txh->TxFesTimeFallback = htol16((u16) dur_fallback); /* update txop byte threshold (txop minus intraframe overhead) */ if (wlc->edcf_txop[ac] >= (dur - frag_dur)) { @@ -6532,9 +6532,9 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, wlc->usr_fragthresh; /* update the fragthresh and do txc update */ if (wlc->fragthresh[queue] != - (uint16) newfragthresh) { + (u16) newfragthresh) { wlc->fragthresh[queue] = - (uint16) newfragthresh; + (u16) newfragthresh; } } } else @@ -6764,8 +6764,8 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, uint32 frm_tx2) uint totlen, supr_status; bool lastframe; struct dot11_header *h; - uint16 fc; - uint16 mcl; + u16 fc; + u16 mcl; struct ieee80211_tx_info *tx_info; struct ieee80211_tx_rate *txrate; int i; @@ -6854,7 +6854,7 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, uint32 frm_tx2) if (!lastframe) { WL_ERROR(("Not last frame!\n")); } else { - uint16 sfbl, lfbl; + u16 sfbl, lfbl; ieee80211_tx_info_clear_status(tx_info); if (queue < AC_COUNT) { sfbl = WLC_WME_RETRY_SFB_GET(wlc, wme_fifo2ac[queue]); @@ -6977,7 +6977,7 @@ uint32 wlc_calc_tbtt_offset(uint32 bp, uint32 tsf_h, uint32 tsf_l) * and * (X + Y) mod Z = ((X mod Z) + (Y mod Z)) mod Z * - * So, if BTk[n] = uint16 n [0,3] of BTk. + * So, if BTk[n] = u16 n [0,3] of BTk. * BTk % BP = SUM((BTk[n] * 2^16n) % BP , 0<=n<4) % BP * and the SUM term can be broken down: * (BTk[n] * 2^16n) % BP @@ -7222,7 +7222,7 @@ void BCMFASTPATH wlc_recv(wlc_info_t *wlc, void *p) d11rxhdr_t *rxh; struct dot11_header *h; osl_t *osh; - uint16 fc; + u16 fc; uint len; bool is_amsdu; #ifdef BCMDBG @@ -7313,7 +7313,7 @@ void BCMFASTPATH wlc_recv(wlc_info_t *wlc, void *p) * Formula given by HT PHY Spec v 1.13 * len = 3(nsyms + nstream + 3) - 3 */ -uint16 BCMFASTPATH +u16 BCMFASTPATH wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len) { uint nsyms, len = 0, kNdps; @@ -7350,7 +7350,7 @@ wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len) len = (3 * nsyms) - 3; /* (-3) excluding service bits and tail bits */ } - return (uint16) len; + return (u16) len; } /* calculate frame duration of a given rate and length, return time in usec unit */ @@ -7609,8 +7609,8 @@ static void wlc_write_rate_shm(wlc_info_t *wlc, u8 rate, u8 basic_rate) { u8 phy_rate, index; u8 basic_phy_rate, basic_index; - uint16 dir_table, basic_table; - uint16 basic_ptr; + u16 dir_table, basic_table; + u16 basic_ptr; /* Shared memory address for the table we are reading */ dir_table = IS_OFDM(basic_rate) ? M_RT_DIRMAP_A : M_RT_DIRMAP_B; @@ -7756,9 +7756,9 @@ void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len) const wlc_rateset_t *rs_dflt; wlc_rateset_t rs; u8 rate; - uint16 entry_ptr; + u16 entry_ptr; u8 plcp[D11_PHY_HDR_LEN]; - uint16 dur, sifs; + u16 dur, sifs; uint i; sifs = SIFS(wlc->band); @@ -7780,20 +7780,20 @@ void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len) /* Calculate the duration of the Probe Response frame plus SIFS for the MAC */ dur = - (uint16) wlc_calc_frame_time(wlc, rate, WLC_LONG_PREAMBLE, + (u16) wlc_calc_frame_time(wlc, rate, WLC_LONG_PREAMBLE, frame_len); dur += sifs; /* Update the SHM Rate Table entry Probe Response values */ wlc_write_shm(wlc, entry_ptr + M_RT_PRS_PLCP_POS, - (uint16) (plcp[0] + (plcp[1] << 8))); + (u16) (plcp[0] + (plcp[1] << 8))); wlc_write_shm(wlc, entry_ptr + M_RT_PRS_PLCP_POS + 2, - (uint16) (plcp[2] + (plcp[3] << 8))); + (u16) (plcp[2] + (plcp[3] << 8))); wlc_write_shm(wlc, entry_ptr + M_RT_PRS_DUR_POS, dur); } } -uint16 +u16 wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, bool phydelay) { @@ -7825,7 +7825,7 @@ wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, D11B_PHY_LPREHDR_TIME; bcntsfoff += wlc_compute_airtime(wlc, rspec, DOT11_MAC_HDR_LEN); } - return (uint16) (bcntsfoff); + return (u16) (bcntsfoff); } /* Max buffering needed for beacon template/prb resp template is 142 bytes. @@ -7842,7 +7842,7 @@ wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, */ static void wlc_bcn_prb_template(wlc_info_t *wlc, uint type, ratespec_t bcn_rspec, - wlc_bsscfg_t *cfg, uint16 *buf, int *len) + wlc_bsscfg_t *cfg, u16 *buf, int *len) { cck_phy_hdr_t *plcp; struct dot11_management_header *h; @@ -7883,7 +7883,7 @@ wlc_bcn_prb_template(wlc_info_t *wlc, uint type, ratespec_t bcn_rspec, h = (struct dot11_management_header *)&plcp[1]; /* fill in 802.11 header */ - h->fc = htol16((uint16) type); + h->fc = htol16((u16) type); /* DUR is 0 for multicast bcn, or filled in by MAC for prb resp */ /* A1 filled in by MAC for prb resp, broadcast for bcn */ @@ -7921,7 +7921,7 @@ void wlc_bss_update_beacon(wlc_info_t *wlc, wlc_bsscfg_t *cfg) if (MBSS_BCN_ENAB(cfg)) { /* Optimize: Some of if/else could be combined */ } else if (HWBCN_ENAB(cfg)) { /* Hardware beaconing for this config */ - uint16 bcn[BCN_TMPL_LEN / 2]; + u16 bcn[BCN_TMPL_LEN / 2]; uint32 both_valid = MCMD_BCN0VLD | MCMD_BCN1VLD; d11regs_t *regs = wlc->regs; osl_t *osh = NULL; @@ -7977,7 +7977,7 @@ void wlc_update_beacon(wlc_info_t *wlc) void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg) { u8 *ssidptr = cfg->SSID; - uint16 base = M_SSID; + u16 base = M_SSID; u8 ssidbuf[DOT11_MAX_SSID_LEN]; /* padding the ssid with zero and copy it into shm */ @@ -7987,7 +7987,7 @@ void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg) wlc_copyto_shm(wlc, base, ssidbuf, DOT11_MAX_SSID_LEN); if (!MBSS_BCN_ENAB(cfg)) - wlc_write_shm(wlc, M_SSIDLEN, (uint16) cfg->SSID_len); + wlc_write_shm(wlc, M_SSIDLEN, (u16) cfg->SSID_len); } void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend) @@ -8005,7 +8005,7 @@ void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend) void wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) { - uint16 prb_resp[BCN_TMPL_LEN / 2]; + u16 prb_resp[BCN_TMPL_LEN / 2]; int len = BCN_TMPL_LEN; /* write the probe response to hardware, or save in the config structure */ @@ -8023,7 +8023,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) (len + 3) & ~3, prb_resp); /* write the length of the probe response frame (+PLCP/-FCS) */ - wlc_write_shm(wlc, M_PRB_RESP_FRM_LEN, (uint16) len); + wlc_write_shm(wlc, M_PRB_RESP_FRM_LEN, (u16) len); /* write the SSID and SSID length */ wlc_shm_ssid_upd(wlc, cfg); @@ -8034,7 +8034,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) * wlc_mod_prb_rsp_rate_table() by subtracting the PLCP len and adding the FCS. */ len += (-D11_PHY_HDR_LEN + DOT11_FCS_LEN); - wlc_mod_prb_rsp_rate_table(wlc, (uint16) len); + wlc_mod_prb_rsp_rate_table(wlc, (u16) len); if (suspend) wlc_enable_mac(wlc); @@ -8051,7 +8051,7 @@ int wlc_prep_pdu(wlc_info_t *wlc, void *pdu, uint *fifop) d11txh_t *txh; struct dot11_header *h; struct scb *scb; - uint16 fc; + u16 fc; osh = wlc->osh; @@ -8339,12 +8339,12 @@ wlc_duty_cycle_set(wlc_info_t *wlc, int duty_cycle, bool isOFDM, idle_busy_ratio_x_16 = (100 - duty_cycle) * 16 / duty_cycle; /* Only write to shared memory when wl is up */ if (writeToShm) - wlc_write_shm(wlc, offset, (uint16) idle_busy_ratio_x_16); + wlc_write_shm(wlc, offset, (u16) idle_busy_ratio_x_16); if (isOFDM) - wlc->tx_duty_cycle_ofdm = (uint16) duty_cycle; + wlc->tx_duty_cycle_ofdm = (u16) duty_cycle; else - wlc->tx_duty_cycle_cck = (uint16) duty_cycle; + wlc->tx_duty_cycle_cck = (u16) duty_cycle; return BCME_OK; } @@ -8354,8 +8354,8 @@ wlc_pktengtx(wlc_info_t *wlc, wl_pkteng_t *pkteng, u8 rate, struct ether_addr *sa, uint32 wait_delay) { bool suspend; - uint16 val = M_PKTENG_MODE_TX; - volatile uint16 frame_cnt_check; + u16 val = M_PKTENG_MODE_TX; + volatile u16 frame_cnt_check; u8 counter = 0; wlc_bmac_set_deaf(wlc->hw, TRUE); @@ -8388,7 +8388,7 @@ wlc_pktengtx(wlc_info_t *wlc, wl_pkteng_t *pkteng, u8 rate, /* CTS frame */ val |= M_PKTENG_MODE_TX_CTS; wlc_bmac_write_shm(wlc->hw, M_PKTENG_IFS, - (uint16) pkteng->delay); + (u16) pkteng->delay); wlc_bmac_write_shm(wlc->hw, M_PKTENG_CTRL, val); } @@ -8409,18 +8409,18 @@ wlc_pktengtx(wlc_info_t *wlc, wl_pkteng_t *pkteng, u8 rate, wlc_bmac_set_deaf(wlc->hw, FALSE); } -/* Read a single uint16 from shared memory. +/* Read a single u16 from shared memory. * SHM 'offset' needs to be an even address */ -uint16 wlc_read_shm(wlc_info_t *wlc, uint offset) +u16 wlc_read_shm(wlc_info_t *wlc, uint offset) { return wlc_bmac_read_shm(wlc->hw, offset); } -/* Write a single uint16 to shared memory. +/* Write a single u16 to shared memory. * SHM 'offset' needs to be an even address */ -void wlc_write_shm(wlc_info_t *wlc, uint offset, uint16 v) +void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v) { wlc_bmac_write_shm(wlc->hw, offset, v); } @@ -8429,7 +8429,7 @@ void wlc_write_shm(wlc_info_t *wlc, uint offset, uint16 v) * SHM 'offset' needs to be an even address and * Range length 'len' must be an even number of bytes */ -void wlc_set_shm(wlc_info_t *wlc, uint offset, uint16 v, int len) +void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len) { /* offset and len need to be even */ ASSERT((offset & 1) == 0); @@ -8484,12 +8484,12 @@ void wlc_corereset(wlc_info_t *wlc, uint32 flags) wlc_bmac_corereset(wlc->hw, flags); } -void wlc_mhf(wlc_info_t *wlc, u8 idx, uint16 mask, uint16 val, int bands) +void wlc_mhf(wlc_info_t *wlc, u8 idx, u16 mask, u16 val, int bands) { wlc_bmac_mhf(wlc->hw, idx, mask, val, bands); } -uint16 wlc_mhf_get(wlc_info_t *wlc, u8 idx, int bands) +u16 wlc_mhf_get(wlc_info_t *wlc, u8 idx, int bands) { return wlc_bmac_mhf_get(wlc->hw, idx, bands); } @@ -8526,13 +8526,13 @@ void wlc_read_tsf(wlc_info_t *wlc, uint32 *tsf_l_ptr, uint32 *tsf_h_ptr) wlc_bmac_read_tsf(wlc->hw, tsf_l_ptr, tsf_h_ptr); } -void wlc_set_cwmin(wlc_info_t *wlc, uint16 newmin) +void wlc_set_cwmin(wlc_info_t *wlc, u16 newmin) { wlc->band->CWmin = newmin; wlc_bmac_set_cwmin(wlc->hw, newmin); } -void wlc_set_cwmax(wlc_info_t *wlc, uint16 newmax) +void wlc_set_cwmax(wlc_info_t *wlc, u16 newmax) { wlc->band->CWmax = newmax; wlc_bmac_set_cwmax(wlc->hw, newmax); diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h index 0b5c41f..b936ca3 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.h +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h @@ -267,12 +267,12 @@ typedef struct wlc_stf { u8 ant_rx_ovr; /* rx antenna override */ s8 txant; /* userTx antenna setting */ - uint16 phytxant; /* phyTx antenna setting in txheader */ + u16 phytxant; /* phyTx antenna setting in txheader */ u8 ss_opmode; /* singlestream Operational mode, 0:siso; 1:cdd */ bool ss_algosel_auto; /* if TRUE, use wlc->stf->ss_algo_channel; */ /* else use wlc->band->stf->ss_mode_band; */ - uint16 ss_algo_channel; /* ss based on per-channel algo: 0: SISO, 1: CDD 2: STBC */ + u16 ss_algo_channel; /* ss based on per-channel algo: 0: SISO, 1: CDD 2: STBC */ u8 no_cddstbc; /* stf override, 1: no CDD (or STBC) allowed */ u8 rxchain_restore_delay; /* delay time to restore default rxchain */ @@ -330,10 +330,10 @@ typedef struct wlcband { int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ uint bandunit; /* bandstate[] index */ - uint16 phytype; /* phytype */ - uint16 phyrev; - uint16 radioid; - uint16 radiorev; + u16 phytype; /* phytype */ + u16 phyrev; + u16 radioid; + u16 radiorev; wlc_phy_t *pi; /* pointer to phy specific information */ bool abgphy_encore; @@ -352,9 +352,9 @@ typedef struct wlcband { bool mimo_cap_40; /* 40 MHz cap enabled on this band */ s8 antgain; /* antenna gain from srom */ - uint16 CWmin; /* The minimum size of contention window, in unit of aSlotTime */ - uint16 CWmax; /* The maximum size of contention window, in unit of aSlotTime */ - uint16 bcntsfoff; /* beacon tsf offset */ + u16 CWmin; /* The minimum size of contention window, in unit of aSlotTime */ + u16 CWmax; /* The maximum size of contention window, in unit of aSlotTime */ + u16 bcntsfoff; /* beacon tsf offset */ } wlcband_t; /* generic function callback takes just one arg */ @@ -416,16 +416,16 @@ struct wlc_if { typedef struct wlc_hwband { int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ uint bandunit; /* bandstate[] index */ - uint16 mhfs[MHFMAX]; /* MHF array shadow */ + u16 mhfs[MHFMAX]; /* MHF array shadow */ u8 bandhw_stf_ss_mode; /* HW configured STF type, 0:siso; 1:cdd */ - uint16 CWmin; - uint16 CWmax; + u16 CWmin; + u16 CWmax; uint32 core_flags; - uint16 phytype; /* phytype */ - uint16 phyrev; - uint16 radioid; - uint16 radiorev; + u16 phytype; /* phytype */ + u16 phyrev; + u16 radioid; + u16 radiorev; wlc_phy_t *pi; /* pointer to phy specific information */ bool abgphy_encore; } wlc_hwband_t; @@ -446,16 +446,16 @@ struct wlc_hw_info { uint unit; /* device instance number */ /* version info */ - uint16 vendorid; /* PCI vendor id */ - uint16 deviceid; /* PCI device id */ + u16 vendorid; /* PCI vendor id */ + u16 deviceid; /* PCI device id */ uint corerev; /* core revision */ u8 sromrev; /* version # of the srom */ - uint16 boardrev; /* version # of particular board */ + u16 boardrev; /* version # of particular board */ uint32 boardflags; /* Board specific flags from srom */ uint32 boardflags2; /* More board flags if sromrev >= 4 */ uint32 machwcap; /* MAC capabilities (corerev >= 13) */ uint32 machwcap_backup; /* backup of machwcap (corerev >= 13) */ - uint16 ucode_dbgsel; /* dbgsel for ucode debug(config gpio) */ + u16 ucode_dbgsel; /* dbgsel for ucode debug(config gpio) */ si_t *sih; /* SB handle (cookie for siutils calls) */ char *vars; /* "environment" name=value */ @@ -465,12 +465,12 @@ struct wlc_hw_info { void *phy_sh; /* pointer to shared phy state */ wlc_hwband_t *band; /* pointer to active per-band state */ wlc_hwband_t *bandstate[MAXBANDS]; /* per-band state (one per phy/radio) */ - uint16 bmac_phytxant; /* cache of high phytxant state */ + u16 bmac_phytxant; /* cache of high phytxant state */ bool shortslot; /* currently using 11g ShortSlot timing */ - uint16 SRL; /* 802.11 dot11ShortRetryLimit */ - uint16 LRL; /* 802.11 dot11LongRetryLimit */ - uint16 SFBL; /* Short Frame Rate Fallback Limit */ - uint16 LFBL; /* Long Frame Rate Fallback Limit */ + u16 SRL; /* 802.11 dot11ShortRetryLimit */ + u16 LRL; /* 802.11 dot11LongRetryLimit */ + u16 SFBL; /* Short Frame Rate Fallback Limit */ + u16 LFBL; /* Long Frame Rate Fallback Limit */ bool up; /* d11 hardware up and running */ uint now; /* # elapsed seconds */ @@ -478,7 +478,7 @@ struct wlc_hw_info { chanspec_t chanspec; /* bmac chanspec shadow */ uint *txavail[NFIFO]; /* # tx descriptors available */ - uint16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */ + u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */ mbool pllreq; /* pll requests to keep PLL on */ @@ -505,7 +505,7 @@ struct wlc_hw_info { #ifdef WLC_LOW_ONLY struct wl_timer *wdtimer; /* timer for watchdog routine */ struct ether_addr orig_etheraddr; /* original hw ethernet address */ - uint16 rpc_dngl_agg; /* rpc agg control for dongle */ + u16 rpc_dngl_agg; /* rpc agg control for dongle */ uint32 mem_required_def; /* memory required to replenish RX DMA ring */ uint32 mem_required_lower; /* memory required with lower RX bound */ uint32 mem_required_least; /* minimum memory requirement to handle RX */ @@ -549,7 +549,7 @@ struct wlc_info { /* clock */ int clkreq_override; /* setting for clkreq for PCIE : Auto, 0, 1 */ - uint16 fastpwrup_dly; /* time in us needed to bring up d11 fast clock */ + u16 fastpwrup_dly; /* time in us needed to bring up d11 fast clock */ /* interrupt */ uint32 macintstatus; /* bit channel between isr and dpc */ @@ -595,8 +595,8 @@ struct wlc_info { uint vars_size; /* size of vars, free vars on detach */ - uint16 vendorid; /* PCI vendor id */ - uint16 deviceid; /* PCI device id */ + u16 vendorid; /* PCI vendor id */ + u16 deviceid; /* PCI device id */ uint ucode_rev; /* microcode revision */ uint32 machwcap; /* MAC capabilities, BMAC shadow */ @@ -667,18 +667,18 @@ struct wlc_info { ac_bitmap_t wme_dp; /* Discard (oldest first) policy per AC */ bool wme_apsd; /* enable Advanced Power Save Delivery */ ac_bitmap_t wme_admctl; /* bit i set if AC i under admission control */ - uint16 edcf_txop[AC_COUNT]; /* current txop for each ac */ + u16 edcf_txop[AC_COUNT]; /* current txop for each ac */ wme_param_ie_t wme_param_ie; /* WME parameter info element, which on STA * contains parameters in use locally, and on * AP contains parameters advertised to STA * in beacons and assoc responses. */ bool wme_prec_queuing; /* enable/disable non-wme STA prec queuing */ - uint16 wme_retries[AC_COUNT]; /* per-AC retry limits */ + u16 wme_retries[AC_COUNT]; /* per-AC retry limits */ int vlan_mode; /* OK to use 802.1Q Tags (ON, OFF, AUTO) */ - uint16 tx_prec_map; /* Precedence map based on HW FIFO space */ - uint16 fifo2prec_map[NFIFO]; /* pointer to fifo2_prec map based on WME */ + u16 tx_prec_map; /* Precedence map based on HW FIFO space */ + u16 fifo2prec_map[NFIFO]; /* pointer to fifo2_prec map based on WME */ /* BSS Configurations */ wlc_bsscfg_t *bsscfg[WLC_MAXBSSCFG]; /* set of BSS configurations, idx 0 is default and @@ -708,7 +708,7 @@ struct wlc_info { u8 mimoft; /* SIGN or 11N */ u8 mimo_band_bwcap; /* bw cap per band type */ s8 txburst_limit_override; /* tx burst limit override */ - uint16 txburst_limit; /* tx burst limit value */ + u16 txburst_limit; /* tx burst limit value */ s8 cck_40txbw; /* 11N, cck tx b/w override when in 40MHZ mode */ s8 ofdm_40txbw; /* 11N, ofdm tx b/w override when in 40MHZ mode */ s8 mimo_40txbw; /* 11N, mimo tx b/w override when in 40MHZ mode */ @@ -719,9 +719,9 @@ struct wlc_info { wlc_bss_info_t *default_bss; /* configured BSS parameters */ - uint16 AID; /* association ID */ - uint16 counter; /* per-sdu monotonically increasing counter */ - uint16 mc_fid_counter; /* BC/MC FIFO frame ID counter */ + u16 AID; /* association ID */ + u16 counter; /* per-sdu monotonically increasing counter */ + u16 mc_fid_counter; /* BC/MC FIFO frame ID counter */ bool ibss_allowed; /* FALSE, all IBSS will be ignored during a scan * and the driver will not allow the creation of @@ -739,7 +739,7 @@ struct wlc_info { bcm_tlv_t *country_ie_override; /* debug override of announced Country IE */ #endif - uint16 prb_resp_timeout; /* do not send prb resp if request older than this, + u16 prb_resp_timeout; /* do not send prb resp if request older than this, * 0 = disable */ @@ -751,13 +751,13 @@ struct wlc_info { /* PHY parameters */ chanspec_t chanspec; /* target operational channel */ - uint16 usr_fragthresh; /* user configured fragmentation threshold */ - uint16 fragthresh[NFIFO]; /* per-fifo fragmentation thresholds */ - uint16 RTSThresh; /* 802.11 dot11RTSThreshold */ - uint16 SRL; /* 802.11 dot11ShortRetryLimit */ - uint16 LRL; /* 802.11 dot11LongRetryLimit */ - uint16 SFBL; /* Short Frame Rate Fallback Limit */ - uint16 LFBL; /* Long Frame Rate Fallback Limit */ + u16 usr_fragthresh; /* user configured fragmentation threshold */ + u16 fragthresh[NFIFO]; /* per-fifo fragmentation thresholds */ + u16 RTSThresh; /* 802.11 dot11RTSThreshold */ + u16 SRL; /* 802.11 dot11ShortRetryLimit */ + u16 LRL; /* 802.11 dot11LongRetryLimit */ + u16 SFBL; /* Short Frame Rate Fallback Limit */ + u16 LFBL; /* Long Frame Rate Fallback Limit */ /* network config */ bool shortpreamble; /* currently operating with CCK ShortPreambles */ @@ -802,10 +802,10 @@ struct wlc_info { uint tempsense_lasttime; - uint16 tx_duty_cycle_ofdm; /* maximum allowed duty cycle for OFDM */ - uint16 tx_duty_cycle_cck; /* maximum allowed duty cycle for CCK */ + u16 tx_duty_cycle_ofdm; /* maximum allowed duty cycle for OFDM */ + u16 tx_duty_cycle_cck; /* maximum allowed duty cycle for CCK */ - uint16 next_bsscfg_ID; + u16 next_bsscfg_ID; wlc_if_t *wlcif_list; /* linked list of wlc_if structs */ wlc_txq_info_t *active_queue; /* txq for the currently active transmit context */ @@ -894,8 +894,8 @@ extern void wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset, const struct ether_addr *addr); extern void wlc_read_tsf(wlc_info_t *wlc, uint32 *tsf_l_ptr, uint32 *tsf_h_ptr); -extern void wlc_set_cwmin(wlc_info_t *wlc, uint16 newmin); -extern void wlc_set_cwmax(wlc_info_t *wlc, uint16 newmax); +extern void wlc_set_cwmin(wlc_info_t *wlc, u16 newmin); +extern void wlc_set_cwmax(wlc_info_t *wlc, u16 newmax); extern void wlc_fifoerrors(wlc_info_t *wlc); extern void wlc_pllreq(wlc_info_t *wlc, bool set, mbool req_bit); extern void wlc_reset_bmac_done(wlc_info_t *wlc); @@ -940,11 +940,11 @@ extern bool wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *qi, extern void wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi); extern int wlc_prep_pdu(wlc_info_t *wlc, void *pdu, uint *fifo); -extern uint16 wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, +extern u16 wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len); extern ratespec_t wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, - bool use_rspec, uint16 mimo_ctlchbw); -extern uint16 wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, + bool use_rspec, u16 mimo_ctlchbw); +extern u16 wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, ratespec_t rts_rate, ratespec_t frame_rate, u8 rts_preamble_type, u8 frame_preamble_type, uint frame_len, @@ -964,9 +964,9 @@ extern void wlc_uint64_sub(uint32 *a_high, uint32 *a_low, uint32 b_high, extern uint32 wlc_calc_tbtt_offset(uint32 bi, uint32 tsf_h, uint32 tsf_l); /* Shared memory access */ -extern void wlc_write_shm(wlc_info_t *wlc, uint offset, uint16 v); -extern uint16 wlc_read_shm(wlc_info_t *wlc, uint offset); -extern void wlc_set_shm(wlc_info_t *wlc, uint offset, uint16 v, int len); +extern void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v); +extern u16 wlc_read_shm(wlc_info_t *wlc, uint offset); +extern void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len); extern void wlc_copyto_shm(wlc_info_t *wlc, uint offset, const void *buf, int len); extern void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len); @@ -984,7 +984,7 @@ extern void wlc_radio_mpc_upd(wlc_info_t *wlc); extern bool wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec); extern bool wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec, bool head); -extern uint16 wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec); +extern u16 wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec); extern void wlc_compute_plcp(wlc_info_t *wlc, ratespec_t rate, uint length, u8 *plcp); extern uint wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec, @@ -1021,7 +1021,7 @@ extern void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, ratespec_t bcn_rate); extern void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len); extern ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs); -extern uint16 wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, +extern u16 wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, bool phydelay); extern void wlc_radio_disable(wlc_info_t *wlc); extern void wlc_bcn_li_upd(wlc_info_t *wlc); diff --git a/drivers/staging/brcm80211/sys/wlc_phy_shim.c b/drivers/staging/brcm80211/sys/wlc_phy_shim.c index 1e9db2e..d7bc4c8 100644 --- a/drivers/staging/brcm80211/sys/wlc_phy_shim.c +++ b/drivers/staging/brcm80211/sys/wlc_phy_shim.c @@ -127,19 +127,19 @@ void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, uint32 macintmask) wl_intrsrestore(physhim->wl, macintmask); } -void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, uint16 v) +void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, u16 v) { wlc_bmac_write_shm(physhim->wlc_hw, offset, v); } -uint16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset) +u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset) { return wlc_bmac_read_shm(physhim->wlc_hw, offset); } void -wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, uint16 mask, - uint16 val, int bands) +wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, u16 mask, + u16 val, int bands) { wlc_bmac_mhf(physhim->wlc_hw, idx, mask, val, bands); } @@ -174,12 +174,12 @@ void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim) wlc_bmac_phy_reset(physhim->wlc_hw); } -void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, uint16 bw) +void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw) { wlc_bmac_bw_set(physhim->wlc_hw, bw); } -uint16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim) +u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim) { return wlc_bmac_get_txant(physhim->wlc_hw); } @@ -222,7 +222,7 @@ wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int offset, wlc_bmac_write_template_ram(physhim->wlc_hw, offset, len, buf); } -uint16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate) +u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate) { return wlc_bmac_rate_shm_offset(physhim->wlc_hw, rate); } diff --git a/drivers/staging/brcm80211/sys/wlc_phy_shim.h b/drivers/staging/brcm80211/sys/wlc_phy_shim.h index a6e6492..e573fbf 100644 --- a/drivers/staging/brcm80211/sys/wlc_phy_shim.h +++ b/drivers/staging/brcm80211/sys/wlc_phy_shim.h @@ -76,10 +76,10 @@ extern void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, uint32 macintmask); extern void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, - uint16 v); -extern uint16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset); + u16 v); +extern u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset); extern void wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, - uint16 mask, uint16 val, int bands); + u16 mask, u16 val, int bands); extern void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, uint32 flags); extern void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim); extern void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode); @@ -87,7 +87,7 @@ extern void wlapi_enable_mac(wlc_phy_shim_info_t *physhim); extern void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, uint32 mask, uint32 val); extern void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim); -extern void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, uint16 bw); +extern void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw); extern void wlapi_bmac_phyclk_fgc(wlc_phy_shim_info_t *physhim, bool clk); extern void wlapi_bmac_macphyclk_set(wlc_phy_shim_info_t *physhim, bool clk); extern void wlapi_bmac_core_phypll_ctl(wlc_phy_shim_info_t *physhim, bool on); @@ -98,7 +98,7 @@ extern void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t * physhim); extern void wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int o, int len, void *buf); -extern uint16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, +extern u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate); extern void wlapi_ucode_sample_init(wlc_phy_shim_info_t *physhim); extern void wlapi_copyfrom_objmem(wlc_phy_shim_info_t *physhim, uint, @@ -111,5 +111,5 @@ extern void wlapi_high_update_phy_mode(wlc_phy_shim_info_t *physhim, extern void wlapi_bmac_pktengtx(wlc_phy_shim_info_t *physhim, wl_pkteng_t *pkteng, u8 rate, struct ether_addr *sa, uint32 wait_delay); -extern uint16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim); +extern u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim); #endif /* _wlc_phy_shim_h_ */ diff --git a/drivers/staging/brcm80211/sys/wlc_pub.h b/drivers/staging/brcm80211/sys/wlc_pub.h index 46a55f1..6c7f1d4 100644 --- a/drivers/staging/brcm80211/sys/wlc_pub.h +++ b/drivers/staging/brcm80211/sys/wlc_pub.h @@ -166,25 +166,25 @@ typedef struct wlc_event { /* wlc internal bss_info, wl external one is in wlioctl.h */ typedef struct wlc_bss_info { struct ether_addr BSSID; /* network BSSID */ - uint16 flags; /* flags for internal attributes */ + u16 flags; /* flags for internal attributes */ u8 SSID_len; /* the length of SSID */ u8 SSID[32]; /* SSID string */ int16 RSSI; /* receive signal strength (in dBm) */ int16 SNR; /* receive signal SNR in dB */ - uint16 beacon_period; /* units are Kusec */ - uint16 atim_window; /* units are Kusec */ + u16 beacon_period; /* units are Kusec */ + u16 atim_window; /* units are Kusec */ chanspec_t chanspec; /* Channel num, bw, ctrl_sb and band */ s8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */ wlc_rateset_t rateset; /* supported rates */ u8 dtim_period; /* DTIM period */ s8 phy_noise; /* noise right after tx (in dBm) */ - uint16 capability; /* Capability information */ + u16 capability; /* Capability information */ struct dot11_bcn_prb *bcn_prb; /* beacon/probe response frame (ioctl na) */ - uint16 bcn_prb_len; /* beacon/probe response frame length (ioctl na) */ + u16 bcn_prb_len; /* beacon/probe response frame length (ioctl na) */ u8 wme_qosinfo; /* QoS Info from WME IE; valid if WLC_BSS_WME flag set */ struct rsn_parms wpa; struct rsn_parms wpa2; - uint16 qbss_load_aac; /* qbss load available admission capacity */ + u16 qbss_load_aac; /* qbss load available admission capacity */ /* qbss_load_chan_free <- (0xff - channel_utilization of qbss_load_ie_t) */ u8 qbss_load_chan_free; /* indicates how free the channel is */ u8 mcipher; /* multicast cipher */ @@ -299,7 +299,7 @@ typedef struct wlc_pub { uint32 wlfeatureflag; /* Flags to control sw features from registry */ int psq_pkts_total; /* total num of ps pkts */ - uint16 txmaxpkts; /* max number of large pkts allowed to be pending */ + u16 txmaxpkts; /* max number of large pkts allowed to be pending */ /* s/w decryption counters */ uint32 swdecrypt; /* s/w decrypt attempts */ @@ -308,7 +308,7 @@ typedef struct wlc_pub { mbool radio_disabled; /* bit vector for radio disabled reasons */ bool radio_active; /* radio on/off state */ - uint16 roam_time_thresh; /* Max. # secs. of not hearing beacons + u16 roam_time_thresh; /* Max. # secs. of not hearing beacons * before roaming. */ bool align_wd_tbtt; /* Align watchdog with tbtt indication @@ -322,7 +322,7 @@ typedef struct wlc_pub { uint sdiod_drive_strength; /* SDIO drive strength */ #endif /* BCMSDIO */ - uint16 boardrev; /* version # of particular board */ + u16 boardrev; /* version # of particular board */ u8 sromrev; /* version # of the srom */ char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */ uint32 boardflags; /* Board specific flags from srom */ @@ -496,7 +496,7 @@ extern const u8 wme_fifo2ac[]; #define WLCNTVAL(a) 0 /* No stats support */ /* common functions for every port */ -extern void *wlc_attach(void *wl, uint16 vendor, uint16 device, uint unit, +extern void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, osl_t *osh, void *regsva, uint bustype, void *btparam, uint *perr); extern uint wlc_detach(struct wlc_info *wlc); @@ -507,7 +507,7 @@ extern int wlc_set(struct wlc_info *wlc, int cmd, int arg); extern int wlc_get(struct wlc_info *wlc, int cmd, int *arg); extern int wlc_iovar_getint(struct wlc_info *wlc, const char *name, int *arg); extern int wlc_iovar_setint(struct wlc_info *wlc, const char *name, int arg); -extern bool wlc_chipmatch(uint16 vendor, uint16 device); +extern bool wlc_chipmatch(u16 vendor, u16 device); extern void wlc_init(struct wlc_info *wlc); extern void wlc_reset(struct wlc_info *wlc); @@ -539,9 +539,9 @@ extern int wlc_bmac_down_finish(struct wlc_hw_info *wlc_hw); extern uint32 wlc_reg_read(struct wlc_info *wlc, void *r, uint size); extern void wlc_reg_write(struct wlc_info *wlc, void *r, uint32 v, uint size); extern void wlc_corereset(struct wlc_info *wlc, uint32 flags); -extern void wlc_mhf(struct wlc_info *wlc, u8 idx, uint16 mask, uint16 val, +extern void wlc_mhf(struct wlc_info *wlc, u8 idx, u16 mask, u16 val, int bands); -extern uint16 wlc_mhf_get(struct wlc_info *wlc, u8 idx, int bands); +extern u16 wlc_mhf_get(struct wlc_info *wlc, u8 idx, int bands); extern uint32 wlc_delta_txfunfl(struct wlc_info *wlc, int fifo); extern void wlc_rate_lookup_init(struct wlc_info *wlc, wlc_rateset_t *rateset); extern void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs); @@ -565,7 +565,7 @@ extern void wlc_event_if(struct wlc_info *wlc, struct wlc_bsscfg *cfg, wlc_event_t *e, const struct ether_addr *addr); extern void wlc_suspend_mac_and_wait(struct wlc_info *wlc); extern void wlc_enable_mac(struct wlc_info *wlc); -extern uint16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate); +extern u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate); extern uint32 wlc_get_rspec_history(struct wlc_bsscfg *cfg); extern uint32 wlc_get_current_highest_rate(struct wlc_bsscfg *cfg); diff --git a/drivers/staging/brcm80211/sys/wlc_rpctx.h b/drivers/staging/brcm80211/sys/wlc_rpctx.h index 5c177a1..ed29896 100644 --- a/drivers/staging/brcm80211/sys/wlc_rpctx.h +++ b/drivers/staging/brcm80211/sys/wlc_rpctx.h @@ -44,7 +44,7 @@ extern void wlc_rpctx_txreclaim(rpctx_info_t *rpctx); extern uint wlc_rpctx_txavail(rpctx_info_t *rpctx, uint fifo); extern int wlc_rpctx_pkteng(rpctx_info_t *rpctx, uint fifo, void *p); extern int wlc_rpctx_tx(rpctx_info_t *rpctx, uint fifo, void *p, bool commit, - uint16 frameid, u8 txpktpend); + u16 frameid, u8 txpktpend); extern void wlc_rpctx_txpktpendinc(rpctx_info_t *rpctx, uint fifo, u8 val); extern void wlc_rpctx_txpktpenddec(rpctx_info_t *rpctx, uint fifo, u8 val); extern void wlc_rpctx_txpktpendclr(rpctx_info_t *rpctx, uint fifo); diff --git a/drivers/staging/brcm80211/sys/wlc_scb.h b/drivers/staging/brcm80211/sys/wlc_scb.h index 143b769..388fff4 100644 --- a/drivers/staging/brcm80211/sys/wlc_scb.h +++ b/drivers/staging/brcm80211/sys/wlc_scb.h @@ -38,7 +38,7 @@ typedef struct scb_ampdu { u8 mpdu_density; /* mpdu density */ u8 max_pdu; /* max pdus allowed in ampdu */ u8 release; /* # of mpdus released at a time */ - uint16 min_len; /* min mpdu len to support the density */ + u16 min_len; /* min mpdu len to support the density */ uint32 max_rxlen; /* max ampdu rcv length; 8k, 16k, 32k, 64k */ struct pktq txq; /* sdu transmit queue pending aggregation */ @@ -62,11 +62,11 @@ struct scb { void *fragbuf[NUMPRIO]; /* defragmentation buffer per prio */ uint fragresid[NUMPRIO]; /* #bytes unused in frag buffer per prio */ - uint16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */ - uint16 seqctl_nonqos; /* seqctl of last received frame (for dups) for + u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */ + u16 seqctl_nonqos; /* seqctl of last received frame (for dups) for * non-QoS data and management */ - uint16 seqnum[NUMPRIO]; /* WME: driver maintained sw seqnum per priority */ + u16 seqnum[NUMPRIO]; /* WME: driver maintained sw seqnum per priority */ scb_ampdu_t scb_ampdu; /* AMPDU state including per tid info */ }; diff --git a/drivers/staging/brcm80211/sys/wlc_stf.c b/drivers/staging/brcm80211/sys/wlc_stf.c index 3bb5037..10db2af 100644 --- a/drivers/staging/brcm80211/sys/wlc_stf.c +++ b/drivers/staging/brcm80211/sys/wlc_stf.c @@ -49,7 +49,7 @@ static int wlc_stf_spatial_policy_set(wlc_info_t *wlc, int val); static void wlc_stf_stbc_rx_ht_update(wlc_info_t *wlc, int val); static void _wlc_stf_phy_txant_upd(wlc_info_t *wlc); -static uint16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); +static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); #define NSTS_1 1 #define NSTS_2 2 @@ -108,7 +108,7 @@ void wlc_tempsense_upd(wlc_info_t *wlc) } void -wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, uint16 *ss_algo_channel, +wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, u16 *ss_algo_channel, chanspec_t chanspec) { tx_power_t power; @@ -118,7 +118,7 @@ wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, uint16 *ss_algo_channel, *ss_algo_channel = 0; if (!wlc->pub->up) { - *ss_algo_channel = (uint16) -1; + *ss_algo_channel = (u16) -1; return; } @@ -380,7 +380,7 @@ int wlc_stf_ss_update(wlc_info_t *wlc, wlcband_t *band) /* NOTE: opmode can only be SISO or CDD as STBC is decided on a per-packet basis */ if (WLC_STBC_CAP_PHY(wlc) && wlc->stf->ss_algosel_auto - && (wlc->stf->ss_algo_channel != (uint16) -1)) { + && (wlc->stf->ss_algo_channel != (u16) -1)) { ASSERT(isset(&wlc->stf->ss_algo_channel, PHY_TXC1_MODE_CDD) || isset(&wlc->stf->ss_algo_channel, PHY_TXC1_MODE_SISO)); @@ -422,7 +422,7 @@ int BCMATTACHFN(wlc_stf_attach) (wlc_info_t *wlc) if (WLC_STBC_CAP_PHY(wlc)) { wlc->stf->ss_algosel_auto = TRUE; - wlc->stf->ss_algo_channel = (uint16) -1; /* Init the default value */ + wlc->stf->ss_algo_channel = (u16) -1; /* Init the default value */ } return 0; } @@ -561,9 +561,9 @@ void BCMATTACHFN(wlc_stf_phy_chain_calc) (wlc_info_t *wlc) wlc_stf_spatial_policy_set(wlc, MIN_SPATIAL_EXPANSION); } -static uint16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) +static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) { - uint16 phytxant = wlc->stf->phytxant; + u16 phytxant = wlc->stf->phytxant; if (RSPEC_STF(rspec) != PHY_TXC1_MODE_SISO) { ASSERT(wlc->stf->txstreams > 1); @@ -574,15 +574,15 @@ static uint16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) return phytxant; } -uint16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) +u16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) { return _wlc_stf_phytxchain_sel(wlc, rspec); } -uint16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec) +u16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec) { - uint16 phytxant = wlc->stf->phytxant; - uint16 mask = PHY_TXC_ANT_MASK; + u16 phytxant = wlc->stf->phytxant; + u16 mask = PHY_TXC_ANT_MASK; /* for non-siso rates or default setting, use the available chains */ if (WLCISNPHY(wlc->band)) { diff --git a/drivers/staging/brcm80211/sys/wlc_stf.h b/drivers/staging/brcm80211/sys/wlc_stf.h index 8cb34a0..99bf5cd 100644 --- a/drivers/staging/brcm80211/sys/wlc_stf.h +++ b/drivers/staging/brcm80211/sys/wlc_stf.h @@ -25,7 +25,7 @@ extern void wlc_stf_detach(wlc_info_t *wlc); extern void wlc_tempsense_upd(wlc_info_t *wlc); extern void wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, - uint16 *ss_algo_channel, + u16 *ss_algo_channel, chanspec_t chanspec); extern int wlc_stf_ss_update(wlc_info_t *wlc, struct wlcband *band); extern void wlc_stf_phy_txant_upd(wlc_info_t *wlc); @@ -36,7 +36,7 @@ extern bool wlc_stf_stbc_rx_set(wlc_info_t *wlc, int32 int_val); extern int wlc_stf_ant_txant_validate(wlc_info_t *wlc, s8 val); extern void wlc_stf_phy_txant_upd(wlc_info_t *wlc); extern void wlc_stf_phy_chain_calc(wlc_info_t *wlc); -extern uint16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); -extern uint16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec); -extern uint16 wlc_stf_spatial_expansion_get(wlc_info_t *wlc, ratespec_t rspec); +extern u16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); +extern u16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec); +extern u16 wlc_stf_spatial_expansion_get(wlc_info_t *wlc, ratespec_t rspec); #endif /* _wlc_stf_h_ */ |