diff options
| author | Weihong Guan <weihong.guan@gmail.com> | 2026-11-11 16:51:30 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-11-11 14:51:52 -0500 |
| commit | daf949c968d485badd6c1fc5b6965ea8175e7dda (patch) | |
| tree | 6c78ba611a470c3aa243e298e074868357ee3cc8 /tools/perf/scripts/python | |
| parent | df33621e70363df4d6963ad5ff19a3ae740c7703 (diff) | |
Bluetooth: hci_sync: Set random address on the set's handle
When the controller supports a single advertising set,
hci_add_adv_instance() gives instance 1 handle 0x00, and the parameters,
data and enable commands for an instance use adv->handle. LE Set
Advertising Set Random Address, from hci_set_adv_set_random_addr_sync(),
still sends the instance number, 0x01, a set the controller doesn't
have, so an instance using a random address, such as a non-connectable
one, never starts:
$ btmgmt add-adv -d 0A09434841445654455354 1
Add Advertising failed with status 0x0d (Invalid Parameters)
< HCI Command: LE Set Extended Advertising Parameters Handle: 0x00
< HCI Command: LE Set Extended Advertising Data Handle: 0x00
< HCI Command: LE Set Advertising Set Random Address
Advertising handle: 0x01
Send the instance's handle, looked up with hdev->lock held.
hci_cc_le_set_adv_set_random_addr() records the address in the instance
numbered as the handle and leaves handle 0x00 alone, as that handle's
address is hdev->random_addr for instance 0. Instance 1's address on
handle 0x00 would then go unrecorded, and its RPA timer never start, so
record it in hci_set_adv_set_random_addr_sync() once the command
succeeds, as the completion does for the other handles.
Fixes: e77f43d531af ("Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1")
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Weihong Guan <weihong.guan@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
