[PATCH] Bluetooth: HCI: fix disabling of adv instance before updating params

From: Christian Eggers
Date: Mon Jun 30 2025 - 04:02:00 EST


struct adv_info::pending doesn't tell whether advertising is currently
enabled. This is already checked in hci_disable_ext_adv_instance_sync().

Fixes: cba6b758711c ("Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 2")
Signed-off-by: Christian Eggers <ceggers@xxxxxxx>
---
net/bluetooth/hci_sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 77b3691f3423..0066627c05eb 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1345,7 +1345,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
* Command Disallowed error, so we must first disable the
* instance if it is active.
*/
- if (adv && !adv->pending) {
+ if (adv) {
err = hci_disable_ext_adv_instance_sync(hdev, instance);
if (err)
return err;
--
2.43.0