mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
USB: allow libusb to talk to unauthenticated WUSB devices
To permit a userspace application to associate with WUSB devices using numeric association, control transfers to unauthenticated WUSB devices must be allowed. This requires that wusbcore correctly sets the device state to UNAUTHENTICATED, DEFAULT and ADDRESS and that control transfers can be performed to UNAUTHENTICATED devices. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4246b06a33
commit
6da9c99059
6 changed files with 9 additions and 3 deletions
|
@ -312,6 +312,7 @@ int wusb_dev_update_address(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
|
|||
result = wusb_set_dev_addr(wusbhc, wusb_dev, 0);
|
||||
if (result < 0)
|
||||
goto error_addr0;
|
||||
usb_set_device_state(usb_dev, USB_STATE_DEFAULT);
|
||||
usb_ep0_reinit(usb_dev);
|
||||
|
||||
/* Set new (authenticated) address. */
|
||||
|
@ -327,6 +328,7 @@ int wusb_dev_update_address(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
|
|||
result = wusb_set_dev_addr(wusbhc, wusb_dev, new_address);
|
||||
if (result < 0)
|
||||
goto error_addr;
|
||||
usb_set_device_state(usb_dev, USB_STATE_ADDRESS);
|
||||
usb_ep0_reinit(usb_dev);
|
||||
usb_dev->authenticated = 1;
|
||||
error_addr:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue