btdev: fix Command Status command opcodes for Setup Sync Conn
authorPauli Virtanen <pav@iki.fi>
Tue, 1 Aug 2023 16:38:39 +0000 (19:38 +0300)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
The command opcode should be the CMD, not EVT.

emulator/btdev.c

index 8658b41..38dcb18 100755 (executable)
@@ -2685,7 +2685,7 @@ static int cmd_enhanced_setup_sync_conn(struct btdev *dev, const void *data,
        if (cmd->tx_coding_format[0] > 5)
                status = BT_HCI_ERR_INVALID_PARAMETERS;
 
-       cmd_status(dev, status, BT_HCI_EVT_SYNC_CONN_COMPLETE);
+       cmd_status(dev, status, BT_HCI_CMD_ENHANCED_SETUP_SYNC_CONN);
 
        return 0;
 }
@@ -2731,7 +2731,7 @@ done:
 
 static int cmd_setup_sync_conn(struct btdev *dev, const void *data, uint8_t len)
 {
-       cmd_status(dev, BT_HCI_ERR_SUCCESS, BT_HCI_EVT_SYNC_CONN_COMPLETE);
+       cmd_status(dev, BT_HCI_ERR_SUCCESS, BT_HCI_CMD_SETUP_SYNC_CONN);
 
        return 0;
 }