diff mbox series

[BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off

Message ID 20240703090549.6702-1-quic_prathm@quicinc.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off | 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

Prathibha Madugonde July 3, 2024, 9:05 a.m. UTC
From: Prathibha Madugonde <quic_prathm@quicinc.com>

Fix for GAP/DISC/NONM/BV-02-C
As per GAP.TS.p44 test spec
IUT does not contain General Discoverable mode and Limited Discoverable
mode in the AD Type Flag. IUT shall send AD Type Flag to PASS the test
case, thus set BR/EDR not supported bit in the AD Type Flag when
discoverable is off.

Test steps:
From DUT, bluetoothctl go to menu advertise
set discoverable to off and then advertise on.
In AD Flags BR/EDR not supported BIT shall be set.

---
 src/advertising.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com July 3, 2024, 10:44 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=867894

---Test result---

Test Summary:
CheckPatch                    PASS      1.54 seconds
GitLint                       PASS      0.35 seconds
BuildEll                      PASS      24.81 seconds
BluezMake                     PASS      1719.44 seconds
MakeCheck                     PASS      13.50 seconds
MakeDistcheck                 PASS      180.56 seconds
CheckValgrind                 PASS      256.32 seconds
CheckSmatch                   PASS      365.05 seconds
bluezmakeextell               PASS      124.99 seconds
IncrementalBuild              PASS      1564.80 seconds
ScanBuild                     PASS      1030.41 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/advertising.c b/src/advertising.c
index 5d373e088..e73191c2c 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -734,8 +734,7 @@  static bool set_flags(struct btd_adv_client *client, uint8_t flags)
 	/* Set BR/EDR Not Supported if adapter is not discoverable but the
 	 * instance is.
 	 */
-	if ((flags & (BT_AD_FLAG_GENERAL | BT_AD_FLAG_LIMITED)) &&
-			!btd_adapter_get_discoverable(client->manager->adapter))
+	if (!btd_adapter_get_discoverable(client->manager->adapter))
 		flags |= BT_AD_FLAG_NO_BREDR;
 
 	if (!bt_ad_add_flags(client->data, &flags, 1))
@@ -1499,6 +1498,12 @@  static DBusMessage *parse_advertisement(struct btd_adv_client *client)
 		goto fail;
 	}
 
+	/* GAP.TS.p44 Test Spec GAP/DISC/NONM/BV-02-C
+	 * BR/EDR Not Supported BIT shall be included
+	 * in the AD Type flag.
+	 */
+	set_flags(client, bt_ad_get_flags(client->data));
+
 	err = refresh_advertisement(client, add_adv_callback);
 
 	if (!err)