Skip to content

Commit

Permalink
usb: introduce usb_device authorization bits
Browse files Browse the repository at this point in the history
This just modifies 'struct usb_device' to contain the 'authorized'
bit. It also adds a 'wusb' bit. This is needed because nonauthorized
(and thus non-authenticated) wusb devices will fail certain kind of
simple requests (such as string descriptors). By knowing the device is
WUSB, we just avoid them.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Inaky Perez-Gonzalez authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent ca2bdf4 commit da04b7a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ struct usb_tt;
*
* Usbcore drivers should not set usbdev->state directly. Instead use
* usb_set_device_state().
*
* @authorized: (user space) policy determines if we authorize this
* device to be used or not. By default, wired USB
* devices are authorized. WUSB devices are not, until we
* authorize them from user space. FIXME -- complete doc
*/
struct usb_device {
int devnum; /* Address on USB bus */
Expand Down Expand Up @@ -380,6 +385,8 @@ struct usb_device {

unsigned discon_suspended:1; /* Disconnected while suspended */
unsigned have_langid:1; /* whether string_langid is valid */
unsigned authorized:1; /* Policy has determined we can use it */
unsigned wusb:1; /* Device is Wireless USB */
int string_langid; /* language ID for strings */

/* static strings from the device */
Expand Down

0 comments on commit da04b7a

Please sign in to comment.