summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/brcmfmac
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-07 17:04:47 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-07 17:04:47 -0700
commit7d4df48eba4cea654ee6fe6e1a51a0600807ed7b (patch)
tree7c4e3cbb7d576ac3a0b273b5908bbed460eceb0a /drivers/staging/brcm80211/brcmfmac
parent4128dd9afb986321edf0baa8a3aaa3c7c5aa3730 (diff)
downloadop-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/brcmfmac')
-rw-r--r--drivers/staging/brcm80211/brcmfmac/bcmsdh.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/bcmutils.c26
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_cdc.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_common.c4
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_linux.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_sdio.c92
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c30
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h8
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_iw.c14
11 files changed, 92 insertions, 92 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
index bbd03cd..8086b62 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
@@ -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;
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
index 3e036b7..8e7be0d 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
@@ -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 */
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index b013a65..c1b9ade 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -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) {
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmutils.c b/drivers/staging/brcm80211/brcmfmac/bcmutils.c
index 7185943..3eff4fe 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmutils.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmutils.c
@@ -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;
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
index fad3e72..492138f 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
@@ -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];
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
index 27c6976..9087997 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
@@ -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;
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index 75f4724..72eed5b 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -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);
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 60b499a..fb5e4b6 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -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 @@ done:
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 @@ fail:
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;
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index b66730c..1c3b0d8 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -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;
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
index ef9b88e..518895c 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
@@ -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];
};
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
index c105b7f..5306368 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@ -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 =
OpenPOWER on IntegriCloud