Lines Matching +full:rx +full:- +full:buffer +full:- +full:elements
6 * Copyright (c) 2015-2016 Intel Corporation
9 * SPDX-License-Identifier: Apache-2.0
33 /** L2CAP PDU header size, used for buffer size calculations */
40 #define BT_L2CAP_RX_MTU (CONFIG_BT_BUF_ACL_RX_SIZE - BT_L2CAP_HDR_SIZE)
42 /** @brief Helper to calculate needed buffer size for L2CAP PDUs.
43 * Useful for creating buffer pools.
47 * @return Needed buffer size to match the requested L2CAP PDU MTU.
51 /** L2CAP SDU header size, used for buffer size calculations */
60 * size of the application buffer pool.
62 #define BT_L2CAP_SDU_TX_MTU (BT_L2CAP_TX_MTU - BT_L2CAP_SDU_HDR_SIZE)
70 * size of the application buffer pool. The application will have to define
74 #define BT_L2CAP_SDU_RX_MTU (BT_L2CAP_RX_MTU - BT_L2CAP_SDU_HDR_SIZE)
78 * @brief Helper to calculate needed buffer size for L2CAP SDUs.
79 * Useful for creating buffer pools.
83 * @return Needed buffer size to match the requested L2CAP SDU MTU.
113 * - L2CAP_CREDIT_BASED_CONNECTION_REQ
114 * - L2CAP_CREDIT_BASED_RECONFIGURE_REQ
132 /** @brief Life-span states of L2CAP CoC channel.
173 /* Total number of status - must be at the end of the enum */
217 struct bt_l2cap_le_endpoint rx; member
219 /** Pending RX MTU on ECFC reconfigure, used internally by stack */
224 * This is an image of the remote's rx.
287 struct bt_l2cap_br_endpoint rx; member
348 * by HCI layer and set to 0 when success and to non-zero (reference to
358 * return a valid buffer.
360 * @param chan The channel requesting a buffer.
362 * @return Allocated buffer.
374 * @param chan The channel requesting a buffer.
376 * @return Allocated buffer.
383 * @param buf Buffer containing incoming data.
389 * If the application returns @c -EINPROGRESS, the application takes
395 * @return -EINPROGRESS in case where user has to confirm once the data
398 * the buffer received with its original user_data
436 * updated MTU and MPS values by inspecting chan->le endpoints.
455 * SDU is marked by `seg_offset + seg->len == sdu_len`.
458 * - The sender had the credit.
459 * - The SDU length does not exceed MTU.
460 * - The segment length does not exceed MPS.
463 * - Segments come in order.
464 * - SDUs cannot be interleaved or aborted halfway.
467 * setting the RX MTU and MPS. The MPS must not exceed @ref BT_L2CAP_RX_MTU.
494 * 0 A dynamic value will be auto-allocated when
497 * 0x0001-0x007f Standard, Bluetooth SIG-assigned fixed values.
499 * 0x0080-0x00ff Dynamically allocated. May be pre-set by the
501 * recommended however), or auto-allocated by the
522 * @return -ENOMEM if no available space for new channel.
523 * @return -EACCES if application did not authorize the connection.
524 * @return -EPERM if encryption key size is too short.
538 * For fixed, SIG-assigned PSMs (in the range 0x0001-0x007f) the PSM should
539 * be assigned to server->psm before calling this API. For dynamic PSMs
540 * (in the range 0x0080-0x00ff) server->psm may be pre-set to a given value
589 * @param chans Array of channel objects. Null-terminated. Elements after the
614 * @warning Known issue: The implementation returns -EBUSY if there already is
619 * @warning Known issue: The implementation returns -ENOMEM when unable to
625 * @param chans Array of channels to reconfigure. Must be non-empty and
627 * elements.
634 * @retval -EINVAL Bad arguments. See above requirements.
635 * @retval -ENOTCONN Connection object is not in connected state.
636 * @retval -EBUSY Another outgoing reconfiguration is pending on the same
638 * @retval -ENOMEM Host is out of buffers.
682 * Send data from buffer to the channel. If credits are not available, buf will
687 * Network buffer fragments (ie `buf->frags`) are not supported.
691 * @ref BT_L2CAP_CHAN_SEND_RESERVE bytes in the buffer before sending.
693 * size the buffers for the for the outgoing buffer pool.
697 * @ref BT_L2CAP_SDU_CHAN_SEND_RESERVE bytes in the buffer before sending.
700 * the buffer to account for the reserved headroom.
704 * on the stack's global buffer pool (sized
707 * @warning The buffer's user_data _will_ be overwritten by this function. Do
711 * @note Buffer ownership is transferred to the stack in case of success, in
712 * case of an error the caller retains the ownership of the buffer.
715 * @return -EINVAL if `buf` or `chan` is NULL.
716 * @return -EINVAL if `chan` is not either BR/EDR or LE credit-based.
717 * @return -EINVAL if buffer doesn't have enough bytes reserved to fit header.
718 * @return -EINVAL if buffer's reference counter != 1
719 * @return -EMSGSIZE if `buf` is larger than `chan`'s MTU.
720 * @return -ENOTCONN if underlying conn is disconnected.
721 * @return -ESHUTDOWN if L2CAP channel is disconnected.
722 * @return -other (from lower layers) if chan is BR/EDR.
735 * default-initialize or memset @p chan when allocating or reusing it for new
752 * channel recv callback has returned -EINPROGRESS to process some incoming
753 * data. The buffer shall contain the original user_data as that is used for
757 * @param buf Buffer containing the data.