Commit 3fd79f7c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: brcm80211: brcmfmac: s/uint8/u8/

Replace uint8 with u8, the correct kernel type to be using here.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 41feb5ed
......@@ -181,14 +181,14 @@ int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
return BCME_UNSUPPORTED;
}
uint8 bcmsdh_cfg_read(void *sdh, uint fnc_num, uint32 addr, int *err)
u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, uint32 addr, int *err)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
SDIOH_API_RC status;
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
int32 retry = 0;
#endif
uint8 data = 0;
u8 data = 0;
if (!bcmsdh)
bcmsdh = l_bcmsdh;
......@@ -202,7 +202,7 @@ uint8 bcmsdh_cfg_read(void *sdh, uint fnc_num, uint32 addr, int *err)
#endif
status =
sdioh_cfg_read(bcmsdh->sdioh, fnc_num, addr,
(uint8 *) &data);
(u8 *) &data);
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
} while (!SDIOH_API_SUCCESS(status)
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
......@@ -210,14 +210,14 @@ uint8 bcmsdh_cfg_read(void *sdh, uint fnc_num, uint32 addr, int *err)
if (err)
*err = (SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR);
BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, uint8data = 0x%x\n",
BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u8data = 0x%x\n",
__func__, fnc_num, addr, data));
return data;
}
void
bcmsdh_cfg_write(void *sdh, uint fnc_num, uint32 addr, uint8 data, int *err)
bcmsdh_cfg_write(void *sdh, uint fnc_num, uint32 addr, u8 data, int *err)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
SDIOH_API_RC status;
......@@ -237,7 +237,7 @@ bcmsdh_cfg_write(void *sdh, uint fnc_num, uint32 addr, uint8 data, int *err)
#endif
status =
sdioh_cfg_write(bcmsdh->sdioh, fnc_num, addr,
(uint8 *) &data);
(u8 *) &data);
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
} while (!SDIOH_API_SUCCESS(status)
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
......@@ -245,7 +245,7 @@ bcmsdh_cfg_write(void *sdh, uint fnc_num, uint32 addr, uint8 data, int *err)
if (err)
*err = SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR;
BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, uint8data = 0x%x\n",
BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u8data = 0x%x\n",
__func__, fnc_num, addr, data));
}
......@@ -296,13 +296,13 @@ bcmsdh_cfg_write_word(void *sdh, uint fnc_num, uint32 addr, uint32 data,
__func__, fnc_num, addr, data));
}
int bcmsdh_cis_read(void *sdh, uint func, uint8 * cis, uint length)
int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
SDIOH_API_RC status;
uint8 *tmp_buf, *tmp_ptr;
uint8 *ptr;
u8 *tmp_buf, *tmp_ptr;
u8 *ptr;
bool ascii = func & ~0xf;
func &= 0x7;
......@@ -318,7 +318,7 @@ int bcmsdh_cis_read(void *sdh, uint func, uint8 * cis, uint length)
if (ascii) {
/* Move binary bits to tmp and format them
into the provided buffer. */
tmp_buf = (uint8 *) MALLOC(bcmsdh->osh, length);
tmp_buf = (u8 *) MALLOC(bcmsdh->osh, length);
if (tmp_buf == NULL) {
BCMSDH_ERROR(("%s: out of memory\n", __func__));
return BCME_NOMEM;
......@@ -388,7 +388,7 @@ uint32 bcmsdh_reg_read(void *sdh, uint32 addr, uint size)
/* if ok, return appropriately masked word */
if (SDIOH_API_SUCCESS(status)) {
switch (size) {
case sizeof(uint8):
case sizeof(u8):
return word & 0xff;
case sizeof(uint16):
return word & 0xffff;
......@@ -452,7 +452,7 @@ bool bcmsdh_regfail(void *sdh)
int
bcmsdh_recv_buf(void *sdh, uint32 addr, uint fn, uint flags,
uint8 *buf, uint nbytes, void *pkt,
u8 *buf, uint nbytes, void *pkt,
bcmsdh_cmplt_fn_t complete, void *handle)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
......@@ -497,7 +497,7 @@ bcmsdh_recv_buf(void *sdh, uint32 addr, uint fn, uint flags,
int
bcmsdh_send_buf(void *sdh, uint32 addr, uint fn, uint flags,
uint8 *buf, uint nbytes, void *pkt,
u8 *buf, uint nbytes, void *pkt,
bcmsdh_cmplt_fn_t complete, void *handle)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
......@@ -540,7 +540,7 @@ bcmsdh_send_buf(void *sdh, uint32 addr, uint fn, uint flags,
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
}
int bcmsdh_rwdata(void *sdh, uint rw, uint32 addr, uint8 *buf, uint nbytes)
int bcmsdh_rwdata(void *sdh, uint rw, uint32 addr, u8 *buf, uint nbytes)
{
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
SDIOH_API_RC status;
......
......@@ -73,7 +73,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
{
int err_ret;
uint32 fbraddr;
uint8 func;
u8 func;
sd_trace(("%s\n", __func__));
......@@ -204,7 +204,7 @@ extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *sd)
extern SDIOH_API_RC sdioh_enable_func_intr(void)
{
uint8 reg;
u8 reg;
int err;
if (gInstance->func[0]) {
......@@ -238,7 +238,7 @@ extern SDIOH_API_RC sdioh_enable_func_intr(void)
extern SDIOH_API_RC sdioh_disable_func_intr(void)
{
uint8 reg;
u8 reg;
int err;
if (gInstance->func[0]) {
......@@ -649,7 +649,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
case IOV_GVAL(IOV_DEVREG):
{
sdreg_t *sd_ptr = (sdreg_t *) params;
uint8 data = 0;
u8 data = 0;
if (sdioh_cfg_read
(si, sd_ptr->func, sd_ptr->offset, &data)) {
......@@ -665,7 +665,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
case IOV_SVAL(IOV_DEVREG):
{
sdreg_t *sd_ptr = (sdreg_t *) params;
uint8 data = (uint8) sd_ptr->value;
u8 data = (u8) sd_ptr->value;
if (sdioh_cfg_write
(si, sd_ptr->func, sd_ptr->offset, &data)) {
......@@ -689,7 +689,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
SDIOH_API_RC sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
{
SDIOH_API_RC status;
uint8 data;
u8 data;
if (enable)
data = 3; /* enable hw oob interrupt */
......@@ -703,7 +703,7 @@ SDIOH_API_RC sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
#endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */
extern SDIOH_API_RC
sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, uint32 addr, uint8 *data)
sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data)
{
SDIOH_API_RC status;
/* No lock needed since sdioh_request_byte does locking */
......@@ -712,7 +712,7 @@ sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, uint32 addr, uint8 *data)
}
extern SDIOH_API_RC
sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, uint32 addr, uint8 *data)
sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data)
{
/* No lock needed since sdioh_request_byte does locking */
SDIOH_API_RC status;
......@@ -725,13 +725,13 @@ static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr)
/* read 24 bits and return valid 17 bit addr */
int i;
uint32 scratch, regdata;
uint8 *ptr = (uint8 *)&scratch;
u8 *ptr = (u8 *)&scratch;
for (i = 0; i < 3; i++) {
if ((sdioh_sdmmc_card_regread(sd, 0, regaddr, 1, &regdata)) !=
SUCCESS)
sd_err(("%s: Can't read!\n", __func__));
*ptr++ = (uint8) regdata;
*ptr++ = (u8) regdata;
regaddr++;
}
......@@ -742,12 +742,12 @@ static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr)
}
extern SDIOH_API_RC
sdioh_cis_read(sdioh_info_t *sd, uint func, uint8 *cisd, uint32 length)
sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, uint32 length)
{
uint32 count;
int offset;
uint32 foo;
uint8 *cis = cisd;
u8 *cis = cisd;
sd_trace(("%s: Func = %d\n", __func__, func));
......@@ -768,7 +768,7 @@ sdioh_cis_read(sdioh_info_t *sd, uint func, uint8 *cisd, uint32 length)
return SDIOH_API_RC_FAIL;
}
*cis = (uint8) (foo & 0xff);
*cis = (u8) (foo & 0xff);
cis++;
}
......@@ -777,7 +777,7 @@ sdioh_cis_read(sdioh_info_t *sd, uint func, uint8 *cisd, uint32 length)
extern SDIOH_API_RC
sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr,
uint8 *byte)
u8 *byte)
{
int err_ret;
......@@ -967,19 +967,19 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
if ((write) && (!fifo)) {
err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
((uint8 *) PKTDATA(pnext)),
((u8 *) PKTDATA(pnext)),
pkt_len);
} else if (write) {
err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
((uint8 *) PKTDATA(pnext)),
((u8 *) PKTDATA(pnext)),
pkt_len);
} else if (fifo) {
err_ret = sdio_readsb(gInstance->func[func],
((uint8 *) PKTDATA(pnext)),
((u8 *) PKTDATA(pnext)),
addr, pkt_len);
} else {
err_ret = sdio_memcpy_fromio(gInstance->func[func],
((uint8 *) PKTDATA(pnext)),
((u8 *) PKTDATA(pnext)),
addr, pkt_len);
}
......@@ -1026,7 +1026,7 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
extern SDIOH_API_RC
sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
uint func, uint addr, uint reg_width, uint buflen_u,
uint8 *buffer, void *pkt)
u8 *buffer, void *pkt)
{
SDIOH_API_RC Status;
void *mypkt = NULL;
......@@ -1160,7 +1160,7 @@ sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, uint32 regaddr,
{
if ((func == 0) || (regsize == 1)) {
uint8 temp = 0;
u8 temp = 0;
sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
*data = temp;
......@@ -1226,7 +1226,7 @@ sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, uint32 regaddr,
{
if ((func == 0) || (regsize == 1)) {
uint8 temp;
u8 temp;
temp = data & 0xff;
sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
......
......@@ -158,7 +158,7 @@ void *pktq_penq(struct pktq *pq, int prec, void *p)
pq->len++;
if (pq->hi_prec < prec)
pq->hi_prec = (uint8) prec;
pq->hi_prec = (u8) prec;
return p;
}
......@@ -185,7 +185,7 @@ void *pktq_penq_head(struct pktq *pq, int prec, void *p)
pq->len++;
if (pq->hi_prec < prec)
pq->hi_prec = (uint8) prec;
pq->hi_prec = (u8) prec;
return p;
}
......@@ -878,11 +878,11 @@ uint pktsetprio(void *pkt, bool update_vtag)
{
struct ether_header *eh;
struct ethervlan_header *evh;
uint8 *pktdata;
u8 *pktdata;
int priority = 0;
int rc = 0;
pktdata = (uint8 *) PKTDATA(pkt);
pktdata = (u8 *) PKTDATA(pkt);
ASSERT(ISALIGNED((uintptr) pktdata, sizeof(uint16)));
eh = (struct ether_header *)pktdata;
......@@ -897,9 +897,9 @@ uint pktsetprio(void *pkt, bool update_vtag)
vlan_prio = (int)(vlan_tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK;
if (ntoh16(evh->ether_type) == ETHER_TYPE_IP) {
uint8 *ip_body =
u8 *ip_body =
pktdata + sizeof(struct ethervlan_header);
uint8 tos_tc = IP_TOS(ip_body);
u8 tos_tc = IP_TOS(ip_body);
dscp_prio = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT);
}
......@@ -925,8 +925,8 @@ uint pktsetprio(void *pkt, bool update_vtag)
rc |= PKTPRIO_UPD;
}
} else if (ntoh16(eh->ether_type) == ETHER_TYPE_IP) {
uint8 *ip_body = pktdata + sizeof(struct ether_header);
uint8 tos_tc = IP_TOS(ip_body);
u8 *ip_body = pktdata + sizeof(struct ether_header);
u8 tos_tc = IP_TOS(ip_body);
priority = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT);
rc |= PKTPRIO_DSCP;
}
......@@ -1049,7 +1049,7 @@ int bcm_iovar_lencheck(const bcm_iovar_t *vi, void *arg, int len, bool set)
* ****************************************************************************
*/
STATIC const uint8 crc8_table[256] = {
STATIC const u8 crc8_table[256] = {
0x00, 0xF7, 0xB9, 0x4E, 0x25, 0xD2, 0x9C, 0x6B,
0x4A, 0xBD, 0xF3, 0x04, 0x6F, 0x98, 0xD6, 0x21,
0x94, 0x63, 0x2D, 0xDA, 0xB1, 0x46, 0x08, 0xFF,
......@@ -1087,14 +1087,14 @@ STATIC const uint8 crc8_table[256] = {
#define CRC_INNER_LOOP(n, c, x) \
(c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff]
uint8 hndcrc8(uint8 *pdata, /* pointer to array of data to process */
u8 hndcrc8(u8 *pdata, /* pointer to array of data to process */
uint nbytes, /* number of input data bytes to process */
uint8 crc /* either CRC8_INIT_VALUE or previous
u8 crc /* either CRC8_INIT_VALUE or previous
return value */
)
{
/* hard code the crc loop instead of using CRC_INNER_LOOP macro
* to avoid the undefined and unnecessary (uint8 >> 8) operation.
* to avoid the undefined and unnecessary (u8 >> 8) operation.
*/
while (nbytes-- > 0)
crc = crc8_table[(crc ^ *pdata++) & 0xff];
......@@ -1159,7 +1159,7 @@ static const uint16 crc16_table[256] = {
0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78
};
uint16 hndcrc16(uint8 *pdata, /* pointer to array of data to process */
uint16 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
return value */
......@@ -1237,19 +1237,19 @@ STATIC const uint32 crc32_table[256] = {
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
};
uint32 hndcrc32(uint8 *pdata, /* pointer to array of data to process */
uint32 hndcrc32(u8 *pdata, /* pointer to array of data to process */
uint nbytes, /* number of input data bytes to process */
uint32 crc /* either CRC32_INIT_VALUE or previous
return value */
)
{
uint8 *pend;
u8 *pend;
#ifdef __mips__
uint8 tmp[4];
u8 tmp[4];
ulong *tptr = (ulong *) tmp;
/* in case the beginning of the buffer isn't aligned */
pend = (uint8 *) ((uint) (pdata + 3) & 0xfffffffc);
pend = (u8 *) ((uint) (pdata + 3) & 0xfffffffc);
nbytes -= (pend - pdata);
while (pdata < pend)
CRC_INNER_LOOP(32, crc, *pdata++);
......@@ -1286,7 +1286,7 @@ uint32 hndcrc32(uint8 *pdata, /* pointer to array of data to process */
void testcrc32(void)
{
uint j, k, l;
uint8 *buf;
u8 *buf;
uint len[CNBUFS];
uint32 crcr;
uint32 crc32tv[CNBUFS] = {
......@@ -1365,7 +1365,7 @@ bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key)
if ((elt->id == key) && (totlen >= (len + 2)))
return elt;
elt = (bcm_tlv_t *) ((uint8 *) elt + (len + 2));
elt = (bcm_tlv_t *) ((u8 *) elt + (len + 2));
totlen -= (len + 2);
}
......@@ -1399,7 +1399,7 @@ bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key)
if ((id == key) && (totlen >= (len + 2)))
return elt;
elt = (bcm_tlv_t *) ((uint8 *) elt + (len + 2));
elt = (bcm_tlv_t *) ((u8 *) elt + (len + 2));
totlen -= (len + 2);
}
return NULL;
......@@ -1463,7 +1463,7 @@ int bcm_format_hex(char *str, const void *bytes, int len)
{
int i;
char *p = str;
const uint8 *src = (const uint8 *)bytes;
const u8 *src = (const u8 *)bytes;
for (i = 0; i < len; i++) {
p += sprintf(p, "%02X", *src);
......@@ -1613,7 +1613,7 @@ static const uint16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = {
/* 185: */ 42170, 44668, 47315, 50119, 53088, 56234, 59566, 63096
};
uint16 bcm_qdbm_to_mw(uint8 qdbm)
uint16 bcm_qdbm_to_mw(u8 qdbm)
{
uint factor = 1;
int idx = qdbm - QDBM_OFFSET;
......@@ -1637,9 +1637,9 @@ uint16 bcm_qdbm_to_mw(uint8 qdbm)
return (nqdBm_to_mW_map[idx] + factor / 2) / factor;
}
uint8 bcm_mw_to_qdbm(uint16 mw)
u8 bcm_mw_to_qdbm(uint16 mw)
{
uint8 qdbm;
u8 qdbm;
int offset;
uint mw_uint = mw;
uint boundary;
......@@ -1663,15 +1663,15 @@ uint8 bcm_mw_to_qdbm(uint16 mw)
break;
}
qdbm += (uint8) offset;
qdbm += (u8) offset;
return qdbm;
}
uint bcm_bitcount(uint8 *bitmap, uint length)
uint bcm_bitcount(u8 *bitmap, uint length)
{
uint bitcount = 0, i;
uint8 tmp;
u8 tmp;
for (i = 0; i < length; i++) {
tmp = bitmap[i];
while (tmp) {
......@@ -1716,7 +1716,7 @@ int bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...)
return r;
}
void bcm_inc_bytes(uchar *num, int num_bytes, uint8 amount)
void bcm_inc_bytes(uchar *num, int num_bytes, u8 amount)
{
int i;
......@@ -1728,7 +1728,7 @@ void bcm_inc_bytes(uchar *num, int num_bytes, uint8 amount)
}
}
int bcm_cmp_bytes(uchar *arg1, uchar *arg2, uint8 nbytes)
int bcm_cmp_bytes(uchar *arg1, uchar *arg2, u8 nbytes)
{
int i;
......
......@@ -101,7 +101,7 @@ typedef struct dhd_pub {
uint hdrlen; /* Total DHD header length (proto + bus) */
uint maxctl; /* Max size rxctl request from proto to bus */
uint rxsz; /* Rx buffer size bus module should use */
uint8 wme_dp; /* wme discard priority */
u8 wme_dp; /* wme discard priority */
/* Dongle media info */
bool iswl; /* Dongle-resident driver is wl */
......@@ -153,7 +153,7 @@ typedef struct dhd_pub {
char *pktfilter[100];
int pktfilter_count;
uint8 country_code[WLC_CNTRY_BUF_SZ];
u8 country_code[WLC_CNTRY_BUF_SZ];
char eventmask[WL_EVENTING_MASK_LEN];
#if defined(CONFIG_HAS_WAKELOCK)
......@@ -277,10 +277,10 @@ static inline void WAKE_LOCK_DESTROY(dhd_pub_t *dhdp, int index)
}
typedef struct dhd_if_event {
uint8 ifidx;
uint8 action;
uint8 flags;
uint8 bssidx;
u8 ifidx;
u8 action;
u8 flags;
u8 bssidx;
} dhd_if_event_t;
/*
......@@ -348,7 +348,7 @@ extern void dhd_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
extern void dhd_os_sdlock_eventq(dhd_pub_t *pub);
extern void dhd_os_sdunlock_eventq(dhd_pub_t *pub);
#ifdef DHD_DEBUG
extern int write_to_file(dhd_pub_t *dhd, uint8 *buf, int size);
extern int write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
#endif /* DHD_DEBUG */
#if defined(OOB_INTR_ONLY)
extern int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr);
......@@ -369,7 +369,7 @@ extern void dhd_timeout_start(dhd_timeout_t *tmo, uint usec);
extern int dhd_timeout_expired(dhd_timeout_t *tmo);
extern int dhd_ifname2idx(struct dhd_info *dhd, char *name);
extern uint8 *dhd_bssidx2bssid(dhd_pub_t *dhd, int idx);
extern u8 *dhd_bssidx2bssid(dhd_pub_t *dhd, int idx);
extern int wl_host_event(struct dhd_info *dhd, int *idx, void *pktdata,
wl_event_msg_t *, void **data_ptr);
extern void wl_event_to_host_order(wl_event_msg_t *evt);
......@@ -377,7 +377,7 @@ extern void wl_event_to_host_order(wl_event_msg_t *evt);
extern void dhd_common_init(void);
extern int dhd_add_if(struct dhd_info *dhd, int ifidx, void *handle,
char *name, uint8 *mac_addr, uint32 flags, uint8 bssidx);
char *name, u8 *mac_addr, uint32 flags, u8 bssidx);
extern void dhd_del_if(struct dhd_info *dhd, int ifidx);
extern void dhd_vif_add(struct dhd_info *dhd, int ifidx, char *name);
......@@ -393,7 +393,7 @@ extern int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, void *pkt);
/* Send event to host */
extern void dhd_sendup_event(dhd_pub_t *dhdp, wl_event_msg_t *event,
void *data);
extern int dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag);
extern int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag);
extern uint dhd_bus_status(dhd_pub_t *dhdp);
extern int dhd_bus_start(dhd_pub_t *dhdp);
......
......@@ -53,9 +53,9 @@ extern int dhd_preinit_ioctls(dhd_pub_t *dhd);
typedef struct dhd_prot {
uint16 reqid;
uint8 pending;
u8 pending;
uint32 lastcmd;
uint8 bus_header[BUS_HEADER_LEN];
u8 bus_header[BUS_HEADER_LEN];
cdc_ioctl_t msg;
unsigned char buf[WLC_IOCTL_MAXLEN + ROUND_UP_MARGIN];
} dhd_prot_t;
......@@ -285,7 +285,7 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len)
slen = strlen("wme_dp") + 1;
if (len >= (int)(slen + sizeof(int)))
bcopy(((char *)buf + slen), &val, sizeof(int));
dhd->wme_dp = (uint8) ltoh32(val);
dhd->wme_dp = (u8) ltoh32(val);
}
prot->pending = FALSE;
......@@ -334,7 +334,7 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf)
BDC_SET_IF_IDX(h, ifidx);
}
bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, uint8 * fcbits)
bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits)
{
#ifdef BDC
struct bdc_header *h;
......
......@@ -986,7 +986,7 @@ static int wl_pattern_atoh(char *src, char *dst)
char num[3];
strncpy(num, src, 2);
num[2] = '\0';
dst[i] = (uint8) strtoul(num, NULL, 16);
dst[i] = (u8) strtoul(num, NULL, 16);
src += 2;
}
return i;
......
......@@ -212,7 +212,7 @@ typedef struct dhd_if {
int idx; /* iface idx in dongle */
int state; /* interface state */
uint subunit; /* subunit */
uint8 mac_addr[ETHER_ADDR_LEN]; /* assigned MAC address */
u8 mac_addr[ETHER_ADDR_LEN]; /* assigned MAC address */
bool attached; /* Delayed attachment when unset */
bool txflowcontrol; /* Per interface flow control indicator */
char name[IFNAMSIZ + 1]; /* linux interface name */
......@@ -1042,7 +1042,7 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, void *pktbuf)
/* Update multicast statistic */
if (PKTLEN(pktbuf) >= ETHER_ADDR_LEN) {
uint8 *pktdata = (uint8 *) PKTDATA(pktbuf);
u8 *pktdata = (u8 *) PKTDATA(pktbuf);
struct ether_header *eh = (struct ether_header *)pktdata;
if (ETHER_ISMULTI(eh->ether_dhost))
......@@ -1849,7 +1849,7 @@ void dhd_osl_detach(osl_t *osh)
int
dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
uint8 *mac_addr, uint32 flags, uint8 bssidx)
u8 *mac_addr, uint32 flags, u8 bssidx)
{
dhd_if_t *ifp;
......@@ -2224,7 +2224,7 @@ int dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
struct net_device *net;
uint8 temp_addr[ETHER_ADDR_LEN] = {
u8 temp_addr[ETHER_ADDR_LEN] = {
0x00, 0x90, 0x4c, 0x11, 0x22, 0x33};
DHD_TRACE(("%s: ifidx %d\n", __func__, ifidx));
......@@ -2795,7 +2795,7 @@ void dhd_wait_event_wakeup(dhd_pub_t *dhd)
return;
}
int dhd_dev_reset(struct net_device *dev, uint8 flag)
int dhd_dev_reset(struct net_device *dev, u8 flag)
{
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
......@@ -2942,7 +2942,7 @@ int dhd_wait_pend8021x(struct net_device *dev)
}
#ifdef DHD_DEBUG
int write_to_file(dhd_pub_t *dhd, uint8 *buf, int size)
int write_to_file(dhd_pub_t *dhd, u8 *buf, int size)
{
int ret = 0;
struct file *fp;
......
......@@ -46,7 +46,7 @@ extern int dhd_prot_init(dhd_pub_t *dhdp);
/* Stop protocol: sync w/dongle state. */
extern void dhd_prot_stop(dhd_pub_t *dhdp);
extern bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, uint8 *fcbits);
extern bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 *fcbits);
/* Add any protocol-specific data header.
* Caller must reserve prot_hdrlen prepend space.
......
......@@ -184,7 +184,7 @@ struct wl_cfg80211_bss_info {
uint16 channel;
int16 rssi;
uint16 frame_len;
uint8 frame_buf[1];
u8 frame_buf[1];
};
/* basic structure of scan request */
......@@ -195,7 +195,7 @@ struct wl_scan_req {
/* basic structure of information element */
struct wl_ie {
uint16 offset;
uint8 buf[WL_TLV_INFO_MAX];
u8 buf[WL_TLV_INFO_MAX];
};
/* event queue for cfg80211 main event */
......@@ -217,18 +217,18 @@ struct wl_security {
/* ibss information for currently joined ibss network */
struct wl_ibss {
uint8 beacon_interval; /* in millisecond */
uint8 atim; /* in millisecond */
u8 beacon_interval; /* in millisecond */
u8 atim; /* in millisecond */
int8 join_only;
uint8 band;
uint8 channel;
u8 band;
u8 channel;
};
/* dongle profile */
struct wl_profile {
uint32 mode;
struct wlc_ssid ssid;
uint8 bssid[ETHER_ADDR_LEN];
u8 bssid[ETHER_ADDR_LEN];
struct wl_security sec;
struct wl_ibss ibss;
int32 band;
......@@ -258,9 +258,9 @@ struct wl_iscan_ctrl {
/* association inform */
struct wl_connect_info {
uint8 *req_ie;
u8 *req_ie;
int32 req_ie_len;
uint8 *resp_ie;
u8 *resp_ie;
int32 resp_ie_len;
};
......@@ -329,9 +329,9 @@ struct wl_priv {
bool dongle_up; /* indicate whether dongle up or not */
bool roam_on; /* on/off switch for dongle self-roaming */
bool scan_tried; /* indicates if first scan attempted */
uint8 *ioctl_buf; /* ioctl buffer */
uint8 *extra_buf; /* maily to grab assoc information */
uint8 ci[0] __attribute__ ((__aligned__(NETDEV_ALIGN)));
u8 *ioctl_buf; /* ioctl buffer */
u8 *extra_buf; /* maily to grab assoc information */
u8 ci[0] __attribute__ ((__aligned__(NETDEV_ALIGN)));
};
#define wl_to_dev(w) (wiphy_dev(wl->wdev->wiphy))
......
......@@ -499,7 +499,7 @@ wl_iw_get_range(struct net_device *dev,
int phytype;
int bw_cap = 0, sgi_tx = 0, nmode = 0;
channel_info_t ci;
uint8 nrate_list2copy = 0;
u8 nrate_list2copy = 0;
uint16 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},
......@@ -1407,10 +1407,10 @@ wl_iw_iscan_set_scan(struct net_device *dev,
#endif /* WL_IW_USE_ISCAN */
#if WIRELESS_EXT > 17
static bool ie_is_wpa_ie(uint8 **wpaie, uint8 **tlvs, int *tlvs_len)
static bool ie_is_wpa_ie(u8 **wpaie, u8 **tlvs, int *tlvs_len)
{
uint8 *ie = *wpaie;
u8 *ie = *wpaie;
if ((ie[1] >= 6) &&
!bcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x01"), 4)) {
......@@ -1423,10 +1423,10 @@ static bool ie_is_wpa_ie(uint8 **wpaie, uint8 **tlvs, int *tlvs_len)
return FALSE;
}
static bool ie_is_wps_ie(uint8 **wpsie, uint8 **tlvs, int *tlvs_len)
static bool ie_is_wps_ie(u8 **wpsie, u8 **tlvs, int *tlvs_len)
{
uint8 *ie = *wpsie;
u8 *ie = *wpsie;
if ((ie[1] >= 4) &&
!bcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x04"), 4)) {
......@@ -1451,7 +1451,7 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
event = *event_p;
if (bi->ie_length) {
bcm_tlv_t *ie;
uint8 *ptr = ((uint8 *) bi) + sizeof(wl_bss_info_t);
u8 *ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
int ptr_len = bi->ie_length;
#ifdef BCMWPA2
......@@ -1463,11 +1463,11 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
IWE_STREAM_ADD_POINT(info, event, end, &iwe,
(char *)ie);
}
ptr = ((uint8 *) bi) + sizeof(wl_bss_info_t);
ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
#endif
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) {
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
if (ie_is_wps_ie(((u8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
event =
......@@ -1477,10 +1477,10 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
}
}
ptr = ((uint8 *) bi) + sizeof(wl_bss_info_t);
ptr = ((u8 *) bi) + sizeof(wl_bss_info_t);
ptr_len = bi->ie_length;
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) {
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
if (ie_is_wpa_ie(((u8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
event =
......@@ -1743,7 +1743,7 @@ wl_iw_iscan_get_scan(struct net_device *dev,
iscan_info_t *iscan = g_iscan;
iscan_buf_t *p_buf;
uint32 counter = 0;
uint8 channel;
u8 channel;
WL_TRACE(("%s %s buflen_from_user %d:\n", dev->name, __func__,
dwrq->length));
......@@ -2205,7 +2205,7 @@ wl_iw_get_txpow(struct net_device *dev,
struct iw_param *vwrq, char *extra)
{
int error, disable, txpwrdbm;
uint8 result;
u8 result;
WL_TRACE(("%s: SIOCGIWTXPOW\n", dev->name));
......@@ -2218,7 +2218,7 @@ wl_iw_get_txpow(struct net_device *dev,
return error;
disable = dtoh32(disable);
result = (uint8) (txpwrdbm & ~WL_TXPWR_OVERRIDE);
result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE);
vwrq->value = (int32) bcm_qdbm_to_mw(result);
vwrq->fixed = 0;
vwrq->disabled =
......@@ -2585,7 +2585,7 @@ wl_iw_set_encodeext(struct net_device *dev,
bcopy((void *)iwe->key, key.data, iwe->key_len);
if (iwe->alg == IW_ENCODE_ALG_TKIP) {
uint8 keybuf[8];
u8 keybuf[8];
bcopy(&key.data[24], keybuf, sizeof(keybuf));
bcopy(&key.data[16], &key.data[24], sizeof(keybuf));
bcopy(keybuf, &key.data[16], sizeof(keybuf));
......@@ -3508,7 +3508,7 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
cmd = IWEVPMKIDCAND;
pmkcandlist = data;
count =
ntoh32_ua((uint8 *) &
ntoh32_ua((u8 *) &
pmkcandlist->npmkid_cand);
ASSERT(count >= 0);
wrqu.data.length = sizeof(struct iw_pmkid_cand);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment