Skip to content

Commit 10bbffa

Browse files
Vudentzholtmann
authored andcommitted
Bluetooth: Fix using advertising instance duration as timeout
When using LE Set Extended Advertising Enable command the duration refers to the lifetime of instance not the length which is actually controlled by the interval_min and interval_max when setting the parameters. Signed-off-by: Luiz Augusto von Dentz <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent de76f73 commit 10bbffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ int __hci_req_enable_ext_advertising(struct hci_request *req, u8 instance)
16901690
* scheduling it.
16911691
*/
16921692
if (adv_instance && adv_instance->duration) {
1693-
u16 duration = adv_instance->duration * MSEC_PER_SEC;
1693+
u16 duration = adv_instance->timeout * MSEC_PER_SEC;
16941694

16951695
/* Time = N * 10 ms */
16961696
adv_set->duration = cpu_to_le16(duration / 10);

0 commit comments

Comments
 (0)