aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-21 16:01:30 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-21 20:04:39 +0200
commit5e5282bbfde9ca6157dba913d90cbab859a837e2 (patch)
tree202265653320550db8c7aea3087bb5cfc8ca032e /net/bluetooth/hci_core.c
parentBluetooth: mgmt: Fix pairable setting upon initialization (diff)
downloadlinux-dev-5e5282bbfde9ca6157dba913d90cbab859a837e2.tar.xz
linux-dev-5e5282bbfde9ca6157dba913d90cbab859a837e2.zip
Bluetooth: mgmt: Allow connectable/discoverable changes in off state
This patch makes it possible to toggle the connectable & discoverable settings when powered off. Two new hdev->dev_flags flags are added to track what the scan mode should be when the device is finally powered on. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a787c9c9d4cd..9d199494bd65 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -737,6 +737,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
if (hdev->discov_timeout > 0) {
cancel_delayed_work(&hdev->discov_off);
hdev->discov_timeout = 0;
+ clear_bit(HCI_DISCOVERABLE, &hdev->dev_flags);
}
if (test_and_clear_bit(HCI_SERVICE_CACHE, &hdev->dev_flags))