Bluetooth: hci_sync: Fix not indicating power state

When setting power state using legacy/non-mgmt API
(e.g hcitool hci0 up) the likes of mgmt_set_powered_complete won't be
called causing clients of the MGMT API to not be notified of the change
of the state.

Fixes: cf75ad8b ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED")
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
parent 35fcbc42
...@@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev) ...@@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev)
hci_dev_test_flag(hdev, HCI_MGMT) && hci_dev_test_flag(hdev, HCI_MGMT) &&
hdev->dev_type == HCI_PRIMARY) { hdev->dev_type == HCI_PRIMARY) {
ret = hci_powered_update_sync(hdev); ret = hci_powered_update_sync(hdev);
mgmt_power_on(hdev, ret);
} }
} else { } else {
/* Init failed, cleanup */ /* Init failed, cleanup */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment