summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-05-15 10:32:01 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-06-10 09:48:25 -0400
commit86fbd9f63a6b42b8f158361334f5a25762aea358 (patch)
tree90f992c3c1194c6d3c4984cc392e9e4a41dd5191 /net/bluetooth
parent93792130a9387b26d825aa78947e4065deb95d15 (diff)
downloadlinux-stable-86fbd9f63a6b42b8f158361334f5a25762aea358.tar.gz
linux-stable-86fbd9f63a6b42b8f158361334f5a25762aea358.tar.bz2
linux-stable-86fbd9f63a6b42b8f158361334f5a25762aea358.zip
Bluetooth: hci_sync: Fix not using correct handle
When setting up an advertisement the code shall always attempt to use the handle set by the instance since it may not be equal to the instance ID. Fixes: e77f43d531af ("Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 16daa79b7981..a8a7d2b36870 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1194,7 +1194,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
cp.own_addr_type = own_addr_type;
cp.channel_map = hdev->le_adv_channel_map;
- cp.handle = instance;
+ cp.handle = adv ? adv->handle : instance;
if (flags & MGMT_ADV_FLAG_SEC_2M) {
cp.primary_phy = HCI_ADV_PHY_1M;