]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb6ed2f6949bae59bd6b3cb2ceeb331d970eb1eb5
treef1c855714f256f6aa5a26601c0af8e5b5d1b3c34
parent5c437346bca71244f666ab0ceadd5f38f15e7ab8
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