From 7ad510ea05730b990308389a1b697da1ac5a61fb Mon Sep 17 00:00:00 2001 From: Aleksander Wasaznik Date: Fri, 25 Oct 2024 14:40:46 +0200 Subject: [PATCH] Bluetooth: host: Remove useless alloc_buf_cb in test The alloc_buf callback is not used when `seg_recv` is set, so it is never called in this test. Remove it. Signed-off-by: Aleksander Wasaznik --- tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c index b98a79e3555766..1ee69d76585b43 100644 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c @@ -59,11 +59,6 @@ int l2cap_chan_send(struct bt_l2cap_chan *chan, uint8_t *data, size_t len) return ret; } -struct net_buf *alloc_buf_cb(struct bt_l2cap_chan *chan) -{ - return net_buf_alloc(&sdu_pool, K_NO_WAIT); -} - void continue_sending(struct test_ctx *ctx) { struct bt_l2cap_chan *chan = &ctx->le_chan.chan; @@ -137,7 +132,6 @@ void l2cap_chan_disconnected_cb(struct bt_l2cap_chan *chan) static struct bt_l2cap_chan_ops ops = { .connected = l2cap_chan_connected_cb, .disconnected = l2cap_chan_disconnected_cb, - .alloc_buf = alloc_buf_cb, .seg_recv = recv_cb, .sent = sent_cb, };