summaryrefslogtreecommitdiff
path: root/emulator/vhci.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-10-07 18:14:09 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-10-10 13:06:16 -0700
commitc2bf15137410c92f346ff8031bdfaa756fb8b16e (patch)
treefaa740c29c53594e04c60dd6946f4466d7a33b6a /emulator/vhci.c
parentc94cdbc6d73ffd818d862975895d48dd01361234 (diff)
downloadbluez-c2bf15137410c92f346ff8031bdfaa756fb8b16e.tar.gz
vhci: Add function to interact with force_static_address
This adds functions that can be used to set debugfs force_static_address.
Diffstat (limited to 'emulator/vhci.c')
-rw-r--r--emulator/vhci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/emulator/vhci.c b/emulator/vhci.c
index 4295e30ef..a12b11e0f 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
@@ -257,3 +257,13 @@ int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode)
{
return btdev_set_emu_opcode(vhci->btdev, opcode);
}
+
+int vhci_set_force_static_address(struct vhci *vhci, bool enable)
+{
+ char val;
+
+ val = (enable) ? 'Y' : 'N';
+
+ return vhci_debugfs_write(vhci, "force_static_address", &val,
+ sizeof(val));
+}