Re: [PATCH] Bluetooth: fix connection setup in l2cap_connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

su, 2024-06-09 kello 14:49 +0200, Timo Schröder kirjoitti:
> Hi Pauli,
> 
> unfortunately it doesn't fix the issue. I'm still experiencing the
> same behaviour. I attached btmon traces and bluetoothd log.

Right, sorry, I see now the patch is wrong and did it for the wrong if
branch... I'll send a v2.

	Pauli

> 
> Best regards,
> Timo
> 
> Am So., 9. Juni 2024 um 00:02 Uhr schrieb Pauli Virtanen <pav@xxxxxx>:
> > 
> > The amp_id argument of l2cap_connect() was removed in
> > commit 84a4bb6548a2 ("Bluetooth: HCI: Remove HCI_AMP support")
> > 
> > It was always called with amp_id == 0, i.e. AMP_ID_BREDR == 0x00 (ie.
> > non-AMP controller).  In the above commit, the code path for amp_id != 0
> > was preserved, although it should have used the amp_id == 0 one.
> > 
> > Restore the previous behavior of the non-AMP code path, to fix problems
> > with L2CAP connections.
> > 
> > Fixes: 84a4bb6548a2 ("Bluetooth: HCI: Remove HCI_AMP support")
> > Signed-off-by: Pauli Virtanen <pav@xxxxxx>
> > ---
> > 
> > Notes:
> >     Tried proofreading the commit, and this part seemed suspicious.
> >     Can you try if this fixes the problem?
> > 
> >  net/bluetooth/l2cap_core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > index c49e0d4b3c0d..fc633feb12a1 100644
> > --- a/net/bluetooth/l2cap_core.c
> > +++ b/net/bluetooth/l2cap_core.c
> > @@ -4016,8 +4016,8 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
> >                                 status = L2CAP_CS_NO_INFO;
> >                         }
> >                 } else {
> > -                       l2cap_state_change(chan, BT_CONNECT2);
> > -                       result = L2CAP_CR_PEND;
> > +                       l2cap_state_change(chan, BT_CONFIG);
> > +                       result = L2CAP_CR_SUCCESS;
> >                         status = L2CAP_CS_AUTHEN_PEND;
> >                 }
> >         } else {
> > --
> > 2.45.2
> > 






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux