Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp22015ybe; Wed, 4 Sep 2019 14:21:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl1/qlcrZNtrSsAg3X25UBh9sfB/hO/Dqo23sL8HJtcPW5Qx0Um9ytHkkpFfb+kpYSAJ31 X-Received: by 2002:a17:90a:8c01:: with SMTP id a1mr281130pjo.82.1567632087583; Wed, 04 Sep 2019 14:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567632087; cv=none; d=google.com; s=arc-20160816; b=ta4AJ4A5GU1bmsBAcpmYnVPZmEoMd5gbEjiNrdOy1sgww/PO3THNtkrHkOZ1e6t2Fd etTC+BB+iNIqa4qmOotAkdBZOXU1MB3kL1hgnmlUF5D8zl1rR2utt7VjdM9qYwMLFFhl HpJFbgfTk/C3OWve9OEcQFPOYExB0DNW3vt1NJSg0rif0PVQ9HMq9aEplxNwFMpkA+Zm ePbZn5zKTKMXZ2L4OoEf0dCycPcos/vs3T4RnirLw+RTcgJpdjQ6+MMlomZxz0yrd4u/ DVYhvhRddRhRpn55qjx8CJG44K+CYgjX0wB5smHgVyRDrSItisoWsUwt5b2scmmULy+/ 2cNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:to :subject:from:reply-to:dkim-signature; bh=H+kx3DuCPdr/Q485XhaV4sCGhzJcFXd8MXI7fRFtmqc=; b=viXJNalGbkMothAz1vRT78AAqcghUf0g1QjtoyMZlguhmpnOpqEyKQH/qGlyjwCVsC TkVOBA2lRPDgx1q7RanNic7w0JVnqHsz/PypQvu55P381YslGmqBSmIyZ1G3puorBmc4 gX7q2yZDfe8yyIyxiRYNgf+d6M4qdlt32qBNAr0E3hvpNBZ4N+XeDWjmsh5EfvBtYu11 eLhV90zh945aEYryGU/TY5J2ZDMIVKojrubK+gBQWEIhjXbpNeQobpmsUUzZ8qQj1QAA VqVnhao7bNaZ3uS2EdIuBlkgmSfxY+0VfW2u6GtcvV6KsP60poH4oKUrOAeQJ++W5Qym eq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d8DGYBEK; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si181783pjf.60.2019.09.04.14.20.45; Wed, 04 Sep 2019 14:21:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d8DGYBEK; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726495AbfIDVUb (ORCPT + 99 others); Wed, 4 Sep 2019 17:20:31 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:39894 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbfIDVUb (ORCPT ); Wed, 4 Sep 2019 17:20:31 -0400 Received: by mail-io1-f68.google.com with SMTP id d25so45120799iob.6 for ; Wed, 04 Sep 2019 14:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=H+kx3DuCPdr/Q485XhaV4sCGhzJcFXd8MXI7fRFtmqc=; b=d8DGYBEKDCJzHOfBMcavVNA9t3wBsjrIST0y+f6q8Ud2BWXcGQPO7q3qB0umrZuU2s f+rhBxaSysTM05+F1Z5uFDCLODq/F+SGvPGuv9OrOXoGLCkp6zdO0qlfQzVSLS8brDEv Nx9djQIAXWIkkiGT2fpYYCzM9x6vlRc2M15QP8VxvB4JDCsBgVK1sf+Xh8byBnHzT/3W 4Lxa37jQiqZODI+IlUfSb0SpxJgVMxVF1si58AvE8EZlXA/M6V/eTnzZz/3w/B4JsOdk mK4caBLct04wfQYtvdQoCxwsZdbB9ogha43pi8fgNt81XhAZXMWpeJjLBH6rcO7zOAaG nVFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:from:subject:to:cc:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=H+kx3DuCPdr/Q485XhaV4sCGhzJcFXd8MXI7fRFtmqc=; b=pCVBcCamWMnc2ng5ojBteb4uO0L5Q+HexAYYJlY7g/FNuK1pQwp7S9rSfqUJzvfeOa NsEQ/pMSR6OSbvTvQvsMZRywHCo/rEuJHwbkrSFMzVywXHIoPw7LmdvDh3S4fUH1G1dm rJajAEA0Mt3vGD9jAlkAEm5N4l6sYbDq7AEpzT1mmUQkgI0ZIrf15KmoKvknGogLW2U9 AEXiJkOg8G/4T2KAFYEiceO7qMiwMaHVR3toP0zkA0H3vERLkmw8YTXhNmfcMjlUCyWu 2zHUMG1CJafvv0PnXBDW8B5wbSAm+K+qB5rk2nZlGjzDEHnjCqBlppnR8BZ80/mOhHtj xicA== X-Gm-Message-State: APjAAAXJhV9taT3a0ssqA+eeCbq+KGCJJKLCoA/AaV7yIsFHmtghT6cW IZNuV2dh1+KkVrm6lbosP0BPG51x X-Received: by 2002:a05:6638:738:: with SMTP id j24mr320116jad.74.1567632030582; Wed, 04 Sep 2019 14:20:30 -0700 (PDT) Received: from [10.1.1.187] ([8.39.228.178]) by smtp.gmail.com with ESMTPSA id n1sm106799iob.7.2019.09.04.14.20.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Sep 2019 14:20:30 -0700 (PDT) Reply-To: Carey Sonsino From: Carey Sonsino Subject: [PATCH 1/1] bluetooth: update default BLE connection params To: Marcel Holtmann , Johan Hedberg Cc: Andreas Kemnade , Jamie Mccrae , "linux-bluetooth@vger.kernel.org" Message-ID: <705dbccb-58a9-7adc-8430-c16b395c27e5@gmail.com> Date: Wed, 4 Sep 2019 15:20:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Update the default BLE connection parameters. Commit c49a8682fc5d298d44e8d911f4fa14690ea9485e introduced a bounds check on connection interval update requests, but the default min/max values were left at 24-40 (30-50ms) which caused problems for devices that want to negotiate connection intervals outside of those bounds. Setting the default min/max connection interval to the full allowable range in the bluetooth specification restores the default Linux behavior of allowing remote devices to negotiate their desired connection interval, while still permitting the system administrator to later narrow the range. The default supervision timeout must also be modified to accommodate the max connection interval increase. The new default value meets the requirements of the bluetooth specification and the conditions in the hci_check_conn_params function. The downside to modifying the default supervision timeout is that it will take longer (about 10 seconds) to detect a link loss condition. Fixes c49a8682fc5d: (validate BLE connection interval updates) Signed-off-by: Carey Sonsino --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 04bc79359a17..895d17ec9291 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3181,10 +3181,10 @@ struct hci_dev *hci_alloc_dev(void) hdev->le_adv_max_interval = 0x0800; hdev->le_scan_interval = 0x0060; hdev->le_scan_window = 0x0030; - hdev->le_conn_min_interval = 0x0018; - hdev->le_conn_max_interval = 0x0028; + hdev->le_conn_min_interval = 0x0006; + hdev->le_conn_max_interval = 0x0c80; hdev->le_conn_latency = 0x0000; - hdev->le_supv_timeout = 0x002a; + hdev->le_supv_timeout = 0x03ea; hdev->le_def_tx_len = 0x001b; hdev->le_def_tx_time = 0x0148; hdev->le_max_tx_len = 0x001b;