diff mbox series

[1/2] Set temp if device is bcast source even if addr is private

Message ID 20230830132915.72153-2-silviu.barbulescu@nxp.com (mailing list archive)
State New, archived
Headers show
Series Set device non temp when synchronized with bcast source | 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/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Silviu Florian Barbulescu Aug. 30, 2023, 1:29 p.m. UTC
For audio LE broadcast we need to set the device temporary flag eaven
if the address is private

---
 src/device.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 30, 2023, 8:51 p.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=780614

---Test result---

Test Summary:
CheckPatch                    PASS      1.02 seconds
GitLint                       PASS      0.67 seconds
BuildEll                      PASS      34.92 seconds
BluezMake                     PASS      1229.43 seconds
MakeCheck                     PASS      13.21 seconds
MakeDistcheck                 PASS      203.48 seconds
CheckValgrind                 PASS      330.33 seconds
CheckSmatch                   PASS      457.77 seconds
bluezmakeextell               PASS      136.69 seconds
IncrementalBuild              PASS      2114.09 seconds
ScanBuild                     PASS      1458.08 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 9b58e0c4e..9ceffa118 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5945,8 +5945,17 @@  void btd_device_set_temporary(struct btd_device *device, bool temporary)
 	if (device->temporary == temporary)
 		return;
 
-	if (device_address_is_private(device))
-		return;
+	if (device_address_is_private(device)) {
+		/* For audio LE broadcast, we need to set the device
+		 * temporary flag even if the address is private.
+		 * If the device that is temporarily set on
+		 * has BCAA_SERVICE_UUID (is a broadcast source)
+		 * will set the temporary flag even if the address
+		 * is private.
+		 */
+		if (!btd_device_has_uuid(device, BCAA_SERVICE_UUID))
+			return;
+	}
 
 	DBG("temporary %d", temporary);