- use uint8_t for xfer buffers and byte numbers
- use bool for sc_dying and sc_attached booleans
This commit is contained in:
parent
0bf9ca9c59
commit
fffa0899ac
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_axe.c,v 1.44 2010/08/14 10:30:11 tsutsui Exp $ */
|
||||
/* $NetBSD: if_axe.c,v 1.45 2010/08/14 10:47:57 tsutsui Exp $ */
|
||||
/* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
|
||||
|
||||
/*
|
||||
@ -89,7 +89,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.44 2010/08/14 10:30:11 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.45 2010/08/14 10:47:57 tsutsui Exp $");
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#include "opt_inet.h"
|
||||
@ -732,7 +732,7 @@ axe_attach(device_t parent, device_t self, void *aux)
|
||||
callout_init(&sc->axe_stat_ch, 0);
|
||||
callout_setfunc(&sc->axe_stat_ch, axe_tick, sc);
|
||||
|
||||
sc->axe_attached = 1;
|
||||
sc->axe_attached = true;
|
||||
splx(s);
|
||||
|
||||
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->axe_udev, sc->axe_dev);
|
||||
@ -751,7 +751,7 @@ axe_detach(device_t self, int flags)
|
||||
if (!sc->axe_attached)
|
||||
return 0;
|
||||
|
||||
sc->axe_dying = 1;
|
||||
sc->axe_dying = true;
|
||||
|
||||
/*
|
||||
* Remove any pending tasks. They cannot be executing because they run
|
||||
@ -781,7 +781,7 @@ axe_detach(device_t self, int flags)
|
||||
aprint_debug_dev(self, "detach has active endpoints\n");
|
||||
#endif
|
||||
|
||||
sc->axe_attached = 0;
|
||||
sc->axe_attached = false;
|
||||
|
||||
if (--sc->axe_refcnt >= 0) {
|
||||
/* Wait for processes to go away. */
|
||||
@ -804,7 +804,7 @@ axe_activate(device_t self, devact_t act)
|
||||
switch (act) {
|
||||
case DVACT_DEACTIVATE:
|
||||
if_deactivate(&sc->axe_ec.ec_if);
|
||||
sc->axe_dying = 1;
|
||||
sc->axe_dying = true;
|
||||
return 0;
|
||||
default:
|
||||
return EOPNOTSUPP;
|
||||
@ -965,7 +965,7 @@ axe_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
m->m_pkthdr.len = m->m_len = pktlen;
|
||||
|
||||
memcpy(mtod(m, char *), buf, pktlen);
|
||||
memcpy(mtod(m, uint8_t *), buf, pktlen);
|
||||
buf += rxlen;
|
||||
|
||||
s = splnet();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_axereg.h,v 1.11 2010/08/14 10:30:11 tsutsui Exp $ */
|
||||
/* $NetBSD: if_axereg.h,v 1.12 2010/08/14 10:47:57 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000-2003
|
||||
@ -176,7 +176,7 @@ struct axe_softc;
|
||||
struct axe_chain {
|
||||
struct axe_softc *axe_sc;
|
||||
usbd_xfer_handle axe_xfer;
|
||||
char *axe_buf;
|
||||
uint8_t *axe_buf;
|
||||
int axe_accum;
|
||||
int axe_idx;
|
||||
};
|
||||
@ -216,8 +216,8 @@ struct axe_softc {
|
||||
struct callout axe_stat_ch;
|
||||
|
||||
int axe_refcnt;
|
||||
char axe_dying;
|
||||
char axe_attached;
|
||||
bool axe_dying;
|
||||
bool axe_attached;
|
||||
|
||||
struct usb_task axe_tick_task;
|
||||
|
||||
@ -225,8 +225,8 @@ struct axe_softc {
|
||||
|
||||
int axe_link;
|
||||
|
||||
unsigned char axe_ipgs[3];
|
||||
unsigned char axe_phyaddrs[2];
|
||||
uint8_t axe_ipgs[3];
|
||||
uint8_t axe_phyaddrs[2];
|
||||
struct timeval axe_rx_notice;
|
||||
int axe_bufsz;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user