Skip to contentSkip to conversation

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

PATCH In review [email protected] 2 participants 2 messages Jul 3, 2024 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Set BREDR not supported bit in AD Flag when discoverable is off

From: Prathibha Madugonde <[email protected]>

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(-)
src/advertising.c +7 -2
index 5d373e088..e73191c2c 100644
@@ -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)
Signature · 1 line
2.17.1
#1 lore raw

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