From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2 01/13] monitor: Use PAST to refer to Periodic Advertising Sync Transfer
Date: Thu, 9 Oct 2025 17:29:19 -0400 [thread overview]
Message-ID: <20251009212931.445719-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This simplify the command and event names and their structs to just
use PAST in place of other terminology currently in use.
---
monitor/bt.h | 39 +++++++++++++++++++++++++++------------
monitor/packet.c | 41 +++++++++++++++++++++++------------------
2 files changed, 50 insertions(+), 30 deletions(-)
diff --git a/monitor/bt.h b/monitor/bt.h
index 0e80ad2a2d6f..ca91f7fefc84 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2630,22 +2630,32 @@ struct bt_hci_cmd_set_pa_rec_enable {
uint8_t enable;
} __attribute__ ((packed));
-#define BT_HCI_CMD_PERIODIC_SYNC_TRANS 0x205a
-struct bt_hci_cmd_periodic_sync_trans {
+#define BT_HCI_CMD_LE_PAST 0x205a
+struct bt_hci_cmd_le_past {
uint16_t handle;
uint16_t service_data;
uint16_t sync_handle;
} __attribute__ ((packed));
-#define BT_HCI_CMD_PA_SET_INFO_TRANS 0x205b
-struct bt_hci_cmd_pa_set_info_trans {
+struct bt_hci_rsp_le_past {
+ uint8_t status;
uint16_t handle;
- uint16_t service_data;
- uint8_t adv_handle;
} __attribute__ ((packed));
-#define BT_HCI_CMD_PA_SYNC_TRANS_PARAMS 0x205c
-struct bt_hci_cmd_pa_sync_trans_params {
+#define BT_HCI_CMD_LE_PAST_SET_INFO 0x205b
+struct bt_hci_cmd_le_past_set_info {
+ uint16_t handle;
+ uint16_t service_data;
+ uint8_t adv_handle;
+} __attribute__ ((packed));
+
+struct bt_hci_rsp_le_past_set_info {
+ uint8_t status;
+ uint16_t handle;
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_LE_PAST_PARAMS 0x205c
+struct bt_hci_cmd_le_past_params {
uint16_t handle;
uint8_t mode;
uint16_t skip;
@@ -2653,8 +2663,13 @@ struct bt_hci_cmd_pa_sync_trans_params {
uint8_t cte_type;
} __attribute__ ((packed));
-#define BT_HCI_CMD_DEFAULT_PA_SYNC_TRANS_PARAMS 0x205d
-struct bt_hci_cmd_default_pa_sync_trans_params {
+struct bt_hci_rsp_le_past_params {
+ uint8_t status;
+ uint16_t handle;
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_DEFAULT_PAST_PARAMS 0x205d
+struct bt_hci_cmd_le_default_past_params {
uint8_t mode;
uint16_t skip;
uint16_t sync_timeout;
@@ -3865,8 +3880,8 @@ struct bt_hci_evt_le_cte_request_failed {
uint16_t handle;
} __attribute__ ((packed));
-#define BT_HCI_EVT_LE_PA_SYNC_TRANS_REC 0x18
-struct bt_hci_evt_le_pa_sync_trans_rec {
+#define BT_HCI_EVT_LE_PAST_RECEIVED 0x18
+struct bt_hci_evt_le_past_recv {
uint8_t status;
uint16_t handle;
uint16_t service_data;
diff --git a/monitor/packet.c b/monitor/packet.c
index 2b30e881a201..f7db1cbb88c6 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3192,7 +3192,7 @@ static const struct bitfield_data events_le_table[] = {
{ 20, "LE Connectionless IQ Report" },
{ 21, "LE Connection IQ Report" },
{ 22, "LE CTE Request Failed" },
- { 23, "LE Periodic Advertising Sync Transfer Rvc"},
+ { 23, "LE PAST Received" },
{ 24, "LE CIS Established" },
{ 25, "LE CIS Request" },
{ 26, "LE Create BIG Complete" },
@@ -8596,18 +8596,18 @@ static void le_pa_rec_enable(uint16_t index, const void *data, uint8_t size)
print_enable("Reporting", cmd->enable);
}
-static void le_pa_sync_trans(uint16_t index, const void *data, uint8_t size)
+static void le_past(uint16_t index, const void *data, uint8_t size)
{
- const struct bt_hci_cmd_periodic_sync_trans *cmd = data;
+ const struct bt_hci_cmd_le_past *cmd = data;
print_field("Connection handle: %d", cmd->handle);
print_field("Service data: 0x%4.4x", cmd->service_data);
print_field("Sync handle: %d", cmd->sync_handle);
}
-static void le_pa_set_info_trans(uint16_t index, const void *data, uint8_t size)
+static void le_past_set_info(uint16_t index, const void *data, uint8_t size)
{
- const struct bt_hci_cmd_pa_set_info_trans *cmd = data;
+ const struct bt_hci_cmd_le_past_set_info *cmd = data;
print_field("Connection handle: %d", cmd->handle);
print_field("Service data: 0x%4.4x", cmd->service_data);
@@ -8628,6 +8628,10 @@ static void print_sync_mode(uint8_t mode)
case 0x02:
str = "Enabled with report events enabled";
break;
+ case 0x03:
+ str = "Enabled with report events enabled with duplicate "
+ "filtering";
+ break;
default:
str = "RFU";
break;
@@ -8636,10 +8640,10 @@ static void print_sync_mode(uint8_t mode)
print_field("Mode: %s (0x%2.2x)", str, mode);
}
-static void le_pa_sync_trans_params(uint16_t index, const void *data,
+static void le_past_params(uint16_t index, const void *data,
uint8_t size)
{
- const struct bt_hci_cmd_pa_sync_trans_params *cmd = data;
+ const struct bt_hci_cmd_le_past_params *cmd = data;
print_field("Connection handle: %d", cmd->handle);
print_sync_mode(cmd->mode);
@@ -8650,10 +8654,10 @@ static void le_pa_sync_trans_params(uint16_t index, const void *data,
print_create_sync_cte_type(cmd->cte_type);
}
-static void le_set_default_pa_sync_trans_params(uint16_t index,
+static void le_set_default_past_params(uint16_t index,
const void *data, uint8_t size)
{
- const struct bt_hci_cmd_default_pa_sync_trans_params *cmd = data;
+ const struct bt_hci_cmd_le_default_past_params *cmd = data;
print_sync_mode(cmd->mode);
print_field("Skip: 0x%2.2x", cmd->skip);
@@ -10492,17 +10496,17 @@ static const struct opcode_data opcode_table[] = {
le_pa_rec_enable, 3, true,
status_rsp, 1, true },
{ 0x205a, 326, "LE Periodic Advertising Sync Transfer",
- le_pa_sync_trans, 6, true,
+ le_past, 6, true,
status_handle_rsp, 3, true },
{ 0x205b, 327, "LE Periodic Advertising Set Info Transfer",
- le_pa_set_info_trans, 5, true,
+ le_past_set_info, 5, true,
status_handle_rsp, 3, true },
{ 0x205c, 328, "LE Periodic Advertising Sync Transfer Parameters",
- le_pa_sync_trans_params, 8, true,
+ le_past_params, 8, true,
status_handle_rsp, 3, true},
{ 0x205d, 329, "LE Set Default Periodic Advertisng Sync Transfer "
"Parameters",
- le_set_default_pa_sync_trans_params,
+ le_set_default_past_params,
6, true, status_rsp, 1, true},
{ BT_HCI_CMD_LE_READ_BUFFER_SIZE_V2,
BT_HCI_BIT_LE_READ_BUFFER_SIZE_V2,
@@ -12383,10 +12387,10 @@ static void le_cte_request_failed_evt(struct timeval *tv, uint16_t index,
print_field("Connection handle: %d", evt->handle);
}
-static void le_pa_sync_trans_rec_evt(struct timeval *tv, uint16_t index,
+static void le_past_received_evt(struct timeval *tv, uint16_t index,
const void *data, uint8_t size)
{
- const struct bt_hci_evt_le_pa_sync_trans_rec *evt = data;
+ const struct bt_hci_evt_le_past_recv *evt = data;
print_status(evt->status);
print_field("Handle: %d", evt->handle);
@@ -13283,9 +13287,10 @@ static const struct subevent_data le_meta_event_table[] = {
le_chan_select_alg_evt, 3, true},
{ 0x17, "LE CTE Request Failed",
le_cte_request_failed_evt, 3, true},
- { 0x18, "LE Periodic Advertising Sync Transfer Received",
- le_pa_sync_trans_rec_evt, 19,
- true},
+ { BT_HCI_EVT_LE_PAST_RECEIVED,
+ "LE Periodic Advertising Sync Transfer Received",
+ le_past_received_evt, 19,
+ true},
{ BT_HCI_EVT_LE_CIS_ESTABLISHED,
"LE Connected Isochronous Stream Established",
le_cis_established_evt,
--
2.51.0
next reply other threads:[~2025-10-09 21:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 21:29 Luiz Augusto von Dentz [this message]
2025-10-09 21:29 ` [PATCH BlueZ v2 02/13] emulator: Add initial support for PAST Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 03/13] iso-tester: Add tests for PAST procedures Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 04/13] monitor: Add support for PAST MGMT settings and flags Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 05/13] MGMT: Add PAST Settings and Flags Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 06/13] device: Add initial support for setting DEVICE_FLAG_PAST Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 07/13] bass: Add " Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 08/13] iso.rst: Add documentation for PAST/rebind Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 09/13] shared/bap: Add callback broadcast instances Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 10/13] MediaAssistant: Add Device option to Push Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 11/13] bass: Implement Device option for Push Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 12/13] client/assistant: Handle assistant.push to own broadcasts Luiz Augusto von Dentz
2025-10-09 21:29 ` [PATCH BlueZ v2 13/13] client/assistant: Detect if object already contains a valid BCode Luiz Augusto von Dentz
2025-10-09 22:51 ` [BlueZ,v2,01/13] monitor: Use PAST to refer to Periodic Advertising Sync Transfer bluez.test.bot
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=20251009212931.445719-1-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.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