Skip to content

Commit 7a687b8

Browse files
KKopyscinskicarlescufi
authored andcommitted
Tests: bluetooth: tester: accomodate L2CAP connect commant to BTP change
BTP change extended L2CAP_CONNECT command by ECFC flag, which determines which connection procedure is used (non-enhanced or ecred). Now, only this flag determines the procedure used, not number of requested channels. This was affecting L2CAP/ECFC/BV-25-C Signed-off-by: Krzysztof Kopyściński <[email protected]>
1 parent 6e26512 commit 7a687b8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/bluetooth/tester/src/bttester.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ struct l2cap_connect_cmd {
746746
uint16_t psm;
747747
uint16_t mtu;
748748
uint8_t num;
749+
uint8_t ecfc;
749750
} __packed;
750751
struct l2cap_connect_rp {
751752
uint8_t num;

tests/bluetooth/tester/src/l2cap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ static void connect(uint8_t *data, uint16_t len)
182182
allocated_channels[i] = &chan->le.chan;
183183
}
184184

185-
if (cmd->num == 1) {
185+
if (cmd->num == 1 && cmd->ecfc == 0) {
186186
err = bt_l2cap_chan_connect(conn, &chan->le.chan, cmd->psm);
187187
if (err < 0) {
188188
goto fail;
189189
}
190-
} else if (cmd->num > 1) {
190+
} else if (cmd->ecfc == 1) {
191191
#if defined(CONFIG_BT_L2CAP_ECRED)
192192
err = bt_l2cap_ecred_chan_connect(conn, allocated_channels,
193193
cmd->psm);

0 commit comments

Comments
 (0)