diff --git a/tests/bluetooth/tester/src/bttester.h b/tests/bluetooth/tester/src/bttester.h index 826c4749234ba..7027b808190d0 100644 --- a/tests/bluetooth/tester/src/bttester.h +++ b/tests/bluetooth/tester/src/bttester.h @@ -746,6 +746,7 @@ struct l2cap_connect_cmd { uint16_t psm; uint16_t mtu; uint8_t num; + uint8_t ecfc; } __packed; struct l2cap_connect_rp { uint8_t num; diff --git a/tests/bluetooth/tester/src/l2cap.c b/tests/bluetooth/tester/src/l2cap.c index 80ac7b96bc2ad..0e377acb012ac 100644 --- a/tests/bluetooth/tester/src/l2cap.c +++ b/tests/bluetooth/tester/src/l2cap.c @@ -182,12 +182,12 @@ static void connect(uint8_t *data, uint16_t len) allocated_channels[i] = &chan->le.chan; } - if (cmd->num == 1) { + if (cmd->num == 1 && cmd->ecfc == 0) { err = bt_l2cap_chan_connect(conn, &chan->le.chan, cmd->psm); if (err < 0) { goto fail; } - } else if (cmd->num > 1) { + } else if (cmd->ecfc == 1) { #if defined(CONFIG_BT_L2CAP_ECRED) err = bt_l2cap_ecred_chan_connect(conn, allocated_channels, cmd->psm);