Skip to content

Commit a9fc732

Browse files
committed
Bluetooth: Host: Conditional bt_cmd_send_sync workaround
This commit disables the deadlock workaround in bt_cmd_send_sync when it's not needed, when tx_processor runs on bt_taskq and not on system workqueue. Signed-off-by: Aleksander Wasaznik <[email protected]>
1 parent 83b68dc commit a9fc732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/hci_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ int bt_hci_cmd_send_sync(uint16_t opcode, struct net_buf *buf,
479479
/* Since the commands are now processed in the syswq, we cannot suspend
480480
* and wait. We have to send the command from the current context.
481481
*/
482-
if (k_current_get() == &k_sys_work_q.thread) {
482+
if (!IS_ENABLED(CONFIG_BT_TASKQ_DEDICATED) && k_current_get() == &k_sys_work_q.thread) {
483483
/* drain the command queue until we get to send the command of interest. */
484484
struct net_buf *cmd = NULL;
485485

0 commit comments

Comments
 (0)