diff options
| author | Weihong Guan <weihong.guan@gmail.com> | 2026-11-11 16:51:31 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-11-11 14:51:59 -0500 |
| commit | e7e877bf658acd15fc7dda1bff3e66d0fa69a061 (patch) | |
| tree | 4c2e7ddd960d11045422519a61b6cd196fdf5674 /tools/perf/scripts/python | |
| parent | daf949c968d485badd6c1fc5b6965ea8175e7dda (diff) | |
Bluetooth: hci_sync: Remove an advertising set by its handle
When the controller supports a single advertising set,
hci_add_adv_instance() gives instance 1 handle 0x00, but
hci_remove_ext_adv_instance_sync() sends the instance number as the
handle of LE Remove Advertising Set, so removing instance 1 fails:
$ btmgmt rm-adv 1
Remove Advertising failed with status 0x03 (Failed)
< HCI Command: LE Remove Advertising Set Handle: 1
> HCI Event: Command Complete
Status: Unknown Advertising Identifier (0x42)
Send the instance's handle, looked up with hdev->lock held. Two more
things follow from the instance and the handle differing:
- hci_cc_le_remove_adv_set() removes the instance numbered as the
handle it sent, which for handle 0x00 is instance 0, so instance 1
would stay in hdev->adv_instances with its RPA timer running, and no
MGMT_EV_ADVERTISING_REMOVED. The completion can't tell instance 1
from instance 0, which the MGMT Set Advertising path removes on the
same handle, so remove instance 1 in
hci_remove_ext_adv_instance_sync() once the command succeeds.
- While Global Advertising is on, it owns handle 0x00
(adv_overridden_by_global()), and the set may be enabled for it, so
the controller would refuse to remove it, with Command Disallowed.
Remove only the instance then, leaving the set to Global
Advertising.
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
