linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises
@ 2023-09-27  7:58 Iulia Tanasescu
  2023-09-27  7:58 ` [PATCH 1/1] " Iulia Tanasescu
  0 siblings, 1 reply; 6+ messages in thread
From: Iulia Tanasescu @ 2023-09-27  7:58 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

Some Broadcast scenarios require for a broadcast listener to listen for
a broadcaster only for PA sync.

This patch adds support for binding to a broadcaster address without
asking for any BIS to sync with.

Iulia Tanasescu (1):
  Bluetooth: ISO: Allow binding a bcast listener to 0 bises

 net/bluetooth/hci_conn.c | 2 +-
 net/bluetooth/iso.c      | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)


base-commit: 091e25d6b54992d1d702ae91cbac139d4c243251
-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises
  2023-09-27  7:58 [PATCH 0/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises Iulia Tanasescu
@ 2023-09-27  7:58 ` Iulia Tanasescu
  2023-09-27  8:44   ` bluez.test.bot
  2023-09-27 21:48   ` [PATCH 1/1] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 6+ messages in thread
From: Iulia Tanasescu @ 2023-09-27  7:58 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

This makes it possible to bind a broadcast listener to a broadcaster
address without asking for any BIS indexes to sync with.

Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
---
 net/bluetooth/hci_conn.c | 2 +-
 net/bluetooth/iso.c      | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index e62a5f368a51..c4395d34da70 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -2138,7 +2138,7 @@ int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon,
 	} pdu;
 	int err;
 
-	if (num_bis > sizeof(pdu.bis))
+	if (num_bis < 0x01 || num_bis > sizeof(pdu.bis))
 		return -EINVAL;
 
 	err = qos_set_big(hdev, qos);
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 2132a16be93c..8ab7ea5ebedf 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -790,8 +790,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
 	BT_DBG("sk %p bc_sid %u bc_num_bis %u", sk, sa->iso_bc->bc_sid,
 	       sa->iso_bc->bc_num_bis);
 
-	if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc) ||
-	    sa->iso_bc->bc_num_bis < 0x01 || sa->iso_bc->bc_num_bis > 0x1f)
+	if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc))
 		return -EINVAL;
 
 	bacpy(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: Bluetooth: ISO: Allow binding a bcast listener to 0 bises
  2023-09-27  7:58 ` [PATCH 1/1] " Iulia Tanasescu
@ 2023-09-27  8:44   ` bluez.test.bot
  2023-09-27 21:48   ` [PATCH 1/1] " Luiz Augusto von Dentz
  1 sibling, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2023-09-27  8:44 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

[-- Attachment #1: Type: text/plain, Size: 1427 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=787934

---Test result---

Test Summary:
CheckPatch                    PASS      0.95 seconds
GitLint                       PASS      0.33 seconds
SubjectPrefix                 PASS      0.10 seconds
BuildKernel                   PASS      40.16 seconds
CheckAllWarning               PASS      44.43 seconds
CheckSparse                   PASS      50.99 seconds
CheckSmatch                   PASS      136.07 seconds
BuildKernel32                 PASS      38.81 seconds
TestRunnerSetup               PASS      600.28 seconds
TestRunner_l2cap-tester       PASS      36.44 seconds
TestRunner_iso-tester         PASS      60.29 seconds
TestRunner_bnep-tester        PASS      12.51 seconds
TestRunner_mgmt-tester        PASS      255.74 seconds
TestRunner_rfcomm-tester      PASS      19.34 seconds
TestRunner_sco-tester         PASS      22.27 seconds
TestRunner_ioctl-tester       PASS      21.76 seconds
TestRunner_mesh-tester        PASS      16.73 seconds
TestRunner_smp-tester         PASS      17.08 seconds
TestRunner_userchan-tester    PASS      15.17 seconds
IncrementalBuild              PASS      38.15 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises
  2023-09-27  7:58 ` [PATCH 1/1] " Iulia Tanasescu
  2023-09-27  8:44   ` bluez.test.bot
@ 2023-09-27 21:48   ` Luiz Augusto von Dentz
  2023-09-28 14:32     ` Iulia Tanasescu
  1 sibling, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2023-09-27 21:48 UTC (permalink / raw)
  To: Iulia Tanasescu
  Cc: linux-bluetooth, claudia.rosu, mihai-octavian.urzica,
	silviu.barbulescu, vlad.pruteanu, andrei.istodorescu

Hi Iulia,

On Wed, Sep 27, 2023 at 12:59 AM Iulia Tanasescu
<iulia.tanasescu@nxp.com> wrote:
>
> This makes it possible to bind a broadcast listener to a broadcaster
> address without asking for any BIS indexes to sync with.

Is the intend to use this logic for discovering broadcaster? I guess
we should make it clearer and perhaps have iso-tester also testing its
behavior.

> Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
> ---
>  net/bluetooth/hci_conn.c | 2 +-
>  net/bluetooth/iso.c      | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index e62a5f368a51..c4395d34da70 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -2138,7 +2138,7 @@ int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon,
>         } pdu;
>         int err;
>
> -       if (num_bis > sizeof(pdu.bis))
> +       if (num_bis < 0x01 || num_bis > sizeof(pdu.bis))
>                 return -EINVAL;
>
>         err = qos_set_big(hdev, qos);
> diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
> index 2132a16be93c..8ab7ea5ebedf 100644
> --- a/net/bluetooth/iso.c
> +++ b/net/bluetooth/iso.c
> @@ -790,8 +790,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
>         BT_DBG("sk %p bc_sid %u bc_num_bis %u", sk, sa->iso_bc->bc_sid,
>                sa->iso_bc->bc_num_bis);
>
> -       if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc) ||
> -           sa->iso_bc->bc_num_bis < 0x01 || sa->iso_bc->bc_num_bis > 0x1f)
> +       if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc))
>                 return -EINVAL;
>
>         bacpy(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr);
> --
> 2.39.2
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises
  2023-09-27 21:48   ` [PATCH 1/1] " Luiz Augusto von Dentz
@ 2023-09-28 14:32     ` Iulia Tanasescu
  0 siblings, 0 replies; 6+ messages in thread
From: Iulia Tanasescu @ 2023-09-28 14:32 UTC (permalink / raw)
  To: luiz.dentz
  Cc: andrei.istodorescu, claudia.rosu, iulia.tanasescu,
	linux-bluetooth, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu

Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Thursday, September 28, 2023 12:49 AM
> To: Iulia Tanasescu <iulia.tanasescu@nxp.com>
> Cc: linux-bluetooth@vger.kernel.org; Claudia Cristina Draghicescu
> <claudia.rosu@nxp.com>; Mihai-Octavian Urzica <mihai-
> octavian.urzica@nxp.com>; Silviu Florian Barbulescu
> <silviu.barbulescu@nxp.com>; Vlad Pruteanu <vlad.pruteanu@nxp.com>;
> Andrei Istodorescu <andrei.istodorescu@nxp.com>
> Subject: Re: [PATCH 1/1] Bluetooth: ISO: Allow binding a bcast listener
> to 0 bises
> 
> Hi Iulia,
> 
> On Wed, Sep 27, 2023 at 12:59 AM Iulia Tanasescu <iulia.tanasescu@nxp.com>
> wrote:
> >
> > This makes it possible to bind a broadcast listener to a broadcaster
> > address without asking for any BIS indexes to sync with.
> 
> Is the intend to use this logic for discovering broadcaster? I guess we should
> make it clearer and perhaps have iso-tester also testing its behavior.
> 

I have been working on new unit tests for BASS, and some of them require
the BASS Server to only sync to the PA transmitted by a source, and not
any BIS - for example, BASS/SR/CP/BV-05-C or BASS/SR/CP/BV-06-C.

So basically the BASS Server will call bt_io_listen with defer setup enabled,
it will just perform PA sync, and it will notify the BASS Client about it
without also continuing to perform BIG sync.

I submitted a patch with an iso-tester test for this case.

> > Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
> > ---
> >  net/bluetooth/hci_conn.c | 2 +-
> >  net/bluetooth/iso.c      | 3 +--
> >  2 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index
> > e62a5f368a51..c4395d34da70 100644
> > --- a/net/bluetooth/hci_conn.c
> > +++ b/net/bluetooth/hci_conn.c
> > @@ -2138,7 +2138,7 @@ int hci_le_big_create_sync(struct hci_dev *hdev,
> struct hci_conn *hcon,
> >         } pdu;
> >         int err;
> >
> > -       if (num_bis > sizeof(pdu.bis))
> > +       if (num_bis < 0x01 || num_bis > sizeof(pdu.bis))
> >                 return -EINVAL;
> >
> >         err = qos_set_big(hdev, qos);
> > diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index
> > 2132a16be93c..8ab7ea5ebedf 100644
> > --- a/net/bluetooth/iso.c
> > +++ b/net/bluetooth/iso.c
> > @@ -790,8 +790,7 @@ static int iso_sock_bind_bc(struct socket *sock,
> struct sockaddr *addr,
> >         BT_DBG("sk %p bc_sid %u bc_num_bis %u", sk, sa->iso_bc->bc_sid,
> >                sa->iso_bc->bc_num_bis);
> >
> > -       if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc) ||
> > -           sa->iso_bc->bc_num_bis < 0x01 || sa->iso_bc->bc_num_bis > 0x1f)
> > +       if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc))
> >                 return -EINVAL;
> >
> >         bacpy(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr);
> > --
> > 2.39.2
> >
> 
> 
> --
> Luiz Augusto von Dentz

Regards,
Iulia


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Bluetooth: ISO: Allow binding a bcast listener to 0 bises
  2023-10-03 14:49 Iulia Tanasescu
@ 2023-10-03 15:38 ` bluez.test.bot
  0 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2023-10-03 15:38 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

[-- Attachment #1: Type: text/plain, Size: 1703 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=789631

---Test result---

Test Summary:
CheckPatch                    PASS      0.81 seconds
GitLint                       PASS      0.30 seconds
SubjectPrefix                 PASS      0.10 seconds
BuildKernel                   PASS      34.70 seconds
CheckAllWarning               PASS      38.04 seconds
CheckSparse                   PASS      44.49 seconds
CheckSmatch                   PASS      116.78 seconds
BuildKernel32                 PASS      33.12 seconds
TestRunnerSetup               PASS      510.61 seconds
TestRunner_l2cap-tester       PASS      31.12 seconds
TestRunner_iso-tester         PASS      54.18 seconds
TestRunner_bnep-tester        PASS      10.63 seconds
TestRunner_mgmt-tester        FAIL      229.78 seconds
TestRunner_rfcomm-tester      PASS      16.20 seconds
TestRunner_sco-tester         PASS      19.63 seconds
TestRunner_ioctl-tester       PASS      18.64 seconds
TestRunner_mesh-tester        PASS      13.54 seconds
TestRunner_smp-tester         PASS      14.64 seconds
TestRunner_userchan-tester    PASS      12.42 seconds
IncrementalBuild              PASS      32.09 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 497, Passed: 496 (99.8%), Failed: 1, Not Run: 0

Failed Test Cases
LL Privacy - Add Device 5 (2 Devices to RL)          Failed       0.424 seconds


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-03 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27  7:58 [PATCH 0/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises Iulia Tanasescu
2023-09-27  7:58 ` [PATCH 1/1] " Iulia Tanasescu
2023-09-27  8:44   ` bluez.test.bot
2023-09-27 21:48   ` [PATCH 1/1] " Luiz Augusto von Dentz
2023-09-28 14:32     ` Iulia Tanasescu
  -- strict thread matches above, loose matches on Subject: below --
2023-10-03 14:49 Iulia Tanasescu
2023-10-03 15:38 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).