diff --git a/test/hciemu.c b/test/hciemu.c
index f2879ba..ccd6cc3 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
+#include <bluetooth/l2cap.h>
#define VHCI_DEV "/dev/vhci"
}
}
+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;
+
+ switch (ocf) {
+ case OCF_READ_LOCAL_AMP_INFO:
+ memset(&ai, 0, sizeof(ai));
+
+ /* BT only */
+ ai.amp_status = 0x01;
+ ai.max_pdu_size = htobl(L2CAP_DEFAULT_MTU);
+ ai.controller_type = HCI_AMP;
+ ai.max_amp_assoc_length = htobl(HCI_MAX_ACL_SIZE);
+ /* No flushing at all */
+ ai.max_flush_timeout = 0xFFFFFFFF;
+ ai.best_effort_flush_timeout = 0xFFFFFFFF;
+
+ command_complete(ogf, ocf, sizeof(ai), &ai);
+ break;
+
+ default:
+ status = 0x01;
+ command_complete(ogf, ocf, 1, &status);
+ break;
+ }
+}
+
static void hci_command(uint8_t *data)
{
hci_command_hdr *ch;
case OGF_INFO_PARAM:
hci_info_param(ocf, ch->plen, ptr);
break;
+
+ case OGF_STATUS_PARAM:
+ hci_status_param(ocf, ch->plen, ptr);
+ break;
}
}