Skip to contentSkip to conversation

monitor: Add features bits defined in 6.2

PATCH Applied Luiz Augusto von Dentz 3 participants 4 messages May 4 – May 6 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/2 monitor: Add features bits defined in 6.2

From: Luiz Augusto von Dentz <[email protected]>

This adds features bits defined as per core spec 6.2:
https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-62/out/en/low-energy-controller/link-layer-specification.html#UUID-56ada5ed-4ae3-acee-198f-27ead57d86f1

---
 monitor/packet.c | 7 +++++++
 1 file changed, 7 insertions(+)
monitor/packet.c +7 -0
index 177ec80a8975..4697eea099a9 100644
@@ -2894,6 +2894,13 @@ static const struct bitfield_data features_le_0[] = {
 static const struct bitfield_data features_le_1[] = {
 	{ 0, "Monitoring Advertisers"				},
 	{ 1, "Frame Space Update"				},
+	{ 2, "UTP OTA Mode"					},
+	{ 3, "UTP HCI Pairing"					},
+	{ 4, "LL_OTA_UTP_IND maximum length"			},
+	{ 5, "LL_OTA_UTP_IND maximum length"			},
+	{ 8, "Shorter Connection Intervals"			},
+	{ 9, "Shorter Connection Intervals (Host Support)"	},
+	{ 10, "LE Flushable ACL Data"				},
 };
 
 static const struct bitfield_data features_msft[] = {
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 2/2 monitor: Add decoding for Short Connection Interval feature

From: Luiz Augusto von Dentz <[email protected]>

This adds deconding support for SCI related commands, command bits, event event mask bit and feature bits:

Events:

HCI_LE_Connection_Rate_Change(0x37)

Commands:

HCI_LE_Connection_Rate_Request(0x20a1) HCI_LE_Set_Default_Rate_Parameters(0x20a2) HCI_LE_Read_Minimum_Supported_Connection_Interval(0x20a3)

---
 monitor/bt.h     |  54 ++++++++++++++++++++
 monitor/packet.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+)
monitor/bt.h +54 -0
index 147b76537e97..60fe2efbf143 100644
@@ -3196,6 +3196,49 @@ struct bt_hci_cmd_le_fsu {
 	uint8_t  types;
 } __attribute__ ((packed));
 
+#define BT_HCI_CMD_LE_CONN_RATE		0x20a1
+#define BT_HCI_BIT_LE_CONN_RATE		BT_HCI_CMD_BIT(48, 5)
+struct bt_hci_cmd_le_conn_rate {
+	uint16_t handle;
+	uint16_t interval_min;
+	uint16_t interval_max;
+	uint16_t subrate_min;
+	uint16_t subrate_max;
+	uint16_t max_latency;
+	uint16_t cont_num;
+	uint16_t supv_timeout;
+	uint16_t min_ce_len;
+	uint16_t max_ce_len;
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_LE_SET_DEF_RATE		0x20a2
+#define BT_HCI_BIT_LE_SET_DEF_RATE		BT_HCI_CMD_BIT(48, 6)
+struct bt_hci_cmd_le_set_def_rate {
+	uint16_t interval_min;
+	uint16_t interval_max;
+	uint16_t subrate_min;
+	uint16_t subrate_max;
+	uint16_t max_latency;
+	uint16_t cont_num;
+	uint16_t supv_timeout;
+	uint16_t min_ce_len;
+	uint16_t max_ce_len;
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_LE_READ_CONN_INTERVAL	0x20a3
+#define BT_HCI_BIT_LE_READ_CONN_INTERVAL	BT_HCI_CMD_BIT(48, 7)
+struct bt_hci_le_conn_interval_group {
+	uint16_t min;
+	uint16_t max;
+	uint16_t stride;
+} __attribute__ ((packed));
+
+struct bt_hci_rsp_le_read_conn_interval {
+	uint8_t  status;
+	uint8_t  num_grps;
+	struct bt_hci_le_conn_interval_group grps[0];
+} __attribute__ ((packed));
+
 #define BT_HCI_EVT_INQUIRY_COMPLETE		0x01
 struct bt_hci_evt_inquiry_complete {
 	uint8_t  status;
@@ -4154,6 +4197,17 @@ struct bt_hci_evt_le_fsu_complete {
 	uint8_t  types;
 } __attribute__ ((packed));
 
+#define BT_HCI_EVT_LE_CONN_RATE_CHANGE		0x37
+struct bt_hci_evt_le_conn_rate_change {
+	uint8_t  status;
+	uint16_t handle;
+	uint16_t interval;
+	uint16_t subrate;
+	uint16_t latency;
+	uint16_t cont_number;
+	uint16_t supv_timeout;
+} __attribute__ ((packed));
+
 #define BT_HCI_ERR_SUCCESS			0x00
 #define BT_HCI_ERR_UNKNOWN_COMMAND		0x01
 #define BT_HCI_ERR_UNKNOWN_CONN_ID		0x02
monitor/packet.c +130 -0

166 lines not on this page · raw message

Signature · 1 line
2.53.0
#2 lore raw
In reply to Luiz Augusto von Dentz

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1089499

---Test result---

Test Summary:

CheckPatch                    FAIL      1.13 seconds
GitLint                       FAIL      0.70 seconds
BuildEll                      PASS      20.49 seconds
BluezMake                     PASS      656.66 seconds
MakeCheck                     PASS      0.95 seconds
MakeDistcheck                 PASS      245.58 seconds
CheckValgrind                 PASS      221.87 seconds
CheckSmatch                   WARNING   349.65 seconds
bluezmakeextell               PASS      182.14 seconds
IncrementalBuild              PASS      700.74 seconds
ScanBuild                     PASS      1031.74 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1,1/2] monitor: Add features bits defined in 6.2
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #98:
https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-62/out/en/low-energy-controller/link-layer-specification.html#UUID-56ada5ed-4ae3-acee-198f-27ead57d86f1

/github/workspace/src/patch/14553784.patch total: 0 errors, 1 warnings, 13 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14553784.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

[BlueZ,v1,2/2] monitor: Add decoding for Short Connection Interval feature WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #140: FILE: monitor/bt.h:3212:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #154: FILE: monitor/bt.h:3226:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #162: FILE: monitor/bt.h:3234:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #168: FILE: monitor/bt.h:3240:
+} __attribute__ ((packed));

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #186: FILE: monitor/bt.h:4209:
+} __attribute__ ((packed));

/github/workspace/src/patch/14553785.patch total: 0 errors, 5 warnings, 232 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14553785.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/2] monitor: Add features bits defined in 6.2

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
6: B1 Line exceeds max length (178>80): "https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-62/out/en/low-energy-controller/link-layer-specification.html#UUID-56ada5ed-4ae3-acee-198f-27ead57d86f1"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c:2000:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3909:52: warning: array of flexible structuresmonitor/bt.h:3897:40: warning: array of flexible structuresmonitor/packet.c:2000:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3909:52: warning: array of flexible structuresmonitor/bt.h:3897:40: warning: array of flexible structures

https://github.com/bluez/bluez/pull/2095

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Luiz Augusto von Dentz
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 7 lines · On Mon, 4 May 2026 17:13:01 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This adds features bits defined as per core spec 6.2:
https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-62/out/en/low-energy-controller/link-layer-specification.html#UUID-56ada5ed-4ae3-acee-198f-27ead57d86f1

---
 monitor/packet.c | 7 +++++++
 1 file changed, 7 insertions(+)

Here is the summary with links:
- [BlueZ,v1,1/2] monitor: Add features bits defined in 6.2

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fda84f7004fa
  - [BlueZ,v1,2/2] monitor: Add decoding for Short Connection Interval feature
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=79cfd07224ff

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html