aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2007-07-31 23:33:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:04 -0400
commitda04b7a42711c1d1d8d9fbc2565cdd83efcfee40 (patch)
treeaa06a22b69dd65107bf2a88b623284977956c0f6 /include/linux/usb.h
parentca2bdf4bcc91818f03e009b87c348609c2578d1d (diff)
usb: introduce usb_device authorization bits
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>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a51f34e80572..92d63c6b6fc6 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -346,6 +346,11 @@ struct usb_tt;
346 * 346 *
347 * Usbcore drivers should not set usbdev->state directly. Instead use 347 * Usbcore drivers should not set usbdev->state directly. Instead use
348 * usb_set_device_state(). 348 * usb_set_device_state().
349 *
350 * @authorized: (user space) policy determines if we authorize this
351 * device to be used or not. By default, wired USB
352 * devices are authorized. WUSB devices are not, until we
353 * authorize them from user space. FIXME -- complete doc
349 */ 354 */
350struct usb_device { 355struct usb_device {
351 int devnum; /* Address on USB bus */ 356 int devnum; /* Address on USB bus */
@@ -380,6 +385,8 @@ struct usb_device {
380 385
381 unsigned discon_suspended:1; /* Disconnected while suspended */ 386 unsigned discon_suspended:1; /* Disconnected while suspended */
382 unsigned have_langid:1; /* whether string_langid is valid */ 387 unsigned have_langid:1; /* whether string_langid is valid */
388 unsigned authorized:1; /* Policy has determined we can use it */
389 unsigned wusb:1; /* Device is Wireless USB */
383 int string_langid; /* language ID for strings */ 390 int string_langid; /* language ID for strings */
384 391
385 /* static strings from the device */ 392 /* static strings from the device */