20#define USB_SUBCLASS_CDC_NCM 0x0d
23#define NCM_GET_NTB_PARAMETERS \
24 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
25 USB_REQUEST_TYPE ( 0x80 ) )
56#define NCM_SET_NET_ADDRESS \
57 ( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
58 USB_REQUEST_TYPE ( 0x82 ) )
61#define NCM_SET_NTB_INPUT_SIZE \
62 ( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
63 USB_REQUEST_TYPE ( 0x86 ) )
72#define NCM_MIN_NTB_INPUT_SIZE 2048
75#define NCM_MAX_NTB_INPUT_SIZE 65536
92#define NCM_TRANSFER_HEADER_MAGIC 0x484d434eUL
118#define NCM_DATAGRAM_POINTER_MAGIC 0x304d434eUL
121#define NCM_DATAGRAM_POINTER_MAGIC_CRC 0x01000000UL
159#define NCM_IN_MIN_COUNT 3
165#define NCM_IN_MIN_SIZE 16384
171#define NCM_IN_MAX_SIZE 131072
177#define NCM_INTR_COUNT 2
USB Communications Device Class (CDC)
CDC-ECM USB Ethernet driver.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Universal Serial Bus (USB)
CDC-NCM datagram descriptor (16-bit)
uint16_t offset
Starting offset.
CDC-NCM datagram pointer (16-bit)
struct ncm_datagram_descriptor desc[0]
Datagram descriptors.
uint16_t offset
Offset of next datagram pointer.
uint16_t header_len
Header length.
A CDC-NCM network device.
struct net_device * netdev
Network device.
struct usb_device * usb
USB device.
struct usb_bus * bus
USB bus.
size_t mtu
Maximum supported NTB input size.
uint16_t sequence
Transmitted packet sequence number.
size_t padding
Alignment padding required on transmitted packets.
struct usbnet_device usbnet
USB network device.
uint16_t remainder
Alignment remainder.
uint32_t mtu
Maximum size.
uint16_t divisor
Alignment divisor.
uint16_t modulus
Alignment modulus.
uint16_t reserved
Reserved.
uint16_t max
Maximum number of datagrams per OUT NTB.
uint16_t formats
Supported formats.
struct ncm_ntb_datagram_parameters in
IN datagram parameters.
struct ncm_ntb_datagram_parameters out
OUT datagram parameters.