Skip to content

Commit

Permalink
Bluetooth: host: Remove useless alloc_buf_cb in test
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
alwa-nordic authored and nashif committed Nov 16, 2024
1 parent 76bceb9 commit 3734268
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 3734268

Please sign in to comment.