diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-07 22:56:50 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-08-14 08:49:15 +0200 |
commit | 148243087b3a5d95a32825da26858dc9d893b141 (patch) | |
tree | 4cbab2fe3547f558a5e9709e033939ff39b1b4df /net/bluetooth/l2cap_core.c | |
parent | 06171e0546434b006a3857ea745b4258ad5d677c (diff) | |
download | op-kernel-dev-148243087b3a5d95a32825da26858dc9d893b141.zip op-kernel-dev-148243087b3a5d95a32825da26858dc9d893b141.tar.gz |
Bluetooth: Move parts of fixed channel initialization to l2cap_add_scid
The l2cap_add_scid function is used for registering a fixed L2CAP
channel. Instead of having separate initialization of the channel type
and outgoing MTU in l2cap_sock.c it's more intuitive to do these things
in the l2cap_add_scid function itself (and thereby make the
functionality available to other users besides l2cap_sock.c).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 09eb4e3..344a29c5 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -210,6 +210,10 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid) { write_lock(&chan_list_lock); + /* Override the defaults (which are for conn-oriented) */ + chan->omtu = L2CAP_DEFAULT_MTU; + chan->chan_type = L2CAP_CHAN_FIXED; + chan->scid = scid; write_unlock(&chan_list_lock); |