summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-01-28 19:56:02 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-01-28 21:26:23 +0100
commit8f502f847a67d00412382aeda0a2fa412b04e2a7 (patch)
tree9ae35c5ca512ece676d74b10a2f7e8013e40aae4 /net/bluetooth/hci_core.c
parent39c5d970d4d1302d3407e0471c55520dd5537069 (diff)
downloadtalos-obmc-linux-8f502f847a67d00412382aeda0a2fa412b04e2a7.tar.gz
talos-obmc-linux-8f502f847a67d00412382aeda0a2fa412b04e2a7.zip
Bluetooth: Fix notifying discovery state when powering off
The discovery state should be set to stopped when the HCI device is powered off. This patch adds the appropriate call to the hci_discovery_set_state() function from hci_dev_do_close() which is responsible for the power-off procedure. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index bb831d678868..46aa702c189d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1628,6 +1628,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hci_dev_lock(hdev);
+ hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
+
if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags)) {
if (hdev->dev_type == HCI_BREDR)
mgmt_powered(hdev, 0);
OpenPOWER on IntegriCloud