Bluetooth: Wait for info response before accepting AMP connection
An incoming AMP "create channel" connection would trigger an info request and an AMP physical accept sequence at the same time. Since accepting an AMP physical link is a local operation, it would complete quickly and send a config request before the info response was received. If there is an outstanding info request, the AMP physical link should not be accepted yet. Existing logic in l2cap_conn_start() will accept the physical link when the info response is received. CRs-fixed: 307243 Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
This commit is contained in:
committed by
Bryan Huntsman
parent
462aceaeaf
commit
55f2a62dff
@@ -4711,9 +4711,11 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
|
|||||||
sk = l2cap_create_connect(conn, cmd, data, L2CAP_CREATE_CHAN_RSP,
|
sk = l2cap_create_connect(conn, cmd, data, L2CAP_CREATE_CHAN_RSP,
|
||||||
req->amp_id);
|
req->amp_id);
|
||||||
|
|
||||||
|
if (sk)
|
||||||
l2cap_pi(sk)->conf_state |= L2CAP_CONF_LOCKSTEP;
|
l2cap_pi(sk)->conf_state |= L2CAP_CONF_LOCKSTEP;
|
||||||
|
|
||||||
if (sk && req->amp_id)
|
if (sk && req->amp_id &&
|
||||||
|
(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE))
|
||||||
amp_accept_physical(conn, req->amp_id, sk);
|
amp_accept_physical(conn, req->amp_id, sk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user