summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-02 01:14:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 13:05:22 +0300
commit53b2ad98d2bb6c2d020cb4bd7e2d406bb310b0e7 (patch)
treea86d6dae63986e20850812c5bd30b33dff92eb1f /net
parent7055782bc72217c9f6662e592f99e4b318bc0b88 (diff)
downloadlinux-53b2ad98d2bb6c2d020cb4bd7e2d406bb310b0e7.tar.xz
Bluetooth: hci_sync: Fix not setting adv set duration
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>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index f15626607b2d..1d34d330afd3 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -2318,7 +2318,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 */