fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI

This commit is contained in:
Jin Cheng
2026-07-17 17:15:56 +08:00
parent cb1e4f4859
commit 970923ba7d
65 changed files with 2210 additions and 1159 deletions
@@ -165,7 +165,10 @@ BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types,
#endif
#if (SMP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == TRUE)
btm_acl_paging (p, dest);
#endif ///SMP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == TRUE
#else
HCI_FREE_CMD_BUF (p);
return (FALSE);
#endif
return (TRUE);
}
@@ -493,7 +496,10 @@ BOOLEAN btsnd_hcic_rmt_name_req (BD_ADDR bd_addr, UINT8 page_scan_rep_mode,
UINT16_TO_STREAM (pp, clock_offset);
#if (SMP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == TRUE)
btm_acl_paging (p, bd_addr);
#endif ///SMP_INCLUDED == TRUE && CLASSIC_BT_INCLUDED == TRUE
#else
HCI_FREE_CMD_BUF (p);
return (FALSE);
#endif
return (TRUE);
}
@@ -1370,7 +1376,7 @@ BOOLEAN btsnd_hcic_write_link_super_tout (UINT8 local_controller_id, UINT16 hand
return (TRUE);
}
BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac, LAP *const iac_lap)
BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac, const LAP *iac_lap)
{
BT_HDR *p;
UINT8 *pp;
@@ -1432,11 +1438,11 @@ BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
#endif /* BTM_SSR_INCLUDED */
/**** Extended Inquiry Response Commands ****/
void btsnd_hcic_write_ext_inquiry_response (BT_HDR *buffer, UINT8 fec_req)
BOOLEAN btsnd_hcic_write_ext_inquiry_response (BT_HDR *buffer, UINT8 fec_req)
{
BT_HDR *p;
if ((p = HCI_GET_CMD_BUF(HCIC_PARAM_SIZE_EXT_INQ_RESP)) == NULL) {
return;
return (FALSE);
}
UINT8 *pp = (UINT8 *)(p + 1);
@@ -1451,6 +1457,7 @@ void btsnd_hcic_write_ext_inquiry_response (BT_HDR *buffer, UINT8 fec_req)
memcpy(pp, buffer->data + 4, p->len - 4);
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
}
BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capability,