summaryrefslogtreecommitdiff
path: root/emulator
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-10-14 17:45:41 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-10-18 13:04:28 -0700
commit3f03ea4aebcee5166cd057047b5eb511eda90f42 (patch)
tree2acbd7d9e44aad11683bd2e14d68cee6a1f3ec70 /emulator
parent016084253bbdb1be81c5aef7d446f3c13bb4e823 (diff)
downloadbluez-3f03ea4aebcee5166cd057047b5eb511eda90f42.tar.gz
mgmt-tester: Make use of vhci_set_force_suspend/vhci_set_force_wakeup
This replaces the direct setting debugfs to use vhci instance which properly stores the controller index so it can be used even if there are real controllers in the system.
Diffstat (limited to 'emulator')
-rw-r--r--emulator/hciemu.c8
-rw-r--r--emulator/hciemu.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 3557efc93..4752c8a4d 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -234,6 +234,14 @@ static bool create_vhci(struct hciemu *hciemu)
return true;
}
+struct vhci *hciemu_get_vhci(struct hciemu *hciemu)
+{
+ if (!hciemu)
+ return NULL;
+
+ return hciemu->vhci;
+}
+
struct hciemu_client *hciemu_get_client(struct hciemu *hciemu, int num)
{
const struct queue_entry *entry;
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index 3d3d93b4b..338fa844d 100644
--- a/emulator/hciemu.h
+++ b/emulator/hciemu.h
@@ -45,6 +45,7 @@ typedef void (*hciemu_destroy_func_t)(void *user_data);
bool hciemu_set_debug(struct hciemu *hciemu, hciemu_debug_func_t callback,
void *user_data, hciemu_destroy_func_t destroy);
+struct vhci *hciemu_get_vhci(struct hciemu *hciemu);
struct bthost *hciemu_client_get_host(struct hciemu *hciemu);
const char *hciemu_get_address(struct hciemu *hciemu);