Bluetooth: fix connection setup in l2cap_connect
[ Upstream commitc695439d19
] The amp_id argument of l2cap_connect() was removed in commit84a4bb6548
("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:84a4bb6548
("Bluetooth: HCI: Remove HCI_AMP support") Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
53e3a4f9db
commit
425389d01e
@ -4009,8 +4009,8 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
|
|||||||
status = L2CAP_CS_AUTHOR_PEND;
|
status = L2CAP_CS_AUTHOR_PEND;
|
||||||
chan->ops->defer(chan);
|
chan->ops->defer(chan);
|
||||||
} else {
|
} else {
|
||||||
l2cap_state_change(chan, BT_CONNECT2);
|
l2cap_state_change(chan, BT_CONFIG);
|
||||||
result = L2CAP_CR_PEND;
|
result = L2CAP_CR_SUCCESS;
|
||||||
status = L2CAP_CS_NO_INFO;
|
status = L2CAP_CS_NO_INFO;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user