vhci: Add function to interact with force_static_address
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sat, 8 Oct 2022 01:14:09 +0000 (18:14 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
This adds functions that can be used to set debugfs
force_static_address.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
emulator/vhci.c
emulator/vhci.h

index 4295e30..a12b11e 100755 (executable)
@@ -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));
+}
index c42e8bd..6da56cb 100755 (executable)
@@ -28,3 +28,4 @@ int vhci_set_force_wakeup(struct vhci *vhci, bool enable);
 int vhci_set_msft_opcode(struct vhci *vhci, uint16_t opcode);
 int vhci_set_aosp_capable(struct vhci *vhci, bool enable);
 int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode);
+int vhci_set_force_static_address(struct vhci *vhci, bool enable);