summaryrefslogtreecommitdiff
path: root/emulator
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2016-07-04 19:21:44 +0200
committerMarcel Holtmann <marcel@holtmann.org>2016-07-04 19:21:44 +0200
commit12cd2eda1a7648833ddfa39c0d02c90693fd2d99 (patch)
treea35fa517d2f8137b3dad160f1fd60660962db7bf /emulator
parent03f0497691537681a75fe498a6ca97e3f9dfbb64 (diff)
downloadbluez-12cd2eda1a7648833ddfa39c0d02c90693fd2d99.tar.gz
lib: Define HCI_PRIMARY and use it instead of HCI_BREDR
Diffstat (limited to 'emulator')
-rw-r--r--emulator/hciemu.c3
-rw-r--r--emulator/le.c2
-rw-r--r--emulator/vhci.c6
3 files changed, 6 insertions, 5 deletions
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 6a534990b..ea1e3cf79 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -243,7 +243,8 @@ static bool create_vhci(struct hciemu *hciemu)
}
create_req[0] = HCI_VENDOR_PKT;
- create_req[1] = HCI_BREDR;
+ create_req[1] = HCI_PRIMARY;
+
written = write(fd, create_req, sizeof(create_req));
if (written < 0) {
close(fd);
diff --git a/emulator/le.c b/emulator/le.c
index 82ae573f4..d7ee297c0 100644
--- a/emulator/le.c
+++ b/emulator/le.c
@@ -1881,7 +1881,7 @@ struct bt_le *bt_le_new(void)
}
setup_cmd[0] = HCI_VENDOR_PKT;
- setup_cmd[1] = HCI_BREDR;
+ setup_cmd[1] = HCI_PRIMARY;
if (write(hci->vhci_fd, setup_cmd, sizeof(setup_cmd)) < 0) {
close(hci->vhci_fd);
diff --git a/emulator/vhci.c b/emulator/vhci.c
index 6bba4e2c6..8dec20a08 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
@@ -105,15 +105,15 @@ struct vhci *vhci_open(enum vhci_type type)
switch (type) {
case VHCI_TYPE_BREDRLE:
btdev_type = BTDEV_TYPE_BREDRLE;
- ctrl_type = HCI_BREDR;
+ ctrl_type = HCI_PRIMARY;
break;
case VHCI_TYPE_BREDR:
btdev_type = BTDEV_TYPE_BREDR;
- ctrl_type = HCI_BREDR;
+ ctrl_type = HCI_PRIMARY;
break;
case VHCI_TYPE_LE:
btdev_type = BTDEV_TYPE_LE;
- ctrl_type = HCI_BREDR;
+ ctrl_type = HCI_PRIMARY;
break;
case VHCI_TYPE_AMP:
btdev_type = BTDEV_TYPE_AMP;