iPXE
|
CDC-ECM USB Ethernet driver. More...
Go to the source code of this file.
Data Structures | |
struct | ecm_ethernet_descriptor |
An Ethernet Functional Descriptor. More... | |
struct | ecm_device |
A CDC-ECM network device. More... | |
Macros | |
#define | USB_SUBCLASS_CDC_ECM 0x06 |
CDC-ECM subclass. More... | |
#define | ECM_SET_ETHERNET_PACKET_FILTER |
Set Ethernet packet filter. More... | |
#define | ECM_INTR_MAX_FILL 2 |
Interrupt maximum fill level. More... | |
#define | ECM_IN_MAX_FILL 8 |
Bulk IN maximum fill level. More... | |
#define | ECM_IN_MTU ( ETH_FRAME_LEN + 4 /* possible VLAN header */ ) |
Bulk IN buffer size. More... | |
Enumerations | |
enum | ecm_ethernet_packet_filter { ECM_PACKET_TYPE_PROMISCUOUS = 0x0001, ECM_PACKET_TYPE_ALL_MULTICAST = 0x0002, ECM_PACKET_TYPE_DIRECTED = 0x0004, ECM_PACKET_TYPE_BROADCAST = 0x0008, ECM_PACKET_TYPE_MULTICAST = 0x0010 } |
Ethernet packet types. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct ecm_ethernet_descriptor * | ecm_ethernet_descriptor (struct usb_configuration_descriptor *config, struct usb_interface_descriptor *interface) |
Locate Ethernet functional descriptor. More... | |
int | ecm_fetch_mac (struct usb_function *func, struct ecm_ethernet_descriptor *desc, struct net_device *netdev) |
Get hardware MAC address. More... | |
CDC-ECM USB Ethernet driver.
Definition in file ecm.h.
#define ECM_SET_ETHERNET_PACKET_FILTER |
Set Ethernet packet filter.
#define ECM_INTR_MAX_FILL 2 |
#define ECM_IN_MAX_FILL 8 |
#define ECM_IN_MTU ( ETH_FRAME_LEN + 4 /* possible VLAN header */ ) |
Ethernet packet types.
Definition at line 25 of file ecm.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct ecm_ethernet_descriptor* ecm_ethernet_descriptor | ( | struct usb_configuration_descriptor * | config, |
struct usb_interface_descriptor * | interface | ||
) |
Locate Ethernet functional descriptor.
config | Configuration descriptor |
interface | Interface descriptor |
desc | Descriptor, or NULL if not found |
Definition at line 70 of file ecm.c.
References CDC_SUBTYPE_ETHERNET, desc, for_each_interface_descriptor, NULL, and USB_CS_INTERFACE_DESCRIPTOR.
Referenced by ecm_probe(), and ncm_probe().
int ecm_fetch_mac | ( | struct usb_function * | func, |
struct ecm_ethernet_descriptor * | desc, | ||
struct net_device * | netdev | ||
) |
Get hardware MAC address.
func | USB function |
desc | Ethernet functional descriptor |
netdev | Network device |
rc | Return status code |
Definition at line 90 of file ecm.c.
References acpi_mac(), base16_encoded_len(), DBGC, desc, EINVAL, ETH_ALEN, eth_ntoa(), net_device::hw_addr, len, net_device::ll_addr, memcpy(), usb_function::name, netdev, rc, strerror(), usb_function::usb, and usb_get_string_descriptor().
Referenced by ecm_probe(), and ncm_probe().