Bluetooth: L2CAP: Allocate buffer from channel if supported
Some channels may required specific user data (e.g. IPSP) so even if data is not segmented use alloc_buf callback to allocate a buffer if supported. Change-Id: Iecca4a6979da8bc6745ad5b3b214506d3dd71437 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
1725d14b31
commit
40aaff5779
1 changed files with 2 additions and 2 deletions
|
@ -891,8 +891,8 @@ static void l2cap_chan_le_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Check if SDU needs segmentation */
|
||||
if (sdu_len > buf->len) {
|
||||
/* Always allocate buffer from the channel if supported. */
|
||||
if (chan->ops->alloc_buf) {
|
||||
chan->_sdu = chan->ops->alloc_buf(chan);
|
||||
if (!chan->_sdu) {
|
||||
BT_ERR("Unable to allocate buffer for SDU");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue