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

This commit is contained in:
Jin Cheng
2026-07-23 07:52:39 +08:00
parent 2b49bba8a8
commit b19ab411cb
65 changed files with 2211 additions and 1160 deletions
@@ -194,11 +194,15 @@ extern UINT16 GAP_ConnReadData (UINT16 gap_handle, UINT8 *p_data,
**
** Function GAP_GetRxQueueCnt
**
** Description This function return number of bytes on the rx queue.
** Description Return the number of bytes waiting on the connection rx queue.
**
** Parameters: handle - Handle returned in the GAP_ConnOpen
** p_rx_queue_count - Pointer to return queue count in.
** Parameters: handle - Handle returned from GAP_ConnOpen
** p_rx_queue_count - Pointer to receive queue byte count
**
** Returns BT_PASS - success, count stored in *p_rx_queue_count
** GAP_ERR_ILL_PARM - p_rx_queue_count is NULL
** GAP_ERR_BAD_HANDLE - handle is invalid
** GAP_ERR_BAD_STATE - connection is not established
**
*******************************************************************************/
extern int GAP_GetRxQueueCnt (UINT16 handle, UINT32 *p_rx_queue_count);
@@ -411,7 +411,7 @@
#define HCI_BLE_SET_PAST_PARAMS (0x005C | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_DEFAULT_PAST_PARAMS (0x005D | HCI_GRP_BLE_CMDS)
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#define HCI_BLE_READ_BUFFER_SZIE_V2 (0x0060 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_READ_BUFFER_SIZE_V2 (0x0060 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_ISO_READ_TX_SYNC (0x0061 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_ISO_SET_CIG_PARAMS (0x0062 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_ISO_SET_CIG_PARAMS_TEST (0x0063 | HCI_GRP_BLE_CMDS)
@@ -435,7 +435,7 @@ BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
#endif /* BTM_SSR_INCLUDED */
/* Extended Inquiry Response */
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);
#define HCIC_PARAM_SIZE_EXT_INQ_RESP 241
@@ -670,7 +670,7 @@ BOOLEAN btsnd_hcic_write_link_super_tout(UINT8 local_controller_id, UINT16 handl
/* Write Link Supervision Timeout */
BOOLEAN btsnd_hcic_write_cur_iac_lap (UINT8 num_cur_iac,
LAP *const iac_lap); /* Write Current IAC LAP */
const LAP *iac_lap); /* Write Current IAC LAP */
#define MAX_IAC_LAPS 0x40
@@ -111,7 +111,7 @@ extern tHID_STATUS HID_DevDeregister(void);
* Returns tHID_STATUS
*
******************************************************************************/
extern tHID_STATUS HID_DevSetSecurityLevel(uint8_t sec_lvl);
extern tHID_STATUS HID_DevSetSecurityLevel(uint16_t sec_lvl);
/*******************************************************************************
*
@@ -223,7 +223,7 @@ extern void HID_HostDeinit(void);
**
** Returns tHID_STATUS
*******************************************************************************/
extern tHID_STATUS HID_HostSetSecurityLevel( char serv_name[], UINT8 sec_lvl );
extern tHID_STATUS HID_HostSetSecurityLevel( const char *serv_name, UINT8 sec_lvl );
/*******************************************************************************
**