diff mbox series

[BlueZ,1/3] btdev: Add support for setting bdaddr

Message ID 20221008011410.1907549-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit c94cdbc6d73ffd818d862975895d48dd01361234
Headers show
Series [BlueZ,1/3] btdev: Add support for setting bdaddr | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/incremental_build success Pass
tedd_an/scan_build success Pass

Commit Message

Luiz Augusto von Dentz Oct. 8, 2022, 1:14 a.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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(+)

Comments

bluez.test.bot@gmail.com Oct. 8, 2022, 3:03 a.m. UTC | #1
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
patchwork-bot+bluetooth@kernel.org Oct. 10, 2022, 9 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri,  7 Oct 2022 18:14:08 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> 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!
diff mbox series

Patch

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);