Home | History | Annotate | Download | only in usb

Lines Matching defs:usbnet

1 /*	$NetBSD: usbnet.h,v 1.35 2022/08/22 08:37:16 riastradh Exp $	*/
46 * - replace most softc members with "struct usbnet" usage, in particular
47 * use usbnet pointer for ifp->if_softc, and device_private (real softc
60 * - start uses usbnet transmit prepare callback (uno_tx_prepare)
62 * - for rx, usbnet will enable the receive pipes and
66 * - for tx, usbnet will pull entries out of the
69 * the transmit completion function (internal to usbnet)
105 struct usbnet;
107 struct usbnet *unc_un;
133 typedef int (*usbnet_mii_read_reg_cb)(struct usbnet *, int reg,
136 typedef int (*usbnet_mii_write_reg_cb)(struct usbnet *, int reg,
142 typedef unsigned (*usbnet_tx_prepare_cb)(struct usbnet *, struct mbuf *,
145 typedef void (*usbnet_rx_loop_cb)(struct usbnet *, struct usbnet_chain *,
148 typedef void (*usbnet_tick_cb)(struct usbnet *);
150 typedef void (*usbnet_intr_cb)(struct usbnet *, usbd_status);
160 * C -> usbnet un_mcastlock
161 * M -> usbnet un_miilock
162 * T -> usbnet un_txlock
163 * R -> usbnet un_rxlock
225 * device_private() in attach unless already using struct usbnet here.
232 struct usbnet {
264 * This section is for driver to use, not touched by usbnet.
269 * This section is private to usbnet. Don't touch.
276 void usbnet_set_link(struct usbnet *, bool);
278 struct ifnet *usbnet_ifp(struct usbnet *);
279 struct ethercom *usbnet_ec(struct usbnet *);
280 struct mii_data *usbnet_mii(struct usbnet *);
281 krndsource_t *usbnet_rndsrc(struct usbnet *);
282 void *usbnet_softc(struct usbnet *);
284 bool usbnet_havelink(struct usbnet *);
285 bool usbnet_isdying(struct usbnet *);
286 bool usbnet_ispromisc(struct usbnet *);
291 * 1. usbnet_attach() initialises usbnet and allocates rx and tx chains
293 * 2. On if_init, usbnet:
299 * 3. On if_stop, usbnet:
311 void usbnet_enqueue(struct usbnet * const, uint8_t *, size_t, int,
313 void usbnet_input(struct usbnet * const, uint8_t *, size_t);
316 void usbnet_attach(struct usbnet *);
317 void usbnet_attach_ifp(struct usbnet *, unsigned, unsigned,
338 MODULE(MODULE_CLASS_DRIVER, if_##name, "usbnet"); \