Skip to contentSkip to conversation

Bluetooth: Set default min/max connection interval for LE slaves

PATCH Applied Marcel Holtmann 2 participants 2 messages Jun 23, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Set default min/max connection interval for LE slaves

For all incoming LE connections, the minimum and maximum connection interval is a value that should be copied from the controller default values. This allows to properly check if the resulting connection interval of a newly established connection is in the range we are expecting.

---
 net/bluetooth/hci_event.c | 8 ++++++++
 1 file changed, 8 insertions(+)
net/bluetooth/hci_event.c +8 -0
index e239435312dc..e1e1ecb4db10 100644
@@ -4026,6 +4026,14 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 		conn->init_addr_type = ev->bdaddr_type;
 		bacpy(&conn->init_addr, &ev->bdaddr);
+
+		/* For incoming connections, set the default minimum
+		 * and maximum connection interval. They will be used
+		 * to check if the parameters are in range and if not
+		 * trigger the connection update procedure.
+		 */
+		conn->le_conn_min_interval = hdev->le_conn_min_interval;
+		conn->le_conn_max_interval = hdev->le_conn_max_interval;
 	}
 
 	/* Lookup the identity address from the stored connection
Signature · 1 line
1.9.3
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

For all incoming LE connections, the minimum and maximum connection interval is a value that should be copied from the controller default values. This allows to properly check if the resulting connection interval of a newly established connection is in the range we are expecting.

---
 net/bluetooth/hci_event.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Applied to bluetooth-next. Thanks.

Johan