emulator: Add HCI_Write_SSP_Debug_Mode support

This commit is contained in:
Johan Hedberg 2014-02-03 07:49:25 +02:00
parent eda66f7074
commit df39364122

View File

@ -104,6 +104,7 @@ struct btdev {
uint8_t ext_inquiry_fec;
uint8_t ext_inquiry_rsp[240];
uint8_t simple_pairing_mode;
uint8_t ssp_debug_mode;
uint8_t secure_conn_support;
uint8_t le_supported;
uint8_t le_simultaneous;
@ -1454,6 +1455,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
const struct bt_hci_cmd_le_set_event_mask *lsem;
const struct bt_hci_cmd_le_set_adv_data *lsad;
const struct bt_hci_cmd_setup_sync_conn *ssc;
const struct bt_hci_cmd_write_ssp_debug_mode *wsdm;
const struct bt_hci_cmd_le_set_adv_enable *lsae;
const struct bt_hci_cmd_le_set_scan_enable *lsse;
const struct bt_hci_cmd_le_start_encrypt *lse;
@ -2370,6 +2372,15 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
cmd_complete(btdev, opcode, &status, sizeof(status));
break;
case BT_HCI_CMD_WRITE_SSP_DEBUG_MODE:
if (btdev->type == BTDEV_TYPE_LE)
goto unsupported;
wsdm = data;
btdev->ssp_debug_mode = wsdm->mode;
status = BT_HCI_ERR_SUCCESS;
cmd_complete(btdev, opcode, &status, sizeof(status));
break;
case BT_HCI_CMD_LE_RECEIVER_TEST:
if (btdev->type == BTDEV_TYPE_BREDR)
goto unsupported;