Patch "Bluetooth: fix connection setup in l2cap_connect" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    Bluetooth: fix connection setup in l2cap_connect

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bluetooth-fix-connection-setup-in-l2cap_connect.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6e073e1801b8427cd78293e94b77752ad519242f
Author: Pauli Virtanen <pav@xxxxxx>
Date:   Sun Jun 9 18:06:20 2024 +0300

    Bluetooth: fix connection setup in l2cap_connect
    
    [ Upstream commit c695439d198d30e10553a3b98360c5efe77b6903 ]
    
    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>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d5fb78c604cf3..bf31c5bae218f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4009,8 +4009,8 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
 				status = L2CAP_CS_AUTHOR_PEND;
 				chan->ops->defer(chan);
 			} else {
-				l2cap_state_change(chan, BT_CONNECT2);
-				result = L2CAP_CR_PEND;
+				l2cap_state_change(chan, BT_CONFIG);
+				result = L2CAP_CR_SUCCESS;
 				status = L2CAP_CS_NO_INFO;
 			}
 		} else {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux