From cbb62333aa6a0e0548ea82338326c4c6797692e5 Mon Sep 17 00:00:00 2001 From: Jonathan Rico Date: Fri, 16 Aug 2024 08:44:19 +0200 Subject: [PATCH] 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 --- subsys/bluetooth/host/l2cap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c index d5a62796a65..1b25f838fa3 100644 --- a/subsys/bluetooth/host/l2cap.c +++ b/subsys/bluetooth/host/l2cap.c @@ -903,11 +903,15 @@ struct net_buf *l2cap_data_pull(struct bt_conn *conn, */ struct net_buf *pdu = k_fifo_peek_head(&lechan->tx_queue); + /* We don't have anything to send for the current channel. We could + * however have something to send on another channel that is attached to + * the same ACL connection. Re-trigger the TX processor: it will call us + * again and this time we will select another channel to pull data from. + */ if (!pdu) { bt_tx_irq_raise(); return NULL; } - /* __ASSERT(pdu, "signaled ready but no PDUs in the TX queue"); */ if (bt_buf_has_view(pdu)) { LOG_ERR("already have view on %p", pdu);