Dear Prathibha,
Thank you for your patch.
Am 03.07.24 um 09:02 schrieb quic_prathm@xxxxxxxxxxx:
From: Prathibha Madugonde <quic_prathm@xxxxxxxxxxx>
I’d use imperative mood in the commit message summary/title:
s/Added/Add/
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 added BR/EDR not supported bit in the AD Type Flag when
s/added/add/
discoverable is off.
Please document your test setup.
Signed-off-by: Prathibha Madugonde <quic_prathm@xxxxxxxxxxx>
Please following the rules in `HACKING` [1].
---
src/advertising.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/advertising.c b/src/advertising.c
index 5d373e088..cfb239585 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,17 @@ static DBusMessage *parse_advertisement(struct btd_adv_client *client)
goto fail;
}
+ /* GAP.TS.p44 Test Spec GAP/DISC/NONM/BV-02-C
+ * page 158:
+ * IUT does not contain
+ * ‘LE General Discoverable Mode’ flag or the
+ * ‘LE Limited Discoverable Mode’ flag in the Flags AD Type
+ * But AD Flag Type should be there for the test case to
+ * PASS. Thus BR/EDR Not Supported BIT shall be included
+ * in the AD Type flag.
You could re-flow for longer lines.
+ */
+ set_flags(client, bt_ad_get_flags(client->data));
+
err = refresh_advertisement(client, add_adv_callback);
if (!err)
Kind regards,
Paul
[1]:
https://github.com/bluez/bluez/blob/be0b08770e9214592e89589b2dc069426c0d9b91/HACKING#L98