summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/net
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-05-28 17:36:36 +0000
committerthompsa <thompsa@FreeBSD.org>2009-05-28 17:36:36 +0000
commitaf6fb4f3d2a2950c2a2c95bc3148ee16510149de (patch)
tree3036722a60a7a9ddd5122172e56736f3e128664b /sys/dev/usb/net
parentd691011026fb63bdede5854aaa7547c7c019cd38 (diff)
downloadFreeBSD-src-af6fb4f3d2a2950c2a2c95bc3148ee16510149de.zip
FreeBSD-src-af6fb4f3d2a2950c2a2c95bc3148ee16510149de.tar.gz
s/usb2_/usb_/ on all C structs for the USB stack.
Diffstat (limited to 'sys/dev/usb/net')
-rw-r--r--sys/dev/usb/net/if_aue.c44
-rw-r--r--sys/dev/usb/net/if_auereg.h4
-rw-r--r--sys/dev/usb/net/if_axe.c40
-rw-r--r--sys/dev/usb/net/if_axereg.h4
-rw-r--r--sys/dev/usb/net/if_cdce.c42
-rw-r--r--sys/dev/usb/net/if_cdcereg.h4
-rw-r--r--sys/dev/usb/net/if_cue.c46
-rw-r--r--sys/dev/usb/net/if_cuereg.h4
-rw-r--r--sys/dev/usb/net/if_kue.c44
-rw-r--r--sys/dev/usb/net/if_kuereg.h4
-rw-r--r--sys/dev/usb/net/if_rue.c40
-rw-r--r--sys/dev/usb/net/if_ruereg.h4
-rw-r--r--sys/dev/usb/net/if_udav.c48
-rw-r--r--sys/dev/usb/net/if_udavreg.h4
-rw-r--r--sys/dev/usb/net/usb_ethernet.c96
-rw-r--r--sys/dev/usb/net/usb_ethernet.h56
16 files changed, 242 insertions, 242 deletions
diff --git a/sys/dev/usb/net/if_aue.c b/sys/dev/usb/net/if_aue.c
index 4902c1c..a384fc4 100644
--- a/sys/dev/usb/net/if_aue.c
+++ b/sys/dev/usb/net/if_aue.c
@@ -97,7 +97,7 @@ SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RW, &aue_debug, 0,
/*
* Various supported device vendors/products.
*/
-static const struct usb2_device_id aue_devs[] = {
+static const struct usb_device_id aue_devs[] = {
{USB_VPI(USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B, AUE_FLAG_PII)},
{USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_DSB650TX_PNA, 0)},
{USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UFE1000, AUE_FLAG_LSYS)},
@@ -202,7 +202,7 @@ static void aue_reset_pegasus_II(struct aue_softc *);
static int aue_ifmedia_upd(struct ifnet *);
static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *);
-static const struct usb2_config aue_config[AUE_N_TRANSFER] = {
+static const struct usb_config aue_config[AUE_N_TRANSFER] = {
[AUE_BULK_DT_WR] = {
.type = UE_BULK,
@@ -266,7 +266,7 @@ MODULE_DEPEND(aue, usb, 1, 1, 1);
MODULE_DEPEND(aue, ether, 1, 1, 1);
MODULE_DEPEND(aue, miibus, 1, 1, 1);
-static const struct usb2_ether_methods aue_ue_methods = {
+static const struct usb_ether_methods aue_ue_methods = {
.ue_attach_post = aue_attach_post,
.ue_start = aue_start,
.ue_init = aue_init,
@@ -287,7 +287,7 @@ static const struct usb2_ether_methods aue_ue_methods = {
static uint8_t
aue_csr_read_1(struct aue_softc *sc, uint16_t reg)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
usb2_error_t err;
uint8_t val;
@@ -306,7 +306,7 @@ aue_csr_read_1(struct aue_softc *sc, uint16_t reg)
static uint16_t
aue_csr_read_2(struct aue_softc *sc, uint16_t reg)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
usb2_error_t err;
uint16_t val;
@@ -325,7 +325,7 @@ aue_csr_read_2(struct aue_softc *sc, uint16_t reg)
static void
aue_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = AUE_UR_WRITEREG;
@@ -342,7 +342,7 @@ aue_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val)
static void
aue_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = AUE_UR_WRITEREG;
@@ -518,7 +518,7 @@ aue_miibus_statchg(device_t dev)
#define AUE_BITS 6
static void
-aue_setmulti(struct usb2_ether *ue)
+aue_setmulti(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -609,7 +609,7 @@ aue_reset(struct aue_softc *sc)
}
static void
-aue_attach_post(struct usb2_ether *ue)
+aue_attach_post(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
@@ -626,7 +626,7 @@ aue_attach_post(struct usb2_ether *ue)
static int
aue_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -654,9 +654,9 @@ aue_probe(device_t dev)
static int
aue_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct aue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -701,7 +701,7 @@ static int
aue_detach(device_t dev)
{
struct aue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, AUE_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -711,7 +711,7 @@ aue_detach(device_t dev)
}
static void
-aue_intr_callback(struct usb2_xfer *xfer)
+aue_intr_callback(struct usb_xfer *xfer)
{
struct aue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -749,10 +749,10 @@ tr_setup:
}
static void
-aue_bulk_read_callback(struct usb2_xfer *xfer)
+aue_bulk_read_callback(struct usb_xfer *xfer)
{
struct aue_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
struct aue_rxpkt stat;
@@ -811,7 +811,7 @@ tr_setup:
}
static void
-aue_bulk_write_callback(struct usb2_xfer *xfer)
+aue_bulk_write_callback(struct usb_xfer *xfer)
{
struct aue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -893,7 +893,7 @@ tr_setup:
}
static void
-aue_tick(struct usb2_ether *ue)
+aue_tick(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
struct mii_data *mii = GET_MII(sc);
@@ -910,7 +910,7 @@ aue_tick(struct usb2_ether *ue)
}
static void
-aue_start(struct usb2_ether *ue)
+aue_start(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
@@ -923,7 +923,7 @@ aue_start(struct usb2_ether *ue)
}
static void
-aue_init(struct usb2_ether *ue)
+aue_init(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -958,7 +958,7 @@ aue_init(struct usb2_ether *ue)
}
static void
-aue_setpromisc(struct usb2_ether *ue)
+aue_setpromisc(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -1015,7 +1015,7 @@ aue_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
* RX and TX lists.
*/
static void
-aue_stop(struct usb2_ether *ue)
+aue_stop(struct usb_ether *ue)
{
struct aue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
diff --git a/sys/dev/usb/net/if_auereg.h b/sys/dev/usb/net/if_auereg.h
index 249c913..f1f7398 100644
--- a/sys/dev/usb/net/if_auereg.h
+++ b/sys/dev/usb/net/if_auereg.h
@@ -202,9 +202,9 @@ struct aue_rxpkt {
} __packed;
struct aue_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[AUE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[AUE_N_TRANSFER];
int sc_flags;
#define AUE_FLAG_LSYS 0x0001 /* use Linksys reset */
diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c
index f720c4e..99fb7e3 100644
--- a/sys/dev/usb/net/if_axe.c
+++ b/sys/dev/usb/net/if_axe.c
@@ -120,7 +120,7 @@ SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RW, &axe_debug, 0,
/*
* Various supported device vendors/products.
*/
-static const struct usb2_device_id axe_devs[] = {
+static const struct usb_device_id axe_devs[] = {
{USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UF200, 0)},
{USB_VPI(USB_VENDOR_ACERCM, USB_PRODUCT_ACERCM_EP1427X2, 0)},
{USB_VPI(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ETHERNET, AXE_FLAG_772)},
@@ -175,7 +175,7 @@ static void axe_ax88178_init(struct axe_softc *);
static void axe_ax88772_init(struct axe_softc *);
static int axe_get_phyno(struct axe_softc *, int);
-static const struct usb2_config axe_config[AXE_N_TRANSFER] = {
+static const struct usb_config axe_config[AXE_N_TRANSFER] = {
[AXE_BULK_DT_WR] = {
.type = UE_BULK,
@@ -243,7 +243,7 @@ MODULE_DEPEND(axe, usb, 1, 1, 1);
MODULE_DEPEND(axe, ether, 1, 1, 1);
MODULE_DEPEND(axe, miibus, 1, 1, 1);
-static const struct usb2_ether_methods axe_ue_methods = {
+static const struct usb_ether_methods axe_ue_methods = {
.ue_attach_post = axe_attach_post,
.ue_start = axe_start,
.ue_init = axe_init,
@@ -258,7 +258,7 @@ static const struct usb2_ether_methods axe_ue_methods = {
static int
axe_cmd(struct axe_softc *sc, int cmd, int index, int val, void *buf)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
usb2_error_t err;
AXE_LOCK_ASSERT(sc, MA_OWNED);
@@ -440,7 +440,7 @@ axe_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
}
static void
-axe_setmulti(struct usb2_ether *ue)
+axe_setmulti(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -599,7 +599,7 @@ axe_ax88772_init(struct axe_softc *sc)
static void
axe_reset(struct axe_softc *sc)
{
- struct usb2_config_descriptor *cd;
+ struct usb_config_descriptor *cd;
usb2_error_t err;
cd = usb2_get_config_descriptor(sc->sc_ue.ue_udev);
@@ -614,7 +614,7 @@ axe_reset(struct axe_softc *sc)
}
static void
-axe_attach_post(struct usb2_ether *ue)
+axe_attach_post(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
@@ -660,7 +660,7 @@ axe_attach_post(struct usb2_ether *ue)
static int
axe_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -679,9 +679,9 @@ axe_probe(device_t dev)
static int
axe_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct axe_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -721,7 +721,7 @@ static int
axe_detach(device_t dev)
{
struct axe_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, AXE_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -731,7 +731,7 @@ axe_detach(device_t dev)
}
static void
-axe_intr_callback(struct usb2_xfer *xfer)
+axe_intr_callback(struct usb_xfer *xfer)
{
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
@@ -756,10 +756,10 @@ tr_setup:
#endif
static void
-axe_bulk_read_callback(struct usb2_xfer *xfer)
+axe_bulk_read_callback(struct usb_xfer *xfer)
{
struct axe_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
struct axe_sframe_hdr hdr;
int error, pos, len, adjust;
@@ -838,7 +838,7 @@ tr_setup:
#endif
static void
-axe_bulk_write_callback(struct usb2_xfer *xfer)
+axe_bulk_write_callback(struct usb_xfer *xfer)
{
struct axe_softc *sc = xfer->priv_sc;
struct axe_sframe_hdr hdr;
@@ -935,7 +935,7 @@ tr_setup:
}
static void
-axe_tick(struct usb2_ether *ue)
+axe_tick(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
struct mii_data *mii = GET_MII(sc);
@@ -951,7 +951,7 @@ axe_tick(struct usb2_ether *ue)
}
static void
-axe_start(struct usb2_ether *ue)
+axe_start(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
@@ -964,7 +964,7 @@ axe_start(struct usb2_ether *ue)
}
static void
-axe_init(struct usb2_ether *ue)
+axe_init(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -1017,7 +1017,7 @@ axe_init(struct usb2_ether *ue)
}
static void
-axe_setpromisc(struct usb2_ether *ue)
+axe_setpromisc(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -1039,7 +1039,7 @@ axe_setpromisc(struct usb2_ether *ue)
}
static void
-axe_stop(struct usb2_ether *ue)
+axe_stop(struct usb_ether *ue)
{
struct axe_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
diff --git a/sys/dev/usb/net/if_axereg.h b/sys/dev/usb/net/if_axereg.h
index dc063e3..075dd24 100644
--- a/sys/dev/usb/net/if_axereg.h
+++ b/sys/dev/usb/net/if_axereg.h
@@ -177,9 +177,9 @@ enum {
};
struct axe_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[AXE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[AXE_N_TRANSFER];
int sc_phyno;
int sc_flags;
diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c
index 0c1e4c1..9032042 100644
--- a/sys/dev/usb/net/if_cdce.c
+++ b/sys/dev/usb/net/if_cdce.c
@@ -93,7 +93,7 @@ SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RW, &cdce_debug, 0,
"Debug level");
#endif
-static const struct usb2_config cdce_config[CDCE_N_TRANSFER] = {
+static const struct usb_config cdce_config[CDCE_N_TRANSFER] = {
[CDCE_BULK_RX] = {
.type = UE_BULK,
@@ -174,7 +174,7 @@ MODULE_DEPEND(cdce, uether, 1, 1, 1);
MODULE_DEPEND(cdce, usb, 1, 1, 1);
MODULE_DEPEND(cdce, ether, 1, 1, 1);
-static const struct usb2_ether_methods cdce_ue_methods = {
+static const struct usb_ether_methods cdce_ue_methods = {
.ue_attach_post = cdce_attach_post,
.ue_start = cdce_start,
.ue_init = cdce_init,
@@ -183,7 +183,7 @@ static const struct usb2_ether_methods cdce_ue_methods = {
.ue_setpromisc = cdce_setpromisc,
};
-static const struct usb2_device_id cdce_devs[] = {
+static const struct usb_device_id cdce_devs[] = {
{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, 0)},
{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_MOBILE_DIRECT_LINE_MODEL, 0)},
@@ -205,13 +205,13 @@ static const struct usb2_device_id cdce_devs[] = {
static int
cdce_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
return (usb2_lookup_id_by_uaa(cdce_devs, sizeof(cdce_devs), uaa));
}
static void
-cdce_attach_post(struct usb2_ether *ue)
+cdce_attach_post(struct usb_ether *ue)
{
/* no-op */
return;
@@ -221,12 +221,12 @@ static int
cdce_attach(device_t dev)
{
struct cdce_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
- struct usb2_interface *iface;
- const struct usb2_cdc_union_descriptor *ud;
- const struct usb2_interface_descriptor *id;
- const struct usb2_cdc_ethernet_descriptor *ued;
+ struct usb_ether *ue = &sc->sc_ue;
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_interface *iface;
+ const struct usb_cdc_union_descriptor *ud;
+ const struct usb_interface_descriptor *id;
+ const struct usb_cdc_ethernet_descriptor *ued;
int error;
uint8_t i;
char eaddr_str[5 * ETHER_ADDR_LEN]; /* approx */
@@ -391,7 +391,7 @@ static int
cdce_detach(device_t dev)
{
struct cdce_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
/* stop all USB transfers first */
usb2_transfer_unsetup(sc->sc_xfer, CDCE_N_TRANSFER);
@@ -402,7 +402,7 @@ cdce_detach(device_t dev)
}
static void
-cdce_start(struct usb2_ether *ue)
+cdce_start(struct usb_ether *ue)
{
struct cdce_softc *sc = usb2_ether_getsc(ue);
@@ -426,7 +426,7 @@ cdce_free_queue(struct mbuf **ppm, uint8_t n)
}
static void
-cdce_bulk_write_callback(struct usb2_xfer *xfer)
+cdce_bulk_write_callback(struct usb_xfer *xfer)
{
struct cdce_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -540,7 +540,7 @@ cdce_m_crc32(struct mbuf *m, uint32_t src_offset, uint32_t src_len)
}
static void
-cdce_init(struct usb2_ether *ue)
+cdce_init(struct usb_ether *ue)
{
struct cdce_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -561,7 +561,7 @@ cdce_init(struct usb2_ether *ue)
}
static void
-cdce_stop(struct usb2_ether *ue)
+cdce_stop(struct usb_ether *ue)
{
struct cdce_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -580,14 +580,14 @@ cdce_stop(struct usb2_ether *ue)
}
static void
-cdce_setmulti(struct usb2_ether *ue)
+cdce_setmulti(struct usb_ether *ue)
{
/* no-op */
return;
}
static void
-cdce_setpromisc(struct usb2_ether *ue)
+cdce_setpromisc(struct usb_ether *ue)
{
/* no-op */
return;
@@ -608,7 +608,7 @@ cdce_resume(device_t dev)
}
static void
-cdce_bulk_read_callback(struct usb2_xfer *xfer)
+cdce_bulk_read_callback(struct usb_xfer *xfer)
{
struct cdce_softc *sc = xfer->priv_sc;
struct mbuf *m;
@@ -684,7 +684,7 @@ tr_stall:
}
static void
-cdce_intr_read_callback(struct usb2_xfer *xfer)
+cdce_intr_read_callback(struct usb_xfer *xfer)
{
; /* style fix */
switch (USB_GET_STATE(xfer)) {
@@ -713,7 +713,7 @@ tr_setup:
}
static void
-cdce_intr_write_callback(struct usb2_xfer *xfer)
+cdce_intr_write_callback(struct usb_xfer *xfer)
{
; /* style fix */
switch (USB_GET_STATE(xfer)) {
diff --git a/sys/dev/usb/net/if_cdcereg.h b/sys/dev/usb/net/if_cdcereg.h
index 0bcdde7..367e167 100644
--- a/sys/dev/usb/net/if_cdcereg.h
+++ b/sys/dev/usb/net/if_cdcereg.h
@@ -47,9 +47,9 @@ enum {
};
struct cdce_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[CDCE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[CDCE_N_TRANSFER];
struct mbuf *sc_rx_buf[CDCE_FRAMES_MAX];
struct mbuf *sc_tx_buf[CDCE_FRAMES_MAX];
diff --git a/sys/dev/usb/net/if_cue.c b/sys/dev/usb/net/if_cue.c
index f5bb9ac..3eba24d7 100644
--- a/sys/dev/usb/net/if_cue.c
+++ b/sys/dev/usb/net/if_cue.c
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
/* Belkin F5U111 adapter covered by NETMATE entry */
-static const struct usb2_device_id cue_devs[] = {
+static const struct usb_device_id cue_devs[] = {
{USB_VPI(USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE, 0)},
{USB_VPI(USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE2, 0)},
{USB_VPI(USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTLINK, 0)},
@@ -114,7 +114,7 @@ SYSCTL_INT(_hw_usb_cue, OID_AUTO, debug, CTLFLAG_RW, &cue_debug, 0,
"Debug level");
#endif
-static const struct usb2_config cue_config[CUE_N_TRANSFER] = {
+static const struct usb_config cue_config[CUE_N_TRANSFER] = {
[CUE_BULK_DT_WR] = {
.type = UE_BULK,
@@ -158,7 +158,7 @@ MODULE_DEPEND(cue, uether, 1, 1, 1);
MODULE_DEPEND(cue, usb, 1, 1, 1);
MODULE_DEPEND(cue, ether, 1, 1, 1);
-static const struct usb2_ether_methods cue_ue_methods = {
+static const struct usb_ether_methods cue_ue_methods = {
.ue_attach_post = cue_attach_post,
.ue_start = cue_start,
.ue_init = cue_init,
@@ -177,7 +177,7 @@ static const struct usb2_ether_methods cue_ue_methods = {
static uint8_t
cue_csr_read_1(struct cue_softc *sc, uint16_t reg)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
uint8_t val;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
@@ -195,7 +195,7 @@ cue_csr_read_1(struct cue_softc *sc, uint16_t reg)
static uint16_t
cue_csr_read_2(struct cue_softc *sc, uint8_t reg)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
uint16_t val;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
@@ -211,7 +211,7 @@ cue_csr_read_2(struct cue_softc *sc, uint8_t reg)
static int
cue_csr_write_1(struct cue_softc *sc, uint16_t reg, uint16_t val)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = CUE_CMD_WRITEREG;
@@ -225,7 +225,7 @@ cue_csr_write_1(struct cue_softc *sc, uint16_t reg, uint16_t val)
static int
cue_mem(struct cue_softc *sc, uint8_t cmd, uint16_t addr, void *buf, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
if (cmd == CUE_CMD_READSRAM)
req.bmRequestType = UT_READ_VENDOR_DEVICE;
@@ -242,7 +242,7 @@ cue_mem(struct cue_softc *sc, uint8_t cmd, uint16_t addr, void *buf, int len)
static int
cue_getmac(struct cue_softc *sc, void *buf)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
req.bRequest = CUE_CMD_GET_MACADDR;
@@ -267,7 +267,7 @@ cue_mchash(const uint8_t *addr)
}
static void
-cue_setpromisc(struct usb2_ether *ue)
+cue_setpromisc(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -285,7 +285,7 @@ cue_setpromisc(struct usb2_ether *ue)
}
static void
-cue_setmulti(struct usb2_ether *ue)
+cue_setmulti(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -329,7 +329,7 @@ cue_setmulti(struct usb2_ether *ue)
static void
cue_reset(struct cue_softc *sc)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = CUE_CMD_RESET;
@@ -348,7 +348,7 @@ cue_reset(struct cue_softc *sc)
}
static void
-cue_attach_post(struct usb2_ether *ue)
+cue_attach_post(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
@@ -358,7 +358,7 @@ cue_attach_post(struct usb2_ether *ue)
static int
cue_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -377,9 +377,9 @@ cue_probe(device_t dev)
static int
cue_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct cue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -416,7 +416,7 @@ static int
cue_detach(device_t dev)
{
struct cue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, CUE_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -426,10 +426,10 @@ cue_detach(device_t dev)
}
static void
-cue_bulk_read_callback(struct usb2_xfer *xfer)
+cue_bulk_read_callback(struct usb_xfer *xfer)
{
struct cue_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
uint8_t buf[2];
int len;
@@ -470,7 +470,7 @@ tr_setup:
}
static void
-cue_bulk_write_callback(struct usb2_xfer *xfer)
+cue_bulk_write_callback(struct usb_xfer *xfer)
{
struct cue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -531,7 +531,7 @@ tr_setup:
}
static void
-cue_tick(struct usb2_ether *ue)
+cue_tick(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -547,7 +547,7 @@ cue_tick(struct usb2_ether *ue)
}
static void
-cue_start(struct usb2_ether *ue)
+cue_start(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
@@ -559,7 +559,7 @@ cue_start(struct usb2_ether *ue)
}
static void
-cue_init(struct usb2_ether *ue)
+cue_init(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -609,7 +609,7 @@ cue_init(struct usb2_ether *ue)
* RX and TX lists.
*/
static void
-cue_stop(struct usb2_ether *ue)
+cue_stop(struct usb_ether *ue)
{
struct cue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
diff --git a/sys/dev/usb/net/if_cuereg.h b/sys/dev/usb/net/if_cuereg.h
index ca3a816..1782c21 100644
--- a/sys/dev/usb/net/if_cuereg.h
+++ b/sys/dev/usb/net/if_cuereg.h
@@ -119,9 +119,9 @@ enum {
};
struct cue_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[CUE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[CUE_N_TRANSFER];
int sc_flags;
#define CUE_FLAG_LINK 0x0001 /* got a link */
diff --git a/sys/dev/usb/net/if_kue.c b/sys/dev/usb/net/if_kue.c
index 91b25b3..137f90e 100644
--- a/sys/dev/usb/net/if_kue.c
+++ b/sys/dev/usb/net/if_kue.c
@@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$");
/*
* Various supported device vendors/products.
*/
-static const struct usb2_device_id kue_devs[] = {
+static const struct usb_device_id kue_devs[] = {
{USB_VPI(USB_VENDOR_3COM, USB_PRODUCT_3COM_3C19250, 0)},
{USB_VPI(USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460, 0)},
{USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_URE450, 0)},
@@ -141,7 +141,7 @@ static usb2_ether_fn_t kue_setmulti;
static usb2_ether_fn_t kue_setpromisc;
static int kue_do_request(struct kue_softc *,
- struct usb2_device_request *, void *);
+ struct usb_device_request *, void *);
static int kue_setword(struct kue_softc *, uint8_t, uint16_t);
static int kue_ctl(struct kue_softc *, uint8_t, uint8_t, uint16_t,
void *, int);
@@ -156,7 +156,7 @@ SYSCTL_INT(_hw_usb_kue, OID_AUTO, debug, CTLFLAG_RW, &kue_debug, 0,
"Debug level");
#endif
-static const struct usb2_config kue_config[KUE_N_TRANSFER] = {
+static const struct usb_config kue_config[KUE_N_TRANSFER] = {
[KUE_BULK_DT_WR] = {
.type = UE_BULK,
@@ -201,7 +201,7 @@ MODULE_DEPEND(kue, uether, 1, 1, 1);
MODULE_DEPEND(kue, usb, 1, 1, 1);
MODULE_DEPEND(kue, ether, 1, 1, 1);
-static const struct usb2_ether_methods kue_ue_methods = {
+static const struct usb_ether_methods kue_ue_methods = {
.ue_attach_post = kue_attach_post,
.ue_start = kue_start,
.ue_init = kue_init,
@@ -218,7 +218,7 @@ static const struct usb2_ether_methods kue_ue_methods = {
* than the default timeout.
*/
static int
-kue_do_request(struct kue_softc *sc, struct usb2_device_request *req,
+kue_do_request(struct kue_softc *sc, struct usb_device_request *req,
void *data)
{
usb2_error_t err;
@@ -231,7 +231,7 @@ kue_do_request(struct kue_softc *sc, struct usb2_device_request *req,
static int
kue_setword(struct kue_softc *sc, uint8_t breq, uint16_t word)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = breq;
@@ -246,7 +246,7 @@ static int
kue_ctl(struct kue_softc *sc, uint8_t rw, uint8_t breq,
uint16_t val, void *data, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
if (rw == KUE_CTL_WRITE)
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
@@ -265,7 +265,7 @@ kue_ctl(struct kue_softc *sc, uint8_t rw, uint8_t breq,
static int
kue_load_fw(struct kue_softc *sc)
{
- struct usb2_device_descriptor *dd;
+ struct usb_device_descriptor *dd;
uint16_t hwrev;
usb2_error_t err;
@@ -320,7 +320,7 @@ kue_load_fw(struct kue_softc *sc)
}
static void
-kue_setpromisc(struct usb2_ether *ue)
+kue_setpromisc(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -336,7 +336,7 @@ kue_setpromisc(struct usb2_ether *ue)
}
static void
-kue_setmulti(struct usb2_ether *ue)
+kue_setmulti(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -390,7 +390,7 @@ kue_setmulti(struct usb2_ether *ue)
static void
kue_reset(struct kue_softc *sc)
{
- struct usb2_config_descriptor *cd;
+ struct usb_config_descriptor *cd;
usb2_error_t err;
cd = usb2_get_config_descriptor(sc->sc_ue.ue_udev);
@@ -405,7 +405,7 @@ kue_reset(struct kue_softc *sc)
}
static void
-kue_attach_post(struct usb2_ether *ue)
+kue_attach_post(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
int error;
@@ -434,7 +434,7 @@ kue_attach_post(struct usb2_ether *ue)
static int
kue_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -453,9 +453,9 @@ kue_probe(device_t dev)
static int
kue_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct kue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -499,7 +499,7 @@ static int
kue_detach(device_t dev)
{
struct kue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, KUE_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -514,10 +514,10 @@ kue_detach(device_t dev)
* the higher level protocols.
*/
static void
-kue_bulk_read_callback(struct usb2_xfer *xfer)
+kue_bulk_read_callback(struct usb_xfer *xfer)
{
struct kue_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
uint8_t buf[2];
int len;
@@ -558,7 +558,7 @@ tr_setup:
}
static void
-kue_bulk_write_callback(struct usb2_xfer *xfer)
+kue_bulk_write_callback(struct usb_xfer *xfer)
{
struct kue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -628,7 +628,7 @@ tr_setup:
}
static void
-kue_start(struct usb2_ether *ue)
+kue_start(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
@@ -640,7 +640,7 @@ kue_start(struct usb2_ether *ue)
}
static void
-kue_init(struct usb2_ether *ue)
+kue_init(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -671,7 +671,7 @@ kue_init(struct usb2_ether *ue)
}
static void
-kue_stop(struct usb2_ether *ue)
+kue_stop(struct usb_ether *ue)
{
struct kue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
diff --git a/sys/dev/usb/net/if_kuereg.h b/sys/dev/usb/net/if_kuereg.h
index 8650687..16ad044 100644
--- a/sys/dev/usb/net/if_kuereg.h
+++ b/sys/dev/usb/net/if_kuereg.h
@@ -124,10 +124,10 @@ enum {
};
struct kue_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
struct kue_ether_desc sc_desc;
- struct usb2_xfer *sc_xfer[KUE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[KUE_N_TRANSFER];
uint8_t *sc_mcfilters;
int sc_flags;
diff --git a/sys/dev/usb/net/if_rue.c b/sys/dev/usb/net/if_rue.c
index 6451779..68d7bb3 100644
--- a/sys/dev/usb/net/if_rue.c
+++ b/sys/dev/usb/net/if_rue.c
@@ -95,7 +95,7 @@ SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RW,
* Various supported device vendors/products.
*/
-static const struct usb2_device_id rue_devs[] = {
+static const struct usb_device_id rue_devs[] = {
{USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAKTX, 0)},
{USB_VPI(USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_USBKR100, 0)},
};
@@ -134,7 +134,7 @@ static void rue_reset(struct rue_softc *);
static int rue_ifmedia_upd(struct ifnet *);
static void rue_ifmedia_sts(struct ifnet *, struct ifmediareq *);
-static const struct usb2_config rue_config[RUE_N_TRANSFER] = {
+static const struct usb_config rue_config[RUE_N_TRANSFER] = {
[RUE_BULK_DT_WR] = {
.type = UE_BULK,
@@ -199,7 +199,7 @@ MODULE_DEPEND(rue, usb, 1, 1, 1);
MODULE_DEPEND(rue, ether, 1, 1, 1);
MODULE_DEPEND(rue, miibus, 1, 1, 1);
-static const struct usb2_ether_methods rue_ue_methods = {
+static const struct usb_ether_methods rue_ue_methods = {
.ue_attach_post = rue_attach_post,
.ue_start = rue_start,
.ue_init = rue_init,
@@ -220,7 +220,7 @@ static const struct usb2_ether_methods rue_ue_methods = {
static int
rue_read_mem(struct rue_softc *sc, uint16_t addr, void *buf, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_READ_VENDOR_DEVICE;
req.bRequest = UR_SET_ADDRESS;
@@ -234,7 +234,7 @@ rue_read_mem(struct rue_softc *sc, uint16_t addr, void *buf, int len)
static int
rue_write_mem(struct rue_softc *sc, uint16_t addr, void *buf, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = UR_SET_ADDRESS;
@@ -434,7 +434,7 @@ rue_miibus_statchg(device_t dev)
}
static void
-rue_setpromisc(struct usb2_ether *ue)
+rue_setpromisc(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -452,7 +452,7 @@ rue_setpromisc(struct usb2_ether *ue)
* Program the 64-bit multicast hash filter.
*/
static void
-rue_setmulti(struct usb2_ether *ue)
+rue_setmulti(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -527,7 +527,7 @@ rue_reset(struct rue_softc *sc)
}
static void
-rue_attach_post(struct usb2_ether *ue)
+rue_attach_post(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
@@ -544,7 +544,7 @@ rue_attach_post(struct usb2_ether *ue)
static int
rue_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -563,9 +563,9 @@ rue_probe(device_t dev)
static int
rue_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct rue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -603,7 +603,7 @@ static int
rue_detach(device_t dev)
{
struct rue_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, RUE_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -613,7 +613,7 @@ rue_detach(device_t dev)
}
static void
-rue_intr_callback(struct usb2_xfer *xfer)
+rue_intr_callback(struct usb_xfer *xfer)
{
struct rue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -649,10 +649,10 @@ tr_setup:
}
static void
-rue_bulk_read_callback(struct usb2_xfer *xfer)
+rue_bulk_read_callback(struct usb_xfer *xfer)
{
struct rue_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
uint16_t status;
@@ -696,7 +696,7 @@ tr_setup:
}
static void
-rue_bulk_write_callback(struct usb2_xfer *xfer)
+rue_bulk_write_callback(struct usb_xfer *xfer)
{
struct rue_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -768,7 +768,7 @@ tr_setup:
}
static void
-rue_tick(struct usb2_ether *ue)
+rue_tick(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
struct mii_data *mii = GET_MII(sc);
@@ -785,7 +785,7 @@ rue_tick(struct usb2_ether *ue)
}
static void
-rue_start(struct usb2_ether *ue)
+rue_start(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
@@ -798,7 +798,7 @@ rue_start(struct usb2_ether *ue)
}
static void
-rue_init(struct usb2_ether *ue)
+rue_init(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
@@ -874,7 +874,7 @@ rue_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
}
static void
-rue_stop(struct usb2_ether *ue)
+rue_stop(struct usb_ether *ue)
{
struct rue_softc *sc = usb2_ether_getsc(ue);
struct ifnet *ifp = usb2_ether_getifp(ue);
diff --git a/sys/dev/usb/net/if_ruereg.h b/sys/dev/usb/net/if_ruereg.h
index a94d45a..edfa3d3 100644
--- a/sys/dev/usb/net/if_ruereg.h
+++ b/sys/dev/usb/net/if_ruereg.h
@@ -170,9 +170,9 @@ enum {
};
struct rue_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[RUE_N_TRANSFER];
+ struct usb_xfer *sc_xfer[RUE_N_TRANSFER];
int sc_flags;
#define RUE_FLAG_LINK 0x0001
diff --git a/sys/dev/usb/net/if_udav.c b/sys/dev/usb/net/if_udav.c
index 3d3a058..50ba416 100644
--- a/sys/dev/usb/net/if_udav.c
+++ b/sys/dev/usb/net/if_udav.c
@@ -94,7 +94,7 @@ static miibus_readreg_t udav_miibus_readreg;
static miibus_writereg_t udav_miibus_writereg;
static miibus_statchg_t udav_miibus_statchg;
-static const struct usb2_config udav_config[UDAV_N_TRANSFER] = {
+static const struct usb_config udav_config[UDAV_N_TRANSFER] = {
[UDAV_BULK_DT_WR] = {
.type = UE_BULK,
@@ -159,7 +159,7 @@ MODULE_DEPEND(udav, usb, 1, 1, 1);
MODULE_DEPEND(udav, ether, 1, 1, 1);
MODULE_DEPEND(udav, miibus, 1, 1, 1);
-static const struct usb2_ether_methods udav_ue_methods = {
+static const struct usb_ether_methods udav_ue_methods = {
.ue_attach_post = udav_attach_post,
.ue_start = udav_start,
.ue_init = udav_init,
@@ -185,7 +185,7 @@ SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RW, &udav_debug, 0,
#define UDAV_CLRBIT(sc, reg, x) \
udav_csr_write1(sc, reg, udav_csr_read1(sc, reg) & ~(x))
-static const struct usb2_device_id udav_devs[] = {
+static const struct usb_device_id udav_devs[] = {
/* ShanTou DM9601 USB NIC */
{USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_DM9601, 0)},
/* ShanTou ST268 USB NIC */
@@ -195,7 +195,7 @@ static const struct usb2_device_id udav_devs[] = {
};
static void
-udav_attach_post(struct usb2_ether *ue)
+udav_attach_post(struct usb_ether *ue)
{
struct udav_softc *sc = usb2_ether_getsc(ue);
@@ -209,7 +209,7 @@ udav_attach_post(struct usb2_ether *ue)
static int
udav_probe(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
@@ -224,9 +224,9 @@ udav_probe(device_t dev)
static int
udav_attach(device_t dev)
{
- struct usb2_attach_arg *uaa = device_get_ivars(dev);
+ struct usb_attach_arg *uaa = device_get_ivars(dev);
struct udav_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
uint8_t iface_index;
int error;
@@ -267,7 +267,7 @@ static int
udav_detach(device_t dev)
{
struct udav_softc *sc = device_get_softc(dev);
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
usb2_transfer_unsetup(sc->sc_xfer, UDAV_N_TRANSFER);
usb2_ether_ifdetach(ue);
@@ -281,7 +281,7 @@ static int
udav_mem_read(struct udav_softc *sc, uint16_t offset, void *buf,
int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
len &= 0xff;
@@ -298,7 +298,7 @@ static int
udav_mem_write(struct udav_softc *sc, uint16_t offset, void *buf,
int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
len &= 0xff;
@@ -315,7 +315,7 @@ static int
udav_mem_write1(struct udav_softc *sc, uint16_t offset,
uint8_t ch)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = UDAV_REQ_MEM_WRITE1;
@@ -330,7 +330,7 @@ udav_mem_write1(struct udav_softc *sc, uint16_t offset,
static int
udav_csr_read(struct udav_softc *sc, uint16_t offset, void *buf, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
len &= 0xff;
@@ -346,7 +346,7 @@ udav_csr_read(struct udav_softc *sc, uint16_t offset, void *buf, int len)
static int
udav_csr_write(struct udav_softc *sc, uint16_t offset, void *buf, int len)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
offset &= 0xff;
len &= 0xff;
@@ -373,7 +373,7 @@ static int
udav_csr_write1(struct udav_softc *sc, uint16_t offset,
uint8_t ch)
{
- struct usb2_device_request req;
+ struct usb_device_request req;
offset &= 0xff;
@@ -387,7 +387,7 @@ udav_csr_write1(struct udav_softc *sc, uint16_t offset,
}
static void
-udav_init(struct usb2_ether *ue)
+udav_init(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -459,7 +459,7 @@ udav_reset(struct udav_softc *sc)
#define UDAV_BITS 6
static void
-udav_setmulti(struct usb2_ether *ue)
+udav_setmulti(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -499,7 +499,7 @@ udav_setmulti(struct usb2_ether *ue)
}
static void
-udav_setpromisc(struct usb2_ether *ue)
+udav_setpromisc(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -518,7 +518,7 @@ udav_setpromisc(struct usb2_ether *ue)
}
static void
-udav_start(struct usb2_ether *ue)
+udav_start(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
@@ -531,7 +531,7 @@ udav_start(struct usb2_ether *ue)
}
static void
-udav_bulk_write_callback(struct usb2_xfer *xfer)
+udav_bulk_write_callback(struct usb_xfer *xfer)
{
struct udav_softc *sc = xfer->priv_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -614,10 +614,10 @@ tr_setup:
}
static void
-udav_bulk_read_callback(struct usb2_xfer *xfer)
+udav_bulk_read_callback(struct usb_xfer *xfer)
{
struct udav_softc *sc = xfer->priv_sc;
- struct usb2_ether *ue = &sc->sc_ue;
+ struct usb_ether *ue = &sc->sc_ue;
struct ifnet *ifp = usb2_ether_getifp(ue);
struct udav_rxpkt stat;
int len;
@@ -665,7 +665,7 @@ tr_setup:
}
static void
-udav_intr_callback(struct usb2_xfer *xfer)
+udav_intr_callback(struct usb_xfer *xfer)
{
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
@@ -686,7 +686,7 @@ tr_setup:
}
static void
-udav_stop(struct usb2_ether *ue)
+udav_stop(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue);
@@ -739,7 +739,7 @@ udav_ifmedia_status(struct ifnet *ifp, struct ifmediareq *ifmr)
}
static void
-udav_tick(struct usb2_ether *ue)
+udav_tick(struct usb_ether *ue)
{
struct udav_softc *sc = ue->ue_sc;
struct mii_data *mii = GET_MII(sc);
diff --git a/sys/dev/usb/net/if_udavreg.h b/sys/dev/usb/net/if_udavreg.h
index d652f5b..6dba64c 100644
--- a/sys/dev/usb/net/if_udavreg.h
+++ b/sys/dev/usb/net/if_udavreg.h
@@ -152,9 +152,9 @@ enum {
};
struct udav_softc {
- struct usb2_ether sc_ue;
+ struct usb_ether sc_ue;
struct mtx sc_mtx;
- struct usb2_xfer *sc_xfer[UDAV_N_TRANSFER];
+ struct usb_xfer *sc_xfer[UDAV_N_TRANSFER];
int sc_flags;
#define UDAV_FLAG_LINK 0x0001
diff --git a/sys/dev/usb/net/usb_ethernet.c b/sys/dev/usb/net/usb_ethernet.c
index 6bd5320..3d0c18d 100644
--- a/sys/dev/usb/net/usb_ethernet.c
+++ b/sys/dev/usb/net/usb_ethernet.c
@@ -67,7 +67,7 @@ static void ue_watchdog(void *);
* Else: device has been detached
*/
uint8_t
-usb2_ether_pause(struct usb2_ether *ue, unsigned int _ticks)
+usb2_ether_pause(struct usb_ether *ue, unsigned int _ticks)
{
if (usb2_proc_is_gone(&ue->ue_tq)) {
/* nothing to do */
@@ -78,11 +78,11 @@ usb2_ether_pause(struct usb2_ether *ue, unsigned int _ticks)
}
static void
-ue_queue_command(struct usb2_ether *ue,
+ue_queue_command(struct usb_ether *ue,
usb2_proc_callback_t *fn,
- struct usb2_proc_msg *t0, struct usb2_proc_msg *t1)
+ struct usb_proc_msg *t0, struct usb_proc_msg *t1)
{
- struct usb2_ether_cfg_task *task;
+ struct usb_ether_cfg_task *task;
UE_LOCK_ASSERT(ue, MA_OWNED);
@@ -94,7 +94,7 @@ ue_queue_command(struct usb2_ether *ue,
* "sc_mtx" mutex. It is safe to update fields in the message
* structure after that the message got queued.
*/
- task = (struct usb2_ether_cfg_task *)
+ task = (struct usb_ether_cfg_task *)
usb2_proc_msignal(&ue->ue_tq, t0, t1);
/* Setup callback and self pointers */
@@ -109,19 +109,19 @@ ue_queue_command(struct usb2_ether *ue,
}
struct ifnet *
-usb2_ether_getifp(struct usb2_ether *ue)
+usb2_ether_getifp(struct usb_ether *ue)
{
return (ue->ue_ifp);
}
struct mii_data *
-usb2_ether_getmii(struct usb2_ether *ue)
+usb2_ether_getmii(struct usb_ether *ue)
{
return (device_get_softc(ue->ue_miibus));
}
void *
-usb2_ether_getsc(struct usb2_ether *ue)
+usb2_ether_getsc(struct usb_ether *ue)
{
return (ue->ue_sc);
}
@@ -129,7 +129,7 @@ usb2_ether_getsc(struct usb2_ether *ue)
static int
ue_sysctl_parent(SYSCTL_HANDLER_ARGS)
{
- struct usb2_ether *ue = arg1;
+ struct usb_ether *ue = arg1;
const char *name;
name = device_get_nameunit(ue->ue_dev);
@@ -137,7 +137,7 @@ ue_sysctl_parent(SYSCTL_HANDLER_ARGS)
}
int
-usb2_ether_ifattach(struct usb2_ether *ue)
+usb2_ether_ifattach(struct usb_ether *ue)
{
int error;
@@ -167,11 +167,11 @@ error:
}
static void
-ue_attach_post_task(struct usb2_proc_msg *_task)
+ue_attach_post_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
struct ifnet *ifp;
int error;
char num[14]; /* sufficient for 32 bits */
@@ -244,7 +244,7 @@ error:
}
void
-usb2_ether_ifdetach(struct usb2_ether *ue)
+usb2_ether_ifdetach(struct usb_ether *ue)
{
struct ifnet *ifp;
@@ -289,7 +289,7 @@ usb2_ether_ifdetach(struct usb2_ether *ue)
}
uint8_t
-usb2_ether_is_gone(struct usb2_ether *ue)
+usb2_ether_is_gone(struct usb_ether *ue)
{
return (usb2_proc_is_gone(&ue->ue_tq));
}
@@ -297,7 +297,7 @@ usb2_ether_is_gone(struct usb2_ether *ue)
static void
ue_init(void *arg)
{
- struct usb2_ether *ue = arg;
+ struct usb_ether *ue = arg;
UE_LOCK(ue);
ue_queue_command(ue, ue_start_task,
@@ -307,11 +307,11 @@ ue_init(void *arg)
}
static void
-ue_start_task(struct usb2_proc_msg *_task)
+ue_start_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
struct ifnet *ifp = ue->ue_ifp;
UE_LOCK_ASSERT(ue, MA_OWNED);
@@ -326,11 +326,11 @@ ue_start_task(struct usb2_proc_msg *_task)
}
static void
-ue_stop_task(struct usb2_proc_msg *_task)
+ue_stop_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
UE_LOCK_ASSERT(ue, MA_OWNED);
@@ -342,7 +342,7 @@ ue_stop_task(struct usb2_proc_msg *_task)
static void
ue_start(struct ifnet *ifp)
{
- struct usb2_ether *ue = ifp->if_softc;
+ struct usb_ether *ue = ifp->if_softc;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
return;
@@ -353,21 +353,21 @@ ue_start(struct ifnet *ifp)
}
static void
-ue_promisc_task(struct usb2_proc_msg *_task)
+ue_promisc_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
ue->ue_methods->ue_setpromisc(ue);
}
static void
-ue_setmulti_task(struct usb2_proc_msg *_task)
+ue_setmulti_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
ue->ue_methods->ue_setmulti(ue);
}
@@ -375,7 +375,7 @@ ue_setmulti_task(struct usb2_proc_msg *_task)
static int
ue_ifmedia_upd(struct ifnet *ifp)
{
- struct usb2_ether *ue = ifp->if_softc;
+ struct usb_ether *ue = ifp->if_softc;
/* Defer to process context */
UE_LOCK(ue);
@@ -388,11 +388,11 @@ ue_ifmedia_upd(struct ifnet *ifp)
}
static void
-ue_ifmedia_task(struct usb2_proc_msg *_task)
+ue_ifmedia_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
struct ifnet *ifp = ue->ue_ifp;
ue->ue_methods->ue_mii_upd(ifp);
@@ -401,7 +401,7 @@ ue_ifmedia_task(struct usb2_proc_msg *_task)
static void
ue_watchdog(void *arg)
{
- struct usb2_ether *ue = arg;
+ struct usb_ether *ue = arg;
struct ifnet *ifp = ue->ue_ifp;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
@@ -415,11 +415,11 @@ ue_watchdog(void *arg)
}
static void
-ue_tick_task(struct usb2_proc_msg *_task)
+ue_tick_task(struct usb_proc_msg *_task)
{
- struct usb2_ether_cfg_task *task =
- (struct usb2_ether_cfg_task *)_task;
- struct usb2_ether *ue = task->ue;
+ struct usb_ether_cfg_task *task =
+ (struct usb_ether_cfg_task *)_task;
+ struct usb_ether *ue = task->ue;
struct ifnet *ifp = ue->ue_ifp;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
@@ -431,7 +431,7 @@ ue_tick_task(struct usb2_proc_msg *_task)
int
usb2_ether_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
- struct usb2_ether *ue = ifp->if_softc;
+ struct usb_ether *ue = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct mii_data *mii;
int error = 0;
@@ -514,7 +514,7 @@ usb2_ether_newbuf(void)
}
int
-usb2_ether_rxmbuf(struct usb2_ether *ue, struct mbuf *m,
+usb2_ether_rxmbuf(struct usb_ether *ue, struct mbuf *m,
unsigned int len)
{
struct ifnet *ifp = ue->ue_ifp;
@@ -532,7 +532,7 @@ usb2_ether_rxmbuf(struct usb2_ether *ue, struct mbuf *m,
}
int
-usb2_ether_rxbuf(struct usb2_ether *ue, struct usb2_page_cache *pc,
+usb2_ether_rxbuf(struct usb_ether *ue, struct usb_page_cache *pc,
unsigned int offset, unsigned int len)
{
struct ifnet *ifp = ue->ue_ifp;
@@ -562,7 +562,7 @@ usb2_ether_rxbuf(struct usb2_ether *ue, struct usb2_page_cache *pc,
}
void
-usb2_ether_rxflush(struct usb2_ether *ue)
+usb2_ether_rxflush(struct usb_ether *ue)
{
struct ifnet *ifp = ue->ue_ifp;
struct mbuf *m;
diff --git a/sys/dev/usb/net/usb_ethernet.h b/sys/dev/usb/net/usb_ethernet.h
index 3eaafed..9b63efd 100644
--- a/sys/dev/usb/net/usb_ethernet.h
+++ b/sys/dev/usb/net/usb_ethernet.h
@@ -49,12 +49,12 @@
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-struct usb2_ether;
-struct usb2_device_request;
+struct usb_ether;
+struct usb_device_request;
-typedef void (usb2_ether_fn_t)(struct usb2_ether *);
+typedef void (usb2_ether_fn_t)(struct usb_ether *);
-struct usb2_ether_methods {
+struct usb_ether_methods {
usb2_ether_fn_t *ue_attach_post;
usb2_ether_fn_t *ue_start;
usb2_ether_fn_t *ue_init;
@@ -69,31 +69,31 @@ struct usb2_ether_methods {
};
-struct usb2_ether_cfg_task {
- struct usb2_proc_msg hdr;
- struct usb2_ether *ue;
+struct usb_ether_cfg_task {
+ struct usb_proc_msg hdr;
+ struct usb_ether *ue;
};
-struct usb2_ether {
+struct usb_ether {
/* NOTE: the "ue_ifp" pointer must be first --hps */
struct ifnet *ue_ifp;
struct mtx *ue_mtx;
- const struct usb2_ether_methods *ue_methods;
+ const struct usb_ether_methods *ue_methods;
struct sysctl_oid *ue_sysctl_oid;
void *ue_sc;
- struct usb2_device *ue_udev; /* used by usb2_ether_do_request() */
+ struct usb_device *ue_udev; /* used by usb2_ether_do_request() */
device_t ue_dev;
device_t ue_miibus;
- struct usb2_process ue_tq;
+ struct usb_process ue_tq;
struct sysctl_ctx_list ue_sysctl_ctx;
struct ifqueue ue_rxq;
- struct usb2_callout ue_watchdog;
- struct usb2_ether_cfg_task ue_sync_task[2];
- struct usb2_ether_cfg_task ue_media_task[2];
- struct usb2_ether_cfg_task ue_multi_task[2];
- struct usb2_ether_cfg_task ue_promisc_task[2];
- struct usb2_ether_cfg_task ue_tick_task[2];
+ struct usb_callout ue_watchdog;
+ struct usb_ether_cfg_task ue_sync_task[2];
+ struct usb_ether_cfg_task ue_media_task[2];
+ struct usb_ether_cfg_task ue_multi_task[2];
+ struct usb_ether_cfg_task ue_promisc_task[2];
+ struct usb_ether_cfg_task ue_tick_task[2];
int ue_unit;
@@ -104,19 +104,19 @@ struct usb2_ether {
#define usb2_ether_do_request(ue,req,data,timo) \
usb2_do_request_proc((ue)->ue_udev,&(ue)->ue_tq,req,data,0,NULL,timo)
-uint8_t usb2_ether_pause(struct usb2_ether *, unsigned int);
-struct ifnet *usb2_ether_getifp(struct usb2_ether *);
-struct mii_data *usb2_ether_getmii(struct usb2_ether *);
-void *usb2_ether_getsc(struct usb2_ether *);
-int usb2_ether_ifattach(struct usb2_ether *);
-void usb2_ether_ifdetach(struct usb2_ether *);
+uint8_t usb2_ether_pause(struct usb_ether *, unsigned int);
+struct ifnet *usb2_ether_getifp(struct usb_ether *);
+struct mii_data *usb2_ether_getmii(struct usb_ether *);
+void *usb2_ether_getsc(struct usb_ether *);
+int usb2_ether_ifattach(struct usb_ether *);
+void usb2_ether_ifdetach(struct usb_ether *);
int usb2_ether_ioctl(struct ifnet *, u_long, caddr_t);
struct mbuf *usb2_ether_newbuf(void);
-int usb2_ether_rxmbuf(struct usb2_ether *, struct mbuf *,
+int usb2_ether_rxmbuf(struct usb_ether *, struct mbuf *,
unsigned int);
-int usb2_ether_rxbuf(struct usb2_ether *,
- struct usb2_page_cache *,
+int usb2_ether_rxbuf(struct usb_ether *,
+ struct usb_page_cache *,
unsigned int, unsigned int);
-void usb2_ether_rxflush(struct usb2_ether *);
-uint8_t usb2_ether_is_gone(struct usb2_ether *);
+void usb2_ether_rxflush(struct usb_ether *);
+uint8_t usb2_ether_is_gone(struct usb_ether *);
#endif /* _USB2_ETHERNET_H_ */
OpenPOWER on IntegriCloud