|
@@ -681,8 +681,12 @@ cdc_ncm_find_endpoints(struct usbnet *dev, struct usb_interface *intf)
|
|
|
u8 ep;
|
|
u8 ep;
|
|
|
|
|
|
|
|
for (ep = 0; ep < intf->cur_altsetting->desc.bNumEndpoints; ep++) {
|
|
for (ep = 0; ep < intf->cur_altsetting->desc.bNumEndpoints; ep++) {
|
|
|
-
|
|
|
|
|
e = intf->cur_altsetting->endpoint + ep;
|
|
e = intf->cur_altsetting->endpoint + ep;
|
|
|
|
|
+
|
|
|
|
|
+ /* ignore endpoints which cannot transfer data */
|
|
|
|
|
+ if (!usb_endpoint_maxp(&e->desc))
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
switch (e->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
|
|
switch (e->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
|
|
|
case USB_ENDPOINT_XFER_INT:
|
|
case USB_ENDPOINT_XFER_INT:
|
|
|
if (usb_endpoint_dir_in(&e->desc)) {
|
|
if (usb_endpoint_dir_in(&e->desc)) {
|