diff --git a/test/hciemu.c b/test/hciemu.c
index bfad0dd..3697814 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
static void hci_link_control(uint16_t ocf, int plen, uint8_t *data)
{
- uint8_t status;
-
const uint16_t ogf = OGF_LINK_CTL;
switch (ocf) {
break;
default:
- status = 0x01;
- command_complete(ogf, ocf, 1, &status);
+ command_status(ogf, ocf, 0x01);
break;
}
}
static void hci_link_policy(uint16_t ocf, int plen, uint8_t *data)
{
- uint8_t status;
-
const uint16_t ogf = OGF_INFO_PARAM;
switch (ocf) {
default:
- status = 0x01;
- command_complete(ogf, ocf, 1, &status);
+ command_status(ogf, ocf, 0x01);
break;
}
}
break;
default:
- status = 0x01;
- command_complete(ogf, ocf, 1, &status);
+ command_status(ogf, ocf, status);
break;
}
}
read_local_ext_features_rp ef;
read_buffer_size_rp bs;
read_bd_addr_rp ba;
- uint8_t status;
const uint16_t ogf = OGF_INFO_PARAM;
break;
default:
- status = 0x01;
- command_complete(ogf, ocf, 1, &status);
+ command_status(ogf, ocf, 0x01);
break;
}
}
static void hci_status_param(uint16_t ocf, int plen, uint8_t *data)
{
read_local_amp_info_rp ai;
- uint8_t status;
const uint16_t ogf = OGF_STATUS_PARAM;
break;
default:
- status = 0x01;
- command_complete(ogf, ocf, 1, &status);
+ command_status(ogf, ocf, 0x01);
+ break;
+ }
+}
+
+static void hci_le_control(uint16_t ocf, int plen, uint8_t *data)
+{
+ const uint16_t ogf = OGF_LE_CTL;
+
+ switch (ocf) {
+ default:
+ command_status(ogf, ocf, 0x01);
break;
}
}
case OGF_STATUS_PARAM:
hci_status_param(ocf, ch->plen, ptr);
break;
+
+ case OGF_LE_CTL:
+ hci_le_control(ocf, ch->plen, ptr);
+ break;
+
+ default:
+ command_status(ogf, ocf, 0x01);
+ break;
}
}