From: <quic_prathm@quicinc.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: <pmenzel@molgen.mpg.de>, <luiz.dentz@gmail.com>,
<quic_mohamull@quicinc.com>, <quic_hbandi@quicinc.com>,
<quic_anubhavg@quicinc.com>
Subject: [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
Date: Fri, 5 Jul 2024 13:07:20 +0530 [thread overview]
Message-ID: <20240705073720.13504-1-quic_prathm@quicinc.com> (raw)
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.
client/advertising.c:
Allowing discoverable property to list in the parsing
function 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.
---
client/advertising.c | 8 +-------
src/advertising.c | 3 +--
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/client/advertising.c b/client/advertising.c
index a9b865a65..4a98121a4 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -416,12 +416,6 @@ static gboolean get_data(const GDBusPropertyTable *property,
return TRUE;
}
-static gboolean discoverable_exists(const GDBusPropertyTable *property,
- void *data)
-{
- return ad.discoverable;
-}
-
static gboolean get_discoverable(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *user_data)
{
@@ -498,7 +492,7 @@ static const GDBusPropertyTable ad_props[] = {
{ "ManufacturerData", "a{qv}", get_manufacturer_data, NULL,
manufacturer_data_exists },
{ "Data", "a{yv}", get_data, NULL, data_exists },
- { "Discoverable", "b", get_discoverable, NULL, discoverable_exists },
+ { "Discoverable", "b", get_discoverable, NULL, NULL },
{ "DiscoverableTimeout", "q", get_discoverable_timeout, NULL,
discoverable_timeout_exists },
{ "Includes", "as", get_includes, NULL, includes_exists },
diff --git a/src/advertising.c b/src/advertising.c
index 5d373e088..af3ed2b93 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))
--
2.17.1
next reply other threads:[~2024-07-05 7:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 7:37 quic_prathm [this message]
2024-07-05 9:43 ` [BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off bluez.test.bot
2024-07-05 17:20 ` [PATCH BlueZ] " Luiz Augusto von Dentz
-- strict thread matches above, loose matches on Subject: below --
2024-07-08 7:44 quic_prathm
2024-07-08 16:00 ` patchwork-bot+bluetooth
2024-07-05 5:37 quic_prathm
2024-07-03 9:05 quic_prathm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240705073720.13504-1-quic_prathm@quicinc.com \
--to=quic_prathm@quicinc.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=pmenzel@molgen.mpg.de \
--cc=quic_anubhavg@quicinc.com \
--cc=quic_hbandi@quicinc.com \
--cc=quic_mohamull@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox