Bluetooth: MGMT: mesh_send: check instances prior disabling advertising
authorChristian Eggers <ceggers@arri.de>
Wed, 25 Jun 2025 13:09:31 +0000 (15:09 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 27 Jun 2025 18:01:02 +0000 (14:01 -0400)
The unconditional call of hci_disable_advertising_sync() in
mesh_send_done_sync() also disables other LE advertisings (non mesh
related).

I am not sure whether this call is required at all, but checking the
adv_instances list (like done at other places) seems to solve the
problem.

Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c

index 5d0f772c7a99edbf0f08114c2531dc685c9f12af..1485b455ade46483ea31b7a02e0dabee088a0010 100644 (file)
@@ -1080,7 +1080,8 @@ static int mesh_send_done_sync(struct hci_dev *hdev, void *data)
        struct mgmt_mesh_tx *mesh_tx;
 
        hci_dev_clear_flag(hdev, HCI_MESH_SENDING);
-       hci_disable_advertising_sync(hdev);
+       if (list_empty(&hdev->adv_instances))
+               hci_disable_advertising_sync(hdev);
        mesh_tx = mgmt_mesh_next(hdev, NULL);
 
        if (mesh_tx)