From patchwork Fri Nov 10 12:11:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Konrad Zapalowicz X-Patchwork-Id: 837453 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3ybCdz4dv5z9sRn; Tue, 14 Nov 2017 01:27:35 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eEFhx-00088O-E3; Mon, 13 Nov 2017 14:27:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1eD89N-0006N8-O2 for kernel-team@lists.ubuntu.com; Fri, 10 Nov 2017 12:11:09 +0000 Received: from mail-lf0-f69.google.com ([209.85.215.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eD89N-0006MF-Ft for kernel-team@lists.ubuntu.com; Fri, 10 Nov 2017 12:11:09 +0000 Received: by mail-lf0-f69.google.com with SMTP id s16so2410831lfs.22 for ; Fri, 10 Nov 2017 04:11:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=Ga8vPcVQBVZO+RuHhwgPO2TwEbMVD02oY3jdoEHwsXo=; b=c52Zgrrn9sMfgXRfCiymQtuUnpWyVFUrqR3y0cm8q31IAiXTzQ6dl6zWdVyeUmxU75 Ms0SsmcQGFfj4TlLMf8t1uglBJJ9tqt9vMBGmfhdi2IypTTxndcMxee74nvD9hZemfsF /vrEUlmwivh4b5qle33C8O+YG+AX5HRjEhO8agoAziqnBARbQuQ5ZABWrEo7iK4JaK+o /D42LhWp4ISH3csBrbB90cCyhwkOPlQgA/bxla9y7p5tvrift2FG22vzNmIgXuhMP6/K 9PSaEbypaegQsbvOV20RcXw8aOSOdWFsOTz6WvRoz0F/7ZEA2zXiKibeSK39u3n1vrL4 S7Uw== X-Gm-Message-State: AJaThX7myGcZ1d1ulj1SHeqVy/0wsh6GjBE5AQmtaIu1q9noz0E8k4rW +ddqSicZ4qfPIQL6l3sh7HSA/IkMV39Q+rCR7oU4Q+xVG/tJMlOpvKZBhuwuhoVo1uXwoE+J1VV +3ScHUOoGhtBiIHBZVXJ//7Hv0x9wq+Ja09x7oSj87A== X-Received: by 10.25.208.82 with SMTP id h79mr46504lfg.178.1510315867723; Fri, 10 Nov 2017 04:11:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ0W/DKkFQnsmv4ftZTAdXABQgtrB6SBwncDte8Or1ffuSFiW50jOYSKEKv33PdcT8hDqOuNA== X-Received: by 10.25.208.82 with SMTP id h79mr46500lfg.178.1510315867353; Fri, 10 Nov 2017 04:11:07 -0800 (PST) Received: from localhost (user-94-254-141-192.play-internet.pl. [94.254.141.192]) by smtp.gmail.com with ESMTPSA id i23sm1643881lfh.64.2017.11.10.04.11.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 04:11:06 -0800 (PST) Date: Fri, 10 Nov 2017 13:11:05 +0100 From: Konrad Zapalowicz To: kernel-team@lists.ubuntu.com Subject: [xenial] SRU: Bluetooth: increase timeout for le auto connections Message-ID: <20171110121105.GD13231@annapurna> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Mon, 13 Nov 2017 14:27:27 +0000 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" SRU Justification: [Impact] Not possible to pair BLE remote devices such as sensors and such with Ubuntu when the host system uses BT+WiFi combo SoC. The connection attempt is disturbed with a timeout. [Fix] It has been fixed by increasing the timeout value from 2 seconds to 4 seconds. It is enough for the events to reach the stack (measured that it takes between 3 and 3.5 seconds). [Testcase] Tested with the device that failed to connect to Ubuntu Core gateway. It fails w/o the patch, it connects just fine with the patch applied. [Regression Potential] Very small. The increased timeout is taken into consideration only for new and scan report triggered connections. It will not make any already working device to fail to pair. [Other Info] The bug has been discussed and fixed here: https://marc.info/?l=linux-bluetooth&m=150824844606937&w=2 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=1f01d8be0e6a04bd682a55f6d50c14c1679e7571 The patch has been accepted by the upstream and will be a part of the next kernel release. Currently in the bluetooth-next tree. [Patch] From 2d5a130b6cf6cbf992f9a7a66dcab8ab4e8e15f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Zapa=C5=82owicz?= Date: Tue, 17 Oct 2017 15:53:49 +0200 Subject: [PATCH] [xenial] (upstream) Bluetooth: increase timeout for le auto connections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Marcel Holtmann (cherry picked from commit 1f01d8be0e6a04bd682a55f6d50c14c1679e7571) Acked-by: Seth Forshee Acked-by: Kleber Sacilotto de Souza --- 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