Skip to content

Commit cbb6233

Browse files
jori-nordichenrikbrixandersen
authored andcommitted
Bluetooth: L2CAP: remove commented-out assert
This assert cannot be turned on, as `pdu` will be NULL sometimes. This is okay, it just means that the current channel doesn't have anything to send and that we should probably try another one. Signed-off-by: Jonathan Rico <[email protected]>
1 parent c98bc82 commit cbb6233

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

subsys/bluetooth/host/l2cap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,11 +903,15 @@ struct net_buf *l2cap_data_pull(struct bt_conn *conn,
903903
*/
904904
struct net_buf *pdu = k_fifo_peek_head(&lechan->tx_queue);
905905

906+
/* We don't have anything to send for the current channel. We could
907+
* however have something to send on another channel that is attached to
908+
* the same ACL connection. Re-trigger the TX processor: it will call us
909+
* again and this time we will select another channel to pull data from.
910+
*/
906911
if (!pdu) {
907912
bt_tx_irq_raise();
908913
return NULL;
909914
}
910-
/* __ASSERT(pdu, "signaled ready but no PDUs in the TX queue"); */
911915

912916
if (bt_buf_has_view(pdu)) {
913917
LOG_ERR("already have view on %p", pdu);

0 commit comments

Comments
 (0)