diff options
author | 2024-11-07 11:41:45 -0800 | |
---|---|---|
committer | 2024-11-08 09:51:41 -0800 | |
commit | 3ef7afd13f04f0d830415bf46e8e0c8934de2d3f (patch) | |
tree | 6a34d6b03e63f258632268573d72ced6bf563ea8 | |
parent | 4607506725f378a21c91adc443c5b9f3ac22cbbd (diff) |
cpplint: fix whitespace/comma
Bug: 364967694
Test: m .
Flag: Exempt refactor
Change-Id: I4e30aadcf89dd65a80fc5cbf411603908f191b28
-rw-r--r-- | system/bta/le_audio/storage_helper_test.cc | 122 | ||||
-rw-r--r-- | system/embdrv/sbc/decoder/include/oi_stddefs.h | 68 | ||||
-rw-r--r-- | system/embdrv/sbc/encoder/include/sbc_dct.h | 3 | ||||
-rw-r--r-- | system/stack/btm/security_device_record.h | 38 | ||||
-rw-r--r-- | system/stack/include/btm_ble_sec_api_types.h | 15 |
5 files changed, 115 insertions, 131 deletions
diff --git a/system/bta/le_audio/storage_helper_test.cc b/system/bta/le_audio/storage_helper_test.cc index 07dbb6859d..ef0a9ed172 100644 --- a/system/bta/le_audio/storage_helper_test.cc +++ b/system/bta/le_audio/storage_helper_test.cc @@ -37,61 +37,61 @@ TEST(StorageHelperTest, DeserializeSinkPacs) { const std::vector<uint8_t> validSinkPack = { 0x00, // Magic 0x01, // Num of PACs - 0x02,0x12, // handle - 0x03,0x12, // cc handle + 0x02, 0x12, // handle + 0x03, 0x12, // cc handle 0x02, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata 0x1e, // - 0x06,0x00,0x00,0x00,0x00, // Codec ID + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec ID 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Codec specific capa - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata }; const std::vector<uint8_t> invalidSinkPackNumOfPacs = { 0x00, // Magic 0x05, // Num of PACs - 0x02,0x12, // handle - 0x03,0x12, // cc handle + 0x02, 0x12, // handle + 0x03, 0x12, // cc handle 0x01, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata 0x1e, // - 0x06,0x00,0x00,0x00,0x00, // Codec ID + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec ID 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Codec specific capa - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata }; const std::vector<uint8_t> invalidSinkPackMagic = { 0x01, // Magic 0x01, // Num of PACs - 0x02,0x12, // handle - 0x03,0x12, // cc handle + 0x02, 0x12, // handle + 0x03, 0x12, // cc handle 0x02, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata 0x1e, // - 0x06,0x00,0x00,0x00,0x00, // Codec ID + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec ID 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00,0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Codec specific capa - 0x03,0x01,0xff,0x0f, // Metadata + 0x03, 0x01, 0xff, 0x0f, // Metadata }; // clang-format on @@ -111,71 +111,71 @@ TEST(StorageHelperTest, DeserializeSourcePacs) { const std::vector<uint8_t> validSourcePack = { 0x00, // Magic 0x01, // Num of PACs - 0x08,0x12, // handle - 0x09,0x12, // cc handle + 0x08, 0x12, // handle + 0x09, 0x12, // cc handle 0x02, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02,0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00,0x02,0x05,0x01, + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, 0x02, 0x05, 0x01, 0x04, // Metadata size - 0x03,0x01,0x03,0x00, // Metadata + 0x03, 0x01, 0x03, 0x00, // Metadata 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02, // Codec specific capa - 0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00, // Codec specific capa - 0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, // Codec specific capa + 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, // Codec specific capa + 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0x03,0x00 // Metadata + 0x03, 0x01, 0x03, 0x00 // Metadata }; const std::vector<uint8_t> invalidSourcePackNumOfPacs = { 0x00, // Magic 0x04, // Num of PACs - 0x08,0x12, // handle - 0x09,0x12, // cc handle + 0x08, 0x12, // handle + 0x09, 0x12, // cc handle 0x01, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02, // Codec specific capa - 0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00, // Codec specific capa - 0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, // Codec specific capa + 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, // Codec specific capa + 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0x03,0x00, // Metadata + 0x03, 0x01, 0x03, 0x00, // Metadata 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02, // Codec specific capa - 0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00, // Codec specific capa - 0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, // Codec specific capa + 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, // Codec specific capa + 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0x03,0x00 // Metadata + 0x03, 0x01, 0x03, 0x00 // Metadata }; const std::vector<uint8_t> invalidSourcePackMagic = { 0x01, // Magic 0x01, // Num of PACs - 0x08,0x12, // handle - 0x09,0x12, // cc handle + 0x08, 0x12, // handle + 0x09, 0x12, // cc handle 0x02, // Number of records in PAC 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x04,0x00,0x02,0x02,0x01,0x02, // Codec specific capa - 0x03,0x01,0x05,0x04,0x1e,0x00,0x1e,0x00, // Codec specific capa - 0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x04, 0x00, 0x02, 0x02, 0x01, 0x02, // Codec specific capa + 0x03, 0x01, 0x05, 0x04, 0x1e, 0x00, 0x1e, 0x00, // Codec specific capa + 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0x03,0x00, // Metadata + 0x03, 0x01, 0x03, 0x00, // Metadata 0x1e, // PAC entry size - 0x06,0x00,0x00,0x00,0x00, // Codec Id + 0x06, 0x00, 0x00, 0x00, 0x00, // Codec Id 0x13, // Codec specific cap. size - 0x03,0x01,0x20,0x00,0x02,0x02,0x01,0x02, // Codec specific capa - 0x03,0x01,0x05,0x04,0x3c,0x00,0x3c,0x00, // Codec specific capa - 0x02,0x05,0x01, // Codec specific capa + 0x03, 0x01, 0x20, 0x00, 0x02, 0x02, 0x01, 0x02, // Codec specific capa + 0x03, 0x01, 0x05, 0x04, 0x3c, 0x00, 0x3c, 0x00, // Codec specific capa + 0x02, 0x05, 0x01, // Codec specific capa 0x04, // Metadata size - 0x03,0x01,0x03,0x00 // Metadata + 0x03, 0x01, 0x03, 0x00 // Metadata }; // clang-format on @@ -206,7 +206,7 @@ TEST(StorageHelperTest, DeserializeAses) { 0x0b, 0x11, // handle 0x0c, 0x11, // ccc handle 0x03, // ASE id - 0x02 // direction + 0x02 // direction }; const std::vector<uint8_t> invalidAsesNumOfAses { 0x00, // Magic @@ -222,7 +222,7 @@ TEST(StorageHelperTest, DeserializeAses) { 0x0b, 0x11, // handle 0x0c, 0x11, // ccc handle 0x03, // ASE id - 0x02 // direction + 0x02 // direction }; const std::vector<uint8_t> invalidAsesMagic { 0x01, // Magic @@ -238,7 +238,7 @@ TEST(StorageHelperTest, DeserializeAses) { 0x0b, 0x11, // handle 0x0c, 0x11, // ccc handle 0x03, // ASE id - 0x02 // direction + 0x02 // direction }; // clang-format on RawAddress test_address0 = GetTestAddress(0); diff --git a/system/embdrv/sbc/decoder/include/oi_stddefs.h b/system/embdrv/sbc/decoder/include/oi_stddefs.h index 1cf03b7bbe..9eec86abeb 100644 --- a/system/embdrv/sbc/decoder/include/oi_stddefs.h +++ b/system/embdrv/sbc/decoder/include/oi_stddefs.h @@ -39,27 +39,21 @@ extern "C" { #endif #ifndef FALSE -#define FALSE 0 /**< This define statement sets FALSE as a preprocessor alias for 0. */ +#define FALSE 0 /* This define statement sets FALSE as a preprocessor alias for 0. */ #endif #ifndef TRUE -#define TRUE \ - (!FALSE) /**< This define statement sets TRUE as a preprocessor alias for \ - !FALSE. */ +#define TRUE (!FALSE) /* This define statement sets TRUE as a preprocessor alias for !FALSE. */ #endif #ifdef HEW_TOOLCHAIN #ifdef NULL -#undef NULL /**< Override HEW toolchain NULL definition */ +#undef NULL /* Override HEW toolchain NULL definition */ #endif -#define NULL \ - 0 /**< HEW toolchain does not allow us to compare (void*) type to function \ - pointer */ +#define NULL 0 /* HEW toolchain does not allow us to compare (void*) type to function pointer */ #else #ifndef NULL -#define NULL \ - ((void*)0) /**< This define statement sets NULL as a preprocessor alias \ - for (void*)0 */ +#define NULL ((void*)0) /* This define statement sets NULL as a preprocessor alias for (void*)0 */ #endif #endif @@ -67,22 +61,18 @@ extern "C" { * @name Maximum and minimum values for basic types * @{ */ -#define OI_INT8_MIN ((int8_t)0x80) /**< decimal value: -128 */ -#define OI_INT8_MAX ((int8_t)0x7F) /**< decimal value: 127 */ -#define OI_INT16_MIN ((int16_t)0x8000) /**< decimal value: -32768 */ -#define OI_INT16_MAX ((int16_t)0x7FFF) /**< decimal value: 32767 */ -#define OI_INT32_MIN \ - ((int32_t)0x80000000) /**< decimal value: -2,147,483,648 \ - */ -#define OI_INT32_MAX \ - ((int32_t)0x7FFFFFFF) /**< decimal value: 2,147,483,647 \ - */ -#define OI_UINT8_MIN ((uint8_t)0) /**< decimal value: 0 */ -#define OI_UINT8_MAX ((uint8_t)0xFF) /**< decimal value: 255 */ -#define OI_UINT16_MIN ((uint16_t)0) /**< decimal value: 0 */ -#define OI_UINT16_MAX ((uint16_t)0xFFFF) /**< decimal value: 65535 */ -#define OI_UINT32_MIN ((uint32_t)0) /**< decimal value: 0 */ -#define OI_UINT32_MAX ((uint32_t)0xFFFFFFFF) /**< decimal value: 4,294,967,295 */ +#define OI_INT8_MIN ((int8_t)0x80) /* decimal value: -128 */ +#define OI_INT8_MAX ((int8_t)0x7F) /* decimal value: 127 */ +#define OI_INT16_MIN ((int16_t)0x8000) /* decimal value: -32768 */ +#define OI_INT16_MAX ((int16_t)0x7FFF) /* decimal value: 32767 */ +#define OI_INT32_MIN ((int32_t)0x80000000) /* decimal value: -2 147 483 648 */ +#define OI_INT32_MAX ((int32_t)0x7FFFFFFF) /* decimal value: 2 147 483 647 */ +#define OI_UINT8_MIN ((uint8_t)0) /* decimal value: 0 */ +#define OI_UINT8_MAX ((uint8_t)0xFF) /* decimal value: 255 */ +#define OI_UINT16_MIN ((uint16_t)0) /* decimal value: 0 */ +#define OI_UINT16_MAX ((uint16_t)0xFFFF) /* decimal value: 65535 */ +#define OI_UINT32_MIN ((uint32_t)0) /* decimal value: 0 */ +#define OI_UINT32_MAX ((uint32_t)0xFFFFFFFF) /* decimal value: 4 294 967 295 */ /** * @} @@ -95,8 +85,8 @@ extern "C" { /** unsigned 64-bit integer as a structure of two unsigned 32-bit integers */ typedef struct { - uint32_t I1; /**< most significant 32 bits */ - uint32_t I2; /**< least significant 32 bits */ + uint32_t I1; /* most significant 32 bits */ + uint32_t I2; /* least significant 32 bits */ } OI_UINT64; #define OI_UINT64_MIN \ @@ -108,8 +98,8 @@ typedef struct { * signed 32-bit integer */ typedef struct { - int32_t I1; /**< most significant 32 bits as a signed integer */ - uint32_t I2; /**< least significant 32 bits as an unsigned integer */ + int32_t I1; /* most significant 32 bits as a signed integer */ + uint32_t I2; /* least significant 32 bits as an unsigned integer */ } OI_INT64; #define OI_INT64_MIN \ @@ -119,10 +109,10 @@ typedef struct { /** unsigned 128-bit integer as a structure of four unsigned 32-bit integers */ typedef struct { - uint32_t I1; /**< most significant 32 bits */ - uint32_t I2; /**< second-most significant 32 bits */ - uint32_t I3; /**< third-most significant 32 bits */ - uint32_t I4; /**< least significant 32 bits */ + uint32_t I1; /* most significant 32 bits */ + uint32_t I2; /* second-most significant 32 bits */ + uint32_t I3; /* third-most significant 32 bits */ + uint32_t I4; /* least significant 32 bits */ } OI_UINT128; #define OI_UINT128_MIN \ @@ -133,10 +123,10 @@ typedef struct { /* signed 128-bit integer as a structure of three unsigned 32-bit integers and * one signed 32-bit integer */ typedef struct { - int32_t I1; /**< most significant 32 bits as a signed integer */ - uint32_t I2; /**< second-most significant 32 bits as an unsigned integer */ - uint32_t I3; /**< third-most significant 32 bits as an unsigned integer */ - uint32_t I4; /**< least significant 32 bits as an unsigned integer */ + int32_t I1; /* most significant 32 bits as a signed integer */ + uint32_t I2; /* second-most significant 32 bits as an unsigned integer */ + uint32_t I3; /* third-most significant 32 bits as an unsigned integer */ + uint32_t I4; /* least significant 32 bits as an unsigned integer */ } OI_INT128; #define OI_INT128_MIN \ diff --git a/system/embdrv/sbc/encoder/include/sbc_dct.h b/system/embdrv/sbc/encoder/include/sbc_dct.h index 42e1d4fb0d..fc817576e5 100644 --- a/system/embdrv/sbc/encoder/include/sbc_dct.h +++ b/system/embdrv/sbc/encoder/include/sbc_dct.h @@ -30,8 +30,7 @@ #if (SBC_ARM_ASM_OPT == TRUE) #define SBC_MULT_32_16_SIMPLIFIED(s16In2, s32In1, s32OutLow) \ { \ - __asm { \ - MUL s32OutLow,(int32_t)s16In2, (s32In1>>15) } \ + __asm { MUL s32OutLow, (int32_t)s16In2, (s32In1>>15) } \ } #else #if (SBC_DSP_OPT == TRUE) diff --git a/system/stack/btm/security_device_record.h b/system/stack/btm/security_device_record.h index 6dc0cfa792..39cff8cbc0 100644 --- a/system/stack/btm/security_device_record.h +++ b/system/stack/btm/security_device_record.h @@ -61,8 +61,8 @@ typedef struct { (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT | BTM_SEC_IN_MITM | BTM_SEC_MODE4_LEVEL4) typedef struct { uint32_t mx_proto_id; /* Service runs over this multiplexer protocol */ - uint32_t orig_mx_chan_id; /* Channel on the multiplexer protocol */ - uint32_t term_mx_chan_id; /* Channel on the multiplexer protocol */ + uint32_t orig_mx_chan_id; /* Channel on the multiplexer protocol */ + uint32_t term_mx_chan_id; /* Channel on the multiplexer protocol */ uint16_t psm; /* L2CAP PSM value */ uint16_t security_flags; /* Bitmap of required security features */ uint8_t service_id; /* Passed in authorization callback */ @@ -74,15 +74,15 @@ typedef struct { typedef struct { Octet16 irk; /* peer diverified identity root */ Octet16 pltk; /* peer long term key */ - Octet16 pcsrk; /* peer SRK peer device used to secured sign local data */ + Octet16 pcsrk; /* peer SRK peer device used to secured sign local data */ Octet16 lltk; /* local long term key */ - Octet16 lcsrk; /* local SRK peer device used to secured sign local data */ + Octet16 lcsrk; /* local SRK peer device used to secured sign local data */ BT_OCTET8 rand; /* random vector for LTK generation */ uint16_t ediv; /* LTK diversifier of this peripheral device */ - uint16_t div; /* local DIV to generate local LTK=d1(ER,DIV,0) and - CSRK=d1(ER,DIV,1) */ + uint16_t div; /* local DIV to generate local LTK=d1(ER, DIV, 0) and + CSRK=d1(ER, DIV, 1) */ uint8_t sec_level; /* local pairing security level */ uint8_t key_size; /* key size of the LTK delivered to peer device */ uint8_t srk_sec_level; /* security property of peer SRK for this device */ @@ -104,8 +104,7 @@ enum tBLE_RAND_ADDR_TYPE : uint8_t { class tBTM_BLE_ADDR_INFO { public: - RawAddress pseudo_addr; /* LE pseudo address of the device if different from - device address */ + RawAddress pseudo_addr; /* LE pseudo address of the device if different from device address */ public: tBLE_ADDR_TYPE AddressType() const { return ble_addr_type_; } void SetAddressType(tBLE_ADDR_TYPE ble_addr_type) { @@ -202,12 +201,12 @@ struct tBTM_SEC_REC { tSECURITY_STATE classic_link; /* Operating state of Classic link */ tSECURITY_STATE le_link; /* Operating state of LE link */ - tHCI_STATUS sec_status; /* Status in encryption change event */ - uint16_t sec_flags; /* Current device security state */ + tHCI_STATUS sec_status; /* Status in encryption change event */ + uint16_t sec_flags; /* Current device security state */ uint8_t pin_code_length; /* Length of the pin_code used for pairing */ uint32_t required_security_flags_for_pairing; - uint16_t security_required; /* Security required for connection */ + uint16_t security_required; /* Security required for connection */ // security callback and its argument tBTM_SEC_CALLBACK* p_callback; void* p_ref_data; @@ -222,9 +221,9 @@ struct tBTM_SEC_REC { ** for SM over BR/EDR. */ // BREDR Link Key Info - LinkKey link_key; /* Device link key */ - uint8_t link_key_type; /* Type of key used in pairing */ - uint8_t enc_key_size; /* current link encryption key size */ + LinkKey link_key; /* Device link key */ + uint8_t link_key_type; /* Type of key used in pairing */ + uint8_t enc_key_size; /* current link encryption key size */ // LE Link Key Info tBTM_SEC_BLE_KEYS ble_keys; @@ -347,16 +346,15 @@ public: tBTM_BLE_ADDR_INFO ble; BD_NAME sec_bd_name; /* User friendly name of the device. (may be truncated to save space in dev_rec table) */ - DEV_CLASS dev_class; /* DEV_CLASS of the device */ + DEV_CLASS dev_class; /* DEV_CLASS of the device */ tBT_DEVICE_TYPE device_type; - uint32_t timestamp; /* Timestamp of the last connection */ + uint32_t timestamp; /* Timestamp of the last connection */ uint16_t hci_handle; /* Handle to BR/EDR ACL connection when exists */ uint16_t ble_hci_handle; /* use in DUMO connection */ - uint16_t suggested_tx_octets; /* Recently suggested tx octets for data length - extension */ - uint16_t clock_offset; /* Latest known clock offset */ + uint16_t suggested_tx_octets; /* Recently suggested tx octets for data length extension */ + uint16_t clock_offset; /* Latest known clock offset */ // whether the peer device can read GAP characteristics only visible in // "discoverable" mode @@ -375,7 +373,7 @@ public: tREMOTE_VERSION_INFO remote_version_info; - bool role_central; /* true if current mode is central (BLE) */ + bool role_central; /* true if current mode is central (BLE) */ bool is_originator; /* true if device is originating ACL connection */ // BLE connection parameters diff --git a/system/stack/include/btm_ble_sec_api_types.h b/system/stack/include/btm_ble_sec_api_types.h index d53b628f26..6d750a7835 100644 --- a/system/stack/include/btm_ble_sec_api_types.h +++ b/system/stack/include/btm_ble_sec_api_types.h @@ -69,8 +69,7 @@ typedef union { tBTM_LE_PENC_KEYS penc_key; /* received peer encryption key */ tBTM_LE_PCSRK_KEYS pcsrk_key; /* received peer device SRK */ tBTM_LE_PID_KEYS pid_key; /* peer device ID key */ - tBTM_LE_LENC_KEYS lenc_key; /* local encryption reproduction keys - * LTK = = d1(ER,DIV,0) */ + tBTM_LE_LENC_KEYS lenc_key; /* local encryption reproduction keys LTK = = d1(ER, DIV, 0) */ tBTM_LE_LCSRK_KEYS lcsrk_key; /* local device CSRK = d1(ER,DIV,1)*/ } tBTM_LE_KEY_VALUE; @@ -80,20 +79,18 @@ typedef struct { } tBTM_LE_KEY; typedef union { - tBTM_LE_IO_REQ io_req; /* BTM_LE_IO_REQ_EVT */ - uint32_t key_notif; /* BTM_LE_KEY_NOTIF_EVT */ + tBTM_LE_IO_REQ io_req; /* BTM_LE_IO_REQ_EVT */ + uint32_t key_notif; /* BTM_LE_KEY_NOTIF_EVT */ /* BTM_LE_NC_REQ_EVT */ - /* no callback data for - * BTM_LE_KEY_REQ_EVT - * and BTM_LE_OOB_REQ_EVT */ - tBTM_LE_COMPLT complt; /* BTM_LE_COMPLT_EVT */ + /* no callback data for BTM_LE_KEY_REQ_EVT and BTM_LE_OOB_REQ_EVT */ + tBTM_LE_COMPLT complt; /* BTM_LE_COMPLT_EVT */ tSMP_OOB_DATA_TYPE req_oob_type; tBTM_LE_KEY key; tSMP_LOC_OOB_DATA local_oob_data; RawAddress id_addr; } tBTM_LE_EVT_DATA; -/* Simple Pairing Events. Called by the stack when Simple Pairing related +/* Simple Pairing Events. Called by the stack when Simple Pairing related * events occur. */ typedef tBTM_STATUS(tBTM_LE_CALLBACK)(tBTM_LE_EVT event, const RawAddress& bda, |