#ifdef BCMDRIVER
/* copy a pkt buffer chain into a buffer */
-uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar * buf)
+uint pktcopy(osl_t *osh, void *p, uint offset, int len, unsigned char * buf)
{
uint n, ret = 0;
}
/* copy a buffer into a pkt buffer chain */
-uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, uchar *buf)
+uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, unsigned char *buf)
{
uint n, ret = 0;
}
/* pretty hex print a contiguous buffer */
-void prhex(const char *msg, uchar *buf, uint nbytes)
+void prhex(const char *msg, unsigned char *buf, uint nbytes)
{
char line[128], *p;
uint i;
return r;
}
-void bcm_inc_bytes(uchar *num, int num_bytes, u8 amount)
+void bcm_inc_bytes(unsigned char *num, int num_bytes, u8 amount)
{
int i;
}
}
-int bcm_cmp_bytes(uchar *arg1, uchar *arg2, u8 nbytes)
+int bcm_cmp_bytes(unsigned char *arg1, unsigned char *arg2, u8 nbytes)
{
int i;
return 0;
}
-void bcm_print_bytes(char *name, const uchar *data, int len)
+void bcm_print_bytes(char *name, const unsigned char *data, int len)
{
int i;
int per_line = 0;
#if defined(WLTINYDUMP) || defined(WLMSG_INFORM) || defined(WLMSG_ASSOC) || \
defined(WLMSG_PRPKT) || defined(WLMSG_WSEC)
-int bcm_format_ssid(char *buf, const uchar ssid[], uint ssid_len)
+int bcm_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len)
{
uint i, c;
char *p = buf;
if (c == '\\') {
*p++ = '\\';
*p++ = '\\';
- } else if (bcm_isprint((uchar) c)) {
+ } else if (bcm_isprint((unsigned char) c)) {
*p++ = (char)c;
} else {
p += snprintf(p, (endp - p), "\\x%02X", c);
extern void dhd_vif_del(struct dhd_info *dhd, int ifidx);
extern void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx);
-extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, uchar * cp,
+extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, unsigned char * cp,
int len);
/* Send packet to dongle via data channel */
/* Send/receive a control message to/from the dongle.
* Expects caller to enforce a single outstanding transaction.
*/
-extern int dhd_bus_txctl(struct dhd_bus *bus, uchar *msg, uint msglen);
-extern int dhd_bus_rxctl(struct dhd_bus *bus, uchar *msg, uint msglen);
+extern int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
+extern int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
/* Watchdog timer function */
extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
#ifdef DHD_DEBUG
/* Device console input function */
-extern int dhd_bus_console_in(dhd_pub_t *dhd, uchar *msg, uint msglen);
+extern int dhd_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
#endif /* DHD_DEBUG */
/* Deferred processing for the bus, return TRUE requests reschedule */
len = CDC_MAX_MSG_SIZE;
/* Send request */
- return dhd_bus_txctl(dhd->bus, (uchar *)&prot->msg, len);
+ return dhd_bus_txctl(dhd->bus, (unsigned char *)&prot->msg, len);
}
static int dhdcdc_cmplt(dhd_pub_t *dhd, uint32 id, uint32 len)
do {
ret =
- dhd_bus_rxctl(dhd->bus, (uchar *)&prot->msg,
+ dhd_bus_rxctl(dhd->bus, (unsigned char *)&prot->msg,
len + sizeof(cdc_ioctl_t));
if (ret < 0)
break;
uint i, status, reason;
bool group = FALSE, flush_txq = FALSE, link = FALSE;
char *auth_str, *event_name;
- uchar *buf;
+ unsigned char *buf;
char err_msg[256], eabuf[ETHER_ADDR_STR_LEN];
static struct {
uint event;
datalen = ntoh32(event->datalen);
/* debug dump of event messages */
sprintf(eabuf, "%02x:%02x:%02x:%02x:%02x:%02x",
- (uchar) event->addr.octet[0] & 0xff,
- (uchar) event->addr.octet[1] & 0xff,
- (uchar) event->addr.octet[2] & 0xff,
- (uchar) event->addr.octet[3] & 0xff,
- (uchar) event->addr.octet[4] & 0xff,
- (uchar) event->addr.octet[5] & 0xff);
+ (unsigned char) event->addr.octet[0] & 0xff,
+ (unsigned char) event->addr.octet[1] & 0xff,
+ (unsigned char) event->addr.octet[2] & 0xff,
+ (unsigned char) event->addr.octet[3] & 0xff,
+ (unsigned char) event->addr.octet[4] & 0xff,
+ (unsigned char) event->addr.octet[5] & 0xff);
event_name = "UNKNOWN";
for (i = 0; i < ARRAYSIZE(event_names); i++) {
uint32 nblost;
char *s, *p;
- buf = (uchar *) event_data;
+ buf = (unsigned char *) event_data;
memcpy(&hdr, buf, MSGTRACE_HDRLEN);
if (hdr.version != MSGTRACE_VERSION) {
/* show any appended data */
if (datalen) {
- buf = (uchar *) event_data;
+ buf = (unsigned char *) event_data;
DHD_EVENT((" data (%d) : ", datalen));
for (i = 0; i < datalen; i++)
DHD_EVENT((" 0x%02x ", *buf++));
wl_scan_results_t *results;
wl_bss_info_t UNALIGNED *bi, *bi_new, *bi_next;
- uchar *s_addr = addr;
+ unsigned char *s_addr = addr;
dhd_iscan_lock();
DHD_ISCAN(("%s: BSS to remove %X:%X:%X:%X:%X:%X\n",
/* Function to execute combined scan */
int
-dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, uchar scan_fr)
+dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid, unsigned char scan_fr)
{
int err = -1;
char iovbuf[128];
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
struct sk_buff *skb;
- uchar *eth;
+ unsigned char *eth;
uint len;
void *data, *pnext, *save_pktbuf;
int i;
/* Linux wrapper to call common dhd_pno_set */
int
dhd_dev_pno_set(struct net_device *dev, wlc_ssid_t *ssids_local, int nssid,
- uchar scan_fr)
+ unsigned char scan_fr)
{
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
return cnt;
}
-int dhd_bus_txctl(struct dhd_bus *bus, uchar *msg, uint msglen)
+int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
{
u8 *frame;
uint16 len;
return ret ? -EIO : 0;
}
-int dhd_bus_rxctl(struct dhd_bus *bus, uchar *msg, uint msglen)
+int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
{
int timeleft;
uint rxlen = 0;
}
#ifdef DHD_DEBUG
-extern int dhd_bus_console_in(dhd_pub_t *dhdp, uchar *msg, uint msglen)
+extern int dhd_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, uint msglen)
{
dhd_bus_t *bus = dhdp->bus;
uint32 addr, val;
}
if (iwe->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
- uchar *ivptr;
- ivptr = (uchar *) iwe->rx_seq;
+ unsigned char *ivptr;
+ ivptr = (unsigned char *) iwe->rx_seq;
key.rxiv.hi = (ivptr[5] << 24) | (ivptr[4] << 16) |
(ivptr[3] << 8) | ivptr[2];
key.rxiv.lo = (ivptr[1] << 8) | ivptr[0];
extern int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled);
extern int dhd_pno_clean(dhd_pub_t *dhd);
extern int dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t *ssids_local, int nssid,
- uchar scan_fr);
+ unsigned char scan_fr);
extern int dhd_pno_get_status(dhd_pub_t *dhd);
extern int dhd_dev_pno_reset(struct net_device *dev);
extern int dhd_dev_pno_set(struct net_device *dev, wlc_ssid_t *ssids_local,
- int nssid, uchar scan_fr);
+ int nssid, unsigned char scan_fr);
extern int dhd_dev_pno_enable(struct net_device *dev, int pfn_enabled);
extern int dhd_dev_get_pno_status(struct net_device *dev);
/* externs */
/* packet */
extern uint pktcopy(osl_t *osh, void *p, uint offset, int len,
- uchar *buf);
+ unsigned char *buf);
extern uint pktfrombuf(osl_t *osh, void *p, uint offset, int len,
- uchar *buf);
+ unsigned char *buf);
extern uint pkttotlen(osl_t *osh, void *p);
extern void *pktlast(osl_t *osh, void *p);
extern uint pktsegcnt(osl_t *osh, void *p);
extern int bcm_iovar_lencheck(const bcm_iovar_t *table, void *arg,
int len, bool set);
#if defined(BCMDBG)
- extern int bcm_format_ssid(char *buf, const uchar ssid[],
+ extern int bcm_format_ssid(char *buf, const unsigned char ssid[],
uint ssid_len);
#endif
extern char *bcm_chipname(uint chipid, char *buf, uint len);
extern char *bcm_brev_str(uint32 brev, char *buf);
extern void printbig(char *buf);
- extern void prhex(const char *msg, uchar *buf, uint len);
+ extern void prhex(const char *msg, unsigned char *buf, uint len);
/* IE parsing */
extern bcm_tlv_t *BCMROMFN(bcm_next_tlv) (bcm_tlv_t *elt, int *buflen);
extern void bcm_binit(struct bcmstrbuf *b, char *buf, uint size);
extern int bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...);
- extern void bcm_inc_bytes(uchar *num, int num_bytes, u8 amount);
- extern int bcm_cmp_bytes(uchar *arg1, uchar *arg2, u8 nbytes);
- extern void bcm_print_bytes(char *name, const uchar *cdata, int len);
+ extern void bcm_inc_bytes(unsigned char *num, int num_bytes, u8 amount);
+ extern int bcm_cmp_bytes(unsigned char *arg1, unsigned char *arg2, u8 nbytes);
+ extern void bcm_print_bytes(char *name, const unsigned char *cdata, int len);
typedef uint32(*bcmutl_rdreg_rtn) (void *arg0, uint arg1,
uint32 offset);
struct sbpcieregs;
extern u8 pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id,
- uchar *buf, uint32 *buflen);
+ unsigned char *buf, uint32 *buflen);
extern uint pcie_readreg(osl_t *osh, struct sbpcieregs *pcieregs,
uint addrtype, uint offset);
extern uint pcie_writereg(osl_t *osh, struct sbpcieregs *pcieregs,
* Default Typedefs
*/
-/* define uchar, ushort, uint, ulong */
-
-#ifndef TYPEDEF_UCHAR
-typedef unsigned char uchar;
-#endif
+/* define ushort, uint, ulong */
#ifndef TYPEDEF_USHORT
typedef unsigned short ushort;
#define AUTO (-1) /* Auto = -1 */
-#undef TYPEDEF_UCHAR
#undef TYPEDEF_USHORT
#undef TYPEDEF_UINT
#undef TYPEDEF_ULONG
typedef struct wlc_ssid {
uint32 SSID_len;
- uchar SSID[32];
+ unsigned char SSID[32];
} wlc_ssid_t;
typedef struct chan_scandata {
extern CONST dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[];
typedef struct {
- uchar gm;
- uchar pga;
- uchar pad;
- uchar dac;
- uchar bb_mult;
+ unsigned char gm;
+ unsigned char pga;
+ unsigned char pad;
+ unsigned char dac;
+ unsigned char bb_mult;
} lcnphy_tx_gain_tbl_entry;
extern CONST lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[];
int periodic);
extern bool wl_del_timer(struct wl_info *wl, struct wl_timer *timer);
-extern uint wl_buf_to_pktcopy(osl_t *osh, void *p, uchar *buf, int len,
+extern uint wl_buf_to_pktcopy(osl_t *osh, void *p, unsigned char *buf, int len,
uint offset);
extern void *wl_get_pktbuffer(osl_t *osh, int len);
extern int wl_set_pktlen(osl_t *osh, void *p, int len);
if (r->size == sizeof(uint32))
r->val =
R_REG(osh,
- (uint32 *) ((uchar *) (uintptr) regs +
+ (uint32 *) ((unsigned char *) (uintptr) regs +
r->byteoff));
else if (r->size == sizeof(uint16))
r->val =
R_REG(osh,
- (uint16 *) ((uchar *) (uintptr) regs +
+ (uint16 *) ((unsigned char *) (uintptr) regs +
r->byteoff));
else
bcmerror = BCME_BADADDR;
}
if (r->size == sizeof(uint32))
W_REG(osh,
- (uint32 *) ((uchar *) (uintptr) regs +
+ (uint32 *) ((unsigned char *) (uintptr) regs +
r->byteoff), r->val);
else if (r->size == sizeof(uint16))
W_REG(osh,
- (uint16 *) ((uchar *) (uintptr) regs +
+ (uint16 *) ((unsigned char *) (uintptr) regs +
r->byteoff), r->val);
else
bcmerror = BCME_BADADDR;
case WLC_GET_PHYLIST:
{
- uchar *cp = arg;
+ unsigned char *cp = arg;
if (len < 3) {
bcmerror = BCME_BUFTOOSHORT;
break;
char hexbuf[256];
/* add plcp header along with txh descriptor */
- prhex("Raw TxDesc + plcp header", (uchar *) txh, sizeof(d11txh_t) + 48);
+ prhex("Raw TxDesc + plcp header", (unsigned char *) txh, sizeof(d11txh_t) + 48);
printf("TxCtlLow: %04x ", mtcl);
printf("TxCtlHigh: %04x ", mtch);
{0, NULL}
};
- prhex("Raw RxDesc", (uchar *) rxh, sizeof(d11rxhdr_t));
+ prhex("Raw RxDesc", (unsigned char *) rxh, sizeof(d11rxhdr_t));
bcm_format_flags(macstat_flags, macstatus1, flagstr, 64);
#endif /* defined(BCMDBG) */
#if defined(BCMDBG)
-int wlc_format_ssid(char *buf, const uchar ssid[], uint ssid_len)
+int wlc_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len)
{
uint i, c;
char *p = buf;
if (c == '\\') {
*p++ = '\\';
*p++ = '\\';
- } else if (isprint((uchar) c)) {
+ } else if (isprint((unsigned char) c)) {
*p++ = (char)c;
} else {
p += snprintf(p, (endp - p), "\\x%02X", c);
int preamble;
int channel;
ratespec_t rspec;
- uchar *plcp;
+ unsigned char *plcp;
wlc_read_tsf(wlc, &tsf_l, &tsf_h); /* mactime */
rx_status->mactime = tsf_h;
extern bool wlc_radio_monitor_stop(struct wlc_info *wlc);
#if defined(BCMDBG)
-extern int wlc_format_ssid(char *buf, const uchar ssid[], uint ssid_len);
+extern int wlc_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len);
#endif
extern void wlc_pmkid_build_cand_list(struct wlc_bsscfg *cfg, bool check_SSID);
SI_CORE_SIZE);
ASSERT(GOODREGS(sii->regs[coreidx]));
}
- r = (uint32 *) ((uchar *) sii->regs[coreidx] + regoff);
+ r = (uint32 *) ((unsigned char *) sii->regs[coreidx] + regoff);
} else if (BUSTYPE(sih->bustype) == PCI_BUS) {
/* If pci/pcie, we can get at pci/pcie regs and on newer cores to chipc */
origidx = si_coreidx(&sii->pub);
/* switch core */
- r = (uint32 *) ((uchar *) ai_setcoreidx(&sii->pub, coreidx) +
+ r = (uint32 *) ((unsigned char *) ai_setcoreidx(&sii->pub, coreidx) +
regoff);
}
ASSERT(r != NULL);
#endif /* WLC_LOW */
/* copy a pkt buffer chain into a buffer */
-uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf)
+uint pktcopy(osl_t *osh, void *p, uint offset, int len, unsigned char *buf)
{
uint n, ret = 0;
}
/* copy a buffer into a pkt buffer chain */
-uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, uchar *buf)
+uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, unsigned char *buf)
{
uint n, ret = 0;
#endif /* defined(BCMDBG) */
/* pretty hex print a contiguous buffer */
-void prhex(const char *msg, uchar *buf, uint nbytes)
+void prhex(const char *msg, unsigned char *buf, uint nbytes)
{
char line[128], *p;
int len = sizeof(line);
return r;
}
-void bcm_inc_bytes(uchar *num, int num_bytes, u8 amount)
+void bcm_inc_bytes(unsigned char *num, int num_bytes, u8 amount)
{
int i;
}
}
-int bcm_cmp_bytes(uchar *arg1, uchar *arg2, u8 nbytes)
+int bcm_cmp_bytes(unsigned char *arg1, unsigned char *arg2, u8 nbytes)
{
int i;
return 0;
}
-void bcm_print_bytes(char *name, const uchar *data, int len)
+void bcm_print_bytes(char *name, const unsigned char *data, int len)
{
int i;
int per_line = 0;
#if defined(BCMDBG)
#define SSID_FMT_BUF_LEN ((4 * DOT11_MAX_SSID_LEN) + 1)
-int bcm_format_ssid(char *buf, const uchar ssid[], uint ssid_len)
+int bcm_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len)
{
uint i, c;
char *p = buf;
if (c == '\\') {
*p++ = '\\';
*p++ = '\\';
- } else if (isprint((uchar) c)) {
+ } else if (isprint((unsigned char) c)) {
*p++ = (char)c;
} else {
p += snprintf(p, (endp - p), "\\x%02X", c);
static int dma32_txfast(dma_info_t *di, void *p0, bool commit)
{
void *p, *next;
- uchar *data;
+ unsigned char *data;
uint len;
uint16 txout;
uint32 flags = 0;
static int BCMFASTPATH dma64_txfast(dma_info_t *di, void *p0, bool commit)
{
void *p, *next;
- uchar *data;
+ unsigned char *data;
uint len;
uint16 txout;
uint32 flags = 0;
/* return cap_offset if requested capability exists in the PCI config space */
/* Note that it's caller's responsibility to make sure it's a pci bus */
u8
-pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id, uchar *buf,
+pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id, unsigned char *buf,
uint32 *buflen)
{
u8 cap_id;
origidx = si_coreidx(&sii->pub);
/* switch core */
- r = (uint32 *) ((uchar *) sb_setcoreidx(&sii->pub, coreidx) +
+ r = (uint32 *) ((unsigned char *) sb_setcoreidx(&sii->pub, coreidx) +
regoff);
}
ASSERT(r != NULL);
ASSERT(GOODREGS(regs));
- bzero((uchar *) sii, sizeof(si_info_t));
+ bzero((unsigned char *) sii, sizeof(si_info_t));
savewin = 0;
ASSERT(GOODREGS(regs));
- bzero((uchar *) sii, sizeof(si_info_t));
+ bzero((unsigned char *) sii, sizeof(si_info_t));
savewin = 0;
sii = SI_INFO(sih);
- bcopy((uchar *) sii->coreid, (uchar *) coreid,
+ bcopy((unsigned char *) sii->coreid, (unsigned char *) coreid,
(sii->numcores * sizeof(uint)));
return sii->numcores;
}