You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/02/03 15:23:00 UTC

[nuttx] branch master updated: sim/hcisocket: correct teardown device index

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new edfae1fe21 sim/hcisocket: correct teardown device index
edfae1fe21 is described below

commit edfae1fe21b7b5feee5aa54ec6592092ae362a0a
Author: chao an <an...@xiaomi.com>
AuthorDate: Fri Feb 3 21:13:05 2023 +0800

    sim/hcisocket: correct teardown device index
    
    Parameter of HCIDEVDOWN should be the corresponding device id, not 0
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 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 7b1973508c..9dc8bd76e1 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;