From: Luiz Augusto von Dentz <[email protected]>
This adds btdev_set_bdaddr so it is possible to set an arbritrary
address.
---
emulator/btdev.c | 10 ++++++++++
emulator/btdev.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 3fdfb64a9eba..549f93645684 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -6960,6 +6960,16 @@ const uint8_t *btdev_get_bdaddr(struct btdev *btdev)
return btdev->bdaddr;
}
+bool btdev_set_bdaddr(struct btdev *btdev, const uint8_t *bdaddr)
+{
+ if (!btdev || !bdaddr)
+ return false;
+
+ memcpy(btdev->bdaddr, bdaddr, sizeof(btdev->bdaddr));
+
+ return true;
+}
+
uint8_t *btdev_get_features(struct btdev *btdev)
{
return btdev->features;
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 228bf205cf4b..cad5f699f801 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
@@ -72,6 +72,8 @@ bool btdev_set_debug(struct btdev *btdev, btdev_debug_func_t callback,
void *user_data, btdev_destroy_func_t destroy);
const uint8_t *btdev_get_bdaddr(struct btdev *btdev);
+bool btdev_set_bdaddr(struct btdev *btdev, const uint8_t *bdaddr);
+
uint8_t *btdev_get_features(struct btdev *btdev);
uint8_t btdev_get_scan_enable(struct btdev *btdev);
--
2.37.3
From: Luiz Augusto von Dentz <[email protected]>
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
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=683864
---Test result---
Test Summary:
CheckPatch PASS 3.44 seconds
GitLint PASS 2.31 seconds
Prep - Setup ELL PASS 26.22 seconds
Build - Prep PASS 0.68 seconds
Build - Configure PASS 8.22 seconds
Build - Make PASS 739.73 seconds
Make Check PASS 11.41 seconds
Make Check w/Valgrind PASS 290.45 seconds
Make Distcheck PASS 237.93 seconds
Build w/ext ELL - Configure PASS 8.38 seconds
Build w/ext ELL - Make PASS 84.79 seconds
Incremental Build w/ patches PASS 297.39 seconds
Scan Build PASS 506.66 seconds
---
Regards,
Linux Bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:
On Fri, 7 Oct 2022 18:14:08 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> This adds btdev_set_bdaddr so it is possible to set an arbritrary
> address.
> ---
> emulator/btdev.c | 10 ++++++++++
> emulator/btdev.h | 2 ++
> 2 files changed, 12 insertions(+)
Here is the summary with links:
- [BlueZ,1/3] btdev: Add support for setting bdaddr
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c94cdbc6d73f
- [BlueZ,2/3] vhci: Add function to interact with force_static_address
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c2bf15137410
- [BlueZ,3/3] mgmt-tester: Fix Set Static Address tests
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9065853fe5c7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html