aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-09-30 13:12:30 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-09-30 17:32:12 -0700
commit6abf0dae8c3c927f54e62c46faf8aba580ba0d04 (patch)
treea808e91002969ccae10d1088c87ab1ed8a8bbbe0 /net/bluetooth
parentBluetooth: L2CAP: Fix user-after-free (diff)
downloadlinux-dev-6abf0dae8c3c927f54e62c46faf8aba580ba0d04.tar.xz
linux-dev-6abf0dae8c3c927f54e62c46faf8aba580ba0d04.zip
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: cf75ad8b41d2 ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_sync.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 15c75ef4c271..76c3107c9f91 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev)
hci_dev_test_flag(hdev, HCI_MGMT) &&
hdev->dev_type == HCI_PRIMARY) {
ret = hci_powered_update_sync(hdev);
+ mgmt_power_on(hdev, ret);
}
} else {
/* Init failed, cleanup */