* [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
@ 2024-07-03 9:05 quic_prathm
0 siblings, 0 replies; 7+ messages in thread
From: quic_prathm @ 2024-07-03 9:05 UTC (permalink / raw)
To: linux-bluetooth
Cc: pmenzel, luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
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(-)
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)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
@ 2024-07-05 5:37 quic_prathm
0 siblings, 0 replies; 7+ messages in thread
From: quic_prathm @ 2024-07-05 5:37 UTC (permalink / raw)
To: linux-bluetooth
Cc: pmenzel, luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
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 | 2 +-
src/advertising.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/client/advertising.c b/client/advertising.c
index a9b865a65..a09802af7 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -498,7 +498,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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
@ 2024-07-05 7:37 quic_prathm
2024-07-05 9:43 ` [BlueZ] " bluez.test.bot
2024-07-05 17:20 ` [PATCH BlueZ] " Luiz Augusto von Dentz
0 siblings, 2 replies; 7+ messages in thread
From: quic_prathm @ 2024-07-05 7:37 UTC (permalink / raw)
To: linux-bluetooth
Cc: pmenzel, luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
2024-07-05 7:37 [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off quic_prathm
@ 2024-07-05 9:43 ` bluez.test.bot
2024-07-05 17:20 ` [PATCH BlueZ] " Luiz Augusto von Dentz
1 sibling, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2024-07-05 9:43 UTC (permalink / raw)
To: linux-bluetooth, quic_prathm
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
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=868660
---Test result---
Test Summary:
CheckPatch PASS 0.32 seconds
GitLint PASS 0.22 seconds
BuildEll PASS 24.57 seconds
BluezMake PASS 1659.26 seconds
MakeCheck PASS 13.14 seconds
MakeDistcheck PASS 176.97 seconds
CheckValgrind PASS 251.17 seconds
CheckSmatch PASS 353.55 seconds
bluezmakeextell PASS 119.49 seconds
IncrementalBuild PASS 1447.26 seconds
ScanBuild PASS 1008.32 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
2024-07-05 7:37 [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off quic_prathm
2024-07-05 9:43 ` [BlueZ] " bluez.test.bot
@ 2024-07-05 17:20 ` Luiz Augusto von Dentz
1 sibling, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-05 17:20 UTC (permalink / raw)
To: quic_prathm
Cc: linux-bluetooth, pmenzel, quic_mohamull, quic_hbandi,
quic_anubhavg
Hi,
On Fri, Jul 5, 2024 at 3:37 AM <quic_prathm@quicinc.com> wrote:
>
> 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 },
Doesn't seems the above change have anything to do with the commit
description, perhaps you want to force it as non-discoverable in case
it is not set? I guess it makes sense but it should probably be made
into its own commit with proper description.
> { "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
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
@ 2024-07-08 7:44 quic_prathm
2024-07-08 16:00 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 7+ messages in thread
From: quic_prathm @ 2024-07-08 7:44 UTC (permalink / raw)
To: linux-bluetooth
Cc: pmenzel, luiz.dentz, quic_mohamull, quic_hbandi, quic_anubhavg
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
2024-07-08 7:44 quic_prathm
@ 2024-07-08 16:00 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-08 16:00 UTC (permalink / raw)
To: Prathibha Madugonde
Cc: linux-bluetooth, pmenzel, luiz.dentz, quic_mohamull, quic_hbandi,
quic_anubhavg
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 8 Jul 2024 13:14:54 +0530 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=42d43b28428f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-08 16:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 7:37 [PATCH BlueZ] Set BREDR not supported bit in AD Flag when discoverable is off quic_prathm
2024-07-05 9:43 ` [BlueZ] " 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox