Linux bluetooth development
 help / color / mirror / Atom feed
* RE: Bluetooth: Periodic advertising and PAwR over MGMT
  2026-11-27  8:53 [RFC PATCH 1/5] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
@ 2026-11-27 13:58 ` bluez.test.bot
  0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2026-11-27 13:58 UTC (permalink / raw)
  To: linux-bluetooth, rolandschober1968

[-- Attachment #1: Type: text/plain, Size: 5967 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/series/1224182/

---Test result---

Test Summary:
CheckPatch                    FAIL      5.14 seconds
VerifyFixes                   PASS      0.08 seconds
VerifySignedoff               PASS      0.08 seconds
GitLint                       FAIL      1.12 seconds
SubjectPrefix                 PASS      0.37 seconds
BuildKernel                   PASS      23.35 seconds
CheckAllWarning               PASS      26.54 seconds
CheckSparse                   WARNING   28.70 seconds
BuildKernel32                 PASS      23.20 seconds
CheckKernelLLVM               PASS      25.41 seconds
TestRunnerSetup               PASS      546.44 seconds
TestRunner_l2cap-tester       PASS      15.18 seconds
TestRunner_iso-tester         PASS      15.25 seconds
TestRunner_bnep-tester        PASS      2.88 seconds
TestRunner_mgmt-tester        PASS      84.82 seconds
TestRunner_rfcomm-tester      PASS      4.06 seconds
TestRunner_sco-tester         PASS      5.07 seconds
TestRunner_ioctl-tester       PASS      4.26 seconds
TestRunner_mesh-tester        PASS      4.15 seconds
TestRunner_smp-tester         PASS      4.01 seconds
TestRunner_userchan-tester    PASS      2.89 seconds
TestRunner_6lowpan-tester     PASS      4.06 seconds
IncrementalBuild              PASS      67.80 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,1/5] Bluetooth: hci: Add Periodic Advertising with Responses definitions
WARNING: Non-standard signature: Assisted-by:
#133: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#133: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 89 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028825.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,2/5] Bluetooth: hci_sync: Disable periodic advertising before removing a set
WARNING: Non-standard signature: Assisted-by:
#128: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#128: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 55 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028826.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,3/5] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command
WARNING: Non-standard signature: Assisted-by:
#140: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#140: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 270 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028827.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,4/5] Bluetooth: MGMT: Add Add Periodic Advertising Data command
WARNING: Non-standard signature: Assisted-by:
#129: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#129: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 140 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028828.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,5/5] Bluetooth: MGMT: Add PAwR subevent data and response reports
WARNING: Non-standard signature: Assisted-by:
#139: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#139: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 387 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028829.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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:
[RFC,2/5] Bluetooth: hci_sync: Disable periodic advertising before removing a set

1: T1 Title exceeds max length (81>80): "[RFC,2/5] Bluetooth: hci_sync: Disable periodic advertising before removing a set"
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):


https://github.com/bluez/bluetooth-next/pull/1241

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT
@ 2026-12-03 22:13 Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

Hi Luiz,

v2 of the RFC for periodic advertising and the advertiser side of
Periodic Advertising with Responses (PAwR) over MGMT. The interface
is the one of v1, and the questions on it are still open; v2 fixes
one more case in the kernel, which the review of the BlueZ series
brought up, and is rebased onto bluetooth-next.

Changes in v2:
 - New patch 3: an instance with a timeout and periodic advertising.
   When the timeout ends the controller stops the advertising of the
   set, and the kernel freed its instance. The periodic advertising
   went on in the controller, and nothing stopped it any more. The
   kernel now disables it and removes the set.
 - Patch 2 is the fix I sent on its own after v1 ("Bluetooth:
   hci_sync: Disable PA before removing an advertising set"), with
   that commit message. The code is the one of v1.
 - Rebased onto bluetooth-next. Patches 1 and 4 to 6 are unchanged.

v1: "[RFC PATCH 0/5] Bluetooth: Periodic advertising and PAwR over
MGMT"

The interface (patches 4 to 6):

  Add Periodic Advertising Parameters (0x005d)
      Makes an instance created with Add Extended Advertising Parameters
      periodic, before Add Extended Advertising Data enables it. With a
      number of subevents it is PAwR, without it is plain periodic
      advertising.
  Add Periodic Advertising Data (0x005e)
      The data of a plain periodic advertising train.
  Periodic Advertising Subevent Data Request event (0x0035)
      The controller asks for the data of a range of subevents.
  Set Periodic Advertising Subevent Data (0x005f)
      The answer: the data of one or more subevents, in one HCI command.
  Periodic Advertising Response Report event (0x0036)
      The responses received in the response slots of a subevent.

The parameters and the entries are those of the HCI commands and
events, in their units; the advertising handle is replaced by the
instance.

Questions:

1. New commands, or flags and parameters added to Add Extended
   Advertising Parameters and Add Extended Advertising Data? I chose
   commands of their own because the existing ones have no room for
   the parameters, and an instance can then become periodic without a
   second way to create it.

2. Set Periodic Advertising Subevent Data is sent with hci_send_cmd()
   and answered from the Command Complete handler, as the PIN code and
   user confirmation replies are. Queued with hci_cmd_sync_queue() it
   waited behind the connection setup, and the controller refused the
   data as too late: it wants the data within its lead time, 40 to 50 ms
   on the controller I tested with. Is this acceptable, or is there a
   better way to send a command which must not wait?

3. The kernel does not check that the subevents of the answer are the
   requested ones, and does not split an answer over several HCI
   commands; the controller refuses what is wrong, and user space gets
   the error. Should the kernel do more here?

4. The controller's Too Late error (0x46) reaches user space as the
   generic Failed. Is a MGMT status of its own wanted?

5. The two events go to all MGMT sockets. Should they go only to the
   socket which added the instance?

6. New in v2: an instance with a timeout which is periodic is removed
   as a whole when the timeout ends, train included (patch 3). The
   other way would be to refuse periodic advertising parameters for an
   instance with a timeout. Is removing it what you would expect?

Not in this series:

 - periodic advertising data of more than one HCI command (252 octets);
 - Periodic Advertising Sync Transfer over MGMT (the tests send
   LE Periodic Advertising Set Info Transfer with HCI Cmd Sync);
 - connecting to a synchronised device through a subevent
   (LE Extended Create Connection [v2]);
 - the scanner side.

A known gap: if the controller never answers LE Set Periodic
Advertising Subevent Data, its MGMT command stays pending, and the
answer to the next one is taken for it. The PIN code replies have the
same weakness; I have not solved it here.

Patches 2 and 3 are needed by the others but stand on their own.
Patch 2: the controller refuses to remove an advertising set while
periodic advertising is enabled on it. Patch 3 changes nothing for an
instance without periodic advertising.

Tested in two ways.

With the BlueZ emulator: the BlueZ series (v3) adds the PAwR
advertiser to btdev and 33 mgmt-tester cases for the three commands,
among them a second instance, controllers without the features,
Remove Advertising and Set Powered off with a train running, an
instance whose timeout ends with a train running, and subevent data
which is too early, too late or sent in two commands at once.
mgmt-tester passes 562 of 562. Without patch 2 the removal and the
power off cases fail, without patch 3 the timeout case. The other
testers pass: iso 213, l2cap 152, sco 30, ioctl 28, mesh 10, smp 8,
userchan 4. No KASAN or lockdep reports.

With a real controller, in QEMU: the Nordic SoftDevice Controller on a
simulated nRF52 (BabbleSim), with Zephyr's periodic_sync_rsp sample as
the responder. Plain periodic advertising: the train starts, its data
is set and changed while it runs, the instance is removed. PAwR: the
train starts, the responder is connected and synchronised by PAST,
95 data requests in 8 s are all answered in time and the responses
arrive. An instance with a timeout and a PAwR train: when the timeout
ends the controller sends LE Advertising Set Terminated and goes on
with the train. Without patch 3 the data requests continue, and Add
Periodic Advertising Parameters for the instance fails with Busy
when it is added again. With it the train is disabled, the set is
removed, and the instance can be added again. An earlier state of the
PAwR patches, ported to 6.6, runs the PAwR exchange on an i.MX93
board.

The Bluetooth code builds with W=1 without warnings. I could not run
sparse, a 32-bit build or an LLVM build here.

The BlueZ side (doc/mgmt-protocol.rst, btmon decoding, btmgmt
commands, emulator and tests) is posted as
"[RFC PATCH BlueZ v3 00/12] Periodic advertising and PAwR over MGMT".

Roland Schober (6):
  Bluetooth: hci: Add Periodic Advertising with Responses definitions
  Bluetooth: hci_sync: Disable PA before removing an advertising set
  Bluetooth: hci_event: Stop PA when an advertising set times out
  Bluetooth: MGMT: Add Add Periodic Advertising Parameters command
  Bluetooth: MGMT: Add Add Periodic Advertising Data command
  Bluetooth: MGMT: Add PAwR subevent data and response reports

 include/net/bluetooth/hci.h      |  59 +++++
 include/net/bluetooth/hci_core.h |  20 ++
 include/net/bluetooth/hci_sync.h |   2 +
 include/net/bluetooth/mgmt.h     |  89 +++++++
 net/bluetooth/hci_event.c        | 115 +++++++++-
 net/bluetooth/hci_sync.c         | 104 ++++++++-
 net/bluetooth/mgmt.c             | 382 +++++++++++++++++++++++++++++++
 7 files changed, 767 insertions(+), 4 deletions(-)


base-commit: 738af1958d2e7205008ca818352199ae8e454509
-- 
2.47.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  2026-12-04  2:11   ` Bluetooth: Periodic advertising and PAwR over MGMT bluez.test.bot
  2026-12-03 22:14 ` [RFC PATCH v2 2/6] Bluetooth: hci_sync: Disable PA before removing an advertising set Roland Schober
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

Add the HCI definitions of the advertiser side of Periodic Advertising
with Responses (PAwR), from the Bluetooth Core Specification 5.4:

 - the LE feature bits of the PAwR advertiser and scanner;
 - LE Set Periodic Advertising Parameters [v2], which adds the subevent
   and response slot timing to the periodic advertising parameters;
 - LE Set Periodic Advertising Subevent Data, by which the host hands
   the controller the data of the next subevents;
 - LE Periodic Advertising Subevent Data Request, by which the
   controller asks for that data;
 - LE Periodic Advertising Response Report, which carries the responses
   received in the response slots of a subevent.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 include/net/bluetooth/hci.h      | 59 ++++++++++++++++++++++++++++++++
 include/net/bluetooth/hci_core.h |  6 ++++
 2 files changed, 65 insertions(+)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ac64780274a5..81ff64dc82ac 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -659,6 +659,8 @@ enum {
 #define HCI_LE_ISO_BROADCASTER		0x40
 #define HCI_LE_ISO_SYNC_RECEIVER	0x80
 #define HCI_LE_LL_EXT_FEATURE		0x80
+#define HCI_LE_PAWR_ADVERTISER		0x08	/* byte 5 */
+#define HCI_LE_PAWR_SCANNER		0x10	/* byte 5 */
 #define HCI_LE_CS			0x40
 #define HCI_LE_CS_HOST			0x80
 #define HCI_LE_SCI			0x01	/* byte 9 - Shorter Connection Intervals */
@@ -2294,6 +2296,37 @@ struct hci_cp_le_set_host_feature {
 	__u8     bit_value;
 } __packed;
 
+struct hci_le_per_adv_subevent_data {
+	__u8    subevent;
+	__u8    response_slot_start;
+	__u8    response_slot_count;
+	__u8    data_len;
+	__u8    data[] __counted_by(data_len);
+} __packed;
+
+/* What fits one command next to handle and num_subevents */
+#define HCI_MAX_PER_ADV_SUBEVENT_DATA_LEN	253
+
+#define HCI_OP_LE_SET_PER_ADV_SUBEVENT_DATA	0x2082
+struct hci_cp_le_set_per_adv_subevent_data {
+	__u8    handle;
+	__u8    num_subevents;
+	__u8    subevents[];
+} __packed;
+
+#define HCI_OP_LE_SET_PER_ADV_PARAMS_V2		0x2086
+struct hci_cp_le_set_per_adv_params_v2 {
+	__u8    handle;
+	__le16  min_interval;
+	__le16  max_interval;
+	__le16  periodic_properties;
+	__u8    num_subevents;
+	__u8    subevent_interval;
+	__u8    response_slot_delay;
+	__u8    response_slot_spacing;
+	__u8    num_response_slots;
+} __packed;
+
 #define HCI_OP_LE_READ_ALL_LOCAL_FEATURES	0x2087
 struct hci_rp_le_read_all_local_features {
 	__u8    status;
@@ -3380,6 +3413,32 @@ struct hci_evt_le_big_info_adv_report {
 	__u8    encryption;
 } __packed;
 
+#define HCI_EV_LE_PER_ADV_SUBEVENT_DATA_REQ	0x27
+struct hci_ev_le_per_adv_subevent_data_req {
+	__u8    handle;
+	__u8    subevent_start;
+	__u8    subevent_data_count;
+} __packed;
+
+struct hci_le_per_adv_response {
+	__s8    tx_power;
+	__s8    rssi;
+	__u8    cte_type;
+	__u8    response_slot;
+	__u8    data_status;
+	__u8    data_len;
+	__u8    data[] __counted_by(data_len);
+} __packed;
+
+#define HCI_EV_LE_PER_ADV_RESPONSE_REPORT	0x28
+struct hci_ev_le_per_adv_response_report {
+	__u8    handle;
+	__u8    subevent;
+	__u8    tx_status;
+	__u8    num_responses;
+	__u8    responses[];
+} __packed;
+
 #define HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE 0x2b
 struct hci_evt_le_read_all_remote_features_complete {
 	__u8    status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 4aa0b49ae104..250245186702 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -2140,6 +2140,12 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
 /* Periodic advertising support */
 #define per_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_PERIODIC_ADV))
 
+/* Periodic Advertising with Responses support */
+#define pawr_adv_capable(dev) \
+	((dev)->le_features[5] & HCI_LE_PAWR_ADVERTISER)
+#define pawr_scan_capable(dev) \
+	((dev)->le_features[5] & HCI_LE_PAWR_SCANNER)
+
 /* CIS Master/Slave and BIS support */
 #define iso_capable(dev) (cis_capable(dev) || bis_capable(dev))
 #define iso_enabled(dev) (le_enabled(dev) && iso_capable(dev))
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 2/6] Bluetooth: hci_sync: Disable PA before removing an advertising set
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 3/6] Bluetooth: hci_event: Stop PA when an advertising set times out Roland Schober
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

The controller answers LE Remove Advertising Set and LE Clear Advertising
Sets with Command Disallowed while periodic advertising is enabled on
a set (Core specification, Vol 4, Part E, 7.8.59 and 7.8.60). Both are
sent without disabling periodic advertising first.

A BIG is the one user of periodic advertising so far. Its own removal
disables periodic advertising, but powering the controller off does not:
hci_power_off_sync() clears the advertising sets before the connections
are terminated, so with a BIG running the command fails and the power
off with it:

  Bluetooth: hci0: Opcode 0x203d failed: -16

  # btmgmt power off
  Set Powered for hci0 failed with status 0x0a (Busy)

The BlueZ emulator accepts both commands in that state, which is why no
tester shows it. With the emulator following the specification [1] the
BAP broadcast cases of test-functional fail, as the controller is power
cycled between two cases.

Disable periodic advertising in the removal itself, for one set in
hci_remove_ext_adv_instance_sync() and for all of them before LE Clear
Advertising Sets.

[1] https://patchwork.kernel.org/project/bluetooth/patch/20261127085525.264299-8-rolandschober1968@gmail.com/

Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections")
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 net/bluetooth/hci_sync.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ee426ffeaa03..a1c723aad55e 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2263,6 +2263,13 @@ int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
 	if (err)
 		return err;
 
+	/* The controller refuses to remove an advertising set which has
+	 * periodic advertising enabled.
+	 */
+	err = hci_disable_per_advertising_sync(hdev, instance);
+	if (err)
+		return err;
+
 	if (instance) {
 		hci_dev_lock(hdev);
 
@@ -2392,6 +2399,32 @@ int hci_schedule_adv_instance_sync(struct hci_dev *hdev, u8 instance,
 	return hci_start_adv_sync(hdev, instance);
 }
 
+/* The controller refuses to clear the advertising sets while one of them has
+ * periodic advertising enabled.
+ */
+static int hci_disable_per_advertising_all_sync(struct hci_dev *hdev)
+{
+	u8 instances[HCI_MAX_ADV_INSTANCES];
+	struct adv_info *adv;
+	u8 i, n = 0;
+	int err;
+
+	hci_dev_lock(hdev);
+	list_for_each_entry(adv, &hdev->adv_instances, list) {
+		if (adv->periodic_enabled && n < ARRAY_SIZE(instances))
+			instances[n++] = adv->instance;
+	}
+	hci_dev_unlock(hdev);
+
+	for (i = 0; i < n; i++) {
+		err = hci_disable_per_advertising_sync(hdev, instances[i]);
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
 static int hci_clear_adv_sets_sync(struct hci_dev *hdev, struct sock *sk)
 {
 	int err;
@@ -2404,6 +2437,10 @@ static int hci_clear_adv_sets_sync(struct hci_dev *hdev, struct sock *sk)
 	if (err)
 		return err;
 
+	err = hci_disable_per_advertising_all_sync(hdev);
+	if (err)
+		return err;
+
 	return __hci_cmd_sync_status_sk(hdev, HCI_OP_LE_CLEAR_ADV_SETS,
 					0, NULL, 0, HCI_CMD_TIMEOUT, sk);
 }
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 3/6] Bluetooth: hci_event: Stop PA when an advertising set times out
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 2/6] Bluetooth: hci_sync: Disable PA before removing an advertising set Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 4/6] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command Roland Schober
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

An advertising instance can have a timeout, which the controller is
given as the duration of the advertising set. When it ends, the
controller sends LE Advertising Set Terminated and the instance is
freed.

The controller only ends the advertising of the set, though: the set
stays, and periodic advertising on it goes on until the host disables
it. For an instance with periodic advertising this leaves a train
which nothing stops any more, and LE Set Periodic Advertising
Parameters is refused when the instance is added again.

Remove such an instance with hci_remove_advertising_sync() instead,
which disables periodic advertising and removes the advertising set
before it frees the instance.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 net/bluetooth/hci_event.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 749963d0ce77..8f4a9c261985 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6674,6 +6674,13 @@ static struct adv_info *hci_le_ext_adv_owner(struct hci_dev *hdev, u8 handle)
 	return NULL;
 }
 
+static int hci_le_ext_adv_term_remove_sync(struct hci_dev *hdev, void *data)
+{
+	u8 instance = PTR_UINT(data);
+
+	return hci_remove_advertising_sync(hdev, NULL, instance, true);
+}
+
 static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data,
 				    struct sk_buff *skb)
 {
@@ -6705,10 +6712,22 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, void *data,
 		if (!adv)
 			goto unlock;
 
-		/* Remove advertising as it has been terminated */
 		instance = adv->instance;
-		hci_free_adv_instance(hdev, adv);
-		mgmt_advertising_removed(NULL, hdev, instance);
+
+		/* The controller goes on with the periodic advertising of a
+		 * set whose advertising has ended. Stopping it and removing
+		 * the set takes commands, so the instance stays until they
+		 * are through.
+		 */
+		if (adv->periodic &&
+		    !hci_cmd_sync_queue(hdev, hci_le_ext_adv_term_remove_sync,
+					UINT_PTR(instance), NULL)) {
+			adv->enabled = false;
+		} else {
+			/* Remove advertising as it has been terminated */
+			hci_free_adv_instance(hdev, adv);
+			mgmt_advertising_removed(NULL, hdev, instance);
+		}
 
 		list_for_each_entry_safe(adv, n, &hdev->adv_instances, list) {
 			if (adv->enabled)
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 4/6] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
                   ` (2 preceding siblings ...)
  2026-12-03 22:14 ` [RFC PATCH v2 3/6] Bluetooth: hci_event: Stop PA when an advertising set times out Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 5/6] Bluetooth: MGMT: Add Add Periodic Advertising Data command Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 6/6] Bluetooth: MGMT: Add PAwR subevent data and response reports Roland Schober
  5 siblings, 0 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

Periodic advertising can only be started by an ISO broadcast socket so
far. Add a MGMT command which makes an advertising instance periodic:

  Add Extended Advertising Parameters    creates the instance
  Add Periodic Advertising Parameters    makes it periodic (new)
  Add Extended Advertising Data          enables it

The command takes the periodic advertising interval and the parameters
of Periodic Advertising with Responses (PAwR): number of subevents,
subevent interval, response slot delay and spacing, number of response
slots. With a number of subevents of 0 the instance is plain periodic
advertising; otherwise the controller has to support the PAwR
advertiser feature and LE Set Periodic Advertising Parameters [v2] is
used. The values are those of the HCI command, in its units.

The instance has to use the extended advertising PDUs and must not be
connectable. Its extended advertising parameters are set again when the
command runs, since they may have been sent before the instance became
periodic.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 include/net/bluetooth/hci_core.h |   8 ++
 include/net/bluetooth/hci_sync.h |   1 +
 include/net/bluetooth/mgmt.h     |  26 ++++++
 net/bluetooth/hci_sync.c         |  60 ++++++++++++++
 net/bluetooth/mgmt.c             | 133 +++++++++++++++++++++++++++++++
 5 files changed, 228 insertions(+)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 250245186702..117408645b9b 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -260,6 +260,14 @@ struct adv_info {
 	bool	scan_rsp_changed;
 	__u16	per_adv_data_len;
 	__u8	per_adv_data[HCI_MAX_PER_AD_LENGTH];
+	/* Periodic Advertising with Responses, if num_subevents is not 0 */
+	__u16	per_adv_min_interval;
+	__u16	per_adv_max_interval;
+	__u8	num_subevents;
+	__u8	subevent_interval;
+	__u8	response_slot_delay;
+	__u8	response_slot_spacing;
+	__u8	num_response_slots;
 	__s8	tx_power;
 	__u32   min_interval;
 	__u32   max_interval;
diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h
index eab827dfa829..03d7e267af7c 100644
--- a/include/net/bluetooth/hci_sync.h
+++ b/include/net/bluetooth/hci_sync.h
@@ -118,6 +118,7 @@ int hci_start_per_adv_sync(struct hci_dev *hdev, u8 instance, u8 sid,
 			   u16 max_interval, u16 sync_interval);
 
 int hci_disable_per_advertising_sync(struct hci_dev *hdev, u8 instance);
+int hci_setup_per_adv_instance_sync(struct hci_dev *hdev, u8 instance);
 
 int hci_remove_advertising_sync(struct hci_dev *hdev, struct sock *sk,
 				u8 instance, bool force);
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 17bdd6345d19..57b9d8d8b57d 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -912,6 +912,32 @@ struct mgmt_cp_load_conn_subrate {
 } __packed;
 #define MGMT_LOAD_CONN_SUBRATE_SIZE	2
 
+/* Turn an instance added with Add Extended Advertising Parameters into
+ * periodic advertising; with num_subevents not 0, into Periodic Advertising
+ * with Responses.  The values are those of the HCI command, in its units:
+ *
+ *   min_interval, max_interval	1.25 ms (0x0006 to 0xffff)
+ *   subevent_interval		1.25 ms
+ *   response_slot_delay	1.25 ms
+ *   response_slot_spacing	0.125 ms
+ *   num_subevents, num_response_slots	counts
+ */
+#define MGMT_OP_ADD_PERIODIC_ADV_PARAMS	0x005D
+struct mgmt_cp_add_periodic_adv_params {
+	__u8	instance;
+	__le16	min_interval;
+	__le16	max_interval;
+	__u8	num_subevents;
+	__u8	subevent_interval;
+	__u8	response_slot_delay;
+	__u8	response_slot_spacing;
+	__u8	num_response_slots;
+} __packed;
+#define MGMT_ADD_PERIODIC_ADV_PARAMS_SIZE	10
+struct mgmt_rp_add_periodic_adv_params {
+	__u8	instance;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index a1c723aad55e..3d8327180c6e 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1968,6 +1968,66 @@ static int hci_enable_per_advertising_sync(struct hci_dev *hdev, u8 instance)
 	return 0;
 }
 
+/* Program periodic advertising on an instance and enable it. The extended
+ * advertising parameters are set again first: they may have been chosen
+ * before the instance became periodic, and a periodic instance can neither be
+ * connectable nor use a non-resolvable private address. An instance with
+ * subevents is Periodic Advertising with Responses and takes the [v2]
+ * parameters. The train starts once extended advertising is enabled as well.
+ */
+int hci_setup_per_adv_instance_sync(struct hci_dev *hdev, u8 instance)
+{
+	struct hci_cp_le_set_per_adv_params_v2 cp;
+	struct adv_info *adv;
+	u16 min_interval, max_interval;
+	int err;
+
+	err = hci_disable_per_advertising_sync(hdev, instance);
+	if (err)
+		return err;
+
+	err = hci_setup_ext_adv_instance_sync(hdev, instance);
+	if (err)
+		return err;
+
+	memset(&cp, 0, sizeof(cp));
+
+	hci_dev_lock(hdev);
+
+	adv = hci_find_adv_instance(hdev, instance);
+	if (!adv || !adv->periodic) {
+		hci_dev_unlock(hdev);
+		return -EINVAL;
+	}
+
+	min_interval = adv->per_adv_min_interval;
+	max_interval = adv->per_adv_max_interval;
+
+	cp.handle = adv->handle;
+	cp.min_interval = cpu_to_le16(min_interval);
+	cp.max_interval = cpu_to_le16(max_interval);
+	cp.periodic_properties = 0x0000;
+	cp.num_subevents = adv->num_subevents;
+	cp.subevent_interval = adv->subevent_interval;
+	cp.response_slot_delay = adv->response_slot_delay;
+	cp.response_slot_spacing = adv->response_slot_spacing;
+	cp.num_response_slots = adv->num_response_slots;
+
+	hci_dev_unlock(hdev);
+
+	if (cp.num_subevents)
+		err = __hci_cmd_sync_status(hdev,
+					    HCI_OP_LE_SET_PER_ADV_PARAMS_V2,
+					    sizeof(cp), &cp, HCI_CMD_TIMEOUT);
+	else
+		err = hci_set_per_adv_params_sync(hdev, instance, min_interval,
+						  max_interval);
+	if (err)
+		return err;
+
+	return hci_enable_per_advertising_sync(hdev, instance);
+}
+
 /* Checks if periodic advertising data contains a Basic Announcement and if it
  * does generates a Broadcast ID and add Broadcast Announcement.
  */
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 01969ab57339..4d9c5f6a05c0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -130,6 +130,7 @@ static const u16 mgmt_commands[] = {
 	MGMT_OP_MESH_SEND,
 	MGMT_OP_MESH_SEND_CANCEL,
 	MGMT_OP_HCI_CMD_SYNC,
+	MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
 };
 
 static const u16 mgmt_events[] = {
@@ -9797,6 +9798,137 @@ static int add_ext_adv_data(struct sock *sk, struct hci_dev *hdev, void *data,
 	return err;
 }
 
+static void add_periodic_adv_params_complete(struct hci_dev *hdev, void *data,
+					     int err)
+{
+	struct mgmt_pending_cmd *cmd = data;
+	struct mgmt_cp_add_periodic_adv_params *cp = cmd->param;
+	struct mgmt_rp_add_periodic_adv_params rp;
+	struct adv_info *adv;
+
+	bt_dev_dbg(hdev, "err %d", err);
+
+	if (err) {
+		/* The instance stays as it was added, without periodic
+		 * advertising.
+		 */
+		hci_dev_lock(hdev);
+		adv = hci_find_adv_instance(hdev, cp->instance);
+		if (adv) {
+			adv->periodic = false;
+			adv->num_subevents = 0;
+		}
+		hci_dev_unlock(hdev);
+
+		mgmt_cmd_status(cmd->sk, hdev->id, cmd->opcode,
+				mgmt_status(err));
+	} else {
+		rp.instance = cp->instance;
+		mgmt_cmd_complete(cmd->sk, hdev->id, cmd->opcode,
+				  MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
+	}
+
+	mgmt_pending_free(cmd);
+}
+
+static int add_periodic_adv_params_sync(struct hci_dev *hdev, void *data)
+{
+	struct mgmt_pending_cmd *cmd = data;
+	struct mgmt_cp_add_periodic_adv_params *cp = cmd->param;
+
+	return hci_setup_per_adv_instance_sync(hdev, cp->instance);
+}
+
+static int add_periodic_adv_params(struct sock *sk, struct hci_dev *hdev,
+				   void *data, u16 data_len)
+{
+	struct mgmt_cp_add_periodic_adv_params *cp = data;
+	struct mgmt_pending_cmd *cmd;
+	struct adv_info *adv;
+	u16 min_interval, max_interval;
+	u8 status;
+	int err;
+
+	bt_dev_dbg(hdev, "sock %p", sk);
+
+	status = mgmt_le_support(hdev);
+	if (status)
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_ADD_PERIODIC_ADV_PARAMS, status);
+
+	if (!ext_adv_capable(hdev) || !per_adv_capable(hdev) ||
+	    (cp->num_subevents && !pawr_adv_capable(hdev)))
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+				       MGMT_STATUS_NOT_SUPPORTED);
+
+	min_interval = __le16_to_cpu(cp->min_interval);
+	max_interval = __le16_to_cpu(cp->max_interval);
+
+	if (min_interval < 0x0006 || min_interval > max_interval ||
+	    cp->num_subevents > 0x80)
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+				       MGMT_STATUS_INVALID_PARAMS);
+
+	hci_dev_lock(hdev);
+
+	if (!hdev_is_powered(hdev)) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+				      MGMT_STATUS_REJECTED);
+		goto unlock;
+	}
+
+	/* Periodic advertising needs an advertising set which uses the
+	 * extended PDUs and is not connectable.
+	 */
+	adv = hci_find_adv_instance(hdev, cp->instance);
+	if (!adv || !(adv->flags & MGMT_ADV_FLAG_SEC_MASK) ||
+	    (adv->flags & MGMT_ADV_FLAG_CONNECTABLE)) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+				      MGMT_STATUS_INVALID_PARAMS);
+		goto unlock;
+	}
+
+	if (adv_overridden_by_global(hdev, adv)) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+				      MGMT_STATUS_BUSY);
+		goto unlock;
+	}
+
+	cmd = mgmt_pending_new(sk, MGMT_OP_ADD_PERIODIC_ADV_PARAMS, hdev, data,
+			       data_len);
+	if (!cmd) {
+		err = -ENOMEM;
+		goto unlock;
+	}
+
+	adv->periodic = true;
+	adv->per_adv_min_interval = min_interval;
+	adv->per_adv_max_interval = max_interval;
+	adv->num_subevents = cp->num_subevents;
+	adv->subevent_interval = cp->subevent_interval;
+	adv->response_slot_delay = cp->response_slot_delay;
+	adv->response_slot_spacing = cp->response_slot_spacing;
+	adv->num_response_slots = cp->num_response_slots;
+
+	err = hci_cmd_sync_queue(hdev, add_periodic_adv_params_sync, cmd,
+				 add_periodic_adv_params_complete);
+	if (err < 0) {
+		adv->periodic = false;
+		adv->num_subevents = 0;
+		mgmt_pending_free(cmd);
+	}
+
+unlock:
+	hci_dev_unlock(hdev);
+
+	return err;
+}
+
 static void remove_advertising_complete(struct hci_dev *hdev, void *data,
 					int err)
 {
@@ -10058,6 +10190,7 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
 	{ mgmt_hci_cmd_sync,       MGMT_HCI_CMD_SYNC_SIZE, HCI_MGMT_VAR_LEN },
 	{ load_conn_subrate,       MGMT_LOAD_CONN_SUBRATE_SIZE,
 						HCI_MGMT_VAR_LEN },
+	{ add_periodic_adv_params, MGMT_ADD_PERIODIC_ADV_PARAMS_SIZE },
 };
 
 void mgmt_index_added(struct hci_dev *hdev)
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 5/6] Bluetooth: MGMT: Add Add Periodic Advertising Data command
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
                   ` (3 preceding siblings ...)
  2026-12-03 22:14 ` [RFC PATCH v2 4/6] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  2026-12-03 22:14 ` [RFC PATCH v2 6/6] Bluetooth: MGMT: Add PAwR subevent data and response reports Roland Schober
  5 siblings, 0 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

Add a MGMT command which sets the data of the periodic advertising
train of an instance made periodic with Add Periodic Advertising
Parameters. It can be sent again to change the data while the train
runs.

The data is limited to what one LE Set Periodic Advertising Data
command takes, as the data of a BIG is. An instance with subevents is
refused: the controller does not allow the command for it.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 include/net/bluetooth/hci_sync.h |  1 +
 include/net/bluetooth/mgmt.h     | 14 +++++
 net/bluetooth/hci_sync.c         |  2 +-
 net/bluetooth/mgmt.c             | 87 ++++++++++++++++++++++++++++++++
 4 files changed, 103 insertions(+), 1 deletion(-)

diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h
index 03d7e267af7c..e6d3d3de482e 100644
--- a/include/net/bluetooth/hci_sync.h
+++ b/include/net/bluetooth/hci_sync.h
@@ -119,6 +119,7 @@ int hci_start_per_adv_sync(struct hci_dev *hdev, u8 instance, u8 sid,
 
 int hci_disable_per_advertising_sync(struct hci_dev *hdev, u8 instance);
 int hci_setup_per_adv_instance_sync(struct hci_dev *hdev, u8 instance);
+int hci_set_per_adv_data_sync(struct hci_dev *hdev, u8 instance);
 
 int hci_remove_advertising_sync(struct hci_dev *hdev, struct sock *sk,
 				u8 instance, bool force);
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 57b9d8d8b57d..a46e87a9152c 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -938,6 +938,20 @@ struct mgmt_rp_add_periodic_adv_params {
 	__u8	instance;
 } __packed;
 
+/* The data of the periodic advertising train of an instance made periodic
+ * with Add Periodic Advertising Parameters.
+ */
+#define MGMT_OP_ADD_PERIODIC_ADV_DATA	0x005E
+struct mgmt_cp_add_periodic_adv_data {
+	__u8	instance;
+	__u8	data_len;
+	__u8	data[] __counted_by(data_len);
+} __packed;
+#define MGMT_ADD_PERIODIC_ADV_DATA_SIZE	2
+struct mgmt_rp_add_periodic_adv_data {
+	__u8	instance;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 3d8327180c6e..05151cf6f413 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1896,7 +1896,7 @@ static int hci_set_per_adv_params_sync(struct hci_dev *hdev, u8 instance,
 				     sizeof(cp), &cp, HCI_CMD_TIMEOUT);
 }
 
-static int hci_set_per_adv_data_sync(struct hci_dev *hdev, u8 instance)
+int hci_set_per_adv_data_sync(struct hci_dev *hdev, u8 instance)
 	__context_unsafe(/* conditional locking */)
 {
 	DEFINE_FLEX(struct hci_cp_le_set_per_adv_data, pdu, data, length,
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 4d9c5f6a05c0..c0e655a189e0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -131,6 +131,7 @@ static const u16 mgmt_commands[] = {
 	MGMT_OP_MESH_SEND_CANCEL,
 	MGMT_OP_HCI_CMD_SYNC,
 	MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
+	MGMT_OP_ADD_PERIODIC_ADV_DATA,
 };
 
 static const u16 mgmt_events[] = {
@@ -9929,6 +9930,90 @@ static int add_periodic_adv_params(struct sock *sk, struct hci_dev *hdev,
 	return err;
 }
 
+static void add_periodic_adv_data_complete(struct hci_dev *hdev, void *data,
+					   int err)
+{
+	struct mgmt_pending_cmd *cmd = data;
+	struct mgmt_cp_add_periodic_adv_data *cp = cmd->param;
+	struct mgmt_rp_add_periodic_adv_data rp;
+
+	bt_dev_dbg(hdev, "err %d", err);
+
+	if (err) {
+		mgmt_cmd_status(cmd->sk, hdev->id, cmd->opcode,
+				mgmt_status(err));
+	} else {
+		rp.instance = cp->instance;
+		mgmt_cmd_complete(cmd->sk, hdev->id, cmd->opcode,
+				  MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
+	}
+
+	mgmt_pending_free(cmd);
+}
+
+static int add_periodic_adv_data_sync(struct hci_dev *hdev, void *data)
+{
+	struct mgmt_pending_cmd *cmd = data;
+	struct mgmt_cp_add_periodic_adv_data *cp = cmd->param;
+
+	return hci_set_per_adv_data_sync(hdev, cp->instance);
+}
+
+static int add_periodic_adv_data(struct sock *sk, struct hci_dev *hdev,
+				 void *data, u16 data_len)
+{
+	struct mgmt_cp_add_periodic_adv_data *cp = data;
+	struct mgmt_pending_cmd *cmd;
+	struct adv_info *adv;
+	int err;
+
+	bt_dev_dbg(hdev, "sock %p", sk);
+
+	if (data_len != struct_size(cp, data, cp->data_len) ||
+	    cp->data_len > HCI_MAX_PER_AD_LENGTH)
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_ADD_PERIODIC_ADV_DATA,
+				       MGMT_STATUS_INVALID_PARAMS);
+
+	hci_dev_lock(hdev);
+
+	if (!hdev_is_powered(hdev)) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_ADD_PERIODIC_ADV_DATA,
+				      MGMT_STATUS_REJECTED);
+		goto unlock;
+	}
+
+	/* The data of an instance with subevents is that of its subevents */
+	adv = hci_find_adv_instance(hdev, cp->instance);
+	if (!adv || !adv->periodic || adv->num_subevents) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_ADD_PERIODIC_ADV_DATA,
+				      MGMT_STATUS_INVALID_PARAMS);
+		goto unlock;
+	}
+
+	cmd = mgmt_pending_new(sk, MGMT_OP_ADD_PERIODIC_ADV_DATA, hdev, data,
+			       data_len);
+	if (!cmd) {
+		err = -ENOMEM;
+		goto unlock;
+	}
+
+	adv->per_adv_data_len = cp->data_len;
+	memcpy(adv->per_adv_data, cp->data, cp->data_len);
+
+	err = hci_cmd_sync_queue(hdev, add_periodic_adv_data_sync, cmd,
+				 add_periodic_adv_data_complete);
+	if (err < 0)
+		mgmt_pending_free(cmd);
+
+unlock:
+	hci_dev_unlock(hdev);
+
+	return err;
+}
+
 static void remove_advertising_complete(struct hci_dev *hdev, void *data,
 					int err)
 {
@@ -10191,6 +10276,8 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
 	{ load_conn_subrate,       MGMT_LOAD_CONN_SUBRATE_SIZE,
 						HCI_MGMT_VAR_LEN },
 	{ add_periodic_adv_params, MGMT_ADD_PERIODIC_ADV_PARAMS_SIZE },
+	{ add_periodic_adv_data,   MGMT_ADD_PERIODIC_ADV_DATA_SIZE,
+						HCI_MGMT_VAR_LEN },
 };
 
 void mgmt_index_added(struct hci_dev *hdev)
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH v2 6/6] Bluetooth: MGMT: Add PAwR subevent data and response reports
  2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
                   ` (4 preceding siblings ...)
  2026-12-03 22:14 ` [RFC PATCH v2 5/6] Bluetooth: MGMT: Add Add Periodic Advertising Data command Roland Schober
@ 2026-12-03 22:14 ` Roland Schober
  5 siblings, 0 replies; 9+ messages in thread
From: Roland Schober @ 2026-12-03 22:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Roland Schober

Complete the advertiser side of Periodic Advertising with Responses
(PAwR) over MGMT:

  PA Subevent Data Request event    the controller asks for the data
                                    of a range of subevents
  Set PA Subevent Data command      user space answers with that data
  PA Response Report event          the responses received in the
                                    response slots of a subevent

The LE events behind the two MGMT events are enabled if the controller
supports the PAwR advertiser feature, and are forwarded for instances
with subevents only.

The controller wants the subevent data within its lead time, a few tens
of milliseconds before the subevent. Set PA Subevent Data is therefore
sent with hci_send_cmd() and answered from the Command Complete handler,
not queued with hci_cmd_sync_queue(), where it would wait behind
sequences which block for an event, such as creating a connection.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Roland Schober <rolandschober1968@gmail.com>
---
 include/net/bluetooth/hci_core.h |   6 ++
 include/net/bluetooth/mgmt.h     |  49 ++++++++++
 net/bluetooth/hci_event.c        |  90 +++++++++++++++++
 net/bluetooth/hci_sync.c         |   5 +
 net/bluetooth/mgmt.c             | 162 +++++++++++++++++++++++++++++++
 5 files changed, 312 insertions(+)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 117408645b9b..37ac912fbb85 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -2661,6 +2661,12 @@ void mgmt_adv_monitor_device_lost(struct hci_dev *hdev, u16 handle,
 				  bdaddr_t *bdaddr, u8 addr_type);
 void mgmt_conn_subrate_notify(struct hci_dev *hdev, struct hci_conn *conn,
 			      u8 status);
+void mgmt_pa_subevent_data_request(struct hci_dev *hdev, u8 instance,
+				   u8 subevent_start, u8 subevent_data_count);
+void mgmt_set_pa_subevent_data_complete(struct hci_dev *hdev, u8 status);
+void mgmt_pa_response_report(struct hci_dev *hdev, u8 instance, u8 subevent,
+			     u8 tx_status, u8 num_responses,
+			     const void *responses, u16 len);
 
 int hci_abort_conn(struct hci_conn *conn, u8 reason);
 void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, u16 latency,
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index a46e87a9152c..b85ff94e518c 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -952,6 +952,28 @@ struct mgmt_rp_add_periodic_adv_data {
 	__u8	instance;
 } __packed;
 
+struct mgmt_pa_subevent_data {
+	__u8	subevent;
+	__u8	response_slot_start;
+	__u8	response_slot_count;
+	__u8	data_len;
+	__u8	data[] __counted_by(data_len);
+} __packed;
+
+/* The answer to MGMT_EV_PA_SUBEVENT_DATA_REQUEST: num_subevents entries of
+ * struct mgmt_pa_subevent_data.
+ */
+#define MGMT_OP_SET_PA_SUBEVENT_DATA	0x005F
+struct mgmt_cp_set_pa_subevent_data {
+	__u8	instance;
+	__u8	num_subevents;
+	__u8	subevents[];
+} __packed;
+#define MGMT_SET_PA_SUBEVENT_DATA_SIZE	2
+struct mgmt_rp_set_pa_subevent_data {
+	__u8	instance;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
@@ -1276,3 +1298,30 @@ struct mgmt_ev_security_level_changed {
 	__u8	tlv_length;
 	__u8	tlv_data[] __counted_by(tlv_length);
 } __packed;
+
+#define MGMT_EV_PA_SUBEVENT_DATA_REQUEST	0x0035
+struct mgmt_ev_pa_subevent_data_request {
+	__u8	instance;
+	__u8	subevent_start;
+	__u8	subevent_data_count;
+} __packed;
+
+struct mgmt_pa_response {
+	__s8	tx_power;
+	__s8	rssi;
+	__u8	cte_type;
+	__u8	response_slot;
+	__u8	data_status;
+	__u8	data_len;
+	__u8	data[] __counted_by(data_len);
+} __packed;
+
+/* num_responses entries of struct mgmt_pa_response */
+#define MGMT_EV_PA_RESPONSE_REPORT		0x0036
+struct mgmt_ev_pa_response_report {
+	__u8	instance;
+	__u8	subevent;
+	__u8	tx_status;
+	__u8	num_responses;
+	__u8	responses[];
+} __packed;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8f4a9c261985..6eec5a7f1f69 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4608,6 +4608,20 @@ static u8 hci_cc_le_set_per_adv_enable(struct hci_dev *hdev, void *data,
 	return rp->status;
 }
 
+static u8 hci_cc_le_set_per_adv_subevent_data(struct hci_dev *hdev, void *data,
+					      struct sk_buff *skb)
+{
+	struct hci_ev_status *rp = data;
+
+	bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
+
+	hci_dev_lock(hdev);
+	mgmt_set_pa_subevent_data_complete(hdev, rp->status);
+	hci_dev_unlock(hdev);
+
+	return rp->status;
+}
+
 #define HCI_CC_VL(_op, _func, _min, _max) \
 { \
 	.op = _op, \
@@ -4784,6 +4798,10 @@ static const struct hci_cc {
 	HCI_CC_STATUS(HCI_OP_LE_SET_PER_ADV_PARAMS, hci_cc_set_per_adv_param),
 	HCI_CC_STATUS(HCI_OP_LE_SET_PER_ADV_ENABLE,
 		      hci_cc_le_set_per_adv_enable),
+	/* Status and advertising handle */
+	HCI_CC_VL(HCI_OP_LE_SET_PER_ADV_SUBEVENT_DATA,
+		  hci_cc_le_set_per_adv_subevent_data,
+		  sizeof(struct hci_ev_status), HCI_MAX_CC_PLEN),
 	HCI_CC(HCI_OP_LE_READ_TRANSMIT_POWER, hci_cc_le_read_transmit_power,
 	       sizeof(struct hci_rp_le_read_transmit_power)),
 	HCI_CC_STATUS(HCI_OP_LE_SET_PRIVACY_MODE, hci_cc_le_set_privacy_mode),
@@ -8170,6 +8188,69 @@ static void hci_le_big_info_adv_report_evt(struct hci_dev *hdev, void *data,
 	hci_dev_unlock(hdev);
 }
 
+static void hci_le_per_adv_subevent_data_req_evt(struct hci_dev *hdev,
+						 void *data,
+						 struct sk_buff *skb)
+{
+	struct hci_ev_le_per_adv_subevent_data_req *ev = data;
+	struct adv_info *adv;
+
+	bt_dev_dbg(hdev, "handle 0x%2.2x start %u count %u", ev->handle,
+		   ev->subevent_start, ev->subevent_data_count);
+
+	hci_dev_lock(hdev);
+
+	adv = hci_le_ext_adv_owner(hdev, ev->handle);
+	if (adv && adv->num_subevents)
+		mgmt_pa_subevent_data_request(hdev, adv->instance,
+					      ev->subevent_start,
+					      ev->subevent_data_count);
+
+	hci_dev_unlock(hdev);
+}
+
+static void hci_le_per_adv_response_report_evt(struct hci_dev *hdev,
+					       void *data, struct sk_buff *skb)
+{
+	struct hci_ev_le_per_adv_response_report *ev = data;
+	struct hci_le_per_adv_response *rsp;
+	struct adv_info *adv;
+	void *responses = skb->data;
+	u16 len = skb->len;
+	u8 i;
+
+	bt_dev_dbg(hdev, "handle 0x%2.2x subevent %u num %u", ev->handle,
+		   ev->subevent, ev->num_responses);
+
+	/* The responses go to user space as they are: check that they are
+	 * all there.
+	 */
+	for (i = 0; i < ev->num_responses; i++) {
+		rsp = hci_le_ev_skb_pull(hdev, skb,
+					 HCI_EV_LE_PER_ADV_RESPONSE_REPORT,
+					 sizeof(*rsp));
+		if (!rsp)
+			return;
+
+		if (!hci_le_ev_skb_pull(hdev, skb,
+					HCI_EV_LE_PER_ADV_RESPONSE_REPORT,
+					rsp->data_len))
+			return;
+	}
+
+	len -= skb->len;
+
+	hci_dev_lock(hdev);
+
+	adv = hci_le_ext_adv_owner(hdev, ev->handle);
+	if (adv && adv->num_subevents)
+		mgmt_pa_response_report(hdev, adv->instance, ev->subevent,
+					ev->tx_status, ev->num_responses,
+					responses, len);
+
+	hci_dev_unlock(hdev);
+}
+
 static void hci_le_read_all_remote_features_evt(struct hci_dev *hdev,
 						void *data, struct sk_buff *skb)
 {
@@ -8479,6 +8560,15 @@ static const struct hci_le_ev {
 		     hci_le_big_info_adv_report_evt,
 		     sizeof(struct hci_evt_le_big_info_adv_report),
 		     HCI_MAX_LE_SUBEVT_PLEN),
+	/* [0x27 = HCI_EV_LE_PER_ADV_SUBEVENT_DATA_REQ] */
+	HCI_LE_EV(HCI_EV_LE_PER_ADV_SUBEVENT_DATA_REQ,
+		  hci_le_per_adv_subevent_data_req_evt,
+		  sizeof(struct hci_ev_le_per_adv_subevent_data_req)),
+	/* [0x28 = HCI_EV_LE_PER_ADV_RESPONSE_REPORT] */
+	HCI_LE_EV_VL(HCI_EV_LE_PER_ADV_RESPONSE_REPORT,
+		     hci_le_per_adv_response_report_evt,
+		     sizeof(struct hci_ev_le_per_adv_response_report),
+		     HCI_MAX_LE_SUBEVT_PLEN),
 	/* [0x2b = HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE] */
 	HCI_LE_EV_VL(HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE,
 		     hci_le_read_all_remote_features_evt,
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 05151cf6f413..71005596f7df 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5099,6 +5099,11 @@ static int hci_le_set_event_mask_sync(struct hci_dev *hdev)
 	if (ll_ext_feature_capable(hdev))
 		events[5] |= BIT(2);
 
+	if (pawr_adv_capable(hdev)) {
+		events[4] |= 0x40;	/* LE PA Subevent Data Request */
+		events[4] |= 0x80;	/* LE PA Response Report */
+	}
+
 	if (le_cs_capable(hdev)) {
 		/* Channel Sounding events */
 		events[5] |= 0x08;	/* LE CS Read Remote Supported Cap Complete event */
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c0e655a189e0..495b3e28e577 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -132,6 +132,7 @@ static const u16 mgmt_commands[] = {
 	MGMT_OP_HCI_CMD_SYNC,
 	MGMT_OP_ADD_PERIODIC_ADV_PARAMS,
 	MGMT_OP_ADD_PERIODIC_ADV_DATA,
+	MGMT_OP_SET_PA_SUBEVENT_DATA,
 };
 
 static const u16 mgmt_events[] = {
@@ -180,6 +181,8 @@ static const u16 mgmt_events[] = {
 	MGMT_EV_ADV_MONITOR_DEVICE_FOUND,
 	MGMT_EV_ADV_MONITOR_DEVICE_LOST,
 	MGMT_EV_SECURITY_LEVEL_CHANGED,
+	MGMT_EV_PA_SUBEVENT_DATA_REQUEST,
+	MGMT_EV_PA_RESPONSE_REPORT,
 };
 
 static const u16 mgmt_untrusted_commands[] = {
@@ -10014,6 +10017,122 @@ static int add_periodic_adv_data(struct sock *sk, struct hci_dev *hdev,
 	return err;
 }
 
+/* The controller's answer to LE Set Periodic Advertising Subevent Data. The
+ * commands are answered in the order they were sent.
+ */
+void mgmt_set_pa_subevent_data_complete(struct hci_dev *hdev, u8 status)
+{
+	struct mgmt_cp_set_pa_subevent_data *cp;
+	struct mgmt_rp_set_pa_subevent_data rp;
+	struct mgmt_pending_cmd *cmd;
+
+	cmd = pending_find(MGMT_OP_SET_PA_SUBEVENT_DATA, hdev);
+	if (!cmd)
+		return;
+
+	cp = cmd->param;
+
+	if (status) {
+		mgmt_cmd_status(cmd->sk, hdev->id, cmd->opcode,
+				mgmt_status(status));
+	} else {
+		rp.instance = cp->instance;
+		mgmt_cmd_complete(cmd->sk, hdev->id, cmd->opcode,
+				  MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
+	}
+
+	mgmt_pending_remove(cmd);
+}
+
+static int set_pa_subevent_data(struct sock *sk, struct hci_dev *hdev,
+				void *data, u16 data_len)
+{
+	DEFINE_RAW_FLEX(struct hci_cp_le_set_per_adv_subevent_data, hci_cp,
+			subevents, HCI_MAX_PER_ADV_SUBEVENT_DATA_LEN);
+	struct mgmt_cp_set_pa_subevent_data *cp = data;
+	struct mgmt_pa_subevent_data *subevent;
+	struct mgmt_pending_cmd *cmd;
+	struct adv_info *adv;
+	u16 len = data_len - sizeof(*cp);
+	u16 left = len;
+	u8 *ptr = cp->subevents;
+	int err;
+	u8 i;
+
+	bt_dev_dbg(hdev, "sock %p", sk);
+
+	BUILD_BUG_ON(sizeof(struct mgmt_pa_subevent_data) !=
+		     sizeof(struct hci_le_per_adv_subevent_data));
+
+	/* One HCI command takes it all, or nothing is sent */
+	if (left > HCI_MAX_PER_ADV_SUBEVENT_DATA_LEN)
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_SET_PA_SUBEVENT_DATA,
+				       MGMT_STATUS_INVALID_PARAMS);
+
+	for (i = 0; i < cp->num_subevents; i++) {
+		subevent = (void *)ptr;
+
+		if (left < sizeof(*subevent) ||
+		    left < sizeof(*subevent) + subevent->data_len)
+			return mgmt_cmd_status(sk, hdev->id,
+					       MGMT_OP_SET_PA_SUBEVENT_DATA,
+					       MGMT_STATUS_INVALID_PARAMS);
+
+		ptr += sizeof(*subevent) + subevent->data_len;
+		left -= sizeof(*subevent) + subevent->data_len;
+	}
+
+	if (!cp->num_subevents || left)
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_SET_PA_SUBEVENT_DATA,
+				       MGMT_STATUS_INVALID_PARAMS);
+
+	hci_dev_lock(hdev);
+
+	if (!hdev_is_powered(hdev)) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_SET_PA_SUBEVENT_DATA,
+				      MGMT_STATUS_REJECTED);
+		goto unlock;
+	}
+
+	adv = hci_find_adv_instance(hdev, cp->instance);
+	if (!adv || !adv->periodic || !adv->num_subevents) {
+		err = mgmt_cmd_status(sk, hdev->id,
+				      MGMT_OP_SET_PA_SUBEVENT_DATA,
+				      MGMT_STATUS_INVALID_PARAMS);
+		goto unlock;
+	}
+
+	cmd = mgmt_pending_add(sk, MGMT_OP_SET_PA_SUBEVENT_DATA, hdev, data,
+			       data_len);
+	if (!cmd) {
+		err = -ENOMEM;
+		goto unlock;
+	}
+
+	/* struct mgmt_pa_subevent_data has the layout of the HCI one */
+	hci_cp->handle = adv->handle;
+	hci_cp->num_subevents = cp->num_subevents;
+	memcpy(hci_cp->subevents, cp->subevents, len);
+
+	/* The controller wants the data within its lead time, a few tens of
+	 * milliseconds. The command is therefore not queued with
+	 * hci_cmd_sync_queue(): it would wait behind sequences which block
+	 * for an event, such as creating a connection.
+	 */
+	err = hci_send_cmd(hdev, HCI_OP_LE_SET_PER_ADV_SUBEVENT_DATA,
+			   struct_size(hci_cp, subevents, len), hci_cp);
+	if (err < 0)
+		mgmt_pending_remove(cmd);
+
+unlock:
+	hci_dev_unlock(hdev);
+
+	return err;
+}
+
 static void remove_advertising_complete(struct hci_dev *hdev, void *data,
 					int err)
 {
@@ -10278,6 +10397,8 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
 	{ add_periodic_adv_params, MGMT_ADD_PERIODIC_ADV_PARAMS_SIZE },
 	{ add_periodic_adv_data,   MGMT_ADD_PERIODIC_ADV_DATA_SIZE,
 						HCI_MGMT_VAR_LEN },
+	{ set_pa_subevent_data,    MGMT_SET_PA_SUBEVENT_DATA_SIZE,
+						HCI_MGMT_VAR_LEN },
 };
 
 void mgmt_index_added(struct hci_dev *hdev)
@@ -11131,6 +11252,47 @@ void mgmt_adv_monitor_device_lost(struct hci_dev *hdev, u16 handle,
 		   NULL);
 }
 
+void mgmt_pa_subevent_data_request(struct hci_dev *hdev, u8 instance,
+				   u8 subevent_start, u8 subevent_data_count)
+{
+	struct mgmt_ev_pa_subevent_data_request ev;
+
+	ev.instance = instance;
+	ev.subevent_start = subevent_start;
+	ev.subevent_data_count = subevent_data_count;
+
+	mgmt_event(MGMT_EV_PA_SUBEVENT_DATA_REQUEST, hdev, &ev, sizeof(ev),
+		   NULL);
+}
+
+/* responses: num_responses entries of struct hci_le_per_adv_response, which
+ * has the layout of struct mgmt_pa_response, len octets in total.
+ */
+void mgmt_pa_response_report(struct hci_dev *hdev, u8 instance, u8 subevent,
+			     u8 tx_status, u8 num_responses,
+			     const void *responses, u16 len)
+{
+	struct mgmt_ev_pa_response_report *ev;
+	struct sk_buff *skb;
+
+	BUILD_BUG_ON(sizeof(struct mgmt_pa_response) !=
+		     sizeof(struct hci_le_per_adv_response));
+
+	skb = mgmt_alloc_skb(hdev, MGMT_EV_PA_RESPONSE_REPORT,
+			     sizeof(*ev) + len);
+	if (!skb)
+		return;
+
+	ev = skb_put(skb, sizeof(*ev));
+	ev->instance = instance;
+	ev->subevent = subevent;
+	ev->tx_status = tx_status;
+	ev->num_responses = num_responses;
+	skb_put_data(skb, responses, len);
+
+	mgmt_event_skb(skb, NULL);
+}
+
 static void mgmt_send_adv_monitor_device_found(struct hci_dev *hdev,
 					       struct sk_buff *skb,
 					       struct sock *skip_sk,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: Bluetooth: Periodic advertising and PAwR over MGMT
  2026-12-03 22:14 ` [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
@ 2026-12-04  2:11   ` bluez.test.bot
  0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2026-12-04  2:11 UTC (permalink / raw)
  To: linux-bluetooth, rolandschober1968

[-- Attachment #1: Type: text/plain, Size: 6746 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/series/1231163/

---Test result---

Test Summary:
CheckPatch                    FAIL      4.21 seconds
VerifyFixes                   PASS      0.04 seconds
VerifySignedoff               PASS      0.04 seconds
GitLint                       PASS      0.89 seconds
SubjectPrefix                 PASS      0.23 seconds
BuildKernel                   PASS      20.39 seconds
CheckAllWarning               PASS      23.14 seconds
CheckSparse                   WARNING   24.63 seconds
BuildKernel32                 PASS      20.27 seconds
CheckKernelLLVM               PASS      22.12 seconds
TestRunnerSetup               PASS      476.01 seconds
TestRunner_l2cap-tester       PASS      14.16 seconds
TestRunner_iso-tester         PASS      11.53 seconds
TestRunner_bnep-tester        PASS      3.10 seconds
TestRunner_mgmt-tester        PASS      84.57 seconds
TestRunner_rfcomm-tester      PASS      4.37 seconds
TestRunner_sco-tester         PASS      5.36 seconds
TestRunner_ioctl-tester       PASS      4.45 seconds
TestRunner_mesh-tester        PASS      4.38 seconds
TestRunner_smp-tester         PASS      4.25 seconds
TestRunner_userchan-tester    PASS      3.16 seconds
TestRunner_6lowpan-tester     PASS      4.29 seconds
IncrementalBuild              PASS      60.98 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[RFC,v2,1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions
WARNING: Non-standard signature: Assisted-by:
#132: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#132: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 89 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052296.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,v2,2/6] Bluetooth: hci_sync: Disable PA before removing an advertising set
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#144: 
[1] https://patchwork.kernel.org/project/bluetooth/patch/20261127085525.264299-8-rolandschober1968@gmail.com/

WARNING: Non-standard signature: Assisted-by:
#147: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#147: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 2 warnings, 0 checks, 55 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052297.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,v2,3/6] Bluetooth: hci_event: Stop PA when an advertising set times out
WARNING: Non-standard signature: Assisted-by:
#134: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#134: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 38 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052298.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,v2,4/6] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command
WARNING: Non-standard signature: Assisted-by:
#139: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#139: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 270 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052299.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,v2,5/6] Bluetooth: MGMT: Add Add Periodic Advertising Data command
WARNING: Non-standard signature: Assisted-by:
#128: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#128: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 140 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052300.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


[RFC,v2,6/6] Bluetooth: MGMT: Add PAwR subevent data and response reports
WARNING: Non-standard signature: Assisted-by:
#138: 
Assisted-by: Claude:claude-fable-5-2

ERROR: Unrecognized email address: 'Claude:claude-fable-5-2'
#138: 
Assisted-by: Claude:claude-fable-5-2

total: 1 errors, 1 warnings, 0 checks, 387 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.

/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15052301.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

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


##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):


https://github.com/bluez/bluetooth-next/pull/1285

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-12-04  2:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 22:13 [RFC PATCH v2 0/6] Bluetooth: Periodic advertising and PAwR over MGMT Roland Schober
2026-12-03 22:14 ` [RFC PATCH v2 1/6] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
2026-12-04  2:11   ` Bluetooth: Periodic advertising and PAwR over MGMT bluez.test.bot
2026-12-03 22:14 ` [RFC PATCH v2 2/6] Bluetooth: hci_sync: Disable PA before removing an advertising set Roland Schober
2026-12-03 22:14 ` [RFC PATCH v2 3/6] Bluetooth: hci_event: Stop PA when an advertising set times out Roland Schober
2026-12-03 22:14 ` [RFC PATCH v2 4/6] Bluetooth: MGMT: Add Add Periodic Advertising Parameters command Roland Schober
2026-12-03 22:14 ` [RFC PATCH v2 5/6] Bluetooth: MGMT: Add Add Periodic Advertising Data command Roland Schober
2026-12-03 22:14 ` [RFC PATCH v2 6/6] Bluetooth: MGMT: Add PAwR subevent data and response reports Roland Schober
  -- strict thread matches above, loose matches on Subject: below --
2026-11-27  8:53 [RFC PATCH 1/5] Bluetooth: hci: Add Periodic Advertising with Responses definitions Roland Schober
2026-11-27 13:58 ` Bluetooth: Periodic advertising and PAwR over MGMT bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox