aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-03-28 09:31:25 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-08 23:41:39 -0400
commitbd4b165312bacbf1e732cbc22c141362cfb5fda3 (patch)
tree189a94b160db0ab5100863d50dfe36959a52ea07 /net/bluetooth/l2cap_sock.c
parent6bcbc4893fe8a6be3c3c5a83449d79dc9e9a51ac (diff)
Bluetooth: Adds set_default function in L2CAP setup
Some parameters in L2CAP chan are set to default similar way in socket based channels and A2MP channels. Adds common function which sets all defaults. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 1d3e9c328a36..ae1d78ee0410 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1006,12 +1006,8 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
1006 } else { 1006 } else {
1007 chan->mode = L2CAP_MODE_BASIC; 1007 chan->mode = L2CAP_MODE_BASIC;
1008 } 1008 }
1009 chan->max_tx = L2CAP_DEFAULT_MAX_TX; 1009
1010 chan->fcs = L2CAP_FCS_CRC16; 1010 l2cap_chan_set_defaults(chan);
1011 chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
1012 chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
1013 chan->sec_level = BT_SECURITY_LOW;
1014 set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
1015 } 1011 }
1016 1012
1017 /* Default config options */ 1013 /* Default config options */