]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Simplify l2cap_chan initialization for LE CoC
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 5 Dec 2013 12:55:33 +0000 (14:55 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Dec 2013 15:05:36 +0000 (07:05 -0800)
commitd366a8979037c1ebb081f514ab4c9e3a200571cf
treef7cb56f1ffe4717ab5f807b0d85df03ba4c62669
parent2b90e1a00c999ac8bbde2bffa07b9c2a9fcf4e29
Bluetooth: Simplify l2cap_chan initialization for LE CoC

The values in l2cap_chan that are used for actually transmitting data
only need to be initialized right after we've received an L2CAP Connect
Request or just before we send one. The only thing that we need to
initialize though bind() and connect() is the chan->mode value. This way
all other initializations can be done in the l2cap_le_flowctl_init
function (which now becomes private to l2cap_core.c) and the
l2cap_le_flowctl_start function can be completely removed.

Also, since the l2cap_sock_init function initializes the imtu and omtu
to adequate values these do not need to be part of l2cap_le_flowctl_init.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/l2cap.h
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c