mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-18 04:54:52 +00:00
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>
This commit is contained in:
parent
39c5d970d4
commit
8f502f847a
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue