Bluetooth: Fix checking for valid device class values
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 9 Jan 2013 13:29:35 +0000 (15:29 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 10 Jan 2013 08:09:07 +0000 (06:09 -0200)
commit575b3a02e20a10bb8110378ef363a8a174018680
tree677812b750e51e31090123be2320267d74582476
parent715a5bf2db4df4a7df64f420d21fb49ba146b3fa
Bluetooth: Fix checking for valid device class values

The two lowest bits of the minor device class value are reserved and
should be zero, and the three highest bits of the major device class
likewise. The management code should therefore test for this and return
a proper "invalid params" error if the condition is not met.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c