[xenial] SRU: [PATCH v2 1/1] Bluetooth: increase timeout for le auto connections

Message ID 1510656700-6395-2-git-send-email-konrad.zapalowicz@canonical.com
State New
Headers show
Series
  • [xenial] SRU: [PATCH v2 1/1] Bluetooth: increase timeout for le auto connections
Related show

Commit Message

Konrad Zapalowicz Nov. 14, 2017, 10:51 a.m.
From: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1731467

This patch increases the connection timeout for LE connections that are
triggered by the advertising report to 4 seconds.

It has been observed that devices equipped with wifi+bt combo SoC fail
to create a connection with BLE devices due to their coexistence issues.
Increasing this timeout gives them enough time to complete the
connection with success.

Signed-off-by: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 1f01d8be0e6a04bd682a55f6d50c14c1679e7571 linux-next)
---
 include/net/bluetooth/hci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Bader Nov. 15, 2017, 1:47 p.m. | #1
On 14.11.2017 11:51, Konrad Zapalowicz wrote:
> From: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1731467
> 
> This patch increases the connection timeout for LE connections that are
> triggered by the advertising report to 4 seconds.
> 
> It has been observed that devices equipped with wifi+bt combo SoC fail
> to create a connection with BLE devices due to their coexistence issues.
> Increasing this timeout gives them enough time to complete the
> connection with success.
> 
> Signed-off-by: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 1f01d8be0e6a04bd682a55f6d50c14c1679e7571 linux-next)
Acked-by: Stefan Bader <stefan.bader@canonical.com>

> ---

How about at least also targeting this to Artful (and maybe Zesty, too) so that
this does not break for people switching to HWE kernels?

-Stefan
>  include/net/bluetooth/hci.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> index 0205b80..630f6d7 100644
> --- a/include/net/bluetooth/hci.h
> +++ b/include/net/bluetooth/hci.h
> @@ -266,7 +266,7 @@ enum {
>  #define HCI_AUTO_OFF_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
>  #define HCI_POWER_OFF_TIMEOUT	msecs_to_jiffies(5000)	/* 5 seconds */
>  #define HCI_LE_CONN_TIMEOUT	msecs_to_jiffies(20000)	/* 20 seconds */
> -#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
> +#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(4000)	/* 4 seconds */
>  
>  /* HCI data types */
>  #define HCI_COMMAND_PKT		0x01
>
Konrad Zapalowicz Nov. 15, 2017, 2:11 p.m. | #2
On 11/15, Stefan Bader wrote:
> On 14.11.2017 11:51, Konrad Zapalowicz wrote:
> > From: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>
> > 
> > BugLink: https://bugs.launchpad.net/bugs/1731467
> > 
> > This patch increases the connection timeout for LE connections that are
> > triggered by the advertising report to 4 seconds.
> > 
> > It has been observed that devices equipped with wifi+bt combo SoC fail
> > to create a connection with BLE devices due to their coexistence issues.
> > Increasing this timeout gives them enough time to complete the
> > connection with success.
> > 
> > Signed-off-by: Konrad Zapałowicz <konrad.zapalowicz@canonical.com>
> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> > (cherry picked from commit 1f01d8be0e6a04bd682a55f6d50c14c1679e7571 linux-next)
> Acked-by: Stefan Bader <stefan.bader@canonical.com>
> 
> > ---
> 
> How about at least also targeting this to Artful (and maybe Zesty, too) so that
> this does not break for people switching to HWE kernels?

From my point of view it is a good idea.

/K

> 
> -Stefan
> >  include/net/bluetooth/hci.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> > index 0205b80..630f6d7 100644
> > --- a/include/net/bluetooth/hci.h
> > +++ b/include/net/bluetooth/hci.h
> > @@ -266,7 +266,7 @@ enum {
> >  #define HCI_AUTO_OFF_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
> >  #define HCI_POWER_OFF_TIMEOUT	msecs_to_jiffies(5000)	/* 5 seconds */
> >  #define HCI_LE_CONN_TIMEOUT	msecs_to_jiffies(20000)	/* 20 seconds */
> > -#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
> > +#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(4000)	/* 4 seconds */
> >  
> >  /* HCI data types */
> >  #define HCI_COMMAND_PKT		0x01
> > 
> 
>

Patch

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 0205b80..630f6d7 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -266,7 +266,7 @@  enum {
 #define HCI_AUTO_OFF_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
 #define HCI_POWER_OFF_TIMEOUT	msecs_to_jiffies(5000)	/* 5 seconds */
 #define HCI_LE_CONN_TIMEOUT	msecs_to_jiffies(20000)	/* 20 seconds */
-#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(2000)	/* 2 seconds */
+#define HCI_LE_AUTOCONN_TIMEOUT	msecs_to_jiffies(4000)	/* 4 seconds */
 
 /* HCI data types */
 #define HCI_COMMAND_PKT		0x01