iPXE
|
USB network devices. More...
#include <ipxe/usb.h>
Go to the source code of this file.
Data Structures | |
struct | usbnet_device |
A USB network device. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | usbnet_init (struct usbnet_device *usbnet, struct usb_function *func, struct usb_endpoint_driver_operations *intr, struct usb_endpoint_driver_operations *in, struct usb_endpoint_driver_operations *out) |
Initialise USB network device. More... | |
static int | usbnet_has_intr (struct usbnet_device *usbnet) |
Check if USB network device has an interrupt endpoint. More... | |
int | usbnet_open (struct usbnet_device *usbnet) |
Open USB network device. More... | |
void | usbnet_close (struct usbnet_device *usbnet) |
Close USB network device. More... | |
int | usbnet_refill (struct usbnet_device *usbnet) |
Refill USB network device bulk IN and interrupt endpoints. More... | |
int | usbnet_describe (struct usbnet_device *usbnet, struct usb_configuration_descriptor *config) |
Describe USB network device interfaces. More... | |
USB network devices.
Definition in file usbnet.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise USB network device.
usbnet | USB network device |
func | USB function |
intr | Interrupt endpoint operations, or NULL |
in | Bulk IN endpoint operations |
out | Bulk OUT endpoint operations |
Definition at line 44 of file usbnet.h.
References usbnet_device::func, usbnet_device::in, in, intr, usbnet_device::intr, usbnet_device::out, out, usb_function::usb, and usb_endpoint_init().
Referenced by acm_probe(), axge_probe(), dm96xx_probe(), ecm_probe(), imux_probe(), iphone_probe(), and ncm_probe().
|
inlinestatic |
Check if USB network device has an interrupt endpoint.
usbnet | USB network device |
has_intr | Device has an interrupt endpoint |
Definition at line 63 of file usbnet.h.
References usb_endpoint::driver, usbnet_device::intr, and NULL.
Referenced by usbnet_close(), usbnet_describe(), usbnet_open(), and usbnet_refill().
int usbnet_open | ( | struct usbnet_device * | usbnet | ) |
Open USB network device.
usbnet | USB network device |
rc | Return status code |
Definition at line 54 of file usbnet.c.
References usbnet_device::alternate, usbnet_device::data, DBGC, usbnet_device::func, usbnet_device::in, usbnet_device::intr, usb_function::name, usbnet_device::out, rc, strerror(), usb_function::usb, usb_endpoint_close(), usb_endpoint_open(), usb_refill(), usb_set_interface(), and usbnet_has_intr().
Referenced by acm_open(), axge_open(), dm96xx_open(), ecm_open(), imux_probe(), iphone_open(), lan78xx_open(), ncm_open(), smsc75xx_open(), and smsc95xx_open().
void usbnet_close | ( | struct usbnet_device * | usbnet | ) |
Close USB network device.
usbnet | USB network device |
Definition at line 127 of file usbnet.c.
References usbnet_device::alternate, usbnet_device::data, usbnet_device::func, usbnet_device::in, usbnet_device::intr, usbnet_device::out, usb_function::usb, usb_endpoint_close(), usb_set_interface(), and usbnet_has_intr().
Referenced by acm_close(), acm_open(), axge_close(), axge_open(), dm96xx_close(), dm96xx_open(), ecm_close(), ecm_open(), imux_shutdown(), iphone_close(), iphone_open(), lan78xx_close(), lan78xx_open(), ncm_close(), ncm_open(), smsc75xx_close(), smsc75xx_open(), smsc95xx_close(), and smsc95xx_open().
int usbnet_refill | ( | struct usbnet_device * | usbnet | ) |
Refill USB network device bulk IN and interrupt endpoints.
usbnet | USB network device |
rc | Return status code |
Definition at line 151 of file usbnet.c.
References usbnet_device::in, usbnet_device::intr, rc, usb_refill(), and usbnet_has_intr().
Referenced by acm_poll(), axge_poll(), dm96xx_poll(), ecm_poll(), imux_step(), iphone_poll(), ncm_poll(), smsc75xx_poll(), and smsc95xx_poll().
int usbnet_describe | ( | struct usbnet_device * | usbnet, |
struct usb_configuration_descriptor * | config | ||
) |
Describe USB network device interfaces.
usbnet | USB network device |
config | Configuration descriptor |
rc | Return status code |
Definition at line 277 of file usbnet.c.
References rc, usbnet_comms_describe(), usbnet_data_describe(), and usbnet_has_intr().
Referenced by acm_probe(), axge_probe(), dm96xx_probe(), ecm_probe(), imux_probe(), iphone_probe(), lan78xx_probe(), ncm_probe(), smsc75xx_probe(), and smsc95xx_probe().