Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 93993a0a authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by Greg Kroah-Hartman
Browse files

usb: introduce usb_authorize/deauthorize()



These USB API functions will do the full authorization/deauthorization
to be used for a device. When authorized we effectively allow a
configuration to be set. Reverse that when deauthorized.

Effectively this means that we have to clean all the configuration
descriptors on deauthorize and reload them when we authorized. We could
do without throwing them out for wired devices, but for wireless, we can
read them only after authenticating, and thus, when authorizing an
authenticated device we would need to read them. So to simplify, always
release them on deauthorize(), re-read them on authorize().

Also fix leak reported by Ragner Magalhaes; in usb_deauthorize_device(),
bNumConfigurations was being set to zero before the for loop, and thus
the different raw descriptors where never being freed.

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d9d16e8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment