Skip to content

Commit

Permalink
Staging: brcm80211: include: s/uint8/u8/
Browse files Browse the repository at this point in the history
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: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Oct 5, 2010
1 parent e868ab0 commit de9bca6
Show file tree
Hide file tree
Showing 36 changed files with 430 additions and 430 deletions.
14 changes: 7 additions & 7 deletions drivers/staging/brcm80211/include/bcm_rpc_tp.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ extern void bcm_rpc_tp_txflowctl(rpc_tp_info_t *rpcb, bool state, int prio);
extern void bcm_rpc_tp_txflowctlcb_init(rpc_tp_info_t *rpc_th, void *ctx,
rpc_txflowctl_cb_t cb);
extern void bcm_rpc_tp_txflowctlcb_deinit(rpc_tp_info_t *rpc_th);
extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, uint8 hiwm,
uint8 lowm);
extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, uint8 *hiwm,
uint8 *lowm);
extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, u8 hiwm,
u8 lowm);
extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm,
u8 *lowm);
#endif /* WLC_LOW */

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, uint8 sf,
extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf,
uint16 bytes);
extern void bcm_rpc_tp_agg_limit_get(rpc_tp_info_t *rpc_th, uint8 *sf,
extern void bcm_rpc_tp_agg_limit_get(rpc_tp_info_t *rpc_th, u8 *sf,
uint16 *bytes);

#define BCM_RPC_TP_MSG_LEVEL_MASK 0x00ff
Expand All @@ -131,7 +131,7 @@ extern void bcm_rpc_tp_agg_limit_get(rpc_tp_info_t *rpc_th, uint8 *sf,
#define RPC_TP_MSG_HOST_AGG_VAL 0x0004 /* DNGL TP agg msg */
#define RPC_TP_MSG_HOST_DEA_VAL 0x0008 /* DNGL TP deag msg */

extern void bcm_rpc_tp_msglevel_set(rpc_tp_info_t *rpc_th, uint8 msglevel,
extern void bcm_rpc_tp_msglevel_set(rpc_tp_info_t *rpc_th, u8 msglevel,
bool high_low);

#endif /* _bcm_rpc_tp_h_ */
8 changes: 4 additions & 4 deletions drivers/staging/brcm80211/include/bcm_xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
*
*/
typedef struct {
uint8 *buf; /* pointer to current position in origbuf */
u8 *buf; /* pointer to current position in origbuf */
uint size; /* current (residual) size in bytes */
uint8 *origbuf; /* unmodified pointer to orignal buffer */
u8 *origbuf; /* unmodified pointer to orignal buffer */
uint origsize; /* unmodified orignal buffer size in bytes */
} bcm_xdr_buf_t;

Expand All @@ -47,8 +47,8 @@ int bcm_xdr_unpack_opaque_varlen(bcm_xdr_buf_t *b, uint *plen, void **pdata);
int bcm_xdr_pack_string(bcm_xdr_buf_t *b, char *str);
int bcm_xdr_unpack_string(bcm_xdr_buf_t *b, uint *plen, char **pstr);

int bcm_xdr_pack_uint8_vec(bcm_xdr_buf_t *, uint8 *vec, uint32 elems);
int bcm_xdr_unpack_uint8_vec(bcm_xdr_buf_t *, uint8 *vec, uint32 elems);
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_uint32_vec(bcm_xdr_buf_t *b, uint len, void *vec);
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/brcm80211/include/bcmcdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ typedef struct cdc_ioctl {
((idx) << BDC_FLAG2_IF_SHIFT)))

struct bdc_header {
uint8 flags; /* Flags */
uint8 priority; /* 802.1d Priority 0:2 bits, 4:7 flow
u8 flags; /* Flags */
u8 priority; /* 802.1d Priority 0:2 bits, 4:7 flow
control info for usb */
uint8 flags2;
uint8 rssi;
u8 flags2;
u8 rssi;
};
48 changes: 24 additions & 24 deletions drivers/staging/brcm80211/include/bcmendian.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@
#define _NTOH32_UA(cp) (((cp)[0] << 24) | ((cp)[1] << 16) | ((cp)[2] << 8) | (cp)[3])

#define ltoh_ua(ptr) \
(sizeof(*(ptr)) == sizeof(uint8) ? *(const uint8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _LTOH16_UA((const uint8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _LTOH32_UA((const uint8 *)(ptr)) : \
*(uint8 *)0)
(sizeof(*(ptr)) == sizeof(u8) ? *(const u8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _LTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _LTOH32_UA((const u8 *)(ptr)) : \
*(u8 *)0)

#define ntoh_ua(ptr) \
(sizeof(*(ptr)) == sizeof(uint8) ? *(const uint8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _NTOH16_UA((const uint8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _NTOH32_UA((const uint8 *)(ptr)) : \
*(uint8 *)0)
(sizeof(*(ptr)) == sizeof(u8) ? *(const u8 *)(ptr) : \
sizeof(*(ptr)) == sizeof(uint16) ? _NTOH16_UA((const u8 *)(ptr)) : \
sizeof(*(ptr)) == sizeof(uint32) ? _NTOH32_UA((const u8 *)(ptr)) : \
*(u8 *)0)

#ifdef __GNUC__

Expand Down Expand Up @@ -148,14 +148,14 @@

#define htol16_ua_store(val, bytes) ({ \
uint16 _val = (val); \
uint8 *_bytes = (uint8 *)(bytes); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val & 0xff; \
_bytes[1] = _val >> 8; \
})

#define htol32_ua_store(val, bytes) ({ \
uint32 _val = (val); \
uint8 *_bytes = (uint8 *)(bytes); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val & 0xff; \
_bytes[1] = (_val >> 8) & 0xff; \
_bytes[2] = (_val >> 16) & 0xff; \
Expand All @@ -164,37 +164,37 @@

#define hton16_ua_store(val, bytes) ({ \
uint16 _val = (val); \
uint8 *_bytes = (uint8 *)(bytes); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val >> 8; \
_bytes[1] = _val & 0xff; \
})

#define hton32_ua_store(val, bytes) ({ \
uint32 _val = (val); \
uint8 *_bytes = (uint8 *)(bytes); \
u8 *_bytes = (u8 *)(bytes); \
_bytes[0] = _val >> 24; \
_bytes[1] = (_val >> 16) & 0xff; \
_bytes[2] = (_val >> 8) & 0xff; \
_bytes[3] = _val & 0xff; \
})

#define ltoh16_ua(bytes) ({ \
const uint8 *_bytes = (const uint8 *)(bytes); \
const u8 *_bytes = (const u8 *)(bytes); \
_LTOH16_UA(_bytes); \
})

#define ltoh32_ua(bytes) ({ \
const uint8 *_bytes = (const uint8 *)(bytes); \
const u8 *_bytes = (const u8 *)(bytes); \
_LTOH32_UA(_bytes); \
})

#define ntoh16_ua(bytes) ({ \
const uint8 *_bytes = (const uint8 *)(bytes); \
const u8 *_bytes = (const u8 *)(bytes); \
_NTOH16_UA(_bytes); \
})

#define ntoh32_ua(bytes) ({ \
const uint8 *_bytes = (const uint8 *)(bytes); \
const u8 *_bytes = (const u8 *)(bytes); \
_NTOH32_UA(_bytes); \
})

Expand Down Expand Up @@ -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, uint8 *bytes)
static inline void htol16_ua_store(uint16 val, u8 *bytes)
{
bytes[0] = val & 0xff;
bytes[1] = val >> 8;
Expand All @@ -241,7 +241,7 @@ static inline void htol16_ua_store(uint16 val, uint8 *bytes)
/*
* Store 32-bit value to unaligned little-endian byte array.
*/
static inline void htol32_ua_store(uint32 val, uint8 *bytes)
static inline void htol32_ua_store(uint32 val, u8 *bytes)
{
bytes[0] = val & 0xff;
bytes[1] = (val >> 8) & 0xff;
Expand All @@ -252,7 +252,7 @@ static inline void htol32_ua_store(uint32 val, uint8 *bytes)
/*
* Store 16-bit value to unaligned network-(big-)endian byte array.
*/
static inline void hton16_ua_store(uint16 val, uint8 *bytes)
static inline void hton16_ua_store(uint16 val, u8 *bytes)
{
bytes[0] = val >> 8;
bytes[1] = val & 0xff;
Expand All @@ -261,7 +261,7 @@ static inline void hton16_ua_store(uint16 val, uint8 *bytes)
/*
* Store 32-bit value to unaligned network-(big-)endian byte array.
*/
static inline void hton32_ua_store(uint32 val, uint8 *bytes)
static inline void hton32_ua_store(uint32 val, u8 *bytes)
{
bytes[0] = val >> 24;
bytes[1] = (val >> 16) & 0xff;
Expand All @@ -274,31 +274,31 @@ static inline void hton32_ua_store(uint32 val, uint8 *bytes)
*/
static inline uint16 ltoh16_ua(const void *bytes)
{
return _LTOH16_UA((const uint8 *)bytes);
return _LTOH16_UA((const u8 *)bytes);
}

/*
* Load 32-bit value from unaligned little-endian byte array.
*/
static inline uint32 ltoh32_ua(const void *bytes)
{
return _LTOH32_UA((const uint8 *)bytes);
return _LTOH32_UA((const u8 *)bytes);
}

/*
* Load 16-bit value from unaligned big-(network-)endian byte array.
*/
static inline uint16 ntoh16_ua(const void *bytes)
{
return _NTOH16_UA((const uint8 *)bytes);
return _NTOH16_UA((const u8 *)bytes);
}

/*
* Load 32-bit value from unaligned big-(network-)endian byte array.
*/
static inline uint32 ntoh32_ua(const void *bytes)
{
return _NTOH32_UA((const uint8 *)bytes);
return _NTOH32_UA((const u8 *)bytes);
}

#endif /* !__GNUC__ */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/include/bcmnvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ extern int nvram_getall(char *nvram_buf, int count);
* returns the crc value of the nvram
* @param nvh nvram header pointer
*/
uint8 nvram_calc_crc(struct nvram_header *nvh);
u8 nvram_calc_crc(struct nvram_header *nvh);

#endif /* _LANGUAGE_ASSEMBLY */

Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/brcm80211/include/bcmsdbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern int sdioh_release_host_and_unlock(sdioh_info_t *si);

/* read or write one byte using cmd52 */
extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc,
uint addr, uint8 *byte);
uint addr, u8 *byte);

/* read or write 2/4 bytes using cmd53 */
extern SDIOH_API_RC sdioh_request_word(sdioh_info_t *si, uint cmd_type,
Expand All @@ -78,17 +78,17 @@ extern SDIOH_API_RC sdioh_request_word(sdioh_info_t *si, uint cmd_type,
extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma,
uint fix_inc, uint rw, uint fnc_num,
uint32 addr, uint regwidth,
uint32 buflen, uint8 *buffer,
uint32 buflen, u8 *buffer,
void *pkt);

/* get cis data */
extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, uint8 *cis,
extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
uint32 length);

extern SDIOH_API_RC sdioh_cfg_read(sdioh_info_t *si, uint fuc, uint32 addr,
uint8 *data);
u8 *data);
extern SDIOH_API_RC sdioh_cfg_write(sdioh_info_t *si, uint fuc, uint32 addr,
uint8 *data);
u8 *data);

/* query number of io functions */
extern uint sdioh_query_iofnum(sdioh_info_t *si);
Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/brcm80211/include/bcmsdh.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ extern int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
* data: data byte to write
* err: pointer to error code (or NULL)
*/
extern uint8 bcmsdh_cfg_read(void *sdh, uint func, uint32 addr, int *err);
extern void bcmsdh_cfg_write(void *sdh, uint func, uint32 addr, uint8 data,
extern u8 bcmsdh_cfg_read(void *sdh, uint func, uint32 addr, int *err);
extern void bcmsdh_cfg_write(void *sdh, uint func, uint32 addr, u8 data,
int *err);

/* Read/Write 4bytes from/to cfg space */
Expand All @@ -92,7 +92,7 @@ extern void bcmsdh_cfg_write_word(void *sdh, uint fnc_num, uint32 addr,
* Internally, this routine uses the values from the cis base regs (0x9-0xB)
* to form an SDIO-space address to read the data from.
*/
extern int bcmsdh_cis_read(void *sdh, uint func, uint8 *cis, uint length);
extern int bcmsdh_cis_read(void *sdh, uint func, u8 *cis, uint length);

/* Synchronous access to device (client) core registers via CMD53 to F1.
* addr: backplane address (i.e. >= regsva from attach)
Expand All @@ -119,10 +119,10 @@ extern bool bcmsdh_regfail(void *sdh);
*/
typedef void (*bcmsdh_cmplt_fn_t) (void *handle, int status, bool sync_waiting);
extern 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);
extern 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);

/* Flags bits */
Expand All @@ -140,7 +140,7 @@ extern int bcmsdh_recv_buf(void *sdh, uint32 addr, uint fn, uint flags,
* nbytes: number of bytes to transfer to/from buf
* Returns 0 or error code.
*/
extern int bcmsdh_rwdata(void *sdh, uint rw, uint32 addr, uint8 *buf,
extern int bcmsdh_rwdata(void *sdh, uint rw, uint32 addr, u8 *buf,
uint nbytes);

/* Issue an abort to the specified function */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/include/bcmsdh_sdmmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct sdioh_info {
bool use_client_ints; /* If this is false, make sure to restore */
int sd_mode; /* SD1/SD4/SPI */
int client_block_size[SDIOD_MAX_IOFUNCS]; /* Blocksize */
uint8 num_funcs; /* Supported funcs on client */
u8 num_funcs; /* Supported funcs on client */
uint32 com_cis_ptr;
uint32 func_cis_ptr[SDIOD_MAX_IOFUNCS];
uint max_dma_len;
Expand Down
22 changes: 11 additions & 11 deletions drivers/staging/brcm80211/include/bcmsdpcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,36 @@

/* SW frame header */
#define SDPCM_SEQUENCE_MASK 0x000000ff /* Sequence Number Mask */
#define SDPCM_PACKET_SEQUENCE(p) (((uint8 *)p)[0] & 0xff) /* p starts w/SW Header */
#define SDPCM_PACKET_SEQUENCE(p) (((u8 *)p)[0] & 0xff) /* p starts w/SW Header */

#define SDPCM_CHANNEL_MASK 0x00000f00 /* Channel Number Mask */
#define SDPCM_CHANNEL_SHIFT 8 /* Channel Number Shift */
#define SDPCM_PACKET_CHANNEL(p) (((uint8 *)p)[1] & 0x0f) /* p starts w/SW Header */
#define SDPCM_PACKET_CHANNEL(p) (((u8 *)p)[1] & 0x0f) /* p starts w/SW Header */

#define SDPCM_FLAGS_MASK 0x0000f000 /* Mask of flag bits */
#define SDPCM_FLAGS_SHIFT 12 /* Flag bits shift */
#define SDPCM_PACKET_FLAGS(p) ((((uint8 *)p)[1] & 0xf0) >> 4) /* p starts w/SW Header */
#define SDPCM_PACKET_FLAGS(p) ((((u8 *)p)[1] & 0xf0) >> 4) /* p starts w/SW Header */

/* Next Read Len: lookahead length of next frame, in 16-byte units (rounded up) */
#define SDPCM_NEXTLEN_MASK 0x00ff0000 /* Next Read Len Mask */
#define SDPCM_NEXTLEN_SHIFT 16 /* Next Read Len Shift */
#define SDPCM_NEXTLEN_VALUE(p) ((((uint8 *)p)[2] & 0xff) << 4) /* p starts w/SW Header */
#define SDPCM_NEXTLEN_VALUE(p) ((((u8 *)p)[2] & 0xff) << 4) /* p starts w/SW Header */
#define SDPCM_NEXTLEN_OFFSET 2

/* Data Offset from SOF (HW Tag, SW Tag, Pad) */
#define SDPCM_DOFFSET_OFFSET 3 /* Data Offset */
#define SDPCM_DOFFSET_VALUE(p) (((uint8 *)p)[SDPCM_DOFFSET_OFFSET] & 0xff)
#define SDPCM_DOFFSET_VALUE(p) (((u8 *)p)[SDPCM_DOFFSET_OFFSET] & 0xff)
#define SDPCM_DOFFSET_MASK 0xff000000
#define SDPCM_DOFFSET_SHIFT 24

#define SDPCM_FCMASK_OFFSET 4 /* Flow control */
#define SDPCM_FCMASK_VALUE(p) (((uint8 *)p)[SDPCM_FCMASK_OFFSET] & 0xff)
#define SDPCM_FCMASK_VALUE(p) (((u8 *)p)[SDPCM_FCMASK_OFFSET] & 0xff)
#define SDPCM_WINDOW_OFFSET 5 /* Credit based fc */
#define SDPCM_WINDOW_VALUE(p) (((uint8 *)p)[SDPCM_WINDOW_OFFSET] & 0xff)
#define SDPCM_WINDOW_VALUE(p) (((u8 *)p)[SDPCM_WINDOW_OFFSET] & 0xff)
#define SDPCM_VERSION_OFFSET 6 /* Version # */
#define SDPCM_VERSION_VALUE(p) (((uint8 *)p)[SDPCM_VERSION_OFFSET] & 0xff)
#define SDPCM_VERSION_VALUE(p) (((u8 *)p)[SDPCM_VERSION_OFFSET] & 0xff)
#define SDPCM_UNUSED_OFFSET 7 /* Spare */
#define SDPCM_UNUSED_VALUE(p) (((uint8 *)p)[SDPCM_UNUSED_OFFSET] & 0xff)
#define SDPCM_UNUSED_VALUE(p) (((u8 *)p)[SDPCM_UNUSED_OFFSET] & 0xff)

#define SDPCM_SWHEADER_LEN 8 /* SW header is 64 bits */

Expand All @@ -131,7 +131,7 @@
/* For GLOM_CHANNEL frames, use a flag to indicate descriptor frame */
#define SDPCM_GLOMDESC_FLAG (SDPCM_FLAG_GLOMDESC << SDPCM_FLAGS_SHIFT)

#define SDPCM_GLOMDESC(p) (((uint8 *)p)[1] & 0x80)
#define SDPCM_GLOMDESC(p) (((u8 *)p)[1] & 0x80)

/* For TEST_CHANNEL packets, define another 4-byte header */
#define SDPCM_TEST_HDRLEN 4 /* Generally: Cmd(1), Ext(1), Len(2);
Expand All @@ -146,7 +146,7 @@
#define SDPCM_TEST_SEND 0x05 /* Receiver sets send mode. Ext is boolean on/off */

/* Handy macro for filling in datagen packets with a pattern */
#define SDPCM_TEST_FILL(byteno, id) ((uint8)(id + byteno))
#define SDPCM_TEST_FILL(byteno, id) ((u8)(id + byteno))

/*
* Software counters (first part matches hardware counters)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/include/bcmsrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ extern int srom_read(si_t *sih, uint bus, void *curmap, osl_t *osh,
/* parse standard PCMCIA cis, normally used by SB/PCMCIA/SDIO/SPI/OTP
* and extract from it into name=value pairs
*/
extern int srom_parsecis(osl_t *osh, uint8 **pcis, uint ciscnt,
extern int srom_parsecis(osl_t *osh, u8 **pcis, uint ciscnt,
char **vars, uint *count);
#endif /* _bcmsrom_h_ */
Loading

0 comments on commit de9bca6

Please sign in to comment.