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>
This commit is contained in:

committed by
Gustavo Padovan

parent
6bcbc4893f
commit
bd4b165312
@@ -1006,12 +1006,8 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
|
||||
} else {
|
||||
chan->mode = L2CAP_MODE_BASIC;
|
||||
}
|
||||
chan->max_tx = L2CAP_DEFAULT_MAX_TX;
|
||||
chan->fcs = L2CAP_FCS_CRC16;
|
||||
chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
|
||||
chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
|
||||
chan->sec_level = BT_SECURITY_LOW;
|
||||
set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
|
||||
|
||||
l2cap_chan_set_defaults(chan);
|
||||
}
|
||||
|
||||
/* Default config options */
|
||||
|
Reference in New Issue
Block a user