emulator: Implement LE Remove CIG
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Sep 2020 20:20:02 +0000 (13:20 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:32 +0000 (19:08 +0530)
This adds support for LE Remove CIG command.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
emulator/btdev.c

index 066c563..e9c3811 100755 (executable)
@@ -2582,6 +2582,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
                struct bt_hci_rsp_le_set_cig_params params;
                uint16_t handle;
        } __attribute__ ((packed)) lscp;
+       struct bt_hci_rsp_le_remove_cig lrc;
        struct bt_hci_cmd_le_setup_iso_path *lesip;
        uint8_t status, page;
 
@@ -3884,6 +3885,15 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 
                break;
 
+       case BT_HCI_CMD_LE_REMOVE_CIG:
+               if (btdev->type != BTDEV_TYPE_BREDRLE52)
+                       goto unsupported;
+               memset(&btdev->le_cig, 0, sizeof(btdev->le_cig));
+               lrc.status = BT_HCI_ERR_SUCCESS;
+               lrc.cig_id = 0x00;
+               cmd_complete(btdev, opcode, &lrc, sizeof(lrc));
+               break;
+
        case BT_HCI_CMD_LE_ACCEPT_CIS:
                if (btdev->type != BTDEV_TYPE_BREDRLE52)
                        goto unsupported;