diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-10-18 15:17:10 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2016-10-21 07:47:31 +0300 |
commit | 15946ad3a729c7efeeef270dee1a306f8a2edf04 (patch) | |
tree | 768b4d7b1006e5ef679f85e82025492a459ac404 /net | |
parent | db45a1b8b91bc7e6c29a7d9a242777a38aa3f067 (diff) |
Bluetooth: L2CAP: Use MPS for outgoing segments
BT_L2CAP_MAX_LE_MPS tracks exactly how big a single buffer can be so use
that as size for outgoing segment pool instead of the minimun MTU.
Change-Id: I48cfba0e2c4c88f390f2f8a1ce63ff6adfce7c7a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index c504011ab..383782bcf 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -91,7 +91,7 @@ static NET_BUF_POOL(le_sig_pool, CONFIG_BLUETOOTH_MAX_CONN, /* Pool for outgoing LE data packets, MTU is 23 */ static struct nano_fifo le_data; static NET_BUF_POOL(le_data_pool, CONFIG_BLUETOOTH_MAX_CONN, - BT_L2CAP_BUF_SIZE(L2CAP_LE_MIN_MTU), &le_data, NULL, + BT_L2CAP_BUF_SIZE(BT_L2CAP_MAX_LE_MPS), &le_data, NULL, BT_BUF_USER_DATA_MIN); #endif /* CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL */ @@ -1444,7 +1444,7 @@ segment: net_buf_add_le16(seg, net_buf_frags_len(buf)); } - len = min(min(buf->len, L2CAP_LE_MIN_MTU - sdu_hdr_len), ch->tx.mps); + len = min(min(buf->len, BT_L2CAP_MAX_LE_MPS - sdu_hdr_len), ch->tx.mps); memcpy(net_buf_add(seg, len), buf->data, len); net_buf_pull(buf, len); |