Bluetooth: Add support for entering limited discoverable mode
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Oct 2013 16:13:39 +0000 (09:13 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 15 Oct 2013 18:22:32 +0000 (21:22 +0300)
commit310a3d4854d71c0a565c9f7705749e78f6113c4c
treeb50981121ce0579309100e18cfa6394125b2f249
parent3d5053127fc51b11f10a2cc3ad638736f2fa814c
Bluetooth: Add support for entering limited discoverable mode

The limited discoverable mode should be used when a device is only
discoverable for a certain amount of time and after that it returns
back into being non-discoverable.

This adds another option to the set discoverable management command
to clearly distinguish limited discoverable from general discoverable
mode.

While the general discoverable mode can be set with a specific
timeout or as permanent setting, the limited discoverable mode
requires a timeout. The timeout is flexible and the kernel will
not enforce any specific limitations. That GAP part of this is
required by userspace to enforce according to the Bluetooth core
specification.

Devices in limited discoverable mode can still be found by the
general discovery procedure. It is mandatory that a device sets
both GIAC and LIAC when entering limited discoverable mode.

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