btdev: Add support for setting bdaddr
Luiz Augusto von Dentz
maintainerPATCH 1/1 btdev: Add support for setting bdaddr
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(+)
emulator/btdev.c +10 -0
@@ -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;
emulator/btdev.h +2 -0
@@ -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);
Signature · 1 line
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=683836
---Test result---
Test Summary:
CheckPatch PASS 1.45 seconds GitLint PASS 1.06 seconds Prep - Setup ELL PASS 26.83 seconds Build - Prep PASS 0.85 seconds Build - Configure PASS 8.58 seconds Build - Make PASS 925.68 seconds Make Check PASS 11.96 seconds Make Check w/Valgrind PASS 290.02 seconds Make Distcheck PASS 233.17 seconds Build w/ext ELL - Configure PASS 8.65 seconds Build w/ext ELL - Make PASS 84.14 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build PASS 512.43 seconds
---
Regards,
Linux Bluetooth