File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,25 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
61
61
const struct usb_device_id * id )
62
62
{
63
63
struct usb_device * dev ;
64
-
64
+ const struct usb_endpoint_descriptor * epd ;
65
+ const struct usb_host_interface * iface_desc = interface -> cur_altsetting ;
65
66
struct wlandevice * wlandev = NULL ;
66
67
struct hfa384x * hw = NULL ;
67
68
int result = 0 ;
68
69
70
+ if (iface_desc -> desc .bNumEndpoints != 2 ) {
71
+ result = - ENODEV ;
72
+ goto failed ;
73
+ }
74
+
75
+ result = - EINVAL ;
76
+ epd = & iface_desc -> endpoint [1 ].desc ;
77
+ if (!usb_endpoint_is_bulk_in (epd ))
78
+ goto failed ;
79
+ epd = & iface_desc -> endpoint [2 ].desc ;
80
+ if (!usb_endpoint_is_bulk_out (epd ))
81
+ goto failed ;
82
+
69
83
dev = interface_to_usbdev (interface );
70
84
wlandev = create_wlan ();
71
85
if (!wlandev ) {
You can’t perform that action at this time.
0 commit comments