Skip to content

Commit c695439

Browse files
pvVudentz
authored andcommitted
Bluetooth: fix connection setup in l2cap_connect
The amp_id argument of l2cap_connect() was removed in commit 84a4bb6 ("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: 84a4bb6 ("Bluetooth: HCI: Remove HCI_AMP support") Signed-off-by: Pauli Virtanen <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 806a519 commit c695439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/bluetooth/l2cap_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4011,8 +4011,8 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
40114011
status = L2CAP_CS_AUTHOR_PEND;
40124012
chan->ops->defer(chan);
40134013
} else {
4014-
l2cap_state_change(chan, BT_CONNECT2);
4015-
result = L2CAP_CR_PEND;
4014+
l2cap_state_change(chan, BT_CONFIG);
4015+
result = L2CAP_CR_SUCCESS;
40164016
status = L2CAP_CS_NO_INFO;
40174017
}
40184018
} else {

0 commit comments

Comments
 (0)