* [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event
@ 2025-05-13 17:55 Luiz Augusto von Dentz
2025-05-13 17:56 ` [PATCH BlueZ v2 2/2] monitor: Add decoding " Luiz Augusto von Dentz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-05-13 17:55 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds FSU command and event as defined in the Core 6.0
specification.
---
monitor/bt.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/monitor/bt.h b/monitor/bt.h
index e708e580f77b..bc84d6b947a9 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2937,6 +2937,16 @@ struct bt_hci_rsp_le_read_iso_link_quality {
uint32_t duplicated_packets;
} __attribute__ ((packed));
+#define BT_HCI_CMD_LE_FSU 0x209d
+#define BT_HCI_BIT_LE_FSU BT_HCI_CMD_BIT(48, 1)
+struct bt_hci_cmd_le_fsu {
+ uint16_t handle;
+ uint16_t frame_space_min;
+ uint16_t frame_space_max;
+ uint8_t phys;
+ uint8_t types;
+} __attribute__ ((packed));
+
#define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
struct bt_hci_evt_inquiry_complete {
uint8_t status;
@@ -3760,6 +3770,16 @@ struct bt_hci_evt_le_big_info_adv_report {
uint8_t encryption;
} __attribute__ ((packed));
+#define BT_HCI_EVT_LE_FSU_COMPLETE 0x35
+struct bt_hci_evt_le_fsu_complete {
+ uint8_t status;
+ uint16_t handle;
+ uint8_t initiator;
+ uint16_t frame_space;
+ uint8_t phys;
+ uint8_t types;
+} __attribute__ ((packed));
+
#define BT_HCI_ERR_SUCCESS 0x00
#define BT_HCI_ERR_UNKNOWN_COMMAND 0x01
#define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH BlueZ v2 2/2] monitor: Add decoding for FSU command and event
2025-05-13 17:55 [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event Luiz Augusto von Dentz
@ 2025-05-13 17:56 ` Luiz Augusto von Dentz
2025-05-13 19:15 ` [BlueZ,v2,1/2] monitor: Add definitions " bluez.test.bot
2025-05-14 18:20 ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-05-13 17:56 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds decoding for FSU command and event as defined in the Bluetooth
Core 6.0 specification:
$ tools/hcitool cmd 0x08 0x009d 0xff 0xff 0x00 0x00 0x00 0x00 0x01 0x03
< HCI Command: LE Frame Space Update (0x08|0x009d) plen 8
Handle: 65535 Address: 00:00:00:00:00:00 (OUI 00-00-00)
Frame Space min: 0 us (0x0000)
Frame Space max: 0 us (0x0000)
PHYs: LE 1M (0x01)
types: 0x03
T_IFS_ACL_CP
T_IFS_ACL_PC
---
monitor/packet.c | 107 +++++++++++++++++++++++++++++++++++++++++------
1 file changed, 94 insertions(+), 13 deletions(-)
diff --git a/monitor/packet.c b/monitor/packet.c
index e16af112feed..149eabad0661 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -7632,6 +7632,18 @@ static const struct bitfield_data le_phys[] = {
{ }
};
+static void print_le_phy_bitfield(const char *label, uint8_t phys)
+{
+ uint8_t mask;
+
+ print_field("%s: 0x%2.2x", label, phys);
+
+ mask = print_bitfield(2, phys, le_phys);
+ if (mask)
+ print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
+ " (0x%2.2x)", mask);
+}
+
static const struct bitfield_data le_phy_preference[] = {
{ 0, "No TX PHY preference" },
{ 1, "No RX PHY preference" },
@@ -7650,19 +7662,8 @@ static void print_le_phys_preference(uint8_t all_phys, uint8_t tx_phys,
print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
" (0x%2.2x)", mask);
- print_field("TX PHYs preference: 0x%2.2x", tx_phys);
-
- mask = print_bitfield(2, tx_phys, le_phys);
- if (mask)
- print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
- " (0x%2.2x)", mask);
-
- print_field("RX PHYs preference: 0x%2.2x", rx_phys);
-
- mask = print_bitfield(2, rx_phys, le_phys);
- if (mask)
- print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
- " (0x%2.2x)", mask);
+ print_le_phy_bitfield("TX PHYs preference", tx_phys);
+ print_le_phy_bitfield("RX PHYs preference", rx_phys);
}
static void le_set_default_phy_cmd(uint16_t index, const void *data,
@@ -9079,6 +9080,42 @@ static void status_le_read_iso_link_quality_rsp(uint16_t index,
print_field("Duplicated packets %d", rsp->duplicated_packets);
}
+static const struct bitfield_data fsu_type_table[] = {
+ { 0, "T_IFS_ACL_CP" },
+ { 1, "T_IFS_ACL_PC" },
+ { 2, "T_MCES" },
+ { 3, "T_IFS_CIS" },
+ { 4, "T_MSS_CIS" },
+ { }
+};
+
+static void print_fsu_types(uint8_t types)
+{
+ uint8_t mask;
+
+ print_field("types: 0x%2.2x", types);
+
+ mask = print_bitfield(2, types, fsu_type_table);
+ if (mask)
+ print_text(COLOR_UNKNOWN_ADDRESS_TYPE, " Unknown type"
+ " (0x%2.2x)", mask);
+}
+
+static void le_fsu_cmd(uint16_t index, const void *data, uint8_t size)
+{
+ const struct bt_hci_cmd_le_fsu *cmd = data;
+
+ print_handle(cmd->handle);
+ print_field("Frame Space min: %d us (0x%4.4x)",
+ le16_to_cpu(cmd->frame_space_min),
+ le16_to_cpu(cmd->frame_space_min));
+ print_field("Frame Space max: %d us (0x%4.4x)",
+ le16_to_cpu(cmd->frame_space_max),
+ le16_to_cpu(cmd->frame_space_max));
+ print_le_phy_bitfield("PHYs", cmd->phys);
+ print_fsu_types(cmd->types);
+}
+
struct opcode_data {
uint16_t opcode;
int bit;
@@ -10038,6 +10075,10 @@ static const struct opcode_data opcode_table[] = {
sizeof(
struct bt_hci_rsp_le_read_iso_link_quality),
true },
+ { BT_HCI_CMD_LE_FSU, BT_HCI_BIT_LE_FSU,
+ "LE Frame Space Update", le_fsu_cmd,
+ sizeof(struct bt_hci_cmd_le_fsu),
+ true, status_rsp, 1, true },
{ }
};
@@ -11857,6 +11898,43 @@ static void le_big_info_evt(struct timeval *tv, uint16_t index,
print_field("Encryption: 0x%02x", evt->encryption);
}
+static void print_fsu_initiator(uint8_t initiator)
+{
+ const char *str;
+
+ switch (initiator) {
+ case 0x00:
+ str = "Local Host initiated";
+ break;
+ case 0x01:
+ str = "Local Controller initiated";
+ break;
+ case 0x02:
+ str = "Peer initiated";
+ break;
+ default:
+ str = "Reserved";
+ break;
+ }
+
+ print_field("initiator: %s (0x%2.2x)", str, initiator);
+}
+
+static void le_fsu_evt(struct timeval *tv, uint16_t index,
+ const void *data, uint8_t size)
+{
+ const struct bt_hci_evt_le_fsu_complete *evt = data;
+
+ print_status(evt->status);
+ print_handle(evt->handle);
+ print_fsu_initiator(evt->initiator);
+ print_field("Frame Space: %u us (0x%4.4x)",
+ le16_to_cpu(evt->frame_space),
+ le16_to_cpu(evt->frame_space));
+ print_le_phy_bitfield("PHYs", evt->phys);
+ print_fsu_types(evt->types);
+}
+
struct subevent_data {
uint8_t subevent;
const char *str;
@@ -11981,6 +12059,9 @@ static const struct subevent_data le_meta_event_table[] = {
"LE Broadcast Isochronous Group Info Advertising Report",
le_big_info_evt,
sizeof(struct bt_hci_evt_le_big_info_adv_report) },
+ { BT_HCI_EVT_LE_FSU_COMPLETE,
+ "LE Frame Space Update Complete",
+ le_fsu_evt, sizeof(struct bt_hci_evt_le_fsu_complete) },
{ }
};
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [BlueZ,v2,1/2] monitor: Add definitions for FSU command and event
2025-05-13 17:55 [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event Luiz Augusto von Dentz
2025-05-13 17:56 ` [PATCH BlueZ v2 2/2] monitor: Add decoding " Luiz Augusto von Dentz
@ 2025-05-13 19:15 ` bluez.test.bot
2025-05-14 18:20 ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-05-13 19:15 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]
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=962526
---Test result---
Test Summary:
CheckPatch PENDING 0.25 seconds
GitLint PENDING 0.31 seconds
BuildEll PASS 20.68 seconds
BluezMake PASS 2648.84 seconds
MakeCheck PASS 20.62 seconds
MakeDistcheck PASS 197.81 seconds
CheckValgrind PASS 272.07 seconds
CheckSmatch WARNING 301.54 seconds
bluezmakeextell PASS 127.29 seconds
IncrementalBuild PENDING 0.45 seconds
ScanBuild PASS 896.61 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1876:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3617:52: warning: array of flexible structuresmonitor/bt.h:3605:40: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event
2025-05-13 17:55 [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event Luiz Augusto von Dentz
2025-05-13 17:56 ` [PATCH BlueZ v2 2/2] monitor: Add decoding " Luiz Augusto von Dentz
2025-05-13 19:15 ` [BlueZ,v2,1/2] monitor: Add definitions " bluez.test.bot
@ 2025-05-14 18:20 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-05-14 18:20 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 13 May 2025 13:55:59 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This adds FSU command and event as defined in the Core 6.0
> specification.
> ---
> monitor/bt.h | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
Here is the summary with links:
- [BlueZ,v2,1/2] monitor: Add definitions for FSU command and event
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f02ca9dc8d54
- [BlueZ,v2,2/2] monitor: Add decoding for FSU command and event
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=080174528484
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-14 18:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 17:55 [PATCH BlueZ v2 1/2] monitor: Add definitions for FSU command and event Luiz Augusto von Dentz
2025-05-13 17:56 ` [PATCH BlueZ v2 2/2] monitor: Add decoding " Luiz Augusto von Dentz
2025-05-13 19:15 ` [BlueZ,v2,1/2] monitor: Add definitions " bluez.test.bot
2025-05-14 18:20 ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.