]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - net/bluetooth/mgmt.c
Bluetooth: Update Set Discoverable to support LE
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 20 Oct 2013 16:00:07 +0000 (19:00 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 20 Oct 2013 16:05:41 +0000 (09:05 -0700)
commit9a43e25fff07a94f40d4a9e1081458e30c840256
treef1c855714f256f6aa5a26601c0af8e5b5d1b3c34
parentb456f87cb0c726cf97ce1e88aecfcbacf1cdf5fe
Bluetooth: Update Set Discoverable to support LE

This patch updates the Set Discoverable management command to also be
applicable for LE. In particular this affects the advertising flags
where we can say "general discoverable" or "limited discoverable".

Since the device flags may not be up-to-date when the advertising data
is written this patch introduces a get_adv_discov_flags() helper
function which also looks at any pending mgmt commands (a pending
set_discoverable would be the exception when the flags are not yet
correct).

The patch also adds HCI_DISCOVERABLE flag clearing to the
mgmt_discoverable_timeout function, since the code was previously
relying on the mgmt_discoverable callback to handle this, which is only
called for the BR/EDR-only HCI_Write_Scan_Enable command.

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