@@ -139,6 +139,7 @@ static void disconnected_cb(struct bt_l2cap_chan *l2cap_chan)
139
139
CONTROLLER_INDEX , (uint8_t * ) & ev , sizeof (ev ));
140
140
}
141
141
142
+ #if defined(CONFIG_BT_L2CAP_ECRED )
142
143
static void reconfigured_cb (struct bt_l2cap_chan * l2cap_chan )
143
144
{
144
145
struct l2cap_reconfigured_ev ev ;
@@ -155,13 +156,16 @@ static void reconfigured_cb(struct bt_l2cap_chan *l2cap_chan)
155
156
tester_send (BTP_SERVICE_ID_L2CAP , L2CAP_EV_RECONFIGURED ,
156
157
CONTROLLER_INDEX , (uint8_t * )& ev , sizeof (ev ));
157
158
}
159
+ #endif
158
160
159
161
static const struct bt_l2cap_chan_ops l2cap_ops = {
160
162
.alloc_buf = alloc_buf_cb ,
161
163
.recv = recv_cb ,
162
164
.connected = connected_cb ,
163
165
.disconnected = disconnected_cb ,
166
+ #if defined(CONFIG_BT_L2CAP_ECRED )
164
167
.reconfigured = reconfigured_cb ,
168
+ #endif
165
169
};
166
170
167
171
static struct channel * get_free_channel ()
@@ -282,6 +286,7 @@ static void disconnect(uint8_t *data, uint16_t len)
282
286
status );
283
287
}
284
288
289
+ #if defined(CONFIG_BT_L2CAP_ECRED )
285
290
static void reconfigure (uint8_t * data , uint16_t len )
286
291
{
287
292
const struct l2cap_reconfigure_cmd * cmd = (void * )data ;
@@ -331,6 +336,7 @@ static void reconfigure(uint8_t *data, uint16_t len)
331
336
tester_rsp (BTP_SERVICE_ID_L2CAP , L2CAP_RECONFIGURE , CONTROLLER_INDEX ,
332
337
status );
333
338
}
339
+ #endif
334
340
335
341
#if defined(CONFIG_BT_EATT )
336
342
void disconnect_eatt_chans (uint8_t * data , uint16_t len )
@@ -541,7 +547,9 @@ static void supported_commands(uint8_t *data, uint16_t len)
541
547
tester_set_bit (cmds , L2CAP_DISCONNECT );
542
548
tester_set_bit (cmds , L2CAP_LISTEN );
543
549
tester_set_bit (cmds , L2CAP_SEND_DATA );
550
+ #if defined(CONFIG_BT_L2CAP_ECRED )
544
551
tester_set_bit (cmds , L2CAP_RECONFIGURE );
552
+ #endif
545
553
tester_set_bit (cmds , L2CAP_CREDITS );
546
554
#if defined(CONFIG_BT_EATT )
547
555
tester_set_bit (cmds , L2CAP_DISCONNECT_EATT_CHANS );
@@ -569,9 +577,11 @@ void tester_handle_l2cap(uint8_t opcode, uint8_t index, uint8_t *data,
569
577
case L2CAP_LISTEN :
570
578
listen (data , len );
571
579
return ;
580
+ #if defined(CONFIG_BT_L2CAP_ECRED )
572
581
case L2CAP_RECONFIGURE :
573
582
reconfigure (data , len );
574
583
return ;
584
+ #endif
575
585
case L2CAP_CREDITS :
576
586
credits (data , len );
577
587
return ;
0 commit comments