mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-29 13:45:45 +00:00
feat(bt/bluedroid): Add flags for BQB auto test of L2CAP
1: add sdp_bqb_disable_flag to avoid running sdpu_build_n_send_error. 2: add sdp_bqb_inact_timeout_flag to set the SDP inactivity timeout to 90 seconds. 3: add l2cap_bqb_bad_cmd_len_rej_flag to reject the C-Frame with invalid PDU length 4: add l2cap_bqb_ertm_mode_included_flag to set L2CAP_FCR_ERTM_MODE for most L2CAP cases
This commit is contained in:

committed by
gongyantao

parent
0d2a52491b
commit
19575dbe3c
@@ -52,6 +52,10 @@ tL2C_CB l2cb;
|
||||
tL2C_CB *l2c_cb_ptr;
|
||||
#endif
|
||||
|
||||
#if BT_CLASSIC_BQB_INCLUDED
|
||||
static BOOLEAN s_l2cap_bqb_bad_cmd_len_rej_flag = FALSE;
|
||||
#endif /* BT_CLASSIC_BQB_INCLUDED */
|
||||
|
||||
#if 0 //Unused
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -107,6 +111,24 @@ void l2c_bcst_msg( BT_HDR *p_buf, UINT16 psm )
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function l2cap_bqb_bad_cmd_len_rej_ctrl
|
||||
**
|
||||
** Description Control rejecting L2CAP signaling PDUs with incorrect length
|
||||
** for BQB test.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if BT_CLASSIC_BQB_INCLUDED
|
||||
void l2cap_bqb_bad_cmd_len_rej_ctrl(BOOLEAN enable)
|
||||
{
|
||||
s_l2cap_bqb_bad_cmd_len_rej_flag = enable;
|
||||
}
|
||||
#endif /* BT_CLASSIC_BQB_INCLUDED */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function l2c_rcv_acl_data
|
||||
@@ -461,6 +483,12 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
|
||||
p_ccb->remote_cid = rcid;
|
||||
|
||||
l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_REQ, &con_info);
|
||||
#if BT_CLASSIC_BQB_INCLUDED
|
||||
// L2CAP/COS/CED/BI-02-C
|
||||
if (s_l2cap_bqb_bad_cmd_len_rej_flag) {
|
||||
l2cu_send_peer_cmd_reject (p_lcb, L2CAP_CMD_REJ_NOT_UNDERSTOOD, id, 0, 0);
|
||||
}
|
||||
#endif /* BT_CLASSIC_BQB_INCLUDED */
|
||||
break;
|
||||
|
||||
case L2CAP_CMD_CONN_RSP:
|
||||
|
Reference in New Issue
Block a user