diff --git a/components/bt/host/bluedroid/stack/gatt/gatt_api.c b/components/bt/host/bluedroid/stack/gatt/gatt_api.c index 6a22bd01d79..ddab5b986f8 100644 --- a/components/bt/host/bluedroid/stack/gatt/gatt_api.c +++ b/components/bt/host/bluedroid/stack/gatt/gatt_api.c @@ -1050,13 +1050,11 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM default: break; } -#if (SMP_INCLUDED == TRUE) /* start security check */ if (gatt_security_check_start(p_clcb) == FALSE) { status = GATT_NO_RESOURCES; gatt_clcb_dealloc(p_clcb); } -#endif // (SMP_INCLUDED == TRUE) } else { status = GATT_NO_RESOURCES; } @@ -1116,11 +1114,9 @@ tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_ p_clcb->start_offset = p_write->offset; p->offset = 0; } -#if (SMP_INCLUDED == TRUE) if (gatt_security_check_start(p_clcb) == FALSE) { status = GATT_NO_RESOURCES; } -#endif // (SMP_INCLUDED == TRUE) } else { status = GATT_NO_RESOURCES; } diff --git a/components/bt/host/bluedroid/stack/gatt/gatt_auth.c b/components/bt/host/bluedroid/stack/gatt/gatt_auth.c index 7ceea18845f..0a033e1ae04 100644 --- a/components/bt/host/bluedroid/stack/gatt/gatt_auth.c +++ b/components/bt/host/bluedroid/stack/gatt/gatt_auth.c @@ -131,8 +131,6 @@ void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf) } #endif ///SMP_INCLUDED == TRUE -#if (SMP_INCLUDED == TRUE) - /******************************************************************************* ** ** Function gatt_sec_check_complete @@ -160,6 +158,7 @@ void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB *p_clcb, UINT8 s } } +#if (SMP_INCLUDED == TRUE) /******************************************************************************* ** ** Function gatt_enc_cmpl_cback @@ -258,7 +257,7 @@ void gatt_notify_enc_cmpl(BD_ADDR bd_addr) } return; } - +#endif // (SMP_INCLUDED == TRUE) /******************************************************************************* ** ** Function gatt_set_sec_act @@ -292,7 +291,7 @@ tGATT_SEC_ACTION gatt_get_sec_act(tGATT_TCB *p_tcb) } return sec_act; } -#endif // (SMP_INCLUDED == TRUE) + /******************************************************************************* ** ** Function gatt_determine_sec_act @@ -428,7 +427,6 @@ tGATT_STATUS gatt_get_link_encrypt_status(tGATT_TCB *p_tcb) return encrypt_status ; } -#if (SMP_INCLUDED == TRUE) /******************************************************************************* ** ** Function gatt_convert_sec_action @@ -526,6 +524,5 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb) return status; } -#endif // (SMP_INCLUDED == TRUE) #endif /* BLE_INCLUDED */ diff --git a/components/bt/host/bluedroid/stack/gatt/gatt_utils.c b/components/bt/host/bluedroid/stack/gatt/gatt_utils.c index 451ce28709f..1b817a0053c 100644 --- a/components/bt/host/bluedroid/stack/gatt/gatt_utils.c +++ b/components/bt/host/bluedroid/stack/gatt/gatt_utils.c @@ -2799,7 +2799,6 @@ BOOLEAN gatt_update_auto_connect_dev (tGATT_IF gatt_if, BOOLEAN add, BD_ADDR bd_ } #endif // #if (GATT_BG_CONN_DEV == TRUE) -#if (SMP_INCLUDED == TRUE) /******************************************************************************* ** ** Function gatt_add_pending_new_srv_start @@ -2821,7 +2820,6 @@ tGATT_PENDING_ENC_CLCB *gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGAT } return p_buf; } -#endif // (SMP_INCLUDED == TRUE) char *gatt_uuid_to_str(const tBT_UUID *uuid) { diff --git a/components/bt/host/bluedroid/stack/gatt/include/gatt_int.h b/components/bt/host/bluedroid/stack/gatt/include/gatt_int.h index 02b36f0fa4b..76432c4f1b6 100644 --- a/components/bt/host/bluedroid/stack/gatt/include/gatt_int.h +++ b/components/bt/host/bluedroid/stack/gatt/include/gatt_int.h @@ -376,10 +376,8 @@ typedef struct{ }tGATT_PREPARE_WRITE_RECORD; typedef struct { -#if (SMP_INCLUDED == TRUE) fixed_queue_t *pending_enc_clcb; /* pending encryption channel q */ tGATT_SEC_ACTION sec_act; -#endif // (SMP_INCLUDED == TRUE) BD_ADDR peer_bda; tBT_TRANSPORT transport;