[ncm] Use generic refill framework for bulk IN and interrupt endpoints

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-02-12 15:17:21 +00:00
parent 1706ab7ff3
commit 14fc311271
2 changed files with 92 additions and 252 deletions

View File

@@ -139,26 +139,6 @@ struct ncm_ntb_header {
struct ncm_datagram_descriptor desc[2];
} __attribute__ (( packed ));
/** A CDC-NCM receive ring */
struct ncm_rx_ring {
/** USB endpoint */
struct usb_endpoint ep;
/** I/O buffer size */
size_t mtu;
/** Recycled buffer list */
struct list_head list;
};
/** A CDC-NCM transmit ring */
struct ncm_tx_ring {
/** USB endpoint */
struct usb_endpoint ep;
/** Transmitted packet sequence number */
uint16_t sequence;
/** Alignment padding required on transmitted packets */
size_t padding;
};
/** A CDC-NCM network device */
struct ncm_device {
/** USB device */
@@ -175,13 +155,17 @@ struct ncm_device {
/** Maximum supported NTB input size */
size_t mtu;
/** Transmitted packet sequence number */
uint16_t sequence;
/** Alignment padding required on transmitted packets */
size_t padding;
/** Interrupt ring */
struct ncm_rx_ring intr;
/** Bulk IN ring */
struct ncm_rx_ring in;
/** Bulk OUT ring */
struct ncm_tx_ring out;
/** Interrupt endpoint */
struct usb_endpoint intr;
/** Bulk IN endpoint */
struct usb_endpoint in;
/** Bulk OUT endpoint */
struct usb_endpoint out;
};
/** Bulk IN ring minimum buffer count