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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 11:02:52 +0000 (12:02 +0100)
commit f16a491c65d9eb19398b25aefc10c2d3313d17b3 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_request.c

index 92611bfc0b9e1655696e8f8163b2a687d8e65d4f..cd71a312feb142ce6fa92b943bcdd97e4cb6cc27 100644 (file)
@@ -1935,7 +1935,7 @@ int __hci_req_enable_ext_advertising(struct hci_request *req, u8 instance)
        /* Set duration per instance since controller is responsible for
         * scheduling it.
         */
-       if (adv_instance && adv_instance->duration) {
+       if (adv_instance && adv_instance->timeout) {
                u16 duration = adv_instance->timeout * MSEC_PER_SEC;
 
                /* Time = N * 10 ms */