Skip to content
Commit b6cdf103 authored by Jonathan Rico's avatar Jonathan Rico Committed by Alberto Escolar
Browse files

Bluetooth: L2CAP: remove seg_pool



We can get rid of the view pool for SDU segments :)
We have to make the code slightly more complex :'(

The basic idea is always giving the original SDU buffer to `conn.c` for it
to pull ACL fragments from.

In order to do this, we need to add the PDU headers just-in-time.
`bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue
anymore. They are added by `l2cap_data_pull()` right before the data leaves
`l2cap.c` for `conn.c`.

We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so
it doesn't fragment across segment boundaries. This oob is the new `length`
parameter to the `.pull()` method.

This is the added complexity mentioned above.

Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't
need this extra logic.

Signed-off-by: default avatarJonathan Rico <jonathan.rico@nordicsemi.no>
parent 28be8909
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment