From edfae1fe21b7b5feee5aa54ec6592092ae362a0a Mon Sep 17 00:00:00 2001 From: chao an Date: Fri, 3 Feb 2023 21:13:05 +0800 Subject: [PATCH] sim/hcisocket: correct teardown device index Parameter of HCIDEVDOWN should be the corresponding device id, not 0 Signed-off-by: chao an --- arch/sim/src/sim/posix/sim_hosthcisocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sim/src/sim/posix/sim_hosthcisocket.c b/arch/sim/src/sim/posix/sim_hosthcisocket.c index 7b1973508c4..9dc8bd76e1e 100644 --- a/arch/sim/src/sim/posix/sim_hosthcisocket.c +++ b/arch/sim/src/sim/posix/sim_hosthcisocket.c @@ -196,7 +196,7 @@ int host_bthcisock_open(int dev_idx) /* We must bring the device down before binding to user channel */ - err = ioctl(fd, HCIDEVDOWN, 0); + err = ioctl(fd, HCIDEVDOWN, dev_idx); if (err < 0) { return err;