Bluetooth: Update class of device on discoverable timeout
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Oct 2013 17:57:40 +0000 (10:57 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 15 Oct 2013 18:28:42 +0000 (21:28 +0300)
commitd1967ff88b3854d1bb002cccd15d28ad0d9223a9
treed2f7b58e1b1350c7064d33ec3de2eadb3bb14988
parentefdcf8e3d716730d2212dfd973571a0ed00c9b10
Bluetooth: Update class of device on discoverable timeout

When the discoverable timeout triggers and limited discoverable mode
was used, then the class of device needs to be updated to remove
the limited discoverable bit.

To keep the class of device logic in a central place, expose a new
function mgmt_discoverable_timeout that can be called from the
timeout callback. In case the class of device value needs updating,
it will add the HCI command to the transaction.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/mgmt.c