monitor: Decode Bluetooth 6.0 version
Luiz Augusto von Dentz
maintainerPATCH 1/3 monitor: Decode Bluetooth 6.0 version
From: Luiz Augusto von Dentz <[email protected]>
This decodes 0x0e as Bluetooth 6.0.
--- monitor/packet.c | 3 +++ 1 file changed, 3 insertions(+)
monitor/packet.c +3 -0
@@ -2526,6 +2526,9 @@ void packet_print_version(const char *label, uint8_t version,case 0x0d : str ="Bluetooth 5.4" ;break ; +case 0x0e : + str ="Bluetooth 6.0" ; +break ;default : str ="Reserved" ;break ;
Signature · 1 line
2.51.0
Luiz Augusto von Dentz
maintainerPATCH 2/3 emulator: Add support for LL Extended Feature Set
From: Luiz Augusto von Dentz <[email protected]>
This adds support for emulating LL Extended Feature Set introduced in 6.0 that adds the following:
Commands:
- HCI_LE_Read_All_Local_Supported_Features(0x2087)(Feature:47,1)
- HCI_LE_Read_All_Remote_Features(0x2088)(Feature:47,2)
Events:
- HCI_LE_Read_All_Remote_Features_Complete(0x2b)(Mask bit:42)
--- emulator/btdev.c | 101 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 4 deletions(-)
emulator/btdev.c +97 -4
@@ -178,7 +178,7 @@ struct btdev {uint8_t country_code;uint8_t bdaddr[6 ];uint8_t random_addr[6 ]; -uint8_t le_features[8 ]; +uint8_t le_features[248 ];uint8_t le_states[8 ];const struct btdev_cmd *cmds;uint16_t msft_opcode;
@@ -7362,6 +7362,75 @@ static const struct btdev_cmd cmd_le[] = { {} }; +static int cmd_le_read_all_local_features (struct btdev *dev,const void *data, +uint8_t len) +{ +struct bt_hci_rsp_le_read_all_local_features rsp; + +memset (&rsp,0 ,sizeof (rsp)); + rsp.status =BT_HCI_ERR_SUCCESS ; +memcpy (rsp.features, dev->le_features,248 ); + +cmd_complete (dev,BT_HCI_CMD_LE_READ_ALL_LOCAL_FEATURES , &rsp, +sizeof (rsp)); + +return 0 ; +} + +static int cmd_le_read_all_remote_features (struct btdev *dev,const void *data, +uint8_t len) +{ +const struct bt_hci_cmd_le_read_all_remote_features *cmd = data; +struct bt_hci_evt_le_read_all_remote_features_complete ev; +struct btdev_conn *conn; +uint8_t status =BT_HCI_ERR_SUCCESS ; + + conn =queue_find (dev->conns, match_handle, +UINT_TO_PTR (le16_to_cpu (cmd->handle))); +if (!conn) + status =BT_HCI_ERR_UNKNOWN_CONN_ID ; + +cmd_status (dev, status,BT_HCI_CMD_LE_READ_ALL_REMOTE_FEATURES ); + +if (status) +return 0 ; + +memset (&ev,0 ,sizeof (ev)); + ev.status =BT_HCI_ERR_SUCCESS ; + ev.handle =cpu_to_le16 (conn->handle); + ev.max_pages =1 ; + ev.valid_pages =1 ; +memcpy (ev.features, conn->link->dev->le_features,248 ); + +le_meta_event (dev,BT_HCI_EVT_LE_READ_ALL_REMOTE_FEATURES_COMPLETE , &ev, +sizeof (ev)); + +return 0 ; +} + +#define CMD_LE_60 \ + CMD(BT_HCI_CMD_LE_READ_ALL_LOCAL_FEATURES, \ + cmd_le_read_all_local_features, NULL), \ + CMD(BT_HCI_CMD_LE_READ_ALL_REMOTE_FEATURES, \ + cmd_le_read_all_remote_features, NULL) + +static const struct btdev_cmd cmd_le_6_0[] = { +CMD_COMMON_ALL , +CMD_COMMON_BREDR_LE , +CMD_LE , +CMD_LE_50 , +CMD_LE_52 , +CMD_LE_60 , + {} +}; + +static void set_le_60_commands (struct btdev *btdev) +{ + btdev->commands[47 ] |=BIT (2 );/* LE Read All Local Features */ + btdev->commands[47 ] |=BIT (3 );/* LE Read All Remote Features */ + btdev->cmds = cmd_le_6_0; +} +static void set_le_commands (struct btdev *btdev) {set_common_commands_all (btdev);
@@ -7427,6 +7496,12 @@ static void set_le_commands(struct btdev *btdev)set_le_52_commands (btdev); btdev->cmds = cmd_le_5_2; } + +/* Extra LE commands for >= 6.0 adapters */ +if (btdev->type >=BTDEV_TYPE_BREDRLE52 ) { +set_le_60_commands (btdev); + btdev->cmds = cmd_le_6_0; + } } static int cmd_set_event_mask_2(struct btdev *dev, const void *data,
@@ -7607,6 +7682,7 @@ static void set_bredrle_features(struct btdev *btdev) }if (btdev->type >=BTDEV_TYPE_BREDRLE52 ) { + btdev->version =0x0b ; btdev->le_features[1 ] |=0x20 ;/* LE PER ADV */ btdev->le_features[3 ] |=BIT (0 );/* LE PAST Sender */ btdev->le_features[3 ] |=BIT (1 );/* LE PAST Receiver */
@@ -7617,6 +7693,11 @@ static void set_bredrle_features(struct btdev *btdev) btdev->le_features[4 ] |=0x01 ;/* LE ISO channels */ } +if (btdev->type >=BTDEV_TYPE_BREDRLE60 ) { + btdev->version =0x0e ; + btdev->le_features[7 ] |=BIT (7 );/* LL Extended Features */ + } + btdev->feat_page_2[0 ] |=0x01 ;/* CPB - Central Operation */ btdev->feat_page_2[0 ] |=0x02 ;/* CPB - Peripheral Operation */ btdev->feat_page_2[0 ] |=0x04 ;/* Synchronization Train */
@@ -7717,14 +7798,23 @@ struct btdev *btdev_create(enum btdev_type type, uint16_t id)memset (btdev,0 ,sizeof (*btdev)); -if (type ==BTDEV_TYPE_BREDRLE || type ==BTDEV_TYPE_LE || - type ==BTDEV_TYPE_BREDRLE50 || - type ==BTDEV_TYPE_BREDRLE52 ) { +switch (type) { +case BTDEV_TYPE_BREDRLE : +case BTDEV_TYPE_LE : +case BTDEV_TYPE_BREDRLE50 : +case BTDEV_TYPE_BREDRLE52 : +case BTDEV_TYPE_BREDRLE60 : btdev->crypto =bt_crypto_new ();if (!btdev->crypto) {free (btdev);return NULL ; } +break ; +case BTDEV_TYPE_BREDR : +case BTDEV_TYPE_BREDR20 : +case BTDEV_TYPE_AMP : +default : +break ; } btdev->type = type;
@@ -7736,6 +7826,7 @@ struct btdev *btdev_create(enum btdev_type type, uint16_t id)case BTDEV_TYPE_BREDRLE :case BTDEV_TYPE_BREDRLE50 :case BTDEV_TYPE_BREDRLE52 : +case BTDEV_TYPE_BREDRLE60 : btdev->version =0x09 ;set_bredrle_features (btdev);set_bredrle_commands (btdev);
@@ -8448,6 +8539,7 @@ int btdev_set_msft_opcode(struct btdev *btdev, uint16_t opcode)case BTDEV_TYPE_BREDRLE :case BTDEV_TYPE_BREDRLE50 :case BTDEV_TYPE_BREDRLE52 : +case BTDEV_TYPE_BREDRLE60 : btdev->msft_opcode = opcode; btdev->msft_cmds = cmd_msft;return 0 ;
@@ -8505,6 +8597,7 @@ int btdev_set_emu_opcode(struct btdev *btdev, uint16_t opcode)case BTDEV_TYPE_BREDRLE :case BTDEV_TYPE_BREDRLE50 :case BTDEV_TYPE_BREDRLE52 : +case BTDEV_TYPE_BREDRLE60 : btdev->emu_opcode = opcode; btdev->emu_cmds = cmd_emu;return 0 ;
Signature · 1 line
2.51.0
Luiz Augusto von Dentz
maintainerPATCH 3/3 mgmt-tester: Add tests for 5.2 and 6.0 Bluetooth version
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
This adds the following tests that attempt to initialize controllers with version 5.2 and 6.0:
- Set Low Energy on 5.2 - Success 4
- Set Low Energy on 6.0 - Success 5
--- tools/mgmt-tester.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
tools/mgmt-tester.c +35 -0
@@ -576,6 +576,20 @@ static void test_condition_complete(struct test_data *data)#define test_bredrle50 (name, data, setup, func) \ test_bredrle50_full(name, data, setup, func, 2) +#define test_bredrle52_full (name, data, setup, func, timeout) \ + test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE52, \ + 0x0b, 0x0001beff, 0x00000080) + +#define test_bredrle52 (name, data, setup, func) \ + test_bredrle52_full(name, data, setup, func, 2) + +#define test_bredrle60_full (name, data, setup, func, timeout) \ + test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \ + 0x0e, 0x0001beff, 0x00000080) + +#define test_bredrle60 (name, data, setup, func) \ + test_bredrle60_full(name, data, setup, func, 2) +#define test_hs_full (name, data, setup, func, timeout) \ test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE, \ 0x09, 0x0001bfff, 0x00000080)
@@ -1696,6 +1710,7 @@ static const char set_le_invalid_param[] = { 0x02 };static const char set_le_garbage_param[] = {0x01 ,0x00 };static const char set_le_settings_param_1[] = {0x80 ,0x02 ,0x00 ,0x00 };static const char set_le_settings_param_2[] = {0x81 ,0x02 ,0x00 ,0x00 }; +static const char set_le_settings_param_4[] = {0x81 ,0x02 ,0xfc ,0x01 };static const char set_le_on_write_le_host_param[] = {0x01 ,0x00 };static const struct generic_data set_le_on_success_test_1 = {
@@ -1736,6 +1751,20 @@ static const struct generic_data set_le_on_success_test_3 = { .expect_hci_len = sizeof(set_le_on_write_le_host_param), }; +static const struct generic_data set_le_on_success_test_4 = { + .setup_settings = settings_le, + .send_opcode =MGMT_OP_SET_POWERED , + .send_param = set_powered_on_param, + .send_len =sizeof (set_powered_on_param), + .expect_status =MGMT_STATUS_SUCCESS , + .expect_param = set_le_settings_param_4, + .expect_len =sizeof (set_le_settings_param_4), + .expect_settings_set =MGMT_SETTING_LE , + .expect_hci_command =BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED , + .expect_hci_param = set_le_on_write_le_host_param, + .expect_hci_len =sizeof (set_le_on_write_le_host_param), +}; +static const struct generic_data set_le_on_invalid_param_test_1 = { .send_opcode =MGMT_OP_SET_LE , .expect_status =MGMT_STATUS_INVALID_PARAMS ,
@@ -13231,6 +13260,12 @@ int main(int argc, char *argv[])test_bredrle ("Set Low Energy on - Success 3" , &set_le_on_success_test_3,NULL , test_command_generic); +test_bredrle52 ("Set Low Energy on 5.2 - Success 4" , + &set_le_on_success_test_4, +NULL , test_command_generic); +test_bredrle60 ("Set Low Energy on 6.0 - Success 5" , + &set_le_on_success_test_4, +NULL , test_command_generic);test_bredrle ("Set Low Energy on - Invalid parameters 1" , &set_le_on_invalid_param_test_1,NULL , test_command_generic);
Signature · 1 line
2.51.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1019114
---Test result---
Test Summary:
CheckPatch PENDING 0.31 seconds GitLint PENDING 0.28 seconds BuildEll PASS 19.77 seconds BluezMake FAIL 32.34 seconds MakeCheck FAIL 138.49 seconds MakeDistcheck PASS 189.01 seconds CheckValgrind FAIL 25.56 seconds CheckSmatch FAIL 179.14 seconds bluezmakeextell FAIL 19.04 seconds IncrementalBuild PENDING 0.32 seconds ScanBuild FAIL 74.71 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:
tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:587:46: error: ‘HCIEMU_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘HCIEMU_TYPE_BREDRLE50’?
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
tools/mgmt-tester.c:587:46: note: each undeclared identifier is reported only once for each function it appears in
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~make[1]: *** [Makefile:6883: tools/mgmt-tester.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4067: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:
emulator/btdev.c: In function ‘set_bredrle_features’:emulator/btdev.c:7696:21: error: ‘BTDEV_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘BTDEV_TYPE_BREDRLE50’?
7696 | if (btdev->type >= BTDEV_TYPE_BREDRLE60) {
| ^~~~~~~~~~~~~~~~~~~~
| BTDEV_TYPE_BREDRLE50
emulator/btdev.c:7696:21: note: each undeclared identifier is reported only once for each function it appears in
emulator/btdev.c: In function ‘btdev_create’:
emulator/btdev.c:7806:7: error: ‘BTDEV_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘BTDEV_TYPE_BREDRLE50’?
7806 | case BTDEV_TYPE_BREDRLE60:
| ^~~~~~~~~~~~~~~~~~~~
| BTDEV_TYPE_BREDRLE50
emulator/btdev.c: In function ‘btdev_set_msft_opcode’:
emulator/btdev.c:8542:7: error: ‘BTDEV_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘BTDEV_TYPE_BREDRLE50’?
8542 | case BTDEV_TYPE_BREDRLE60:
| ^~~~~~~~~~~~~~~~~~~~
| BTDEV_TYPE_BREDRLE50
emulator/btdev.c: In function ‘btdev_set_emu_opcode’:
emulator/btdev.c:8600:7: error: ‘BTDEV_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘BTDEV_TYPE_BREDRLE50’?
8600 | case BTDEV_TYPE_BREDRLE60:
| ^~~~~~~~~~~~~~~~~~~~
| BTDEV_TYPE_BREDRLE50make[1]: *** [Makefile:6883: emulator/btdev.o] Error 1
make: *** [Makefile:10504: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind Output:
tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:587:46: error: ‘HCIEMU_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘HCIEMU_TYPE_BREDRLE50’?
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
tools/mgmt-tester.c:587:46: note: each undeclared identifier is reported only once for each function it appears in
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~make[1]: *** [Makefile:6883: tools/mgmt-tester.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:10504: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
src/shared/crypto.c:271:21: warning: Variable length array is used.src/shared/crypto.c:272:23: warning: Variable length array is used.src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.src/shared/gatt-server.c:278:25: warning: Variable length array is used.src/shared/gatt-server.c:618:25: warning: Variable length array is used.src/shared/gatt-server.c:716:25: warning: Variable length array is used.src/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function' /usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction' /usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction' /usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction' src/shared/crypto.c:271:21: warning: Variable length array is used.src/shared/crypto.c:272:23: warning: Variable length array is used.src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.src/shared/gatt-server.c:278:25: warning: Variable length array is used.src/shared/gatt-server.c:618:25: warning: Variable length array is used.src/shared/gatt-server.c:716:25: warning: Variable length array is used.src/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function' /usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction' /usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction' /usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction' tools/mesh-cfgtest.c:1453:17: warning: unknown escape sequence: '\%'tools/sco-tester.c: note: in included file:./lib/bluetooth/bluetooth.h:232:15: warning: array of flexible structures./lib/bluetooth/bluetooth.h:237:31: warning: array of flexible structurestools/bneptest.c:634:39: warning: unknown escape sequence: '\%'tools/seq2bseq.c:57:26: warning: Variable length array is used.tools/obex-client-tool.c: note: in included file (through /usr/include/readline/readline.h):/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function' /usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction' /usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction' /usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction' unit/avctp.c:505:34: warning: Variable length array is used.unit/avctp.c:556:34: warning: Variable length array is used.unit/test-avrcp.c:373:26: warning: Variable length array is used.unit/test-avrcp.c:398:26: warning: Variable length array is used.unit/test-avrcp.c:414:24: warning: Variable length array is used.unit/avrcp-lib.c:1085:34: warning: Variable length array is used.unit/avrcp-lib.c:1583:34: warning: Variable length array is used.unit/avrcp-lib.c:1612:34: warning: Variable length array is used.unit/avrcp-lib.c:1638:34: warning: Variable length array is used.tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:587:46: error: ‘HCIEMU_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘HCIEMU_TYPE_BREDRLE50’?
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
tools/mgmt-tester.c:587:46: note: each undeclared identifier is reported only once for each function it appears in
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~make[1]: *** [Makefile:6883: tools/mgmt-tester.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4067: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:
tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:587:46: error: ‘HCIEMU_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘HCIEMU_TYPE_BREDRLE50’?
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
tools/mgmt-tester.c:587:46: note: each undeclared identifier is reported only once for each function it appears in
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~make[1]: *** [Makefile:6883: tools/mgmt-tester.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4067: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2147:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2155:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3180:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3202:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
12 warnings generated.
src/shared/bap.c:1534:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2322:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:996:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1102:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1296:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1361:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1641:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2147:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2155:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3180:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3202:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~
12 warnings generated.
tools/hciattach.c:817:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 10)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:865:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:887:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 10)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:909:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:930:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 4)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:974:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 6)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
src/shared/bap.c:1534:8: warning: Use of memory after it is freed
bap = bt_bap_ref_safe(bap);
^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2322:20: warning: Use of memory after it is freed
return queue_find(stream->bap->streams, NULL, stream);
^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/oui.c:50:2: warning: Value stored to 'hwdb' is never read
hwdb = udev_hwdb_unref(hwdb);
^ ~~~~~~~~~~~~~~~~~~~~~
src/oui.c:53:2: warning: Value stored to 'udev' is never read
udev = udev_unref(udev);
^ ~~~~~~~~~~~~~~~~
2 warnings generated.
tools/rfcomm.c:234:3: warning: Value stored to 'i' is never read
i = execvp(cmdargv[0], cmdargv);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:234:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
i = execvp(cmdargv[0], cmdargv);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:354:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:497:14: warning: Assigned value is garbage or undefined
req.channel = raddr.rc_channel;
^ ~~~~~~~~~~~~~~~~
tools/rfcomm.c:515:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
tools/hcidump.c:180:9: warning: Potential leak of memory pointed to by 'dp'
if (fds[i].fd == sock)
^~~
tools/hcidump.c:248:17: warning: Assigned value is garbage or undefined
dh->ts_sec = htobl(frm.ts.tv_sec);
^ ~~~~~~~~~~~~~~~~~~~~
tools/hcidump.c:326:9: warning: 1st function call argument is an uninitialized value
if (be32toh(dp.flags) & 0x02) {
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:341:20: warning: 1st function call argument is an uninitialized value
frm.data_len = be32toh(dp.len);
^~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:346:14: warning: 1st function call argument is an uninitialized value
opcode = be32toh(dp.flags) & 0xffff;
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:384:17: warning: Assigned value is garbage or undefined
frm.data_len = btohs(dh.len);
^ ~~~~~~~~~~~~~
tools/hcidump.c:394:11: warning: Assigned value is garbage or undefined
frm.len = frm.data_len;
^ ~~~~~~~~~~~~
tools/hcidump.c:398:9: warning: 1st function call argument is an uninitialized value
ts = be64toh(ph.ts);
^~~~~~~~~~~~~~
/usr/include/endian.h:51:22: note: expanded from macro 'be64toh'
# define be64toh(x) __bswap_64 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:403:13: warning: 1st function call argument is an uninitialized value
frm.in = be32toh(dp.flags) & 0x01;
^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
# define be32toh(x) __bswap_32 (x)
^~~~~~~~~~~~~~
tools/hcidump.c:408:11: warning: Assigned value is garbage or undefined
frm.in = dh.in;
^ ~~~~~
tools/hcidump.c:437:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
fd = open(file, open_flags, 0644);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 warnings generated.
tools/ciptool.c:351:7: warning: 5th function call argument is an uninitialized value
sk = do_connect(ctl, dev_id, &src, &dst, psm, (1 << CMTP_LOOPBACK));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:587:46: error: ‘HCIEMU_TYPE_BREDRLE60’ undeclared (first use in this function); did you mean ‘HCIEMU_TYPE_BREDRLE50’?
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
tools/mgmt-tester.c:587:46: note: each undeclared identifier is reported only once for each function it appears in
587 | test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE60, \
| ^~~~~~~~~~~~~~~~~~~~~tools/mgmt-tester.c:538:23: note: in definition of macro ‘test_full’
538 | user->hciemu_type = type; \
| ^~~~tools/mgmt-tester.c:591:2: note: in expansion of macro ‘test_bredrle60_full’
591 | test_bredrle60_full(name, data, setup, func, 2)
| ^~~~~~~~~~~~~~~~~~~
tools/mgmt-tester.c:13266:2: note: in expansion of macro ‘test_bredrle60’
13266 | test_bredrle60("Set Low Energy on 6.0 - Success 5",
| ^~~~~~~~~~~~~~
make[1]: *** [Makefile:6883: tools/mgmt-tester.o] Error 1
make[1]: *** Waiting for unfinished jobs....
src/sdp-xml.c:126:10: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
src/sdp-xml.c:306:11: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
src/sdp-xml.c:344:11: warning: Assigned value is garbage or undefined
buf[1] = data[i + 1];
^ ~~~~~~~~~~~
3 warnings generated.
tools/sdptool.c:941:26: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t', which is incompatible with sizeof operand type 'int'
uint32_t *value_int = malloc(sizeof(int));
~~~~~~~~~~ ^~~~~~ ~~~~~~~~~~~
tools/sdptool.c:980:4: warning: 1st function call argument is an uninitialized value
free(allocArray[i]);
^~~~~~~~~~~~~~~~~~~
tools/sdptool.c:3777:2: warning: Potential leak of memory pointed to by 'si.name'
return add_service(0, &si);
^~~~~~~~~~~~~~~~~~~~~~~~~~
tools/sdptool.c:4112:4: warning: Potential leak of memory pointed to by 'context.svc'
return -1;
^~~~~~~~~4 warnings generated.
make: *** [Makefile:4067: all] Error 2
---
Regards,
Linux Bluetooth