mirror of
https://github.com/ipxe/ipxe
synced 2026-04-04 03:00:20 +03:00
[usb] Allow for USB network devices with no interrupt endpoint
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -36,7 +36,7 @@ struct usbnet_device {
|
||||
*
|
||||
* @v usbnet USB network device
|
||||
* @v func USB function
|
||||
* @v intr Interrupt endpoint operations
|
||||
* @v intr Interrupt endpoint operations, or NULL
|
||||
* @v in Bulk IN endpoint operations
|
||||
* @v out Bulk OUT endpoint operations
|
||||
*/
|
||||
@@ -53,6 +53,18 @@ usbnet_init ( struct usbnet_device *usbnet, struct usb_function *func,
|
||||
usb_endpoint_init ( &usbnet->out, usb, out );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if USB network device has an interrupt endpoint
|
||||
*
|
||||
* @v usbnet USB network device
|
||||
* @ret has_intr Device has an interrupt endpoint
|
||||
*/
|
||||
static inline __attribute__ (( always_inline )) int
|
||||
usbnet_has_intr ( struct usbnet_device *usbnet ) {
|
||||
|
||||
return ( usbnet->intr.driver != NULL );
|
||||
}
|
||||
|
||||
extern int usbnet_open ( struct usbnet_device *usbnet );
|
||||
extern void usbnet_close ( struct usbnet_device *usbnet );
|
||||
extern int usbnet_refill ( struct usbnet_device *usbnet );
|
||||
|
||||
Reference in New Issue
Block a user