diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-05-15 17:32:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-21 15:40:22 +0300 |
commit | 4ae9c0893689a8974b9f34fa8d3c73b164131389 (patch) | |
tree | 2d2a07f82baa7503bdadda3fba88079215551efa | |
parent | a9800ced128e83fd8ce25c50fbe732d6f6eeee38 (diff) | |
download | linux-4ae9c0893689a8974b9f34fa8d3c73b164131389.tar.xz |
Bluetooth: hci_sync: Fix not using correct handle
[ Upstream commit 86fbd9f63a6b42b8f158361334f5a25762aea358 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/bluetooth/hci_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 64f794d198cd..7bfa6b59ba87 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; |