提交 7d4df48e 编写于 作者: G Greg Kroah-Hartman

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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 4128dd9a
......@@ -390,7 +390,7 @@ uint32 bcmsdh_reg_read(void *sdh, uint32 addr, uint size)
switch (size) {
case sizeof(u8):
return word & 0xff;
case sizeof(uint16):
case sizeof(u16):
return word & 0xffff;
case sizeof(uint32):
return word;
......
......@@ -81,7 +81,7 @@ static bcmsdh_driver_t drvinfo = { NULL, NULL };
/**
* Checks to see if vendor and device IDs match a supported SDIO Host Controller.
*/
bool bcmsdh_chipmatch(uint16 vendor, uint16 device)
bool bcmsdh_chipmatch(u16 vendor, u16 device)
{
/* Add other vendors and devices as required */
......
......@@ -479,7 +479,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
case IOV_SVAL(IOV_BLOCKSIZE):
{
uint func = ((uint32) int_val >> 16);
uint blksize = (uint16) int_val;
uint blksize = (u16) int_val;
uint maxsize;
if (func > si->num_funcs) {
......
......@@ -307,9 +307,9 @@ void pktq_init(struct pktq *pq, int num_prec, int max_len)
bzero(pq,
OFFSETOF(struct pktq, q) + (sizeof(struct pktq_prec) * num_prec));
pq->num_prec = (uint16) num_prec;
pq->num_prec = (u16) num_prec;
pq->max = (uint16) max_len;
pq->max = (u16) max_len;
for (prec = 0; prec < num_prec; prec++)
pq->q[prec].max = pq->max;
......@@ -883,12 +883,12 @@ uint pktsetprio(void *pkt, bool update_vtag)
int rc = 0;
pktdata = (u8 *) PKTDATA(pkt);
ASSERT(ISALIGNED((uintptr) pktdata, sizeof(uint16)));
ASSERT(ISALIGNED((uintptr) pktdata, sizeof(u16)));
eh = (struct ether_header *)pktdata;
if (ntoh16(eh->ether_type) == ETHER_TYPE_8021Q) {
uint16 vlan_tag;
u16 vlan_tag;
int vlan_prio, dscp_prio = 0;
evh = (struct ethervlan_header *)eh;
......@@ -920,7 +920,7 @@ uint pktsetprio(void *pkt, bool update_vtag)
*/
if (update_vtag && (priority != vlan_prio)) {
vlan_tag &= ~(VLAN_PRI_MASK << VLAN_PRI_SHIFT);
vlan_tag |= (uint16) priority << VLAN_PRI_SHIFT;
vlan_tag |= (u16) priority << VLAN_PRI_SHIFT;
evh->vlan_tag = hton16(vlan_tag);
rc |= PKTPRIO_UPD;
}
......@@ -1124,7 +1124,7 @@ u8 hndcrc8(u8 *pdata, /* pointer to array of data to process */
* ****************************************************************************
*/
static const uint16 crc16_table[256] = {
static const u16 crc16_table[256] = {
0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF,
0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7,
0x1081, 0x0108, 0x3393, 0x221A, 0x56A5, 0x472C, 0x75B7, 0x643E,
......@@ -1159,9 +1159,9 @@ static const uint16 crc16_table[256] = {
0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78
};
uint16 hndcrc16(u8 *pdata, /* pointer to array of data to process */
u16 hndcrc16(u8 *pdata, /* pointer to array of data to process */
uint nbytes, /* number of input data bytes to process */
uint16 crc /* either CRC16_INIT_VALUE or previous
u16 crc /* either CRC16_INIT_VALUE or previous
return value */
)
{
......@@ -1586,7 +1586,7 @@ uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
/* Quarter dBm units to mW
* Table starts at QDBM_OFFSET, so the first entry is mW for qdBm=153
* Table is offset so the last entry is largest mW value that fits in
* a uint16.
* a u16.
*/
#define QDBM_OFFSET 153 /* Offset for first entry */
......@@ -1604,7 +1604,7 @@ uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
*/
#define QDBM_TABLE_HIGH_BOUND 64938 /* High bound */
static const uint16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = {
static const u16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = {
/* qdBm: +0 +1 +2 +3 +4 +5 +6 +7 */
/* 153: */ 6683, 7079, 7499, 7943, 8414, 8913, 9441, 10000,
/* 161: */ 10593, 11220, 11885, 12589, 13335, 14125, 14962, 15849,
......@@ -1613,13 +1613,13 @@ static const uint16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = {
/* 185: */ 42170, 44668, 47315, 50119, 53088, 56234, 59566, 63096
};
uint16 bcm_qdbm_to_mw(u8 qdbm)
u16 bcm_qdbm_to_mw(u8 qdbm)
{
uint factor = 1;
int idx = qdbm - QDBM_OFFSET;
if (idx >= QDBM_TABLE_LEN) {
/* clamp to max uint16 mW value */
/* clamp to max u16 mW value */
return 0xFFFF;
}
......@@ -1637,7 +1637,7 @@ uint16 bcm_qdbm_to_mw(u8 qdbm)
return (nqdBm_to_mW_map[idx] + factor / 2) / factor;
}
u8 bcm_mw_to_qdbm(uint16 mw)
u8 bcm_mw_to_qdbm(u16 mw)
{
u8 qdbm;
int offset;
......
......@@ -52,7 +52,7 @@ extern int dhd_preinit_ioctls(dhd_pub_t *dhd);
*/
typedef struct dhd_prot {
uint16 reqid;
u16 reqid;
u8 pending;
uint32 lastcmd;
u8 bus_header[BUS_HEADER_LEN];
......
......@@ -836,7 +836,7 @@ wl_host_event(struct dhd_info *dhd, int *ifidx, void *pktdata,
bcm_event_t *pvt_data = (bcm_event_t *) pktdata;
char *event_data;
uint32 type, status;
uint16 flags;
u16 flags;
int evlen;
if (bcmp(BRCM_OUI, &pvt_data->bcm_hdr.oui[0], DOT11_OUI_LEN)) {
......@@ -1674,7 +1674,7 @@ void dhd_iscan_ind_scan_confirm(void *dhdp, bool status)
dhd_ind_scan_confirm(dhdp, status);
}
int dhd_iscan_request(void *dhdp, uint16 action)
int dhd_iscan_request(void *dhdp, u16 action)
{
int rc;
wl_iscan_params_t params;
......
......@@ -1249,7 +1249,7 @@ void dhd_txcomplete(dhd_pub_t *dhdp, void *txp, bool success)
uint ifidx;
dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
struct ether_header *eh;
uint16 type;
u16 type;
dhd_prot_hdrpull(dhdp, &ifidx, txp);
......
......@@ -182,7 +182,7 @@ typedef struct dhd_bus {
bool dpc_sched; /* Indicates DPC schedule (intrpt rcvd) */
bool fcstate; /* State of dongle flow-control */
uint16 cl_devid; /* cached devid for dhdsdio_probe_attach() */
u16 cl_devid; /* cached devid for dhdsdio_probe_attach() */
char *fw_path; /* module_param: path to firmware image */
char *nv_path; /* module_param: path to nvram vars file */
const char *nvram_params; /* user specified nvram params. */
......@@ -197,7 +197,7 @@ typedef struct dhd_bus {
u8 hdrbuf[MAX_HDR_READ + DHD_SDALIGN];
u8 *rxhdr; /* Header of current rx frame (in hdrbuf) */
uint16 nextlen; /* Next Read Len from last header */
u16 nextlen; /* Next Read Len from last header */
u8 rx_seq; /* Receive sequence number (expected) */
bool rxskip; /* Skip receive (awaiting NAK ACK) */
......@@ -271,7 +271,7 @@ typedef struct dhd_bus {
uint pktgen_sent; /* Number of test packets generated */
uint pktgen_rcvd; /* Number of test packets received */
uint pktgen_fail; /* Number of failed send attempts */
uint16 pktgen_len; /* Length of next packet to send */
u16 pktgen_len; /* Length of next packet to send */
#endif /* SDTEST */
/* Some additional counters */
......@@ -432,9 +432,9 @@ static int dhdsdio_download_state(dhd_bus_t *bus, bool enter);
static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh);
static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh);
static void dhdsdio_disconnect(void *ptr);
static bool dhdsdio_chipmatch(uint16 chipid);
static bool dhdsdio_chipmatch(u16 chipid);
static bool dhdsdio_probe_attach(dhd_bus_t *bus, osl_t *osh, void *sdh,
void *regsva, uint16 devid);
void *regsva, u16 devid);
static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh);
static bool dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh);
static void dhdsdio_release_dongle(dhd_bus_t *bus, osl_t * osh);
......@@ -904,7 +904,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt)
int ret;
osl_t *osh;
u8 *frame;
uint16 len, pad = 0;
u16 len, pad = 0;
uint32 swheader;
uint retries = 0;
bcmsdh_info_t *sdh;
......@@ -960,9 +960,9 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt)
ASSERT(pad < DHD_SDALIGN);
/* Hardware tag: 2 byte len followed by 2 byte ~len check (all LE) */
len = (uint16) PKTLEN(pkt);
*(uint16 *) frame = htol16(len);
*(((uint16 *) frame) + 1) = htol16(~len);
len = (u16) PKTLEN(pkt);
*(u16 *) frame = htol16(len);
*(((u16 *) frame) + 1) = htol16(~len);
/* Software tag: channel, sequence number, data offset */
swheader =
......@@ -985,7 +985,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt)
/* Raise len to next SDIO block to eliminate tail command */
if (bus->roundup && bus->blocksize && (len > bus->blocksize)) {
uint16 pad = bus->blocksize - (len % bus->blocksize);
u16 pad = bus->blocksize - (len % bus->blocksize);
if ((pad <= bus->roundup) && (pad < bus->blocksize))
#ifdef NOTUSED
if (pad <= PKTTAILROOM(pkt))
......@@ -1222,7 +1222,7 @@ static uint dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes)
int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
{
u8 *frame;
uint16 len;
u16 len;
uint32 swheader;
uint retries = 0;
bcmsdh_info_t *sdh = bus->sdh;
......@@ -1254,7 +1254,7 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
/* Round send length to next SDIO block */
if (bus->roundup && bus->blocksize && (len > bus->blocksize)) {
uint16 pad = bus->blocksize - (len % bus->blocksize);
u16 pad = bus->blocksize - (len % bus->blocksize);
if ((pad <= bus->roundup) && (pad < bus->blocksize))
len += pad;
} else if (len % DHD_SDALIGN) {
......@@ -1276,8 +1276,8 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
/* Hardware tag: 2 byte len followed by 2 byte ~len check (all LE) */
*(uint16 *) frame = htol16((uint16) msglen);
*(((uint16 *) frame) + 1) = htol16(~msglen);
*(u16 *) frame = htol16((u16) msglen);
*(((u16 *) frame) + 1) = htol16(~msglen);
/* Software tag: channel, sequence number, data offset */
swheader =
......@@ -3009,7 +3009,7 @@ static void dhdsdio_rxfail(dhd_bus_t *bus, bool abort, bool rtx)
bcmsdh_info_t *sdh = bus->sdh;
sdpcmd_regs_t *regs = bus->regs;
uint retries = 0;
uint16 lastrbc;
u16 lastrbc;
u8 hi, lo;
int err;
......@@ -3173,10 +3173,10 @@ dhdsdio_read_control(dhd_bus_t *bus, u8 *hdr, uint len, uint doff)
static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
{
uint16 dlen, totlen;
u16 dlen, totlen;
u8 *dptr, num = 0;
uint16 sublen, check;
u16 sublen, check;
void *pfirst, *plast, *pnext, *save_pfirst;
osl_t *osh = bus->dhd->osh;
......@@ -3198,7 +3198,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
dhd_os_sdlock_rxq(bus->dhd);
pfirst = plast = pnext = NULL;
dlen = (uint16) PKTLEN(bus->glomd);
dlen = (u16) PKTLEN(bus->glomd);
dptr = PKTDATA(bus->glomd);
if (!dlen || (dlen & 1)) {
DHD_ERROR(("%s: bad glomd len(%d), ignore descriptor\n",
......@@ -3209,8 +3209,8 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
for (totlen = num = 0; dlen; num++) {
/* Get (and move past) next length */
sublen = ltoh16_ua(dptr);
dlen -= sizeof(uint16);
dptr += sizeof(uint16);
dlen -= sizeof(u16);
dptr += sizeof(u16);
if ((sublen < SDPCM_HDRLEN) ||
((num == 0) && (sublen < (2 * SDPCM_HDRLEN)))) {
DHD_ERROR(("%s: descriptor len %d bad: %d\n",
......@@ -3297,7 +3297,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
}
pfirst = bus->glom;
dlen = (uint16) pkttotlen(osh, pfirst);
dlen = (u16) pkttotlen(osh, pfirst);
/* Do an SDIO read for the superframe. Configurable iovar to
* read directly into the chained packet, or allocate a large
......@@ -3317,7 +3317,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
F2SYNC, bus->dataptr,
dlen, NULL, NULL, NULL);
sublen =
(uint16) pktfrombuf(osh, pfirst, 0, dlen,
(u16) pktfrombuf(osh, pfirst, 0, dlen,
bus->dataptr);
if (sublen != dlen) {
DHD_ERROR(("%s: FAILED TO COPY, dlen %d sublen %d\n",
......@@ -3362,7 +3362,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
/* Validate the superframe header */
dptr = (u8 *) PKTDATA(pfirst);
sublen = ltoh16_ua(dptr);
check = ltoh16_ua(dptr + sizeof(uint16));
check = ltoh16_ua(dptr + sizeof(u16));
chan = SDPCM_PACKET_CHANNEL(&dptr[SDPCM_FRAMETAG_LEN]);
seq = SDPCM_PACKET_SEQUENCE(&dptr[SDPCM_FRAMETAG_LEN]);
......@@ -3376,7 +3376,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
txmax = SDPCM_WINDOW_VALUE(&dptr[SDPCM_FRAMETAG_LEN]);
errcode = 0;
if ((uint16)~(sublen ^ check)) {
if ((u16)~(sublen ^ check)) {
DHD_ERROR(("%s (superframe): HW hdr error: len/check "
"0x%04x/0x%04x\n", __func__, sublen, check));
errcode = -1;
......@@ -3430,9 +3430,9 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
for (num = 0, pnext = pfirst; pnext && !errcode;
num++, pnext = PKTNEXT(pnext)) {
dptr = (u8 *) PKTDATA(pnext);
dlen = (uint16) PKTLEN(pnext);
dlen = (u16) PKTLEN(pnext);
sublen = ltoh16_ua(dptr);
check = ltoh16_ua(dptr + sizeof(uint16));
check = ltoh16_ua(dptr + sizeof(u16));
chan = SDPCM_PACKET_CHANNEL(&dptr[SDPCM_FRAMETAG_LEN]);
doff = SDPCM_DOFFSET_VALUE(&dptr[SDPCM_FRAMETAG_LEN]);
#ifdef DHD_DEBUG
......@@ -3440,7 +3440,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
prhex("subframe", dptr, 32);
#endif
if ((uint16)~(sublen ^ check)) {
if ((u16)~(sublen ^ check)) {
DHD_ERROR(("%s (subframe %d): HW hdr error: "
"len/check 0x%04x/0x%04x\n",
__func__, num, sublen, check));
......@@ -3582,14 +3582,14 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
osl_t *osh = bus->dhd->osh;
bcmsdh_info_t *sdh = bus->sdh;
uint16 len, check; /* Extracted hardware header fields */
u16 len, check; /* Extracted hardware header fields */
u8 chan, seq, doff; /* Extracted software header fields */
u8 fcbits; /* Extracted fcbits from software header */
u8 delta;
void *pkt; /* Packet for event or data frames */
uint16 pad; /* Number of pad bytes to read */
uint16 rdlen; /* Total number of bytes to read */
u16 pad; /* Number of pad bytes to read */
u16 rdlen; /* Total number of bytes to read */
u8 rxseq; /* Next sequence number to expect */
uint rxleft = 0; /* Remaining number of frames allowed */
int sdret; /* Return code from bcmsdh calls */
......@@ -3637,7 +3637,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
/* Try doing single read if we can */
if (dhd_readahead && bus->nextlen) {
uint16 nextlen = bus->nextlen;
u16 nextlen = bus->nextlen;
bus->nextlen = 0;
if (bus->bus == SPI_BUS) {
......@@ -3768,7 +3768,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
/* Extract hardware header fields */
len = ltoh16_ua(bus->rxhdr);
check = ltoh16_ua(bus->rxhdr + sizeof(uint16));
check = ltoh16_ua(bus->rxhdr + sizeof(u16));
/* All zeros means readahead info was bad */
if (!(len | check)) {
......@@ -3782,7 +3782,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
}
/* Validate check bytes */
if ((uint16)~(len ^ check)) {
if ((u16)~(len ^ check)) {
DHD_ERROR(("%s (nextlen): HW hdr error: nextlen/len/check" " 0x%04x/0x%04x/0x%04x\n",
__func__, nextlen, len, check));
dhd_os_sdlock_rxq(bus->dhd);
......@@ -3960,7 +3960,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
/* Extract hardware header fields */
len = ltoh16_ua(bus->rxhdr);
check = ltoh16_ua(bus->rxhdr + sizeof(uint16));
check = ltoh16_ua(bus->rxhdr + sizeof(u16));
/* All zeros means no more frames */
if (!(len | check)) {
......@@ -3969,7 +3969,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
}
/* Validate check bytes */
if ((uint16) ~(len ^ check)) {
if ((u16) ~(len ^ check)) {
DHD_ERROR(("%s: HW hdr err: len/check 0x%04x/0x%04x\n",
__func__, len, check));
bus->rx_badhdr++;
......@@ -4611,7 +4611,7 @@ static void dhdsdio_pktgen_init(dhd_bus_t *bus)
bus->pktgen_maxlen = MAX_PKTGEN_LEN;
bus->pktgen_minlen = 0;
}
bus->pktgen_len = (uint16) bus->pktgen_minlen;
bus->pktgen_len = (u16) bus->pktgen_minlen;
/* Default to per-watchdog burst with 10s print time */
bus->pktgen_freq = 1;
......@@ -4630,7 +4630,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
uint pktcount;
uint fillbyte;
osl_t *osh = bus->dhd->osh;
uint16 len;
u16 len;
/* Display current count if appropriate */
if (bus->pktgen_print && (++bus->pktgen_ptick >= bus->pktgen_print)) {
......@@ -4722,7 +4722,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
/* Bump length if not fixed, wrap at max */
if (++bus->pktgen_len > bus->pktgen_maxlen)
bus->pktgen_len = (uint16) bus->pktgen_minlen;
bus->pktgen_len = (u16) bus->pktgen_minlen;
/* Special case for burst mode: just send one request! */
if (bus->pktgen_mode == DHD_PKTGEN_RXBURST)
......@@ -4765,8 +4765,8 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, void *pkt, uint seq)
u8 cmd;
u8 extra;
uint16 len;
uint16 offset;
u16 len;
u16 offset;
/* Check for min length */
pktlen = PKTLEN(pkt);
......@@ -5047,7 +5047,7 @@ static void dhd_dump_cis(uint fn, u8 *cis)
}
#endif /* DHD_DEBUG */
static bool dhdsdio_chipmatch(uint16 chipid)
static bool dhdsdio_chipmatch(u16 chipid)
{
if (chipid == BCM4325_CHIP_ID)
return TRUE;
......@@ -5058,8 +5058,8 @@ static bool dhdsdio_chipmatch(uint16 chipid)
return FALSE;
}
static void *dhdsdio_probe(uint16 venid, uint16 devid, uint16 bus_no,
uint16 slot, uint16 func, uint bustype, void *regsva,
static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
u16 slot, u16 func, uint bustype, void *regsva,
osl_t *osh, void *sdh)
{
int ret;
......@@ -5154,7 +5154,7 @@ static void *dhdsdio_probe(uint16 venid, uint16 devid, uint16 bus_no,
}
bzero(bus, sizeof(dhd_bus_t));
bus->sdh = sdh;
bus->cl_devid = (uint16) devid;
bus->cl_devid = (u16) devid;
bus->bus = DHD_BUS;
bus->tx_seq = SDPCM_SEQUENCE_WRAP - 1;
bus->usebufpool = FALSE; /* Use bufpool if allocated,
......@@ -5221,7 +5221,7 @@ static void *dhdsdio_probe(uint16 venid, uint16 devid, uint16 bus_no,
static bool
dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
uint16 devid)
u16 devid)
{
u8 clkctl = 0;
int err = 0;
......@@ -5315,7 +5315,7 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
bcmsdh_chipinfo(sdh, bus->sih->chip, bus->sih->chiprev);
if (!dhdsdio_chipmatch((uint16) bus->sih->chip)) {
if (!dhdsdio_chipmatch((u16) bus->sih->chip)) {
DHD_ERROR(("%s: unsupported chip: 0x%04x\n",
__func__, bus->sih->chip));
goto fail;
......
......@@ -86,7 +86,7 @@ static int32 wl_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme);
static int32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
uint16 reason_code);
u16 reason_code);
static int32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
enum nl80211_tx_power_setting type,
int32 dbm);
......@@ -203,8 +203,8 @@ static int32 wl_get_assoc_ies(struct wl_priv *wl);
*/
static void wl_rst_ie(struct wl_priv *wl);
static int32 wl_add_ie(struct wl_priv *wl, u8 t, u8 l, u8 *v);
static int32 wl_mrg_ie(struct wl_priv *wl, u8 *ie_stream, uint16 ie_size);
static int32 wl_cp_ie(struct wl_priv *wl, u8 *dst, uint16 dst_size);
static int32 wl_mrg_ie(struct wl_priv *wl, u8 *ie_stream, u16 ie_size);
static int32 wl_cp_ie(struct wl_priv *wl, u8 *dst, u16 dst_size);
static uint32 wl_get_ielen(struct wl_priv *wl);
static int32 wl_mode_to_nl80211_iftype(int32 mode);
......@@ -298,7 +298,7 @@ static int32 wl_dev_iovar_getbuf(struct net_device *dev, s8 *iovar,
void *param, int32 paramlen, void *bufptr,
int32 buflen);
static int32 wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid,
uint16 action);
u16 action);
static int32 wl_do_iscan(struct wl_priv *wl);
static int32 wl_wakeup_iscan(struct wl_iscan_ctrl *iscan);
static int32 wl_invoke_iscan(struct wl_priv *wl);
......@@ -319,7 +319,7 @@ static void wl_init_fw(struct wl_fw_ctrl *fw);
/*
* find most significant bit set
*/
static __used uint32 wl_find_msb(uint16 bit16);
static __used uint32 wl_find_msb(u16 bit16);
/*
* update pmklist to dongle
......@@ -686,7 +686,7 @@ wl_dev_iovar_getbuf(struct net_device *dev, s8 * iovar, void *param,
}
static int32
wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, uint16 action)
wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action)
{
int32 params_size =
(WL_SCAN_PARAMS_FIXED_SIZE + OFFSETOF(wl_iscan_params_t, params));
......@@ -1380,7 +1380,7 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
static int32
wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
uint16 reason_code)
u16 reason_code)
{
struct wl_priv *wl = wiphy_to_wl(wiphy);
scb_val_t scbval;
......@@ -1412,7 +1412,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy,
struct wl_priv *wl = wiphy_to_wl(wiphy);
struct net_device *ndev = wl_to_ndev(wl);
uint16 txpwrmw;
u16 txpwrmw;
int32 err = 0;
int32 disable = 0;
......@@ -1445,7 +1445,7 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy,
if (dbm > 0xffff)
txpwrmw = 0xffff;
else
txpwrmw = (uint16) dbm;
txpwrmw = (u16) dbm;
err = wl_dev_intvar_set(ndev, "qtxpower",
(int32) (bcm_mw_to_qdbm(txpwrmw)));
if (unlikely(err)) {
......@@ -1867,7 +1867,7 @@ wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
return err;
}
static __used uint32 wl_find_msb(uint16 bit16)
static __used uint32 wl_find_msb(u16 bit16)
{
uint32 ret = 0;
......@@ -2317,7 +2317,7 @@ static int32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
static bool wl_is_linkup(struct wl_priv *wl, const wl_event_msg_t *e)
{
uint32 event = ntoh32(e->event_type);
uint16 flags = ntoh16(e->flags);
u16 flags = ntoh16(e->flags);
if (event == WLC_E_JOIN || event == WLC_E_ASSOC_IND
|| event == WLC_E_REASSOC_IND) {
......@@ -2339,7 +2339,7 @@ static bool wl_is_linkup(struct wl_priv *wl, const wl_event_msg_t *e)
static bool wl_is_linkdown(struct wl_priv *wl, const wl_event_msg_t *e)
{
uint32 event = ntoh32(e->event_type);
uint16 flags = ntoh16(e->flags);
u16 flags = ntoh16(e->flags);
if (event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
return TRUE;
......@@ -2602,7 +2602,7 @@ static int32
wl_notify_mic_status(struct wl_priv *wl, struct net_device *ndev,
const wl_event_msg_t *e, void *data)
{
uint16 flags = ntoh16(e->flags);
u16 flags = ntoh16(e->flags);
enum nl80211_key_type key_type;
rtnl_lock();
......@@ -3897,7 +3897,7 @@ static int32 wl_add_ie(struct wl_priv *wl, u8 t, u8 l, u8 *v)
return err;
}
static int32 wl_mrg_ie(struct wl_priv *wl, u8 *ie_stream, uint16 ie_size)
static int32 wl_mrg_ie(struct wl_priv *wl, u8 *ie_stream, u16 ie_size)
{
struct wl_ie *ie = wl_to_ie(wl);
int32 err = 0;
......@@ -3912,7 +3912,7 @@ static int32 wl_mrg_ie(struct wl_priv *wl, u8 *ie_stream, uint16 ie_size)
return err;
}
static int32 wl_cp_ie(struct wl_priv *wl, u8 *dst, uint16 dst_size)
static int32 wl_cp_ie(struct wl_priv *wl, u8 *dst, u16 dst_size)
{
struct wl_ie *ie = wl_to_ie(wl);
int32 err = 0;
......
......@@ -180,10 +180,10 @@ struct wl_dev {
/* bss inform structure for cfg80211 interface */
struct wl_cfg80211_bss_info {
uint16 band;
uint16 channel;
u16 band;
u16 channel;
int16 rssi;
uint16 frame_len;
u16 frame_len;
u8 frame_buf[1];
};
......@@ -194,7 +194,7 @@ struct wl_scan_req {
/* basic structure of information element */
struct wl_ie {
uint16 offset;
u16 offset;
u8 buf[WL_TLV_INFO_MAX];
};
......
......@@ -148,7 +148,7 @@ typedef struct iscan_info {
iscan_info_t *g_iscan;
static void wl_iw_timerfunc(unsigned long data);
static void wl_iw_set_event_mask(struct net_device *dev);
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action);
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, u16 action);
#endif /* defined(WL_IW_USE_ISCAN) */
static int
......@@ -503,7 +503,7 @@ wl_iw_get_range(struct net_device *dev,
int bw_cap = 0, sgi_tx = 0, nmode = 0;
channel_info_t ci;
u8 nrate_list2copy = 0;
uint16 nrate_list[4][8] = { {13, 26, 39, 52, 78, 104, 117, 130},
u16 nrate_list[4][8] = { {13, 26, 39, 52, 78, 104, 117, 130},
{14, 29, 43, 58, 87, 116, 130, 144},
{27, 54, 81, 108, 162, 216, 243, 270},
{30, 60, 90, 120, 180, 240, 270, 300}
......@@ -1048,7 +1048,7 @@ static int wl_iw_iscan_prep(wl_scan_params_t *params, wlc_ssid_t *ssid)
return err;
}
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, uint16 action)
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, u16 action)
{
int err = 0;
......@@ -2172,7 +2172,7 @@ wl_iw_set_txpow(struct net_device *dev,
struct iw_param *vwrq, char *extra)
{
int error, disable;
uint16 txpwrmw;
u16 txpwrmw;
WL_TRACE(("%s: SIOCSIWTXPOW\n", dev->name));
disable = vwrq->disabled ? WL_RADIO_SW_DISABLE : 0;
......@@ -2195,7 +2195,7 @@ wl_iw_set_txpow(struct net_device *dev,
if (vwrq->value > 0xffff)
txpwrmw = 0xffff;
else
txpwrmw = (uint16) vwrq->value;
txpwrmw = (u16) vwrq->value;
error =
dev_wlc_intvar_set(dev, "qtxpower", (int)(bcm_mw_to_qdbm(txpwrmw)));
......@@ -3402,7 +3402,7 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
char extra[IW_CUSTOM_MAX + 1];
int cmd = 0;
uint32 event_type = ntoh32(e->event_type);
uint16 flags = ntoh16(e->flags);
u16 flags = ntoh16(e->flags);
uint32 datalen = ntoh32(e->datalen);
uint32 status = ntoh32(e->status);
wl_iw_t *iw;
......@@ -3709,7 +3709,7 @@ int wl_iw_attach(struct net_device *dev, void *dhdp)
#ifdef CSCAN
params_size =
(WL_SCAN_PARAMS_FIXED_SIZE + OFFSETOF(wl_iscan_params_t, params)) +
(WL_NUMCHANNELS * sizeof(uint16)) +
(WL_NUMCHANNELS * sizeof(u16)) +
WL_SCAN_PARAMS_SSID_MAX * sizeof(wlc_ssid_t);
#else
params_size =
......
......@@ -74,7 +74,7 @@ extern int bcm_rpc_dump(rpc_info_t *rpci, struct bcmstrbuf *b);
#define RPC_TRACE_VAL 0x0002
#define RPC_PKTTRACE_VAL 0x0004
#define RPC_PKTLOG_VAL 0x0008
extern void bcm_rpc_msglevel_set(struct rpc_info *rpci, uint16 msglevel,
extern void bcm_rpc_msglevel_set(struct rpc_info *rpci, u16 msglevel,
bool high_low);
#endif /* _BCM_RPC_H_ */
......@@ -114,9 +114,9 @@ extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm,
extern void bcm_rpc_tp_agg_set(rpc_tp_info_t *rpcb, uint32 reason, bool set);
extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf,
uint16 bytes);
u16 bytes);
extern void bcm_rpc_tp_agg_limit_get(rpc_tp_info_t *rpc_th, u8 *sf,
uint16 *bytes);
u16 *bytes);
#define BCM_RPC_TP_MSG_LEVEL_MASK 0x00ff
/* dongle msg level */
......
......@@ -49,8 +49,8 @@ int bcm_xdr_unpack_string(bcm_xdr_buf_t *b, uint *plen, char **pstr);
int bcm_xdr_pack_u8_vec(bcm_xdr_buf_t *, u8 *vec, uint32 elems);
int bcm_xdr_unpack_u8_vec(bcm_xdr_buf_t *, u8 *vec, uint32 elems);
int bcm_xdr_pack_uint16_vec(bcm_xdr_buf_t *b, uint len, void *vec);
int bcm_xdr_unpack_uint16_vec(bcm_xdr_buf_t *b, uint len, void *vec);
int bcm_xdr_pack_u16_vec(bcm_xdr_buf_t *b, uint len, void *vec);
int bcm_xdr_unpack_u16_vec(bcm_xdr_buf_t *b, uint len, void *vec);
int bcm_xdr_pack_uint32_vec(bcm_xdr_buf_t *b, uint len, void *vec);
int bcm_xdr_unpack_uint32_vec(bcm_xdr_buf_t *b, uint len, void *vec);
......
......@@ -21,8 +21,8 @@
/* Reverse the bytes in a 16-bit value */
#define BCMSWAP16(val) \
((uint16)((((uint16)(val) & (uint16)0x00ffU) << 8) | \
(((uint16)(val) & (uint16)0xff00U) >> 8)))
((u16)((((u16)(val) & (u16)0x00ffU) << 8) | \
(((u16)(val) & (u16)0xff00U) >> 8)))
/* Reverse the bytes in a 32-bit value */
#define BCMSWAP32(val) \
......@@ -82,8 +82,8 @@
#define ltoh16_buf(buf, i)
#define htol16_buf(buf, i)
#else
#define ltoh16_buf(buf, i) bcmswap16_buf((uint16 *)(buf), (i))
#define htol16_buf(buf, i) bcmswap16_buf((uint16 *)(buf), (i))
#define ltoh16_buf(buf, i) bcmswap16_buf((u16 *)(buf), (i))
#define htol16_buf(buf, i) bcmswap16_buf((u16 *)(buf), (i))
#endif /* IL_BIGENDIAN */
/* Unaligned loads and stores in host byte order */
......@@ -106,13 +106,13 @@
#define ltoh_ua(ptr) \
(sizeof(*(ptr)) == sizeof(u8) ? *(const u8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _LTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(u16) ? _LTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _LTOH32_UA((const u8 *)(ptr)) : \
*(u8 *)0)
#define ntoh_ua(ptr) \
(sizeof(*(ptr)) == sizeof(u8) ? *(const u8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _NTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(u16) ? _NTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _NTOH32_UA((const u8 *)(ptr)) : \
*(u8 *)0)
......@@ -123,7 +123,7 @@
*/
#define bcmswap16(val) ({ \
uint16 _val = (val); \
u16 _val = (val); \
BCMSWAP16(_val); \
})
......@@ -138,7 +138,7 @@
})
#define bcmswap16_buf(buf, len) ({ \
uint16 *_buf = (uint16 *)(buf); \
u16 *_buf = (u16 *)(buf); \
uint _wds = (len) / 2; \
while (_wds--) { \
*_buf = bcmswap16(*_buf); \
......@@ -147,7 +147,7 @@
})
#define htol16_ua_store(val, bytes) ({ \
uint16 _val = (val); \
u16 _val = (val); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val & 0xff; \
_bytes[1] = _val >> 8; \
......@@ -163,7 +163,7 @@
})
#define hton16_ua_store(val, bytes) ({ \
uint16 _val = (val); \
u16 _val = (val); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val >> 8; \
_bytes[1] = _val & 0xff; \
......@@ -201,7 +201,7 @@
#else /* !__GNUC__ */
/* Inline versions avoid referencing the argument multiple times */
static inline uint16 bcmswap16(uint16 val)
static inline u16 bcmswap16(u16 val)
{
return BCMSWAP16(val);
}
......@@ -219,7 +219,7 @@ static inline uint32 bcmswap32by16(uint32 val)
/* Reverse pairs of bytes in a buffer (not for high-performance use) */
/* buf - start of buffer of shorts to swap */
/* len - byte length of buffer */
static inline void bcmswap16_buf(uint16 *buf, uint len)
static inline void bcmswap16_buf(u16 *buf, uint len)
{
len = len / 2;
......@@ -232,7 +232,7 @@ static inline void bcmswap16_buf(uint16 *buf, uint len)
/*
* Store 16-bit value to unaligned little-endian byte array.
*/
static inline void htol16_ua_store(uint16 val, u8 *bytes)
static inline void htol16_ua_store(u16 val, u8 *bytes)
{
bytes[0] = val & 0xff;
bytes[1] = val >> 8;
......@@ -252,7 +252,7 @@ static inline void htol32_ua_store(uint32 val, u8 *bytes)
/*
* Store 16-bit value to unaligned network-(big-)endian byte array.
*/
static inline void hton16_ua_store(uint16 val, u8 *bytes)
static inline void hton16_ua_store(u16 val, u8 *bytes)
{
bytes[0] = val >> 8;
bytes[1] = val & 0xff;
......@@ -272,7 +272,7 @@ static inline void hton32_ua_store(uint32 val, u8 *bytes)
/*
* Load 16-bit value from unaligned little-endian byte array.
*/
static inline uint16 ltoh16_ua(const void *bytes)
static inline u16 ltoh16_ua(const void *bytes)
{
return _LTOH16_UA((const u8 *)bytes);
}
......@@ -288,7 +288,7 @@ static inline uint32 ltoh32_ua(const void *bytes)
/*
* Load 16-bit value from unaligned big-(network-)endian byte array.
*/
static inline uint16 ntoh16_ua(const void *bytes)
static inline u16 ntoh16_ua(const void *bytes)
{
return _NTOH16_UA((const u8 *)bytes);
}
......
......@@ -36,9 +36,9 @@
/* Exported functions */
extern int otp_status(void *oh);
extern int otp_size(void *oh);
extern uint16 otp_read_bit(void *oh, uint offset);
extern u16 otp_read_bit(void *oh, uint offset);
extern void *otp_init(si_t *sih);
extern int otp_read_region(si_t *sih, int region, uint16 *data, uint *wlen);
extern int otp_read_region(si_t *sih, int region, u16 *data, uint *wlen);
extern int otp_nvread(void *oh, char *data, uint *len);
#endif /* _bcmotp_h_ */
......@@ -173,8 +173,8 @@ extern void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
/* callback functions */
typedef struct {
/* attach to device */
void *(*attach) (uint16 vend_id, uint16 dev_id, uint16 bus, uint16 slot,
uint16 func, uint bustype, void *regsva, osl_t *osh,
void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
u16 func, uint bustype, void *regsva, osl_t *osh,
void *param);
/* detach from device */
void (*detach) (void *ch);
......@@ -183,7 +183,7 @@ typedef struct {
/* platform specific/high level functions */
extern int bcmsdh_register(bcmsdh_driver_t *driver);
extern void bcmsdh_unregister(void);
extern bool bcmsdh_chipmatch(uint16 vendor, uint16 device);
extern bool bcmsdh_chipmatch(u16 vendor, u16 device);
extern void bcmsdh_device_remove(void *sdh);
/* Function to pass device-status bits to DHD. */
......
......@@ -56,7 +56,7 @@ struct sdioh_info {
bool intr_handler_valid; /* client driver interrupt handler valid */
sdioh_cb_fn_t intr_handler; /* registered interrupt handler */
void *intr_handler_arg; /* argument to call interrupt handler */
uint16 intmask; /* Current active interrupts */
u16 intmask; /* Current active interrupts */
void *sdos_info; /* Pointer to per-OS private data */
uint irq; /* Client irq */
......
......@@ -24,7 +24,7 @@ extern int srom_var_init(si_t *sih, uint bus, void *curmap, osl_t *osh,
char **vars, uint *count);
extern int srom_read(si_t *sih, uint bus, void *curmap, osl_t *osh,
uint byteoff, uint nbytes, uint16 *buf, bool check_crc);
uint byteoff, uint nbytes, u16 *buf, bool check_crc);
/* parse standard PCMCIA cis, normally used by SB/PCMCIA/SDIO/SPI/OTP
* and extract from it into name=value pairs
......
......@@ -24,8 +24,8 @@ typedef struct {
const char *name;
uint32 revmask;
uint32 flags;
uint16 off;
uint16 mask;
u16 off;
u16 mask;
} sromvar_t;
#define SRFL_MORE 1 /* value continues as described by the next entry */
......@@ -447,9 +447,9 @@ static const sromvar_t perpath_pci_sromvars[] = {
#endif /* !defined(PHY_TYPE_NULL) */
typedef struct {
uint16 phy_type;
uint16 bandrange;
uint16 chain;
u16 phy_type;
u16 bandrange;
u16 chain;
const char *vars;
} pavars_t;
......@@ -476,8 +476,8 @@ static const pavars_t pavars[] = {
};
typedef struct {
uint16 phy_type;
uint16 bandrange;
u16 phy_type;
u16 bandrange;
const char *vars;
} povars_t;
......
......@@ -92,26 +92,26 @@ extern "C" {
typedef struct pktq_prec {
void *head; /* first packet to dequeue */
void *tail; /* last packet to dequeue */
uint16 len; /* number of queued packets */
uint16 max; /* maximum number of queued packets */
u16 len; /* number of queued packets */
u16 max; /* maximum number of queued packets */
} pktq_prec_t;
/* multi-priority pkt queue */
struct pktq {
uint16 num_prec; /* number of precedences in use */
uint16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
uint16 max; /* total max packets */
uint16 len; /* total number of packets */
u16 num_prec; /* number of precedences in use */
u16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
u16 max; /* total max packets */
u16 len; /* total number of packets */
/* q array must be last since # of elements can be either PKTQ_MAX_PREC or 1 */
struct pktq_prec q[PKTQ_MAX_PREC];
};
/* simple, non-priority pkt queue */
struct spktq {
uint16 num_prec; /* number of precedences in use (always 1) */
uint16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
uint16 max; /* total max packets */
uint16 len; /* total number of packets */
u16 num_prec; /* number of precedences in use (always 1) */
u16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
u16 max; /* total max packets */
u16 len; /* total number of packets */
/* q array must be last since # of elements can be either PKTQ_MAX_PREC or 1 */
struct pktq_prec q[1];
};
......@@ -273,10 +273,10 @@ extern "C" {
/* iovar structure */
typedef struct bcm_iovar {
const char *name; /* name for lookup and display */
uint16 varid; /* id for switch */
uint16 flags; /* driver-specific flag bits */
uint16 type; /* base type of argument */
uint16 minlen; /* min length for buffer vars */
u16 varid; /* id for switch */
u16 flags; /* driver-specific flag bits */
u16 type; /* base type of argument */
u16 minlen; /* min length for buffer vars */
} bcm_iovar_t;
/* varid definitions are per-driver, may use these get/set bits */
......@@ -325,7 +325,7 @@ extern "C" {
"s8", \
"u8", \
"int16", \
"uint16", \
"u16", \
"int32", \
"uint32", \
"buffer", \
......@@ -569,7 +569,7 @@ extern "C" {
/* externs */
/* crc */
extern u8 BCMROMFN(hndcrc8) (u8 *p, uint nbytes, u8 crc);
extern uint16 BCMROMFN(hndcrc16) (u8 *p, uint nbytes, uint16 crc);
extern u16 BCMROMFN(hndcrc16) (u8 *p, uint nbytes, u16 crc);
/* format/print */
#if defined(BCMDBG)
extern int bcm_format_flags(const bcm_bit_desc_t *bd, uint32 flags,
......@@ -612,8 +612,8 @@ extern "C" {
#ifdef BRCM_FULLMAC
/* power conversion */
extern uint16 BCMROMFN(bcm_qdbm_to_mw) (u8 qdbm);
extern u8 BCMROMFN(bcm_mw_to_qdbm) (uint16 mw);
extern u16 BCMROMFN(bcm_qdbm_to_mw) (u8 qdbm);
extern u8 BCMROMFN(bcm_mw_to_qdbm) (u16 mw);
#endif
/* generic datastruct to help dump routines */
......
......@@ -18,7 +18,7 @@
#define _bcmwifi_h_
/* A chanspec holds the channel number, band, bandwidth and control sideband */
typedef uint16 chanspec_t;
typedef u16 chanspec_t;
/* channel defines */
#define CH_UPPER_SB 0x01
......
......@@ -59,8 +59,8 @@ typedef void *(*di_getnexttxp_t) (hnddma_t *dmah, txd_range_t range);
typedef void *(*di_getnextrxp_t) (hnddma_t *dmah, bool forceall);
typedef void *(*di_peeknexttxp_t) (hnddma_t *dmah);
typedef void *(*di_peeknextrxp_t) (hnddma_t *dmah);
typedef void (*di_rxparam_get_t) (hnddma_t *dmah, uint16 *rxoffset,
uint16 *rxbufsize);
typedef void (*di_rxparam_get_t) (hnddma_t *dmah, u16 *rxoffset,
u16 *rxbufsize);
typedef void (*di_txblock_t) (hnddma_t *dmah);
typedef void (*di_txunblock_t) (hnddma_t *dmah);
typedef uint(*di_txactive_t) (hnddma_t *dmah);
......
......@@ -46,7 +46,7 @@ extern void si_pmu_set_switcher_voltage(si_t *sih, osl_t *osh,
u8 bb_voltage, u8 rf_voltage);
extern void si_pmu_set_ldo_voltage(si_t *sih, osl_t *osh, u8 ldo,
u8 voltage);
extern uint16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh);
extern u16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh);
extern void si_pmu_rcal(si_t *sih, osl_t *osh);
extern void si_pmu_pllupd(si_t *sih);
extern void si_pmu_spuravoid(si_t *sih, osl_t *osh, u8 spuravoid);
......
......@@ -39,8 +39,8 @@ typedef struct patchaddrvalue {
} patchaddrvalue_t;
extern void hnd_patch_init(void *srp);
extern void hnd_tcam_write(void *srp, uint16 index, uint32 data);
extern void hnd_tcam_read(void *srp, uint16 index, uint32 * content);
extern void hnd_tcam_write(void *srp, u16 index, uint32 data);
extern void hnd_tcam_read(void *srp, u16 index, uint32 * content);
void *hnd_tcam_init(void *srp, uint no_addrs);
extern void hnd_tcam_disablepatch(void *srp);
extern void hnd_tcam_enablepatch(void *srp);
......
......@@ -128,7 +128,7 @@ extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, unsigned long *pap)
#define DMA_ALLOC_CONSISTENT(osh, size, align, tot, pap, dmah) \
osl_dma_alloc_consistent((osh), (size), (align), (tot), (pap))
extern uint osl_dma_consistent_align(void);
extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, uint16 align,
extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align,
uint *tot, unsigned long *pap);
#endif
#define DMA_FREE_CONSISTENT(osh, va, size, pa, dmah) \
......@@ -193,7 +193,7 @@ extern int osl_error(int bcmerror);
#ifndef __mips__
#define R_REG(osh, r) (\
SELECT_BUS_READ(osh, sizeof(*(r)) == sizeof(u8) ? readb((volatile u8*)(r)) : \
sizeof(*(r)) == sizeof(uint16) ? readw((volatile uint16*)(r)) : \
sizeof(*(r)) == sizeof(u16) ? readw((volatile u16*)(r)) : \
readl((volatile uint32*)(r)), OSL_READ_REG(osh, r)) \
)
#else /* __mips__ */
......@@ -206,8 +206,8 @@ extern int osl_error(int bcmerror);
case sizeof(u8): \
__osl_v = readb((volatile u8*)(r)); \
break; \
case sizeof(uint16): \
__osl_v = readw((volatile uint16*)(r)); \
case sizeof(u16): \
__osl_v = readw((volatile u16*)(r)); \
break; \
case sizeof(uint32): \
__osl_v = \
......@@ -232,8 +232,8 @@ extern int osl_error(int bcmerror);
switch (sizeof(*(r))) { \
case sizeof(u8): \
writeb((u8)(v), (volatile u8*)(r)); break; \
case sizeof(uint16): \
writew((uint16)(v), (volatile uint16*)(r)); break; \
case sizeof(u16): \
writew((u16)(v), (volatile u16*)(r)); break; \
case sizeof(uint32): \
writel((uint32)(v), (volatile uint32*)(r)); break; \
}, \
......@@ -249,9 +249,9 @@ extern int osl_error(int bcmerror);
__osl_v = \
readb((volatile u8*)((uintptr)(r)^3)); \
break; \
case sizeof(uint16): \
case sizeof(u16): \
__osl_v = \
readw((volatile uint16*)((uintptr)(r)^2)); \
readw((volatile u16*)((uintptr)(r)^2)); \
break; \
case sizeof(uint32): \
__osl_v = readl((volatile uint32*)(r)); \
......@@ -267,9 +267,9 @@ extern int osl_error(int bcmerror);
case sizeof(u8): \
writeb((u8)(v), \
(volatile u8*)((uintptr)(r)^3)); break; \
case sizeof(uint16): \
writew((uint16)(v), \
(volatile uint16*)((uintptr)(r)^2)); break; \
case sizeof(u16): \
writew((u16)(v), \
(volatile u16*)((uintptr)(r)^2)); break; \
case sizeof(uint32): \
writel((uint32)(v), \
(volatile uint32*)(r)); break; \
......@@ -413,7 +413,7 @@ osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt)
#if defined(BCMSDIO) && !defined(BRCM_FULLMAC)
#define RPC_READ_REG(osh, r) (\
sizeof(*(r)) == sizeof(u8) ? osl_readb((osh), (volatile u8*)(r)) : \
sizeof(*(r)) == sizeof(uint16) ? osl_readw((osh), (volatile uint16*)(r)) : \
sizeof(*(r)) == sizeof(u16) ? osl_readw((osh), (volatile u16*)(r)) : \
osl_readl((osh), (volatile uint32*)(r)) \
)
#define RPC_WRITE_REG(osh, r, v) do { \
......@@ -421,8 +421,8 @@ osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt)
case sizeof(u8): \
osl_writeb((osh), (volatile u8*)(r), (u8)(v)); \
break; \
case sizeof(uint16): \
osl_writew((osh), (volatile uint16*)(r), (uint16)(v)); \
case sizeof(u16): \
osl_writew((osh), (volatile u16*)(r), (u16)(v)); \
break; \
case sizeof(uint32): \
osl_writel((osh), (volatile uint32*)(r), (uint32)(v)); \
......@@ -431,10 +431,10 @@ osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt)
} while (0)
extern u8 osl_readb(osl_t *osh, volatile u8 *r);
extern uint16 osl_readw(osl_t *osh, volatile uint16 *r);
extern u16 osl_readw(osl_t *osh, volatile u16 *r);
extern uint32 osl_readl(osl_t *osh, volatile uint32 *r);
extern void osl_writeb(osl_t *osh, volatile u8 *r, u8 v);
extern void osl_writew(osl_t *osh, volatile uint16 *r, uint16 v);
extern void osl_writew(osl_t *osh, volatile u16 *r, u16 v);
extern void osl_writel(osl_t *osh, volatile uint32 *r, uint32 v);
#endif /* BCMSDIO */
......
......@@ -28,7 +28,7 @@
typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr {
u8 version;
u8 spare;
uint16 len; /* Len of the trace */
u16 len; /* Len of the trace */
uint32 seqnum; /* Sequence number of message. Useful
* if the messsage has been lost
* because of DMA error or a bus reset
......@@ -55,8 +55,8 @@ typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr {
extern bool msgtrace_hbus_trace;
typedef void (*msgtrace_func_send_t) (void *hdl1, void *hdl2, u8 *hdr,
uint16 hdrlen, u8 *buf,
uint16 buflen);
u16 hdrlen, u8 *buf,
u16 buflen);
extern void msgtrace_sent(void);
extern void msgtrace_put(char *buf, int count);
......
......@@ -50,7 +50,7 @@ typedef struct sbpciregs {
uint32 sbtopci2; /* Sonics to PCI translation 2 */
uint32 PAD[189];
uint32 pcicfg[4][64]; /* 0x400 - 0x7FF, PCI Cfg Space (>=rev8) */
uint16 sprom[36]; /* SPROM shadow Area */
u16 sprom[36]; /* SPROM shadow Area */
uint32 PAD[46];
} sbpciregs_t;
......
......@@ -103,10 +103,10 @@
#define PCI_CAPPTR_PRESENT 0x0010
typedef struct _pci_config_regs {
uint16 vendor;
uint16 device;
uint16 command;
uint16 status;
u16 vendor;
u16 device;
u16 command;
u16 status;
u8 rev_id;
u8 prog_if;
u8 sub_class;
......@@ -117,8 +117,8 @@ typedef struct _pci_config_regs {
u8 bist;
uint32 base[PCI_BAR_MAX];
uint32 cardbus_cis;
uint16 subsys_vendor;
uint16 subsys_id;
u16 subsys_vendor;
u16 subsys_id;
uint32 baserom;
uint32 rsvd_a[PCR_RSVDA_MAX];
u8 int_line;
......@@ -331,10 +331,10 @@ typedef enum {
#define PPB_RSVDD_MAX 8
typedef struct _ppb_config_regs {
uint16 vendor;
uint16 device;
uint16 command;
uint16 status;
u16 vendor;
u16 device;
u16 command;
u16 status;
u8 rev_id;
u8 prog_if;
u8 sub_class;
......@@ -350,24 +350,24 @@ typedef struct _ppb_config_regs {
u8 sec_lat;
u8 io_base;
u8 io_lim;
uint16 sec_status;
uint16 mem_base;
uint16 mem_lim;
uint16 pf_mem_base;
uint16 pf_mem_lim;
u16 sec_status;
u16 mem_base;
u16 mem_lim;
u16 pf_mem_base;
u16 pf_mem_lim;
uint32 pf_mem_base_hi;
uint32 pf_mem_lim_hi;
uint16 io_base_hi;
uint16 io_lim_hi;
uint16 subsys_vendor;
uint16 subsys_id;
u16 io_base_hi;
u16 io_lim_hi;
u16 subsys_vendor;
u16 subsys_id;
uint32 rsvd_b;
u8 rsvd_c;
u8 int_pin;
uint16 bridge_ctrl;
u16 bridge_ctrl;
u8 chip_ctrl;
u8 diag_ctrl;
uint16 arb_ctrl;
u16 arb_ctrl;
uint32 rsvd_d[PPB_RSVDD_MAX];
u8 dev_dep[192];
} ppb_config_regs;
......@@ -384,7 +384,7 @@ typedef struct _ppb_config_regs {
typedef struct _pciconfig_cap_msi {
u8 capID;
u8 nextptr;
uint16 msgctrl;
u16 msgctrl;
uint32 msgaddr;
} pciconfig_cap_msi;
......@@ -394,8 +394,8 @@ typedef struct _pciconfig_cap_msi {
typedef struct _pciconfig_cap_pwrmgmt {
u8 capID;
u8 nextptr;
uint16 pme_cap;
uint16 pme_sts_ctrl;
u16 pme_cap;
u16 pme_sts_ctrl;
u8 pme_bridge_ext;
u8 data;
} pciconfig_cap_pwrmgmt;
......@@ -409,18 +409,18 @@ typedef struct _pciconfig_cap_pwrmgmt {
typedef struct _pciconfig_cap_pcie {
u8 capID;
u8 nextptr;
uint16 pcie_cap;
u16 pcie_cap;
uint32 dev_cap;
uint16 dev_ctrl;
uint16 dev_status;
u16 dev_ctrl;
u16 dev_status;
uint32 link_cap;
uint16 link_ctrl;
uint16 link_status;
u16 link_ctrl;
u16 link_status;
uint32 slot_cap;
uint16 slot_ctrl;
uint16 slot_status;
uint16 root_ctrl;
uint16 root_cap;
u16 slot_ctrl;
u16 slot_status;
u16 root_ctrl;
u16 root_cap;
uint32 root_status;
} pciconfig_cap_pcie;
......@@ -453,9 +453,9 @@ typedef struct _pciconfig_cap_pcie {
/* Header to define the PCIE specific capabilities in the extended config space */
typedef struct _pcie_enhanced_caphdr {
uint16 capID;
uint16 cap_ver:4;
uint16 next_ptr:12;
u16 capID;
u16 cap_ver:4;
u16 next_ptr:12;
} pcie_enhanced_caphdr;
/* Everything below is BRCM HND proprietary */
......
......@@ -76,7 +76,7 @@ typedef struct sbpcieregs {
uint32 clkreqenctrl; /* >= rev 6, Clkreq rdma control : 0x138 */
uint32 PAD[177];
uint32 pciecfg[4][64]; /* 0x400 - 0x7FF, PCIE Cfg Space */
uint16 sprom[64]; /* SPROM shadow Area */
u16 sprom[64]; /* SPROM shadow Area */
} sbpcieregs_t;
/* PCI control */
......
......@@ -47,18 +47,18 @@
#define DOT11_OUI_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_header {
uint16 fc;
uint16 durid;
u16 fc;
u16 durid;
struct ether_addr a1;
struct ether_addr a2;
struct ether_addr a3;
uint16 seq;
u16 seq;
struct ether_addr a4;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
uint16 fc;
uint16 durid;
u16 fc;
u16 durid;
struct ether_addr ra;
struct ether_addr ta;
} BWL_POST_PACKED_STRUCT;
......@@ -71,19 +71,19 @@ BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
#define DOT11_BA_LEN 4
BWL_PRE_PACKED_STRUCT struct dot11_management_header {
uint16 fc;
uint16 durid;
u16 fc;
u16 durid;
struct ether_addr da;
struct ether_addr sa;
struct ether_addr bssid;
uint16 seq;
u16 seq;
} BWL_POST_PACKED_STRUCT;
#define DOT11_MGMT_HDR_LEN 24
BWL_PRE_PACKED_STRUCT struct dot11_bcn_prb {
uint32 timestamp[2];
uint16 beacon_interval;
uint16 capability;
u16 beacon_interval;
u16 capability;
} BWL_POST_PACKED_STRUCT;
#define DOT11_BCN_PRB_LEN 12
......@@ -106,7 +106,7 @@ typedef u8 ac_bitmap_t;
BWL_PRE_PACKED_STRUCT struct edcf_acparam {
u8 ACI;
u8 ECW;
uint16 TXOP;
u16 TXOP;
} BWL_POST_PACKED_STRUCT;
typedef struct edcf_acparam edcf_acparam_t;
......@@ -255,10 +255,10 @@ typedef struct d11cnt {
#define MCSSET_LEN 16
BWL_PRE_PACKED_STRUCT struct ht_cap_ie {
uint16 cap;
u16 cap;
u8 params;
u8 supp_mcs[MCSSET_LEN];
uint16 ext_htcap;
u16 ext_htcap;
uint32 txbf_cap;
u8 as_cap;
} BWL_POST_PACKED_STRUCT;
......
......@@ -37,11 +37,11 @@
#define BCMILCP_BCM_SUBTYPEHDR_VERSION 0
typedef BWL_PRE_PACKED_STRUCT struct bcmeth_hdr {
uint16 subtype;
uint16 length;
u16 subtype;
u16 length;
u8 version;
u8 oui[3];
uint16 usr_subtype;
u16 usr_subtype;
} BWL_POST_PACKED_STRUCT bcmeth_hdr_t;
#include <packed_section_end.h>
......
......@@ -28,8 +28,8 @@
#define WLC_EVENT_MSG_GROUP 0x04
typedef BWL_PRE_PACKED_STRUCT struct {
uint16 version;
uint16 flags;
u16 version;
u16 flags;
uint32 event_type;
uint32 status;
uint32 reason;
......
......@@ -56,7 +56,7 @@
BWL_PRE_PACKED_STRUCT struct ether_header {
u8 ether_dhost[ETHER_ADDR_LEN];
u8 ether_shost[ETHER_ADDR_LEN];
uint16 ether_type;
u16 ether_type;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct ether_addr {
......
......@@ -34,9 +34,9 @@
struct ethervlan_header {
u8 ether_dhost[ETHER_ADDR_LEN];
u8 ether_shost[ETHER_ADDR_LEN];
uint16 vlan_type;
uint16 vlan_tag;
uint16 ether_type;
u16 vlan_type;
u16 vlan_tag;
u16 ether_type;
};
#define ETHERVLAN_HDR_LEN (ETHER_HDR_LEN + VLAN_TAG_LEN)
......
......@@ -27,7 +27,7 @@ int16 qm_mul16(int16 op1, int16 op2);
int32 qm_muls321616(int16 op1, int16 op2);
uint16 qm_mulu16(uint16 op1, uint16 op2);
u16 qm_mulu16(u16 op1, u16 op2);
int16 qm_muls16(int16 op1, int16 op2);
......@@ -65,7 +65,7 @@ int16 qm_div163232(int32 num, int32 denom, int16 *qquotient);
int32 qm_mul323216(int32 op1, int16 op2);
int32 qm_mulsu321616(int16 op1, uint16 op2);
int32 qm_mulsu321616(int16 op1, u16 op2);
int32 qm_muls323216(int32 op1, int16 op2);
......
......@@ -220,7 +220,7 @@ typedef volatile struct {
uint32 pmustrapopt; /* 0x668, corerev >= 28 */
uint32 pmu_xtalfreq; /* 0x66C, pmurev >= 10 */
uint32 PAD[100];
uint16 sromotp[768];
u16 sromotp[768];
} chipcregs_t;
#endif /* _LANGUAGE_ASSEMBLY */
......
......@@ -308,8 +308,8 @@ typedef volatile struct {
/* receive frame status */
typedef volatile struct {
uint16 len;
uint16 flags;
u16 len;
u16 flags;
} dma_rxh_t;
#endif /* _sbhnddma_h_ */
......@@ -25,10 +25,10 @@
/* 2byte-wide pio register set per channel(xmt or rcv) */
typedef volatile struct {
uint16 fifocontrol;
uint16 fifodata;
uint16 fifofree; /* only valid in xmt channel, not in rcv channel */
uint16 PAD;
u16 fifocontrol;
u16 fifodata;
u16 fifofree; /* only valid in xmt channel, not in rcv channel */
u16 PAD;
} pio2regs_t;
/* a pair of pio channels(tx and rx) */
......
......@@ -60,14 +60,14 @@ typedef volatile struct {
uint32 biststatus; /* BistStatus, 0x00c, rev8 */
/* PCMCIA access */
uint16 pcmciamesportaladdr; /* PcmciaMesPortalAddr, 0x010, rev8 */
uint16 PAD[1];
uint16 pcmciamesportalmask; /* PcmciaMesPortalMask, 0x014, rev8 */
uint16 PAD[1];
uint16 pcmciawrframebc; /* PcmciaWrFrameBC, 0x018, rev8 */
uint16 PAD[1];
uint16 pcmciaunderflowtimer; /* PcmciaUnderflowTimer, 0x01c, rev8 */
uint16 PAD[1];
u16 pcmciamesportaladdr; /* PcmciaMesPortalAddr, 0x010, rev8 */
u16 PAD[1];
u16 pcmciamesportalmask; /* PcmciaMesPortalMask, 0x014, rev8 */
u16 PAD[1];
u16 pcmciawrframebc; /* PcmciaWrFrameBC, 0x018, rev8 */
u16 PAD[1];
u16 pcmciaunderflowtimer; /* PcmciaUnderflowTimer, 0x01c, rev8 */
u16 PAD[1];
/* interrupt */
uint32 intstatus; /* IntStatus, 0x020, rev8 */
......@@ -125,22 +125,22 @@ typedef volatile struct {
/* PCMCIA function control registers */
char pcmciafcr[256]; /* PCMCIA FCR, 0x600-6ff, rev6 */
uint16 PAD[55];
u16 PAD[55];
/* PCMCIA backplane access */
uint16 backplanecsr; /* BackplaneCSR, 0x76E, rev6 */
uint16 backplaneaddr0; /* BackplaneAddr0, 0x770, rev6 */
uint16 backplaneaddr1; /* BackplaneAddr1, 0x772, rev6 */
uint16 backplaneaddr2; /* BackplaneAddr2, 0x774, rev6 */
uint16 backplaneaddr3; /* BackplaneAddr3, 0x776, rev6 */
uint16 backplanedata0; /* BackplaneData0, 0x778, rev6 */
uint16 backplanedata1; /* BackplaneData1, 0x77a, rev6 */
uint16 backplanedata2; /* BackplaneData2, 0x77c, rev6 */
uint16 backplanedata3; /* BackplaneData3, 0x77e, rev6 */
uint16 PAD[31];
u16 backplanecsr; /* BackplaneCSR, 0x76E, rev6 */
u16 backplaneaddr0; /* BackplaneAddr0, 0x770, rev6 */
u16 backplaneaddr1; /* BackplaneAddr1, 0x772, rev6 */
u16 backplaneaddr2; /* BackplaneAddr2, 0x774, rev6 */
u16 backplaneaddr3; /* BackplaneAddr3, 0x776, rev6 */
u16 backplanedata0; /* BackplaneData0, 0x778, rev6 */
u16 backplanedata1; /* BackplaneData1, 0x77a, rev6 */
u16 backplanedata2; /* BackplaneData2, 0x77c, rev6 */
u16 backplanedata3; /* BackplaneData3, 0x77e, rev6 */
u16 PAD[31];
/* sprom "size" & "blank" info */
uint16 spromstatus; /* SPROMStatus, 0x7BE, rev2 */
u16 spromstatus; /* SPROMStatus, 0x7BE, rev2 */
uint32 PAD[464];
/* Sonics SiliconBackplane registers */
......@@ -264,8 +264,8 @@ typedef volatile struct {
/* rx header */
typedef volatile struct {
uint16 len;
uint16 flags;
u16 len;
u16 flags;
} sdpcmd_rxh_t;
/* rx header flags */
......
......@@ -178,7 +178,7 @@ extern void si_register_intr_callback(si_t *sih, void *intrsoff_fn,
void *intrsenabled_fn, void *intr_arg);
extern void si_deregister_intr_callback(si_t *sih);
extern void si_clkctl_init(si_t *sih);
extern uint16 si_clkctl_fast_pwrup_delay(si_t *sih);
extern u16 si_clkctl_fast_pwrup_delay(si_t *sih);
extern bool si_clkctl_cc(si_t *sih, uint mode);
extern int si_clkctl_xtal(si_t *sih, uint what, bool on);
extern uint32 si_gpiotimerval(si_t *sih, uint32 mask, uint32 val);
......@@ -227,7 +227,7 @@ extern uint si_pcie_readreg(void *sih, uint addrtype, uint offset);
extern void si_sdio_init(si_t *sih);
#endif
extern uint16 si_d11_devid(si_t *sih);
extern u16 si_d11_devid(si_t *sih);
#define si_eci(sih) 0
#define si_eci_init(sih) (0)
......
......@@ -29,12 +29,12 @@ typedef volatile struct {
* function selection, command/data error check
*/
u8 reset_bp; /* 0x03, reset on wlan/bt backplane reset (corerev >= 1) */
uint16 intr_reg; /* 0x04, Intr status register */
uint16 intr_en_reg; /* 0x06, Intr mask register */
u16 intr_reg; /* 0x04, Intr status register */
u16 intr_en_reg; /* 0x06, Intr mask register */
uint32 status_reg; /* 0x08, RO, Status bits of last spi transfer */
uint16 f1_info_reg; /* 0x0c, RO, enabled, ready for data transfer, blocksize */
uint16 f2_info_reg; /* 0x0e, RO, enabled, ready for data transfer, blocksize */
uint16 f3_info_reg; /* 0x10, RO, enabled, ready for data transfer, blocksize */
u16 f1_info_reg; /* 0x0c, RO, enabled, ready for data transfer, blocksize */
u16 f2_info_reg; /* 0x0e, RO, enabled, ready for data transfer, blocksize */
u16 f3_info_reg; /* 0x10, RO, enabled, ready for data transfer, blocksize */
uint32 test_read; /* 0x14, RO 0xfeedbead signature */
uint32 test_rw; /* 0x18, RW */
u8 resp_delay_f0; /* 0x1c, read resp delay bytes for F0 (corerev >= 3) */
......
......@@ -44,10 +44,6 @@ typedef unsigned int uint;
/* define [u]int16/32/64, uintptr */
#ifndef TYPEDEF_UINT16
typedef unsigned short uint16;
#endif
#ifndef TYPEDEF_UINT32
typedef unsigned int uint32;
#endif
......@@ -85,7 +81,6 @@ typedef signed int int32;
#define AUTO (-1) /* Auto = -1 */
#undef TYPEDEF_UINT
#undef TYPEDEF_UINT16
#undef TYPEDEF_UINT32
#undef TYPEDEF_UINTPTR
#undef TYPEDEF_INT16
......
......@@ -44,8 +44,8 @@ typedef struct wl_bss_info_107 {
* starting at version and including IEs
*/
struct ether_addr BSSID;
uint16 beacon_period; /* units are Kusec */
uint16 capability; /* Capability information */
u16 beacon_period; /* units are Kusec */
u16 capability; /* Capability information */
u8 SSID_len;
u8 SSID[32];
struct {
......@@ -53,7 +53,7 @@ typedef struct wl_bss_info_107 {
u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
} rateset; /* supported rates */
u8 channel; /* Channel no. */
uint16 atim_window; /* units are Kusec */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
......@@ -77,8 +77,8 @@ typedef struct wl_bss_info_108 {
* starting at version and including IEs
*/
struct ether_addr BSSID;
uint16 beacon_period; /* units are Kusec */
uint16 capability; /* Capability information */
u16 beacon_period; /* units are Kusec */
u16 capability; /* Capability information */
u8 SSID_len;
u8 SSID[32];
struct {
......@@ -86,7 +86,7 @@ typedef struct wl_bss_info_108 {
u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
} rateset; /* supported rates */
chanspec_t chanspec; /* chanspec for bss */
uint16 atim_window; /* units are Kusec */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
......@@ -99,7 +99,7 @@ typedef struct wl_bss_info_108 {
u8 reserved[3]; /* Reserved for expansion of BSS properties */
u8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */
uint16 ie_offset; /* offset at which IEs start, from beginning */
u16 ie_offset; /* offset at which IEs start, from beginning */
uint32 ie_length; /* byte length of Information Elements */
/* Add new fields here */
/* variable length Information Elements */
......@@ -121,8 +121,8 @@ typedef struct wl_bss_info {
* starting at version and including IEs
*/
struct ether_addr BSSID;
uint16 beacon_period; /* units are Kusec */
uint16 capability; /* Capability information */
u16 beacon_period; /* units are Kusec */
u16 capability; /* Capability information */
u8 SSID_len;
u8 SSID[32];
struct {
......@@ -130,7 +130,7 @@ typedef struct wl_bss_info {
u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
} rateset; /* supported rates */
chanspec_t chanspec; /* chanspec for bss */
uint16 atim_window; /* units are Kusec */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
......@@ -143,7 +143,7 @@ typedef struct wl_bss_info {
u8 reserved[3]; /* Reserved for expansion of BSS properties */
u8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */
uint16 ie_offset; /* offset at which IEs start, from beginning */
u16 ie_offset; /* offset at which IEs start, from beginning */
uint32 ie_length; /* byte length of Information Elements */
int16 SNR; /* average SNR of during frame reception */
/* Add new fields here */
......@@ -229,7 +229,7 @@ typedef struct wl_scan_params {
* parameter portion is assumed, otherwise ssid in
* the fixed portion is ignored
*/
uint16 channel_list[1]; /* list of chanspecs */
u16 channel_list[1]; /* list of chanspecs */
} wl_scan_params_t;
/* size of wl_scan_params not including variable length array */
......@@ -248,8 +248,8 @@ typedef struct wl_scan_params {
/* incremental scan struct */
typedef struct wl_iscan_params {
uint32 version;
uint16 action;
uint16 scan_duration;
u16 action;
u16 scan_duration;
wl_scan_params_t params;
} wl_iscan_params_t;
......@@ -277,8 +277,8 @@ typedef struct wl_scan_results {
typedef struct wl_escan_params {
uint32 version;
uint16 action;
uint16 sync_id;
u16 action;
u16 sync_id;
wl_scan_params_t params;
} wl_escan_params_t;
......@@ -287,8 +287,8 @@ typedef struct wl_escan_params {
typedef struct wl_escan_result {
uint32 buflen;
uint32 version;
uint16 sync_id;
uint16 bss_count;
u16 sync_id;
u16 bss_count;
wl_bss_info_t bss_info[1];
} wl_escan_result_t;
......@@ -552,7 +552,7 @@ typedef struct wl_wsec_key {
/* Rx IV */
struct {
uint32 hi; /* upper 32 bits of IV */
uint16 lo; /* lower 16 bits of IV */
u16 lo; /* lower 16 bits of IV */
} rxiv;
uint32 pad_5[2];
struct ether_addr ea; /* per station */
......@@ -629,7 +629,7 @@ typedef struct wl_led_info {
typedef struct {
uint byteoff; /* byte offset */
uint nbytes; /* number of bytes */
uint16 buf[1];
u16 buf[1];
} srom_rw_t;
/* similar cis (srom or otp) struct [iovar: may not be aligned] */
......@@ -661,10 +661,10 @@ typedef struct {
#define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
typedef struct {
uint16 auto_ctrl; /* WL_ATTEN_XX */
uint16 bb; /* Baseband attenuation */
uint16 radio; /* Radio attenuation */
uint16 txctl1; /* Radio TX_CTL1 value */
u16 auto_ctrl; /* WL_ATTEN_XX */
u16 bb; /* Baseband attenuation */
u16 radio; /* Radio attenuation */
u16 txctl1; /* Radio TX_CTL1 value */
} atten_t;
/* Per-AC retry parameters */
......@@ -673,7 +673,7 @@ struct wme_tx_params_s {
u8 short_fallback;
u8 long_retry;
u8 long_fallback;
uint16 max_rate; /* In units of 512 Kbps */
u16 max_rate; /* In units of 512 Kbps */
};
typedef struct wme_tx_params_s wme_tx_params_t;
......@@ -701,9 +701,9 @@ typedef struct {
#define BCM_MAC_STATUS_INDICATION (0x40010200L)
typedef struct {
uint16 ver; /* version of this struct */
uint16 len; /* length in bytes of this structure */
uint16 cap; /* sta's advertised capabilities */
u16 ver; /* version of this struct */
u16 len; /* length in bytes of this structure */
u16 cap; /* sta's advertised capabilities */
uint32 flags; /* flags defined below */
uint32 idle; /* time since data pkt rx'd from sta */
struct ether_addr ea; /* Station address */
......@@ -819,9 +819,9 @@ typedef struct wl_instance_info {
/* structure to change size of tx fifo */
typedef struct wl_txfifo_sz {
uint16 magic;
uint16 fifo;
uint16 size;
u16 magic;
u16 fifo;
u16 size;
} wl_txfifo_sz_t;
/* magic pattern used for mismatch driver and wl */
#define WL_TXFIFO_SZ_MAGIC 0xa5a5
......@@ -1205,11 +1205,11 @@ typedef struct wlc_iov_trx_s {
#define WL_PHY_PAVARS_LEN 6 /* Phy type, Band range, chain, a1, b0, b1 */
typedef struct wl_po {
uint16 phy_type; /* Phy type */
uint16 band;
uint16 cckpo;
u16 phy_type; /* Phy type */
u16 band;
u16 cckpo;
uint32 ofdmpo;
uint16 mcspo[8];
u16 mcspo[8];
} wl_po_t;
/* a large TX Power as an init value to factor out of MIN() calculations,
......@@ -1493,8 +1493,8 @@ struct tsinfo_arg {
#define WL_CNT_T_VERSION 7 /* current version of wl_cnt_t struct */
typedef struct {
uint16 version; /* see definition of WL_CNT_T_VERSION */
uint16 length; /* length of entire structure */
u16 version; /* see definition of WL_CNT_T_VERSION */
u16 length; /* length of entire structure */
/* transmit stat counters */
uint32 txframe; /* tx data frames */
......@@ -1727,8 +1727,8 @@ typedef struct {
#define WL_DELTA_STATS_T_VERSION 1 /* current version of wl_delta_stats_t struct */
typedef struct {
uint16 version; /* see definition of WL_DELTA_STATS_T_VERSION */
uint16 length; /* length of entire structure */
u16 version; /* see definition of WL_DELTA_STATS_T_VERSION */
u16 length; /* length of entire structure */
/* transmit stat counters */
uint32 txframe; /* tx data frames */
......@@ -1772,8 +1772,8 @@ typedef struct {
} wl_traffic_stats_t;
typedef struct {
uint16 version; /* see definition of WL_WME_CNT_VERSION */
uint16 length; /* length of entire structure */
u16 version; /* see definition of WL_WME_CNT_VERSION */
u16 length; /* length of entire structure */
wl_traffic_stats_t tx[AC_COUNT]; /* Packets transmitted */
wl_traffic_stats_t tx_failed[AC_COUNT]; /* Packets dropped or failed to transmit */
......@@ -1797,8 +1797,8 @@ struct wl_msglevel2 {
/* block ack related stats */
typedef struct wlc_ba_cnt {
uint16 version; /* WLC_BA_CNT_VERSION */
uint16 length; /* length of entire structure */
u16 version; /* WLC_BA_CNT_VERSION */
u16 length; /* length of entire structure */
/* transmit stat counters */
uint32 txpdu; /* pdus sent */
......@@ -1858,13 +1858,13 @@ struct tslist {
/* structure for addts/delts arguments */
typedef struct tspec_arg {
uint16 version; /* see definition of TSPEC_ARG_VERSION */
uint16 length; /* length of entire structure */
u16 version; /* see definition of TSPEC_ARG_VERSION */
u16 length; /* length of entire structure */
uint flag; /* bit field */
/* TSPEC Arguments */
struct tsinfo_arg tsinfo; /* TS Info bit field */
uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */
uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */
u16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */
u16 max_msdu_size; /* Maximum MSDU Size (bytes) */
uint min_srv_interval; /* Minimum Service Interval (us) */
uint max_srv_interval; /* Maximum Service Interval (us) */
uint inactivity_interval; /* Inactivity Interval (us) */
......@@ -1876,8 +1876,8 @@ typedef struct tspec_arg {
uint max_burst_size; /* Maximum Burst Size (bytes) */
uint delay_bound; /* Delay Bound (us) */
uint min_phy_rate; /* Minimum PHY Rate (bps) */
uint16 surplus_bw; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
uint16 medium_time; /* Medium Time (32 us/s periods) */
u16 surplus_bw; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
u16 medium_time; /* Medium Time (32 us/s periods) */
u8 dialog_token; /* dialog token */
} tspec_arg_t;
......
......@@ -33,8 +33,8 @@
uint32 phyhal_msg_level = PHYHAL_ERROR;
typedef struct _chan_info_basic {
uint16 chan;
uint16 freq;
u16 chan;
u16 freq;
} chan_info_basic_t;
static chan_info_basic_t chan_info_all[] = {
......@@ -97,7 +97,7 @@ static chan_info_basic_t chan_info_all[] = {
{216, 50800}
};
uint16 ltrn_list[PHY_LTRN_LIST_LEN] = {
u16 ltrn_list[PHY_LTRN_LIST_LEN] = {
0x18f9, 0x0d01, 0x00e4, 0xdef4, 0x06f1, 0x0ffc,
0xfa27, 0x1dff, 0x10f0, 0x0918, 0xf20a, 0xe010,
0x1417, 0x1104, 0xf114, 0xf2fa, 0xf7db, 0xe2fc,
......@@ -207,16 +207,16 @@ void wlc_radioreg_enter(wlc_phy_t *pih)
void wlc_radioreg_exit(wlc_phy_t *pih)
{
phy_info_t *pi = (phy_info_t *) pih;
volatile uint16 dummy;
volatile u16 dummy;
dummy = R_REG(pi->sh->osh, &pi->regs->phyversion);
pi->phy_wreg = 0;
wlapi_bmac_mctrl(pi->sh->physhim, MCTL_LOCK_RADIO, 0);
}
uint16 read_radio_reg(phy_info_t *pi, uint16 addr)
u16 read_radio_reg(phy_info_t *pi, u16 addr)
{
uint16 data;
u16 data;
if ((addr == RADIO_IDCODE))
return 0xffff;
......@@ -270,7 +270,7 @@ uint16 read_radio_reg(phy_info_t *pi, uint16 addr)
return data;
}
void write_radio_reg(phy_info_t *pi, uint16 addr, uint16 val)
void write_radio_reg(phy_info_t *pi, u16 addr, u16 val)
{
osl_t *osh;
......@@ -344,9 +344,9 @@ static uint32 read_radio_id(phy_info_t *pi)
return id;
}
void and_radio_reg(phy_info_t *pi, uint16 addr, uint16 val)
void and_radio_reg(phy_info_t *pi, u16 addr, u16 val)
{
uint16 rval;
u16 rval;
if (NORADIO_ENAB(pi->pubpi))
return;
......@@ -355,9 +355,9 @@ void and_radio_reg(phy_info_t *pi, uint16 addr, uint16 val)
write_radio_reg(pi, addr, (rval & val));
}
void or_radio_reg(phy_info_t *pi, uint16 addr, uint16 val)
void or_radio_reg(phy_info_t *pi, u16 addr, u16 val)
{
uint16 rval;
u16 rval;
if (NORADIO_ENAB(pi->pubpi))
return;
......@@ -366,9 +366,9 @@ void or_radio_reg(phy_info_t *pi, uint16 addr, uint16 val)
write_radio_reg(pi, addr, (rval | val));
}
void xor_radio_reg(phy_info_t *pi, uint16 addr, uint16 mask)
void xor_radio_reg(phy_info_t *pi, u16 addr, u16 mask)
{
uint16 rval;
u16 rval;
if (NORADIO_ENAB(pi->pubpi))
return;
......@@ -377,9 +377,9 @@ void xor_radio_reg(phy_info_t *pi, uint16 addr, uint16 mask)
write_radio_reg(pi, addr, (rval ^ mask));
}
void mod_radio_reg(phy_info_t *pi, uint16 addr, uint16 mask, uint16 val)
void mod_radio_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val)
{
uint16 rval;
u16 rval;
if (NORADIO_ENAB(pi->pubpi))
return;
......@@ -403,7 +403,7 @@ static bool wlc_phy_war41476(phy_info_t *pi)
}
#endif
uint16 read_phy_reg(phy_info_t *pi, uint16 addr)
u16 read_phy_reg(phy_info_t *pi, u16 addr)
{
osl_t *osh;
d11regs_t *regs;
......@@ -424,7 +424,7 @@ uint16 read_phy_reg(phy_info_t *pi, uint16 addr)
return R_REG(osh, &regs->phyregdata);
}
void write_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
void write_phy_reg(phy_info_t *pi, u16 addr, u16 val)
{
osl_t *osh;
d11regs_t *regs;
......@@ -450,7 +450,7 @@ void write_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
#endif
}
void and_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
void and_phy_reg(phy_info_t *pi, u16 addr, u16 val)
{
osl_t *osh;
d11regs_t *regs;
......@@ -471,7 +471,7 @@ void and_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
pi->phy_wreg = 0;
}
void or_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
void or_phy_reg(phy_info_t *pi, u16 addr, u16 val)
{
osl_t *osh;
d11regs_t *regs;
......@@ -492,7 +492,7 @@ void or_phy_reg(phy_info_t *pi, uint16 addr, uint16 val)
pi->phy_wreg = 0;
}
void mod_phy_reg(phy_info_t *pi, uint16 addr, uint16 mask, uint16 val)
void mod_phy_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val)
{
osl_t *osh;
d11regs_t *regs;
......@@ -815,12 +815,12 @@ void BCMATTACHFN(wlc_phy_detach) (wlc_phy_t *pih)
}
bool
wlc_phy_get_phyversion(wlc_phy_t *pih, uint16 *phytype, uint16 *phyrev,
uint16 *radioid, uint16 *radiover)
wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, u16 *phyrev,
u16 *radioid, u16 *radiover)
{
phy_info_t *pi = (phy_info_t *) pih;
*phytype = (uint16) pi->pubpi.phy_type;
*phyrev = (uint16) pi->pubpi.phy_rev;
*phytype = (u16) pi->pubpi.phy_type;
*phyrev = (u16) pi->pubpi.phy_rev;
*radioid = pi->pubpi.radioid;
*radiover = pi->pubpi.radiorev;
......@@ -1075,7 +1075,7 @@ static uint32 wlc_phy_get_radio_ver(phy_info_t *pi)
void
wlc_phy_table_addr(phy_info_t *pi, uint tbl_id, uint tbl_offset,
uint16 tblAddr, uint16 tblDataHi, uint16 tblDataLo)
u16 tblAddr, u16 tblDataHi, u16 tblDataLo)
{
write_phy_reg(pi, tblAddr, (tbl_id << 10) | tbl_offset);
......@@ -1108,24 +1108,24 @@ void wlc_phy_table_data_write(phy_info_t *pi, uint width, uint32 val)
if (width == 32) {
write_phy_reg(pi, pi->tbl_data_hi, (uint16) (val >> 16));
write_phy_reg(pi, pi->tbl_data_lo, (uint16) val);
write_phy_reg(pi, pi->tbl_data_hi, (u16) (val >> 16));
write_phy_reg(pi, pi->tbl_data_lo, (u16) val);
} else {
write_phy_reg(pi, pi->tbl_data_lo, (uint16) val);
write_phy_reg(pi, pi->tbl_data_lo, (u16) val);
}
}
void
wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
uint16 tblAddr, uint16 tblDataHi, uint16 tblDataLo)
u16 tblAddr, u16 tblDataHi, u16 tblDataLo)
{
uint idx;
uint tbl_id = ptbl_info->tbl_id;
uint tbl_offset = ptbl_info->tbl_offset;
uint tbl_width = ptbl_info->tbl_width;
const u8 *ptbl_8b = (const u8 *)ptbl_info->tbl_ptr;
const uint16 *ptbl_16b = (const uint16 *)ptbl_info->tbl_ptr;
const u16 *ptbl_16b = (const u16 *)ptbl_info->tbl_ptr;
const uint32 *ptbl_32b = (const uint32 *)ptbl_info->tbl_ptr;
ASSERT((tbl_width == 8) || (tbl_width == 16) || (tbl_width == 32));
......@@ -1147,8 +1147,8 @@ wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
if (tbl_width == 32) {
write_phy_reg(pi, tblDataHi,
(uint16) (ptbl_32b[idx] >> 16));
write_phy_reg(pi, tblDataLo, (uint16) ptbl_32b[idx]);
(u16) (ptbl_32b[idx] >> 16));
write_phy_reg(pi, tblDataLo, (u16) ptbl_32b[idx]);
} else if (tbl_width == 16) {
write_phy_reg(pi, tblDataLo, ptbl_16b[idx]);
......@@ -1161,14 +1161,14 @@ wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
void
wlc_phy_read_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
uint16 tblAddr, uint16 tblDataHi, uint16 tblDataLo)
u16 tblAddr, u16 tblDataHi, u16 tblDataLo)
{
uint idx;
uint tbl_id = ptbl_info->tbl_id;
uint tbl_offset = ptbl_info->tbl_offset;
uint tbl_width = ptbl_info->tbl_width;
u8 *ptbl_8b = (u8 *) (uintptr) ptbl_info->tbl_ptr;
uint16 *ptbl_16b = (uint16 *) (uintptr) ptbl_info->tbl_ptr;
u16 *ptbl_16b = (u16 *) (uintptr) ptbl_info->tbl_ptr;
uint32 *ptbl_32b = (uint32 *) (uintptr) ptbl_info->tbl_ptr;
ASSERT((tbl_width == 8) || (tbl_width == 16) || (tbl_width == 32));
......@@ -1208,7 +1208,7 @@ wlc_phy_init_radio_regs_allbands(phy_info_t *pi, radio_20xx_regs_t *radioregs)
do {
if (radioregs[i].do_init) {
write_radio_reg(pi, radioregs[i].address,
(uint16) radioregs[i].init);
(u16) radioregs[i].init);
}
i++;
......@@ -1219,7 +1219,7 @@ wlc_phy_init_radio_regs_allbands(phy_info_t *pi, radio_20xx_regs_t *radioregs)
uint
wlc_phy_init_radio_regs(phy_info_t *pi, radio_regs_t *radioregs,
uint16 core_offset)
u16 core_offset)
{
uint i = 0;
uint count = 0;
......@@ -1230,7 +1230,7 @@ wlc_phy_init_radio_regs(phy_info_t *pi, radio_regs_t *radioregs,
write_radio_reg(pi,
radioregs[i].
address | core_offset,
(uint16) radioregs[i].init_a);
(u16) radioregs[i].init_a);
if (ISNPHY(pi) && (++count % 4 == 0))
WLC_PHY_WAR_PR51571(pi);
}
......@@ -1239,7 +1239,7 @@ wlc_phy_init_radio_regs(phy_info_t *pi, radio_regs_t *radioregs,
write_radio_reg(pi,
radioregs[i].
address | core_offset,
(uint16) radioregs[i].init_g);
(u16) radioregs[i].init_g);
if (ISNPHY(pi) && (++count % 4 == 0))
WLC_PHY_WAR_PR51571(pi);
}
......@@ -1428,14 +1428,14 @@ void wlc_phy_switch_radio(wlc_phy_t *pih, bool on)
}
}
uint16 wlc_phy_bw_state_get(wlc_phy_t *ppi)
u16 wlc_phy_bw_state_get(wlc_phy_t *ppi)
{
phy_info_t *pi = (phy_info_t *) ppi;
return pi->bw;
}
void wlc_phy_bw_state_set(wlc_phy_t *ppi, uint16 bw)
void wlc_phy_bw_state_set(wlc_phy_t *ppi, u16 bw)
{
phy_info_t *pi = (phy_info_t *) ppi;
......@@ -1459,7 +1459,7 @@ chanspec_t wlc_phy_chanspec_get(wlc_phy_t *ppi)
void wlc_phy_chanspec_set(wlc_phy_t *ppi, chanspec_t chanspec)
{
phy_info_t *pi = (phy_info_t *) ppi;
uint16 m_cur_channel;
u16 m_cur_channel;
chansetfn_t chanspec_set = NULL;
ASSERT(!wf_chspec_malformed(chanspec));
......@@ -2090,7 +2090,7 @@ void wlc_phy_machwcap_set(wlc_phy_t *ppi, uint32 machwcap)
void wlc_phy_runbist_config(wlc_phy_t *ppi, bool start_end)
{
phy_info_t *pi = (phy_info_t *) ppi;
uint16 rxc;
u16 rxc;
rxc = 0;
if (start_end == ON) {
......@@ -2169,7 +2169,7 @@ void wlc_phy_txpower_update_shm(phy_info_t *pi)
return;
if (pi->hwpwrctrl) {
uint16 offset;
u16 offset;
wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_MAX, 63);
wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_N,
......@@ -2203,7 +2203,7 @@ void wlc_phy_txpower_update_shm(phy_info_t *pi)
pi->tx_power_offset[i] =
(u8) ROUNDUP(pi->tx_power_offset[i], 8);
wlapi_bmac_write_shm(pi->sh->physhim, M_OFDM_OFFSET,
(uint16) ((pi->
(u16) ((pi->
tx_power_offset[TXP_FIRST_OFDM]
+ 7) >> 3));
}
......@@ -2275,7 +2275,7 @@ static uint32 wlc_phy_txpower_est_power_nphy(phy_info_t *pi);
static uint32 wlc_phy_txpower_est_power_nphy(phy_info_t *pi)
{
int16 tx0_status, tx1_status;
uint16 estPower1, estPower2;
u16 estPower1, estPower2;
u8 pwr0, pwr1, adj_pwr0, adj_pwr1;
uint32 est_pwr;
......@@ -2444,8 +2444,8 @@ bool wlc_phy_ant_rxdiv_get(wlc_phy_t *ppi, u8 *pval)
ret = FALSE;
} else if (ISLCNPHY(pi)) {
uint16 crsctrl = read_phy_reg(pi, 0x410);
uint16 div = crsctrl & (0x1 << 1);
u16 crsctrl = read_phy_reg(pi, 0x410);
u16 div = crsctrl & (0x1 << 1);
*pval = (div | ((crsctrl & (0x1 << 0)) ^ (div >> 1)));
}
......@@ -2491,7 +2491,7 @@ void wlc_phy_ant_rxdiv_set(wlc_phy_t *ppi, u8 val)
((ANT_RX_DIV_START_1 == val) ? 1 : 0) << 0);
} else {
mod_phy_reg(pi, 0x410, (0x1 << 1), 0x00 << 1);
mod_phy_reg(pi, 0x410, (0x1 << 0), (uint16) val << 0);
mod_phy_reg(pi, 0x410, (0x1 << 0), (u16) val << 0);
}
} else {
ASSERT(0);
......@@ -2618,7 +2618,7 @@ wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch)
phy_iq_est_t est[PHY_CORE_MAX];
uint32 cmplx_pwr[PHY_CORE_MAX];
s8 noise_dbm_ant[PHY_CORE_MAX];
uint16 log_num_samps, num_samps, classif_state = 0;
u16 log_num_samps, num_samps, classif_state = 0;
u8 wait_time = 32;
u8 wait_crs = 0;
u8 i;
......@@ -2700,7 +2700,7 @@ static s8 wlc_phy_noise_read_shmem(phy_info_t *pi)
{
uint32 cmplx_pwr[PHY_CORE_MAX];
s8 noise_dbm_ant[PHY_CORE_MAX];
uint16 lo, hi;
u16 lo, hi;
uint32 cmplx_pwr_tot = 0;
s8 noise_dbm = PHY_NOISE_FIXED_VAL_NPHY;
u8 idx, core;
......@@ -2741,15 +2741,15 @@ static s8 wlc_phy_noise_read_shmem(phy_info_t *pi)
void wlc_phy_noise_sample_intr(wlc_phy_t *pih)
{
phy_info_t *pi = (phy_info_t *) pih;
uint16 jssi_aux;
u16 jssi_aux;
u8 channel = 0;
s8 noise_dbm = PHY_NOISE_FIXED_VAL_NPHY;
if (ISLCNPHY(pi)) {
uint32 cmplx_pwr, cmplx_pwr0, cmplx_pwr1;
uint16 lo, hi;
u16 lo, hi;
int32 pwr_offset_dB, gain_dB;
uint16 status_0, status_1;
u16 status_0, status_1;
jssi_aux = wlapi_bmac_read_shm(pi->sh->physhim, M_JSSI_AUX);
channel = jssi_aux & D11_CURCHANNEL_MAX;
......@@ -3330,7 +3330,7 @@ void wlc_lcnphy_epa_switch(phy_info_t *pi, bool mode)
if ((CHIPID(pi->sh->chip) == BCM4313_CHIP_ID) &&
(pi->sh->boardflags & BFL_FEM)) {
if (mode) {
uint16 txant = 0;
u16 txant = 0;
txant = wlapi_bmac_get_txant(pi->sh->physhim);
if (txant == 1) {
mod_phy_reg(pi, 0x44d, (0x1 << 2), (1) << 2);
......
......@@ -138,8 +138,8 @@ typedef struct shared_phy_params {
uint bustype;
uint buscorerev;
char *vars;
uint16 vid;
uint16 did;
u16 vid;
u16 did;
uint chip;
uint chiprev;
uint chippkg;
......@@ -159,9 +159,9 @@ extern wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype,
char *vars);
extern void wlc_phy_detach(wlc_phy_t *ppi);
extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, uint16 *phytype,
uint16 *phyrev, uint16 *radioid,
uint16 *radiover);
extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype,
u16 *phyrev, u16 *radioid,
u16 *radiover);
extern bool wlc_phy_get_encore(wlc_phy_t *pih);
extern uint32 wlc_phy_get_coreflags(wlc_phy_t *pih);
......@@ -177,8 +177,8 @@ extern void wlc_phy_antsel_init(wlc_phy_t *ppi, bool lut_init);
extern void wlc_phy_chanspec_set(wlc_phy_t *ppi, chanspec_t chanspec);
extern chanspec_t wlc_phy_chanspec_get(wlc_phy_t *ppi);
extern void wlc_phy_chanspec_radio_set(wlc_phy_t *ppi, chanspec_t newch);
extern uint16 wlc_phy_bw_state_get(wlc_phy_t *ppi);
extern void wlc_phy_bw_state_set(wlc_phy_t *ppi, uint16 bw);
extern u16 wlc_phy_bw_state_get(wlc_phy_t *ppi);
extern void wlc_phy_bw_state_set(wlc_phy_t *ppi, u16 bw);
extern void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx);
extern void wlc_phy_por_inform(wlc_phy_t *ppi);
......
......@@ -23,7 +23,7 @@ struct phy_info_lcnphy {
int lcnphy_txrf_sp_9_override;
u8 lcnphy_full_cal_channel;
u8 lcnphy_cal_counter;
uint16 lcnphy_cal_temper;
u16 lcnphy_cal_temper;
bool lcnphy_recal;
u8 lcnphy_rc_cap;
......@@ -51,7 +51,7 @@ struct phy_info_lcnphy {
int16 lcnphy_pa0b1;
int16 lcnphy_pa0b2;
uint16 lcnphy_rawtempsense;
u16 lcnphy_rawtempsense;
u8 lcnphy_measPower;
u8 lcnphy_tempsense_slope;
u8 lcnphy_freqoffset_corr;
......@@ -61,13 +61,13 @@ struct phy_info_lcnphy {
bool lcnphy_hw_iqcal_en;
uint lcnphy_bandedge_corr;
bool lcnphy_spurmod;
uint16 lcnphy_tssi_tx_cnt;
uint16 lcnphy_tssi_idx;
uint16 lcnphy_tssi_npt;
u16 lcnphy_tssi_tx_cnt;
u16 lcnphy_tssi_idx;
u16 lcnphy_tssi_npt;
uint16 lcnphy_target_tx_freq;
u16 lcnphy_target_tx_freq;
s8 lcnphy_tx_power_idx_override;
uint16 lcnphy_noise_samples;
u16 lcnphy_noise_samples;
uint32 lcnphy_papdRxGnIdx;
uint32 lcnphy_papd_rxGnCtrl_init;
......@@ -81,8 +81,8 @@ struct phy_info_lcnphy {
uint32 lcnphy_tr_R_gain_val;
uint32 lcnphy_tr_T_gain_val;
s8 lcnphy_input_pwr_offset_db;
uint16 lcnphy_Med_Low_Gain_db;
uint16 lcnphy_Very_Low_Gain_db;
u16 lcnphy_Med_Low_Gain_db;
u16 lcnphy_Very_Low_Gain_db;
s8 lcnphy_lastsensed_temperature;
s8 lcnphy_pkteng_rssi_slope;
u8 lcnphy_saved_tx_user_target[TXP_NUM_RATES];
......@@ -95,9 +95,9 @@ struct phy_info_lcnphy {
u8 lcnphy_psat_2pt3_detected;
int32 lcnphy_lowest_Re_div_Im;
s8 lcnphy_final_papd_cal_idx;
uint16 lcnphy_extstxctrl4;
uint16 lcnphy_extstxctrl0;
uint16 lcnphy_extstxctrl1;
u16 lcnphy_extstxctrl4;
u16 lcnphy_extstxctrl0;
u16 lcnphy_extstxctrl1;
int16 lcnphy_cck_dig_filt_type;
int16 lcnphy_ofdm_dig_filt_type;
lcnphy_cal_results_t lcnphy_cal_results;
......@@ -108,11 +108,11 @@ struct phy_info_lcnphy {
u8 lcnphy_final_idx;
u8 lcnphy_start_idx;
u8 lcnphy_current_index;
uint16 lcnphy_logen_buf_1;
uint16 lcnphy_local_ovr_2;
uint16 lcnphy_local_oval_6;
uint16 lcnphy_local_oval_5;
uint16 lcnphy_logen_mixer_1;
u16 lcnphy_logen_buf_1;
u16 lcnphy_local_ovr_2;
u16 lcnphy_local_oval_6;
u16 lcnphy_local_oval_5;
u16 lcnphy_logen_mixer_1;
u8 lcnphy_aci_stat;
uint lcnphy_aci_start_time;
......
......@@ -217,7 +217,7 @@ const uint32 dot11lcn_gain_tbl_rev1[] = {
0x00000000,
};
const uint16 dot11lcn_aux_gain_idx_tbl_rev0[] = {
const u16 dot11lcn_aux_gain_idx_tbl_rev0[] = {
0x0401,
0x0402,
0x0403,
......@@ -409,7 +409,7 @@ const uint32 dot11lcn_gain_idx_tbl_rev0[] = {
0x0000001c,
};
const uint16 dot11lcn_aux_gain_idx_tbl_2G[] = {
const u16 dot11lcn_aux_gain_idx_tbl_2G[] = {
0x0000,
0x0000,
0x0000,
......@@ -874,7 +874,7 @@ const uint32 dot11lcn_gain_tbl_extlna_2G[] = {
0x00000000
};
const uint16 dot11lcn_aux_gain_idx_tbl_extlna_2G[] = {
const u16 dot11lcn_aux_gain_idx_tbl_extlna_2G[] = {
0x0400,
0x0400,
0x0400,
......@@ -1625,7 +1625,7 @@ const uint32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz =
sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2) /
sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2[0]);
const uint16 dot11lcn_min_sig_sq_tbl_rev0[] = {
const u16 dot11lcn_min_sig_sq_tbl_rev0[] = {
0x014d,
0x014d,
0x014d,
......@@ -1692,7 +1692,7 @@ const uint16 dot11lcn_min_sig_sq_tbl_rev0[] = {
0x014d,
};
const uint16 dot11lcn_noise_scale_tbl_rev0[] = {
const u16 dot11lcn_noise_scale_tbl_rev0[] = {
0x0000,
0x0000,
0x0000,
......@@ -1795,7 +1795,7 @@ const uint32 dot11lcn_ps_ctrl_tbl_rev0[] = {
0x00600f22,
};
const uint16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
0x0007,
0x0005,
0x0006,
......@@ -1863,7 +1863,7 @@ const uint16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
};
const uint16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
const u16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
0x0007,
0x0005,
0x0002,
......@@ -1930,7 +1930,7 @@ const uint16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
0x0002,
};
const uint16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
0x0002,
0x0008,
0x0004,
......@@ -1997,7 +1997,7 @@ const uint16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
0x0001,
};
const uint16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
const u16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
0x000a,
0x0009,
0x0006,
......@@ -2064,7 +2064,7 @@ const uint16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
0x0005,
};
const uint16 dot11lcn_sw_ctrl_tbl_rev0[] = {
const u16 dot11lcn_sw_ctrl_tbl_rev0[] = {
0x0004,
0x0004,
0x0002,
......@@ -2344,7 +2344,7 @@ const u8 dot11lcn_spur_tbl_rev0[] = {
0x01,
};
const uint16 dot11lcn_unsup_mcs_tbl_rev0[] = {
const u16 dot11lcn_unsup_mcs_tbl_rev0[] = {
0x001a,
0x0034,
0x004e,
......@@ -2501,7 +2501,7 @@ const uint16 dot11lcn_unsup_mcs_tbl_rev0[] = {
0x06f6,
};
const uint16 dot11lcn_iq_local_tbl_rev0[] = {
const u16 dot11lcn_iq_local_tbl_rev0[] = {
0x0200,
0x0300,
0x0400,
......
......@@ -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;
......
......@@ -16,8 +16,8 @@
#include <typedefs.h>
typedef struct d11init {
uint16 addr;
uint16 size;
u16 addr;
u16 size;
uint32 value;
} d11init_t;
......
......@@ -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_ */
......@@ -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_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册