Skip to content

Commit 86fbd9f

Browse files
committed
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: e77f43d ("Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1") Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 9379213 commit 86fbd9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
11941194

11951195
cp.own_addr_type = own_addr_type;
11961196
cp.channel_map = hdev->le_adv_channel_map;
1197-
cp.handle = instance;
1197+
cp.handle = adv ? adv->handle : instance;
11981198

11991199
if (flags & MGMT_ADV_FLAG_SEC_2M) {
12001200
cp.primary_phy = HCI_ADV_PHY_1M;

0 commit comments

Comments
 (0)