Bluetooth: MGMT: Fix Add Device to responding before completing
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 25 Nov 2024 20:42:10 +0000 (15:42 -0500)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 8 Jan 2025 16:14:01 +0000 (11:14 -0500)
commita182d9c84f9c52fb5db895ecceeee8b3a1bf661e
tree1e1b5c4f1225d3b388e81fe3751f11444286f54b
parentc2994b008492db033d40bd767be1620229a3035e
Bluetooth: MGMT: Fix Add Device to responding before completing

Add Device with LE type requires updating resolving/accept list which
requires quite a number of commands to complete and each of them may
fail, so instead of pretending it would always work this checks the
return of hci_update_passive_scan_sync which indicates if everything
worked as intended.

Fixes: e8907f76544f ("Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 3")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c