diff mbox series

[BlueZ,v1,1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

Message ID 20240318123712.9729-2-mahesh.talewad@nxp.com (mailing list archive)
State New, archived
Headers show
Series LE Create Connection command timeout changed to 20 secs | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T1 Title exceeds max length (84>80): "[BlueZ,v1,1/1] LE Create Connection command timeout increased to 20 secs from 4 secs"
tedd_an/SubjectPrefix fail "Bluetooth: " prefix is not specified in the subject
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse warning CheckSparse WARNING net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
tedd_an/CheckSmatch warning CheckSparse WARNING net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester fail TestRunner_iso-tester: Total: 117, Passed: 116 (99.1%), Failed: 1, Not Run: 0
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester fail TestRunner_mgmt-tester: Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Mahesh Talewad March 18, 2024, 12:37 p.m. UTC
- As per specs LE Connection timeout is 20 secs but in implementation,
   it was 4 secs. Hence increased this timeout to 20 Secs.

Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com March 18, 2024, 1:10 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=836066

---Test result---

Test Summary:
CheckPatch                    PASS      0.49 seconds
GitLint                       FAIL      0.47 seconds
SubjectPrefix                 FAIL      0.32 seconds
BuildKernel                   PASS      27.83 seconds
CheckAllWarning               PASS      32.20 seconds
CheckSparse                   WARNING   36.11 seconds
CheckSmatch                   WARNING   98.74 seconds
BuildKernel32                 PASS      27.90 seconds
TestRunnerSetup               PASS      517.55 seconds
TestRunner_l2cap-tester       PASS      22.12 seconds
TestRunner_iso-tester         FAIL      32.70 seconds
TestRunner_bnep-tester        PASS      4.71 seconds
TestRunner_mgmt-tester        FAIL      111.33 seconds
TestRunner_rfcomm-tester      PASS      7.35 seconds
TestRunner_sco-tester         PASS      12.96 seconds
TestRunner_ioctl-tester       PASS      7.75 seconds
TestRunner_mesh-tester        PASS      5.79 seconds
TestRunner_smp-tester         PASS      6.99 seconds
TestRunner_userchan-tester    PASS      4.93 seconds
IncrementalBuild              PASS      26.30 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (84>80): "[BlueZ,v1,1/1] LE Create Connection command timeout increased to 20 secs from 4 secs"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 117, Passed: 116 (99.1%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success                       Failed       4.211 seconds
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2

Failed Test Cases
LL Privacy - Start Discovery 2 (Disable RL)          Failed       0.173 seconds


---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz March 20, 2024, 9:50 a.m. UTC | #2
Hi Mahesh,

On Mon, Mar 18, 2024 at 12:37 PM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
>  - As per specs LE Connection timeout is 20 secs but in implementation,
>    it was 4 secs. Hence increased this timeout to 20 Secs.
>
> Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
> ---
>  net/bluetooth/hci_event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 4ae224824012..06fe5f6b9546 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -6067,7 +6067,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
>         }
>
>         conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
> -                             BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
> +                             BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
>                               HCI_ROLE_MASTER);
>         if (!IS_ERR(conn)) {
>                 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already owned
> --
> 2.34.1

Afaik this is on purpose since it is the autoconnect procedure, rather
than user initiate connection, so are you running into a problem if
the timeout is different?
Mahesh Talewad March 20, 2024, 10:56 a.m. UTC | #3
Hi Luiz,

Yes, its auto connect scenario.
While running connect disconnect in a loop on one of the chip, we are getting issue with this default timeout . Hence we increased this timeout value to standard LE timeout i.e 20s.
Kindly let us know, is there any timeout explicitly defined for the autoconnect in the spec.

Thanks and regards,
Mahesh Vithal Talewad

-----Original Message-----
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com> 
Sent: Wednesday, March 20, 2024 3:21 PM
To: Mahesh Talewad <mahesh.talewad@nxp.com>
Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
Subject: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button


Hi Mahesh,

On Mon, Mar 18, 2024 at 12:37 PM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
>  - As per specs LE Connection timeout is 20 secs but in implementation,
>    it was 4 secs. Hence increased this timeout to 20 Secs.
>
> Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
> ---
>  net/bluetooth/hci_event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c 
> index 4ae224824012..06fe5f6b9546 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -6067,7 +6067,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
>         }
>
>         conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
> -                             BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
> +                             BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
>                               HCI_ROLE_MASTER);
>         if (!IS_ERR(conn)) {
>                 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already 
> owned
> --
> 2.34.1

Afaik this is on purpose since it is the autoconnect procedure, rather than user initiate connection, so are you running into a problem if the timeout is different?

--
Luiz Augusto von Dentz
Luiz Augusto von Dentz March 20, 2024, 11:42 a.m. UTC | #4
Hi Mahesh,

On Wed, Mar 20, 2024 at 10:56 AM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
> Hi Luiz,
>
> Yes, its auto connect scenario.
> While running connect disconnect in a loop on one of the chip, we are getting issue with this default timeout . Hence we increased this timeout value to standard LE timeout i.e 20s.
> Kindly let us know, is there any timeout explicitly defined for the autoconnect in the spec.

What exactly is the issue though, or are you saying it is a controller
issue because the attempts are too closely together when the timeout
is just 4 seconds, note that you are just working around the problem
because users can bypass the default when set via conn->conn_timeout.

> Thanks and regards,
> Mahesh Vithal Talewad
>
> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Wednesday, March 20, 2024 3:21 PM
> To: Mahesh Talewad <mahesh.talewad@nxp.com>
> Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
> Subject: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command timeout increased to 20 secs from 4 secs
>
> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
>
>
> Hi Mahesh,
>
> On Mon, Mar 18, 2024 at 12:37 PM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
> >
> >  - As per specs LE Connection timeout is 20 secs but in implementation,
> >    it was 4 secs. Hence increased this timeout to 20 Secs.
> >
> > Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
> > ---
> >  net/bluetooth/hci_event.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> > index 4ae224824012..06fe5f6b9546 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -6067,7 +6067,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
> >         }
> >
> >         conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
> > -                             BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
> > +                             BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
> >                               HCI_ROLE_MASTER);
> >         if (!IS_ERR(conn)) {
> >                 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already
> > owned
> > --
> > 2.34.1
>
> Afaik this is on purpose since it is the autoconnect procedure, rather than user initiate connection, so are you running into a problem if the timeout is different?
>
> --
> Luiz Augusto von Dentz
Mahesh Talewad April 22, 2024, 9:01 a.m. UTC | #5
Hi Luiz,

On our DUT, we can see that the host issues create connection cancel command after 4-sec if there is no connection complete event for LE create connection cmd.
As per core spec v5.3 section 7.8.5, advertisement interval range is -

Advertising_Interval_Min
Default : 0x0800(1.28s)
Time Range: 20ms to 10.24s

Advertising_Interval_Max
Default : 0x0800(1.28s)
Time Range: 20ms to 10.24s

If the remote device is using adv interval of > 4 sec, it is difficult to make a connection with the current timeout value.
Also, with the default interval of 1.28 sec, we will get only 3 chances to capture the adv packets with the 4 sec window.
Hence we want to increase this timeout to 20sec.
Note: In Android this timeout value is 29 secs.
Does setting via 'conn->conn_timeout' mean setting 'Autoconnecttimeout=value' in main.conf file?

Thanks and regards,
Mahesh Vithal Talewad

-----Original Message-----
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com> 
Sent: Wednesday, March 20, 2024 5:13 PM
To: Mahesh Talewad <mahesh.talewad@nxp.com>
Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
Subject: Re: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button


Hi Mahesh,

On Wed, Mar 20, 2024 at 10:56 AM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
> Hi Luiz,
>
> Yes, its auto connect scenario.
> While running connect disconnect in a loop on one of the chip, we are getting issue with this default timeout . Hence we increased this timeout value to standard LE timeout i.e 20s.
> Kindly let us know, is there any timeout explicitly defined for the autoconnect in the spec.

What exactly is the issue though, or are you saying it is a controller issue because the attempts are too closely together when the timeout is just 4 seconds, note that you are just working around the problem because users can bypass the default when set via conn->conn_timeout.

> Thanks and regards,
> Mahesh Vithal Talewad
>
> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Wednesday, March 20, 2024 3:21 PM
> To: Mahesh Talewad <mahesh.talewad@nxp.com>
> Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole 
> <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
> Subject: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command 
> timeout increased to 20 secs from 4 secs
>
> Caution: This is an external email. Please take care when clicking 
> links or opening attachments. When in doubt, report the message using 
> the 'Report this email' button
>
>
> Hi Mahesh,
>
> On Mon, Mar 18, 2024 at 12:37 PM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
> >
> >  - As per specs LE Connection timeout is 20 secs but in implementation,
> >    it was 4 secs. Hence increased this timeout to 20 Secs.
> >
> > Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
> > ---
> >  net/bluetooth/hci_event.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c 
> > index 4ae224824012..06fe5f6b9546 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -6067,7 +6067,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
> >         }
> >
> >         conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
> > -                             BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
> > +                             BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
> >                               HCI_ROLE_MASTER);
> >         if (!IS_ERR(conn)) {
> >                 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already 
> > owned
> > --
> > 2.34.1
>
> Afaik this is on purpose since it is the autoconnect procedure, rather than user initiate connection, so are you running into a problem if the timeout is different?
>
> --
> Luiz Augusto von Dentz



--
Luiz Augusto von Dentz
Mahesh Talewad April 24, 2024, 1:49 p.m. UTC | #6
Hi Luiz,

We tried with - 6093f28402aa6342890fc3adb6be355f804b719d - with this as well issue is observed.

Thanks and regards,
Mahesh Vithal Talewad

-----Original Message-----
From: Mahesh Talewad 
Sent: Monday, April 22, 2024 2:31 PM
To: 'Luiz Augusto von Dentz' <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
Subject: RE: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

Hi Luiz,

On our DUT, we can see that the host issues create connection cancel command after 4-sec if there is no connection complete event for LE create connection cmd.
As per core spec v5.3 section 7.8.5, advertisement interval range is -

Advertising_Interval_Min
Default : 0x0800(1.28s)
Time Range: 20ms to 10.24s

Advertising_Interval_Max
Default : 0x0800(1.28s)
Time Range: 20ms to 10.24s

If the remote device is using adv interval of > 4 sec, it is difficult to make a connection with the current timeout value.
Also, with the default interval of 1.28 sec, we will get only 3 chances to capture the adv packets with the 4 sec window.
Hence we want to increase this timeout to 20sec.
Note: In Android this timeout value is 29 secs.
Does setting via 'conn->conn_timeout' mean setting 'Autoconnecttimeout=value' in main.conf file?

Thanks and regards,
Mahesh Vithal Talewad

-----Original Message-----
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Sent: Wednesday, March 20, 2024 5:13 PM
To: Mahesh Talewad <mahesh.talewad@nxp.com>
Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
Subject: Re: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command timeout increased to 20 secs from 4 secs

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button


Hi Mahesh,

On Wed, Mar 20, 2024 at 10:56 AM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
> Hi Luiz,
>
> Yes, its auto connect scenario.
> While running connect disconnect in a loop on one of the chip, we are getting issue with this default timeout . Hence we increased this timeout value to standard LE timeout i.e 20s.
> Kindly let us know, is there any timeout explicitly defined for the autoconnect in the spec.

What exactly is the issue though, or are you saying it is a controller issue because the attempts are too closely together when the timeout is just 4 seconds, note that you are just working around the problem because users can bypass the default when set via conn->conn_timeout.

> Thanks and regards,
> Mahesh Vithal Talewad
>
> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Wednesday, March 20, 2024 3:21 PM
> To: Mahesh Talewad <mahesh.talewad@nxp.com>
> Cc: linux-bluetooth@vger.kernel.org; Devyani Godbole 
> <devyani.godbole@nxp.com>; Sarveshwar Bajaj <sarveshwar.bajaj@nxp.com>
> Subject: [EXT] Re: [PATCH BlueZ v1 1/1] LE Create Connection command 
> timeout increased to 20 secs from 4 secs
>
> Caution: This is an external email. Please take care when clicking 
> links or opening attachments. When in doubt, report the message using 
> the 'Report this email' button
>
>
> Hi Mahesh,
>
> On Mon, Mar 18, 2024 at 12:37 PM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
> >
> >  - As per specs LE Connection timeout is 20 secs but in implementation,
> >    it was 4 secs. Hence increased this timeout to 20 Secs.
> >
> > Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
> > ---
> >  net/bluetooth/hci_event.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c 
> > index 4ae224824012..06fe5f6b9546 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -6067,7 +6067,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
> >         }
> >
> >         conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
> > -                             BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
> > +                             BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
> >                               HCI_ROLE_MASTER);
> >         if (!IS_ERR(conn)) {
> >                 /* If HCI_AUTO_CONN_EXPLICIT is set, conn is already 
> > owned
> > --
> > 2.34.1
>
> Afaik this is on purpose since it is the autoconnect procedure, rather than user initiate connection, so are you running into a problem if the timeout is different?
>
> --
> Luiz Augusto von Dentz



--
Luiz Augusto von Dentz
Luiz Augusto von Dentz April 24, 2024, 7:31 p.m. UTC | #7
Hi Mahesh,

On Wed, Apr 24, 2024 at 9:49 AM Mahesh Talewad <mahesh.talewad@nxp.com> wrote:
>
> Hi Luiz,
>
> We tried with - 6093f28402aa6342890fc3adb6be355f804b719d - with this as well issue is observed.

The lets do something like:

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5c12761cbc0e..fbf0a6263dae 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -456,7 +456,6 @@ enum {
 #define HCI_AUTO_OFF_TIMEOUT   msecs_to_jiffies(2000)  /* 2 seconds */
 #define HCI_ACL_CONN_TIMEOUT   msecs_to_jiffies(20000) /* 20 seconds */
 #define HCI_LE_CONN_TIMEOUT    msecs_to_jiffies(20000) /* 20 seconds */
-#define HCI_LE_AUTOCONN_TIMEOUT        msecs_to_jiffies(4000)  /* 4 seconds */

 /* HCI data types */
 #define HCI_COMMAND_PKT                0x01
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 99b4e68075f4..651e5105fdd5 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2556,7 +2556,7 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv)
        hdev->le_rx_def_phys = HCI_LE_SET_PHY_1M;
        hdev->le_num_of_adv_sets = HCI_MAX_ADV_INSTANCES;
        hdev->def_multi_adv_rotation_duration = HCI_DEFAULT_ADV_DURATION;
-       hdev->def_le_autoconnect_timeout = HCI_LE_AUTOCONN_TIMEOUT;
+       hdev->def_le_autoconnect_timeout = HCI_LE_CONN_TIMEOUT;
        hdev->min_le_tx_power = HCI_TX_POWER_INVALID;
        hdev->max_le_tx_power = HCI_TX_POWER_INVALID;
diff mbox series

Patch

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4ae224824012..06fe5f6b9546 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6067,7 +6067,7 @@  static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
 	}
 
 	conn = hci_connect_le(hdev, addr, addr_type, addr_resolved,
-			      BT_SECURITY_LOW, hdev->def_le_autoconnect_timeout,
+			      BT_SECURITY_LOW, HCI_LE_CONN_TIMEOUT,
 			      HCI_ROLE_MASTER);
 	if (!IS_ERR(conn)) {
 		/* If HCI_AUTO_CONN_EXPLICIT is set, conn is already owned