diff options
-rw-r--r-- | net/bluetooth/l2cap_core.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4ef85d24797d..d51741fb5a9c 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -3478,12 +3478,21 @@ void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) | |||
3478 | struct l2cap_conn_rsp rsp; | 3478 | struct l2cap_conn_rsp rsp; |
3479 | struct l2cap_conn *conn = chan->conn; | 3479 | struct l2cap_conn *conn = chan->conn; |
3480 | u8 buf[128]; | 3480 | u8 buf[128]; |
3481 | u8 rsp_code; | ||
3481 | 3482 | ||
3482 | rsp.scid = cpu_to_le16(chan->dcid); | 3483 | rsp.scid = cpu_to_le16(chan->dcid); |
3483 | rsp.dcid = cpu_to_le16(chan->scid); | 3484 | rsp.dcid = cpu_to_le16(chan->scid); |
3484 | rsp.result = __constant_cpu_to_le16(L2CAP_CR_SUCCESS); | 3485 | rsp.result = __constant_cpu_to_le16(L2CAP_CR_SUCCESS); |
3485 | rsp.status = __constant_cpu_to_le16(L2CAP_CS_NO_INFO); | 3486 | rsp.status = __constant_cpu_to_le16(L2CAP_CS_NO_INFO); |
3486 | l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_RSP, sizeof(rsp), &rsp); | 3487 | |
3488 | if (chan->hs_hcon) | ||
3489 | rsp_code = L2CAP_CREATE_CHAN_RSP; | ||
3490 | else | ||
3491 | rsp_code = L2CAP_CONN_RSP; | ||
3492 | |||
3493 | BT_DBG("chan %p rsp_code %u", chan, rsp_code); | ||
3494 | |||
3495 | l2cap_send_cmd(conn, chan->ident, rsp_code, sizeof(rsp), &rsp); | ||
3487 | 3496 | ||
3488 | if (test_and_set_bit(CONF_REQ_SENT, &chan->conf_state)) | 3497 | if (test_and_set_bit(CONF_REQ_SENT, &chan->conf_state)) |
3489 | return; | 3498 | return; |