Skip to content

Commit

Permalink
Bluetooth: L2CAP_BR: Sending multiple SDU at same time
Browse files Browse the repository at this point in the history
Improve the retransmission and flow control to support
sending multiple SDU at the same time if the TX windows
is not full.

Signed-off-by: Lyle Zhu <[email protected]>
  • Loading branch information
lylezhu2012 committed Sep 23, 2024
1 parent ab3c106 commit ee55bf4
Show file tree
Hide file tree
Showing 2 changed files with 183 additions and 149 deletions.
10 changes: 7 additions & 3 deletions include/zephyr/bluetooth/l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ struct bt_l2cap_br_window {
/** srej flag */
bool srej;
/* Save PDU state */
struct net_buf_simple_state pdu;
struct net_buf_simple_state sdu_state;
/** @internal Holds the sending buffer. */
struct net_buf *sdu;
/** @internal Total length of TX SDU */
uint16_t sdu_total_len;
};

Check notice on line 346 in include/zephyr/bluetooth/l2cap.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

include/zephyr/bluetooth/l2cap.h:346 - struct net_buf *sdu; + struct net_buf *sdu; /** @internal Total length of TX SDU */ - uint16_t sdu_total_len; + uint16_t sdu_total_len;

/** @brief BREDR L2CAP Channel structure. */
Expand Down Expand Up @@ -367,8 +371,8 @@ struct bt_l2cap_br_chan {
sys_snode_t _pdu_ready;
/** @internal To be used with @ref bt_conn.upper_data_ready */
atomic_t _pdu_ready_lock;
/** @internal Queue of net bufs not yet sent to lower layer */
struct k_fifo _pdu_tx_queue;
/** @internal List of net bufs not yet sent to lower layer */
sys_slist_t _pdu_tx_queue;

#if defined(CONFIG_BT_L2CAP_RET) || defined(CONFIG_BT_L2CAP_FC) || \
defined(CONFIG_BT_L2CAP_ENH_RET) || defined(CONFIG_BT_L2CAP_STREAM)
Expand Down
Loading

0 comments on commit ee55bf4

Please sign in to comment.