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,
6161 const struct usb_device_id * id )
6262{
6363 struct usb_device * dev ;
64-
64+ const struct usb_endpoint_descriptor * epd ;
65+ const struct usb_host_interface * iface_desc = interface -> cur_altsetting ;
6566 struct wlandevice * wlandev = NULL ;
6667 struct hfa384x * hw = NULL ;
6768 int result = 0 ;
6869
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+
6983 dev = interface_to_usbdev (interface );
7084 wlandev = create_wlan ();
7185 if (!wlandev ) {
You can’t perform that action at this time.
0 commit comments