FreeBSD kernel usb device Code
usb_ethernet.h File Reference
#include "opt_inet.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/limits.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <net/bpf.h>
#include <net/ethernet.h>
Include dependency graph for usb_ethernet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usb_ether_methods
 
struct  usb_ether_cfg_task
 
struct  usb_ether
 

Macros

#define uether_do_request(ue, req, data, timo)    usbd_do_request_proc((ue)->ue_udev,&(ue)->ue_tq,req,data,0,NULL,timo)
 

Typedefs

typedef void() uether_fn_t(struct usb_ether *)
 

Functions

uint8_t uether_pause (struct usb_ether *, unsigned int)
 
struct ifnet * uether_getifp (struct usb_ether *)
 
struct mii_data * uether_getmii (struct usb_ether *)
 
void * uether_getsc (struct usb_ether *)
 
int uether_ifattach (struct usb_ether *)
 
void uether_ifattach_wait (struct usb_ether *)
 
void uether_ifdetach (struct usb_ether *)
 
int uether_ifmedia_upd (struct ifnet *)
 
void uether_init (void *)
 
int uether_ioctl (struct ifnet *, u_long, caddr_t)
 
struct mbuf * uether_newbuf (void)
 
int uether_rxmbuf (struct usb_ether *, struct mbuf *, unsigned int)
 
int uether_rxbuf (struct usb_ether *, struct usb_page_cache *, unsigned int, unsigned int)
 
void uether_rxflush (struct usb_ether *)
 
uint8_t uether_is_gone (struct usb_ether *)
 
void uether_start (struct ifnet *)
 

Macro Definition Documentation

◆ uether_do_request

#define uether_do_request (   ue,
  req,
  data,
  timo 
)     usbd_do_request_proc((ue)->ue_udev,&(ue)->ue_tq,req,data,0,NULL,timo)

Definition at line 104 of file usb_ethernet.h.

Typedef Documentation

◆ uether_fn_t

typedef void() uether_fn_t(struct usb_ether *)

Definition at line 55 of file usb_ethernet.h.

Function Documentation

◆ uether_getifp()

struct ifnet * uether_getifp ( struct usb_ether ue)

Definition at line 136 of file usb_ethernet.c.

References usb_ether::ue_ifp.

Referenced by aue_bulk_read_callback(), aue_bulk_write_callback(), aue_init(), aue_intr_callback(), aue_setmulti(), aue_setpromisc(), aue_stop(), axe_bulk_write_callback(), axe_csum_cfg(), axe_init(), axe_miibus_statchg(), axe_setmulti(), axe_setpromisc(), axe_stop(), axge_bulk_write_callback(), axge_csum_cfg(), axge_init(), axge_miibus_statchg(), axge_rxfilter(), axge_stop(), cdce_attach_post_sub(), cdce_bulk_write_callback(), cdce_init(), cdce_intr_read_callback(), cdce_set_filter(), cdce_stop(), cdceem_bulk_write_callback(), cdceem_handle_data(), cdceem_init(), cdceem_send_data(), cdceem_stop(), cue_bulk_read_callback(), cue_bulk_write_callback(), cue_init(), cue_setmulti(), cue_setpromisc(), cue_stop(), cue_tick(), ipheth_bulk_write_callback(), ipheth_init(), kue_bulk_read_callback(), kue_bulk_write_callback(), kue_init(), kue_setmulti(), kue_setpromisc(), kue_stop(), lan78xx_miibus_statchg(), mos_bulk_read_callback(), mos_bulk_write_callback(), mos_init(), mos_intr_callback(), mos_setmulti(), mos_setpromisc(), mos_stop(), muge_bulk_read_callback(), muge_bulk_write_callback(), muge_init(), muge_sethwcsum(), muge_setmulti(), muge_setpromisc(), muge_stop(), rue_bulk_read_callback(), rue_bulk_write_callback(), rue_init(), rue_intr_callback(), rue_setmulti(), rue_setpromisc(), rue_stop(), smsc_bulk_read_callback(), smsc_bulk_write_callback(), smsc_init(), smsc_miibus_statchg(), smsc_sethwcsum(), smsc_setmulti(), smsc_setpromisc(), smsc_stop(), udav_bulk_read_callback(), udav_bulk_write_callback(), udav_init(), udav_setmulti(), udav_setpromisc(), udav_stop(), ure_bulk_read_callback(), ure_bulk_write_callback(), ure_init(), ure_link_state(), ure_miibus_statchg(), ure_rtl8153b_nic_reset(), ure_rxfilter(), ure_stop(), ure_tick(), urndis_bulk_read_callback(), urndis_bulk_write_callback(), urndis_init(), and urndis_stop().

◆ uether_getmii()

struct mii_data * uether_getmii ( struct usb_ether ue)

Definition at line 142 of file usb_ethernet.c.

References usb_ether::ue_miibus.

Referenced by lan78xx_miibus_statchg(), muge_ifmedia_sts(), muge_ifmedia_upd(), muge_tick(), smsc_ifmedia_sts(), smsc_ifmedia_upd(), smsc_miibus_statchg(), and smsc_tick().

Here is the caller graph for this function:

◆ uether_getsc()

void * uether_getsc ( struct usb_ether ue)

Definition at line 148 of file usb_ethernet.c.

References usb_ether::ue_sc.

Referenced by aue_attach_post(), aue_init(), aue_setmulti(), aue_setpromisc(), aue_start(), aue_stop(), aue_tick(), axe_attach_post(), axe_attach_post_sub(), axe_csum_cfg(), axe_init(), axe_ioctl(), axe_rx_frame(), axe_setmulti(), axe_setpromisc(), axe_start(), axe_stop(), axe_tick(), axge_attach_post(), axge_csum_cfg(), axge_init(), axge_ioctl(), axge_rxfilter(), axge_start(), axge_stop(), axge_tick(), cdce_attach_post_sub(), cdce_init(), cdce_ioctl(), cdce_set_filter(), cdce_start(), cdce_stop(), cdceem_init(), cdceem_start(), cdceem_stop(), cue_attach_post(), cue_init(), cue_setmulti(), cue_setpromisc(), cue_start(), cue_stop(), cue_tick(), ipheth_init(), ipheth_start(), ipheth_stop(), ipheth_tick(), kue_attach_post(), kue_init(), kue_setmulti(), kue_setpromisc(), kue_start(), kue_stop(), mos_attach_post(), mos_init(), mos_setmulti(), mos_setpromisc(), mos_start(), mos_stop(), mos_tick(), muge_attach_post(), muge_attach_post_sub(), muge_init(), muge_ioctl(), muge_set_leds(), muge_set_mac_addr(), muge_setmulti(), muge_setpromisc(), muge_start(), muge_stop(), muge_tick(), rue_attach_post(), rue_init(), rue_setmulti(), rue_setpromisc(), rue_start(), rue_stop(), rue_tick(), smsc_attach_post(), smsc_attach_post_sub(), smsc_init(), smsc_ioctl(), smsc_setmulti(), smsc_setpromisc(), smsc_start(), smsc_stop(), smsc_tick(), udav_attach_post(), ure_attach_post(), ure_attach_post_sub(), ure_init(), ure_ioctl(), ure_rxfilter(), ure_start(), ure_stop(), ure_tick(), urndis_init(), urndis_start(), and urndis_stop().

◆ uether_ifattach()

◆ uether_ifattach_wait()

void uether_ifattach_wait ( struct usb_ether ue)

Definition at line 194 of file usb_ethernet.c.

References usb_ether_cfg_task::hdr, UE_LOCK, usb_ether::ue_sync_task, usb_ether::ue_tq, UE_UNLOCK, and usb_proc_mwait().

Referenced by muge_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uether_ifdetach()

◆ uether_ifmedia_upd()

int uether_ifmedia_upd ( struct ifnet *  ifp)

Definition at line 450 of file usb_ethernet.c.

References ue_ifmedia_upd().

Referenced by axe_attach_post_sub(), axge_attach_post_sub(), muge_attach_post_sub(), smsc_attach_post_sub(), and ure_attach_post_sub().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uether_init()

void uether_init ( void *  arg)

Definition at line 358 of file usb_ethernet.c.

References ue_init().

Referenced by axe_attach_post_sub(), axe_ioctl(), axge_attach_post_sub(), axge_ioctl(), cdce_attach_post_sub(), muge_attach_post_sub(), muge_ioctl(), smsc_attach_post_sub(), smsc_ioctl(), ure_attach_post_sub(), and ure_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uether_ioctl()

int uether_ioctl ( struct ifnet *  ifp,
u_long  command,
caddr_t  data 
)

◆ uether_is_gone()

uint8_t uether_is_gone ( struct usb_ether ue)

Definition at line 352 of file usb_ethernet.c.

References usb_ether::ue_tq, and usb_proc_is_gone().

Here is the call graph for this function:

◆ uether_newbuf()

struct mbuf * uether_newbuf ( void  )

Definition at line 584 of file usb_ethernet.c.

Referenced by cdce_bulk_read_callback(), cdceem_handle_data(), ipheth_bulk_read_callback(), muge_bulk_read_callback(), smsc_bulk_read_callback(), and uether_rxbuf().

Here is the caller graph for this function:

◆ uether_pause()

◆ uether_rxbuf()

int uether_rxbuf ( struct usb_ether ue,
struct usb_page_cache pc,
unsigned int  offset,
unsigned int  len 
)

Definition at line 616 of file usb_ethernet.c.

References len, offset, usb_ether::ue_ifp, UE_LOCK_ASSERT, usb_ether::ue_rxq, uether_newbuf(), and usbd_copy_out().

Referenced by aue_bulk_read_callback(), cue_bulk_read_callback(), kue_bulk_read_callback(), mos_bulk_read_callback(), rue_bulk_read_callback(), and udav_bulk_read_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uether_rxflush()

◆ uether_rxmbuf()

int uether_rxmbuf ( struct usb_ether ue,
struct mbuf *  m,
unsigned int  len 
)

◆ uether_start()

void uether_start ( struct ifnet *  ifp)

Definition at line 410 of file usb_ethernet.c.

References ue_start().

Referenced by axe_attach_post_sub(), axge_attach_post_sub(), cdce_attach_post_sub(), muge_attach_post_sub(), smsc_attach_post_sub(), and ure_attach_post_sub().

Here is the call graph for this function:
Here is the caller graph for this function: