[PATCH BlueZ] vhci: Add function to interact with force_static_address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

This adds functions that can be used to set debugfs
force_static_address.
---
 emulator/vhci.c | 10 ++++++++++
 emulator/vhci.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/emulator/vhci.c b/emulator/vhci.c
index 4295e30ef980..a12b11e0f305 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));
+}
diff --git a/emulator/vhci.h b/emulator/vhci.h
index c42e8bde1cd5..6da56cb589fe 100644
--- a/emulator/vhci.h
+++ b/emulator/vhci.h
@@ -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);
-- 
2.37.3




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux