Skip to contentSkip to conversation

Bluetooth: Store default and maximum LE data length settings

PATCH In review Marcel Holtmann 1 participant 1 message Dec 20, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 3/3 Bluetooth: Store default and maximum LE data length settings

When the controller supports the LE Data Length Extension feature, the default and maximum data length are read and now stored.

For backwards compatibility all values are initialized to the data length values from Bluetooth 4.1 and earlier specifications.

---
 include/net/bluetooth/hci_core.h |  6 ++++
 net/bluetooth/hci_core.c         |  6 ++++
 net/bluetooth/hci_event.c        | 61 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
include/net/bluetooth/hci_core.h +6 -0
index 79724c87ab00..f20f6bd668bd 100644
@@ -220,6 +220,12 @@ struct hci_dev {
 	__u16		le_conn_max_interval;
 	__u16		le_conn_latency;
 	__u16		le_supv_timeout;
+	__u16		le_def_tx_len;
+	__u16		le_def_tx_time;
+	__u16		le_max_tx_len;
+	__u16		le_max_tx_time;
+	__u16		le_max_rx_len;
+	__u16		le_max_rx_time;
 	__u16		discov_interleaved_timeout;
 	__u16		conn_info_min_age;
 	__u16		conn_info_max_age;
net/bluetooth/hci_core.c +6 -0
index 01e35ef6d201..47f0311d1006 100644
@@ -2896,6 +2896,12 @@ struct hci_dev *hci_alloc_dev(void)
 	hdev->le_conn_max_interval = 0x0038;
 	hdev->le_conn_latency = 0x0000;
 	hdev->le_supv_timeout = 0x002a;
+	hdev->le_def_tx_len = 0x001b;
+	hdev->le_def_tx_time = 0x0148;
+	hdev->le_max_tx_len = 0x001b;
+	hdev->le_max_tx_time = 0x0148;
+	hdev->le_max_rx_len = 0x001b;
+	hdev->le_max_rx_time = 0x0148;
 
 	hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT;
 	hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT;
net/bluetooth/hci_event.c +61 -0

73 lines not on this page · raw message

Signature · 1 line
2.1.0