aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-07 10:15:25 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-12-05 10:05:35 -0500
commitaeddd075d5483cc9a34cd98b0df967f28d651f93 (patch)
tree5c25446296504090cde1817aa9b5eaf8d3a2ea65 /net/bluetooth
parent3916aed81f1fd07f71a597080690d36f02e88850 (diff)
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: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 4c8bac9e8d35..eb5604e06106 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -516,12 +516,12 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
516 switch (chan->chan_type) { 516 switch (chan->chan_type) {
517 case L2CAP_CHAN_CONN_ORIENTED: 517 case L2CAP_CHAN_CONN_ORIENTED:
518 if (conn->hcon->type == LE_LINK) { 518 if (conn->hcon->type == LE_LINK) {
519 /* LE connection */ 519 if (chan->dcid == L2CAP_CID_ATT) {
520 chan->omtu = L2CAP_DEFAULT_MTU; 520 chan->omtu = L2CAP_DEFAULT_MTU;
521 if (chan->dcid == L2CAP_CID_ATT)
522 chan->scid = L2CAP_CID_ATT; 521 chan->scid = L2CAP_CID_ATT;
523 else 522 } else {
524 chan->scid = l2cap_alloc_cid(conn); 523 chan->scid = l2cap_alloc_cid(conn);
524 }
525 } else { 525 } else {
526 /* Alloc CID for connection-oriented socket */ 526 /* Alloc CID for connection-oriented socket */
527 chan->scid = l2cap_alloc_cid(conn); 527 chan->scid = l2cap_alloc_cid(conn);