Bluetooth: hci_sync: Fix not setting adv set duration
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 1 Nov 2021 22:14:41 +0000 (15:14 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 2 Nov 2021 06:32:38 +0000 (07:32 +0100)
10bbffa3e88e attempted to fix the use of rotation duration as
advertising duration but it didn't change the if condition which still
uses the duration instead of the timeout.

Fixes: 10bbffa3e88e ("Bluetooth: Fix using advertising instance duration as timeout")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_sync.c

index fb7ecf2..b794605 100644 (file)
@@ -895,7 +895,7 @@ int hci_enable_ext_advertising_sync(struct hci_dev *hdev, u8 instance)
        /* Set duration per instance since controller is responsible for
         * scheduling it.
         */
-       if (adv && adv->duration) {
+       if (adv && adv->timeout) {
                u16 duration = adv->timeout * MSEC_PER_SEC;
 
                /* Time = N * 10 ms */