linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carey Sonsino <csonsino@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Cc: Andreas Kemnade <andreas@kemnade.info>,
	Jamie Mccrae <Jamie.Mccrae@lairdconnect.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: [PATCH 1/1] bluetooth: update default BLE connection params
Date: Wed, 4 Sep 2019 15:20:29 -0600	[thread overview]
Message-ID: <705dbccb-58a9-7adc-8430-c16b395c27e5@gmail.com> (raw)

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 <csonsino@gmail.com>

---

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;

             reply	other threads:[~2019-09-04 21:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 21:20 Carey Sonsino [this message]
2019-09-05 15:34 ` [PATCH 1/1] bluetooth: update default BLE connection params Marcel Holtmann
2019-09-20  9:11   ` Andreas Kemnade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=705dbccb-58a9-7adc-8430-c16b395c27e5@gmail.com \
    --to=csonsino@gmail.com \
    --cc=Jamie.Mccrae@lairdconnect.com \
    --cc=andreas@kemnade.info \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).