iPXE
Data Structures | Defines | Functions | Variables
ncm.h File Reference

CDC-NCM USB Ethernet driver. More...

#include <stdint.h>
#include <ipxe/usb.h>
#include <ipxe/cdc.h>
#include <byteswap.h>
#include "ecm.h"

Go to the source code of this file.

Data Structures

struct  ncm_ntb_datagram_parameters
 NTB datagram parameters. More...
struct  ncm_ntb_parameters
 NTB parameters. More...
struct  ncm_set_ntb_input_size
 Set NTB input size. More...
struct  ncm_transfer_header
 CDC-NCM transfer header (16-bit) More...
struct  ncm_datagram_descriptor
 CDC-NCM datagram descriptor (16-bit) More...
struct  ncm_datagram_pointer
 CDC-NCM datagram pointer (16-bit) More...
struct  ncm_ntb_header
 NTB constructed for transmitted packets (excluding padding) More...
struct  ncm_device
 A CDC-NCM network device. More...

Defines

#define USB_SUBCLASS_CDC_NCM   0x0d
 CDC-NCM subclass.
#define NCM_GET_NTB_PARAMETERS
 Get NTB parameters.
#define NCM_SET_NET_ADDRESS
 Set MAC address.
#define NCM_SET_NTB_INPUT_SIZE
 Set NTB input size.
#define NCM_MIN_NTB_INPUT_SIZE   2048
 Minimum allowed NTB input size.
#define NCM_MAX_NTB_INPUT_SIZE   65536
 Maximum allowed NTB input size (16-bit)
#define NCM_TRANSFER_HEADER_MAGIC   0x484d434eUL
 CDC-NCM transfer header magic.
#define NCM_DATAGRAM_POINTER_MAGIC   0x304d434eUL
 CDC-NCM datagram pointer magic.
#define NCM_DATAGRAM_POINTER_MAGIC_CRC   0x01000000UL
 CDC-NCM datagram pointer CRC present flag.
#define NCM_IN_MIN_COUNT   3
 Bulk IN ring minimum buffer count.
#define NCM_IN_MIN_SIZE   16384
 Bulk IN ring minimum total buffer size.
#define NCM_IN_MAX_SIZE   131072
 Bulk IN ring maximum total buffer size.
#define NCM_INTR_COUNT   2
 Interrupt ring buffer count.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)

Variables

struct ncm_ntb_datagram_parameters __attribute__

Detailed Description

CDC-NCM USB Ethernet driver.

Definition in file ncm.h.


Define Documentation

#define USB_SUBCLASS_CDC_NCM   0x0d

CDC-NCM subclass.

Definition at line 19 of file ncm.h.

Value:
( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE |           \
          USB_REQUEST_TYPE ( 0x80 ) )

Get NTB parameters.

Definition at line 22 of file ncm.h.

Referenced by ncm_probe().

Value:
( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE |          \
          USB_REQUEST_TYPE ( 0x82 ) )

Set MAC address.

Definition at line 55 of file ncm.h.

Referenced by ncm_open().

Value:
( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE |          \
          USB_REQUEST_TYPE ( 0x86 ) )

Set NTB input size.

Definition at line 60 of file ncm.h.

Referenced by ncm_open().

#define NCM_MIN_NTB_INPUT_SIZE   2048

Minimum allowed NTB input size.

Definition at line 71 of file ncm.h.

Referenced by ncm_in_prefill().

#define NCM_MAX_NTB_INPUT_SIZE   65536

Maximum allowed NTB input size (16-bit)

Definition at line 74 of file ncm.h.

Referenced by ncm_in_prefill().

#define NCM_TRANSFER_HEADER_MAGIC   0x484d434eUL

CDC-NCM transfer header magic.

Definition at line 91 of file ncm.h.

Referenced by ncm_out_transmit().

#define NCM_DATAGRAM_POINTER_MAGIC   0x304d434eUL

CDC-NCM datagram pointer magic.

Definition at line 117 of file ncm.h.

Referenced by ncm_out_transmit().

#define NCM_DATAGRAM_POINTER_MAGIC_CRC   0x01000000UL

CDC-NCM datagram pointer CRC present flag.

Definition at line 120 of file ncm.h.

Referenced by ncm_in_complete().

#define NCM_IN_MIN_COUNT   3

Bulk IN ring minimum buffer count.

This is a policy decision.

Definition at line 158 of file ncm.h.

Referenced by ncm_in_prefill().

#define NCM_IN_MIN_SIZE   16384

Bulk IN ring minimum total buffer size.

This is a policy decision.

Definition at line 164 of file ncm.h.

Referenced by ncm_in_prefill().

#define NCM_IN_MAX_SIZE   131072

Bulk IN ring maximum total buffer size.

This is a policy decision.

Definition at line 170 of file ncm.h.

Referenced by ncm_in_prefill().

#define NCM_INTR_COUNT   2

Interrupt ring buffer count.

This is a policy decision.

Definition at line 176 of file ncm.h.

Referenced by ncm_probe().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

Variable Documentation