lkml.org 
[lkml]   [2020]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1] Bluetooth: L2CAP: add support for waiting disconnection resp
Hi Marcel,

Let me write a test for that.

However, I cannot seem to run l2cap-tester properly.
On raspberry pi, all of the tests failed to initiate.
On chromeOS, all BREDR tests pass (before and after the change), but
all LE tests timed out on init stage (before and after the change).

I need to find out what went wrong when I execute those tests first.

Thanks,
Archie


On Thu, 23 Apr 2020 at 01:42, Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Archie,
>
> > Whenever we disconnect a L2CAP connection, we would immediately
> > report a disconnection event (EPOLLHUP) to the upper layer, without
> > waiting for the response of the other device.
> >
> > This patch offers an option to wait until we receive a disconnection
> > response before reporting disconnection event, by using the "how"
> > parameter in l2cap_sock_shutdown(). Therefore, upper layer can opt
> > to wait for disconnection response by shutdown(sock, SHUT_WR).
> >
> > This can be used to enforce proper disconnection order in HID,
> > where the disconnection of the interrupt channel must be complete
> > before attempting to disconnect the control channel.
> >
> > Signed-off-by: Archie Pusaka <apusaka@chromium.org>
> > ---
> >
> > net/bluetooth/l2cap_sock.c | 30 +++++++++++++++++++++++-------
> > 1 file changed, 23 insertions(+), 7 deletions(-)
>
> the patch looks fine to me. Do we have something in l2cap-tester or l2test that we can verify this with before I apply it.
>
> Regards
>
> Marcel
>

\
 
 \ /
  Last update: 2020-04-23 12:17    [W:0.096 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site