[ecm] 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:16:40 +00:00
parent ebe433e795
commit 1706ab7ff3
2 changed files with 40 additions and 133 deletions

View File

@@ -64,24 +64,6 @@ struct ecm_ethernet_descriptor {
uint8_t wol;
} __attribute__ (( packed ));
/** A CDC-ECM receive ring */
struct ecm_rx_ring {
/** USB endpoint */
struct usb_endpoint ep;
/** I/O buffer size */
size_t mtu;
/** Fill level */
unsigned int fill;
/** Maximum fill level */
unsigned int max;
};
/** A CDC-ECM transmit ring */
struct ecm_tx_ring {
/** USB endpoint */
struct usb_endpoint ep;
};
/** A CDC-ECM network device */
struct ecm_device {
/** USB device */
@@ -96,12 +78,12 @@ struct ecm_device {
/** Data interface */
unsigned int data;
/** Interrupt ring */
struct ecm_rx_ring intr;
/** Bulk IN ring */
struct ecm_rx_ring in;
/** Bulk OUT ring */
struct ecm_tx_ring out;
/** Interrupt endpoint */
struct usb_endpoint intr;
/** Bulk IN endpoint */
struct usb_endpoint in;
/** Bulk OUT endpoint */
struct usb_endpoint out;
};
/** Interrupt maximum fill level