Commit aeddd075 authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Fix clearing of chan->omtu for LE CoC channels

The outgoing MTU should only be set upon channel creation to the initial
minimum value (23) or from a remote connect req/rsp PDU.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 3916aed8
...@@ -516,12 +516,12 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan) ...@@ -516,12 +516,12 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
switch (chan->chan_type) { switch (chan->chan_type) {
case L2CAP_CHAN_CONN_ORIENTED: case L2CAP_CHAN_CONN_ORIENTED:
if (conn->hcon->type == LE_LINK) { if (conn->hcon->type == LE_LINK) {
/* LE connection */ if (chan->dcid == L2CAP_CID_ATT) {
chan->omtu = L2CAP_DEFAULT_MTU; chan->omtu = L2CAP_DEFAULT_MTU;
if (chan->dcid == L2CAP_CID_ATT)
chan->scid = L2CAP_CID_ATT; chan->scid = L2CAP_CID_ATT;
else } else {
chan->scid = l2cap_alloc_cid(conn); chan->scid = l2cap_alloc_cid(conn);
}
} else { } else {
/* Alloc CID for connection-oriented socket */ /* Alloc CID for connection-oriented socket */
chan->scid = l2cap_alloc_cid(conn); chan->scid = l2cap_alloc_cid(conn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment