diff mbox series

[BlueZ] bthost: Set advertising intervals to valid value

Message ID 20250215190251.173383-1-arkadiusz.bokowy@gmail.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ] bthost: Set advertising intervals to valid value | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake fail BluezMake FAIL: tools/mgmt-tester.c: In function ‘main’: tools/mgmt-tester.c:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12893 | int main(int argc, char *argv[]) | ^~~~ emulator/btdev.c: In function ‘cmd_set_ext_adv_params’: emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] 4880 | if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */) | ^ emulator/btdev.c: In function ‘cmd_set_ext_adv_params’: emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] 4880 | if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */) | ^ cc1: all warnings being treated as errors make[1]: *** [Makefile:8757: emulator/android_android_tester-btdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... cc1: all warnings being treated as errors make[1]: *** [Makefile:9387: emulator/android_ipc_tester-btdev.o] Error 1 make: *** [Makefile:4682: all] Error 2
tedd_an/MakeCheck fail BlueZ Make Check FAIL:
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind fail Check Valgrind FAIL: emulator/btdev.c: In function ‘cmd_set_ext_adv_params’: emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] 4880 | if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */) | ^ cc1: all warnings being treated as errors make[1]: *** [Makefile:8757: emulator/android_android_tester-btdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... tools/mgmt-tester.c: In function ‘main’: tools/mgmt-tester.c:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12893 | int main(int argc, char *argv[]) | ^~~~ make: *** [Makefile:12320: check] Error 2
tedd_an/CheckSmatch fail CheckSparse: FAIL: 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:296:25: warning: array of flexible structures src/shared/bap.c: note: in included file: ./src/shared/ascs.h:88:25: warning: array of flexible structures src/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:296:25: warning: array of flexible structures src/shared/bap.c: note: in included file: ./src/shared/ascs.h:88:25: warning: array of flexible structures src/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.h:232:15: warning: array of flexible structures ./lib/bluetooth.h:237:31: warning: array of flexible structures tools/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' android/avctp.c:505:34: warning: Variable length array is used. android/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. android/avrcp-lib.c:1085:34: warning: Variable length array is used. android/avrcp-lib.c:1583:34: warning: Variable length array is used. android/avrcp-lib.c:1612:34: warning: Variable length array is used. android/avrcp-lib.c:1638:34: warning: Variable length array is used. mesh/mesh-io-mgmt.c:523:67: warning: Variable length array is used. client/display.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:296:25: warning: array of flexible structures src/shared/bap.c: note: in included file: ./src/shared/ascs.h:88:25: warning: array of flexible structures src/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' monitor/packet.c: note: in included file: monitor/display.h:82:26: warning: Variable length array is used. monitor/packet.c:1868:26: warning: Variable length array is used. monitor/l2cap.c: note: in included file: monitor/display.h:82:26: warning: Variable length array is used. monitor/packet.c: note: in included file: monitor/bt.h:3606:52: warning: array of flexible structures monitor/bt.h:3594:40: warning: array of flexible structures monitor/msft.c: note: in included file: monitor/msft.h:88:44: warning: array of flexible structures monitor/att.c: note: in included file: monitor/display.h:82:26: warning: Variable length array is used. tools/rctest.c:627:33: warning: non-ANSI function declaration of function 'automated_send_recv' tools/hex2hcd.c:136:26: warning: Variable length array is used. tools/meshctl.c:324:33: warning: non-ANSI function declaration of function 'forget_mesh_devices' tools/mesh-gatt/node.c:456:39: warning: non-ANSI function declaration of function 'node_get_local_node' tools/mesh-gatt/net.c:1239:30: warning: non-ANSI function declaration of function 'get_next_seq' tools/mesh-gatt/net.c:2193:29: warning: non-ANSI function declaration of function 'net_get_default_ttl' tools/mesh-gatt/net.c:2207:26: warning: non-ANSI function declaration of function 'net_get_seq_num' tools/mesh-gatt/prov.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-gatt/onoff-model.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' ell/log.c:431:65: warning: non-ANSI function declaration of function 'register_debug_section' ell/log.c:439:68: warning: non-ANSI function declaration of function 'free_debug_sections' ell/random.c:60:42: warning: non-ANSI function declaration of function 'l_getrandom_is_supported' ell/cipher.c:660:28: warning: non-ANSI function declaration of function 'init_supported' ell/checksum.c:372:28: warning: non-ANSI function declaration of function 'init_supported' ell/checksum.c:434:47: warning: non-ANSI function declaration of function 'l_checksum_cmac_aes_supported' ell/cipher.c:519:24: warning: Variable length array is used. ell/cert-crypto.c:36:33: warning: Variable length array is used. ell/cert-crypto.c:132:36: warning: Variable length array is used. ell/cert-crypto.c:188:36: warning: Variable length array is used. ell/cert-crypto.c:241:31: warning: Variable length array is used. ell/key.c:538:25: warning: Variable length array is used. ell/dbus-service.c:548:49: warning: non-ANSI function declaration of function '_dbus_object_tree_new' ell/dbus-filter.c:232:46: warning: Variable length array is used. ell/tls.c:45:25: warning: Variable length array is used. ell/tls.c:86:22: warning: Variable length array is used. ell/tls.c:86:46: warning: Variable length array is used. ell/tls-suites.c:1078:25: warning: Variable length array is used. ell/tls-suites.c:1080:34: warning: Variable length array is used. ell/tls-suites.c:1083:41: warning: Variable length array is used. ell/tls-suites.c:1132:41: warning: Variable length array is used. ell/tls.c:1819:26: warning: Variable length array is used. emulator/btdev.c:450:29: warning: Variable length array is used. emulator/bthost.c:613:28: warning: Variable length array is used. emulator/bthost.c:787:28: warning: Variable length array is used. emulator/btdev.c: In function ‘cmd_set_ext_adv_params’: emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] 4880 | if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */) | ^ cc1: all warnings being treated as errors make[1]: *** [Makefile:7851: emulator/btdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:4682: all] Error 2
tedd_an/bluezmakeextell fail Make External ELL FAIL: emulator/btdev.c: In function ‘cmd_set_ext_adv_params’: emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] 4880 | if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */) | ^ cc1: all warnings being treated as errors make[1]: *** [Makefile:7851: emulator/btdev.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:4682: all] Error 2
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Arkadiusz Bokowy Feb. 15, 2025, 7:02 p.m. UTC
The range for LE advertising intervals shall be in range between 20 ms
and 10,485,759.375 ms. Requesting other value should result in the
unsupported feature or parameter value error code (0x11).

After the modification in fa4d477, the btdev emulator no longer accepts
uninitialized LE advertising intervals. To fix that, set the default LE
advertising interval to the lowest possible value - 20 ms - in order to
minimize tests delay cause by device discovery.

Also, this commit fixes the detection of the high duty cycle directed
connectable advertising and sets the advertising interval to 3 ms for
such cases in order to be complaint with the spec.
---
 emulator/btdev.c  | 11 ++++++-----
 emulator/bthost.c |  3 +++
 2 files changed, 9 insertions(+), 5 deletions(-)

Comments

bluez.test.bot@gmail.com Feb. 15, 2025, 7:41 p.m. UTC | #1
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=934344

---Test result---

Test Summary:
CheckPatch                    PENDING   0.28 seconds
GitLint                       PENDING   0.30 seconds
BuildEll                      PASS      20.59 seconds
BluezMake                     FAIL      65.37 seconds
MakeCheck                     FAIL      139.20 seconds
MakeDistcheck                 PASS      157.90 seconds
CheckValgrind                 FAIL      45.71 seconds
CheckSmatch                   FAIL      267.41 seconds
bluezmakeextell               FAIL      87.90 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      863.09 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:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12893 | int main(int argc, char *argv[])
      |     ^~~~
emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8757: emulator/android_android_tester-btdev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[1]: *** [Makefile:9387: emulator/android_ipc_tester-btdev.o] Error 1
make: *** [Makefile:4682: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:

emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7851: emulator/btdev.o] Error 1
make: *** [Makefile:12320: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:

emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8757: emulator/android_android_tester-btdev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12893 | int main(int argc, char *argv[])
      |     ^~~~
make: *** [Makefile:12320: 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:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/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:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/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.h:232:15: warning: array of flexible structures
./lib/bluetooth.h:237:31: warning: array of flexible structures
tools/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'
android/avctp.c:505:34: warning: Variable length array is used.
android/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.
android/avrcp-lib.c:1085:34: warning: Variable length array is used.
android/avrcp-lib.c:1583:34: warning: Variable length array is used.
android/avrcp-lib.c:1612:34: warning: Variable length array is used.
android/avrcp-lib.c:1638:34: warning: Variable length array is used.
mesh/mesh-io-mgmt.c:523:67: warning: Variable length array is used.
client/display.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:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/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'
monitor/packet.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
monitor/packet.c:1868:26: warning: Variable length array is used.
monitor/l2cap.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
monitor/packet.c: note: in included file:
monitor/bt.h:3606:52: warning: array of flexible structures
monitor/bt.h:3594:40: warning: array of flexible structures
monitor/msft.c: note: in included file:
monitor/msft.h:88:44: warning: array of flexible structures
monitor/att.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
tools/rctest.c:627:33: warning: non-ANSI function declaration of function 'automated_send_recv'
tools/hex2hcd.c:136:26: warning: Variable length array is used.
tools/meshctl.c:324:33: warning: non-ANSI function declaration of function 'forget_mesh_devices'
tools/mesh-gatt/node.c:456:39: warning: non-ANSI function declaration of function 'node_get_local_node'
tools/mesh-gatt/net.c:1239:30: warning: non-ANSI function declaration of function 'get_next_seq'
tools/mesh-gatt/net.c:2193:29: warning: non-ANSI function declaration of function 'net_get_default_ttl'
tools/mesh-gatt/net.c:2207:26: warning: non-ANSI function declaration of function 'net_get_seq_num'
tools/mesh-gatt/prov.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-gatt/onoff-model.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'
ell/log.c:431:65: warning: non-ANSI function declaration of function 'register_debug_section'
ell/log.c:439:68: warning: non-ANSI function declaration of function 'free_debug_sections'
ell/random.c:60:42: warning: non-ANSI function declaration of function 'l_getrandom_is_supported'
ell/cipher.c:660:28: warning: non-ANSI function declaration of function 'init_supported'
ell/checksum.c:372:28: warning: non-ANSI function declaration of function 'init_supported'
ell/checksum.c:434:47: warning: non-ANSI function declaration of function 'l_checksum_cmac_aes_supported'
ell/cipher.c:519:24: warning: Variable length array is used.
ell/cert-crypto.c:36:33: warning: Variable length array is used.
ell/cert-crypto.c:132:36: warning: Variable length array is used.
ell/cert-crypto.c:188:36: warning: Variable length array is used.
ell/cert-crypto.c:241:31: warning: Variable length array is used.
ell/key.c:538:25: warning: Variable length array is used.
ell/dbus-service.c:548:49: warning: non-ANSI function declaration of function '_dbus_object_tree_new'
ell/dbus-filter.c:232:46: warning: Variable length array is used.
ell/tls.c:45:25: warning: Variable length array is used.
ell/tls.c:86:22: warning: Variable length array is used.
ell/tls.c:86:46: warning: Variable length array is used.
ell/tls-suites.c:1078:25: warning: Variable length array is used.
ell/tls-suites.c:1080:34: warning: Variable length array is used.
ell/tls-suites.c:1083:41: warning: Variable length array is used.
ell/tls-suites.c:1132:41: warning: Variable length array is used.
ell/tls.c:1819:26: warning: Variable length array is used.
emulator/btdev.c:450:29: warning: Variable length array is used.
emulator/bthost.c:613:28: warning: Variable length array is used.
emulator/bthost.c:787:28: warning: Variable length array is used.
emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7851: emulator/btdev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4682: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:

emulator/btdev.c: In function ‘cmd_set_ext_adv_params’:
emulator/btdev.c:4880:20: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
 4880 |  if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
      |                    ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7851: emulator/btdev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4682: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index d7f61deb0..c0872ad55 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -4870,14 +4870,15 @@  static int cmd_set_ext_adv_params(struct btdev *dev, const void *data,
 
 	ext_adv->type = le16_to_cpu(cmd->evt_properties);
 
-	/* In case of direct advertising (type == 0x01) the advertising
-	 * intervals shall be ignored and high duty cycle shall be used.
+	/* In case of high duty cycle directed connectable advertising
+	 * intervals shall be ignored and high duty cycle shall be used
+	 * (advertising interval <= 3.75 ms).
 	 */
-	if (ext_adv->type == 0x01)
-		ext_adv->interval = 10;
+	if (ext_adv->type & 0x0D == 0x0D /* 0b1101 */)
+		ext_adv->interval = 3;
 	else {
 		unsigned int min_interval = get_le24(cmd->min_interval);
-		if (min_interval < 0x0020 || min_interval > 0x4000) {
+		if (min_interval < 0x0020 || min_interval > 0xFFFFFF) {
 			rsp.status = BT_HCI_ERR_UNSUPPORTED_FEATURE;
 			cmd_complete(dev, BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
 						&rsp, sizeof(rsp));
diff --git a/emulator/bthost.c b/emulator/bthost.c
index 95160506d..a76b02ecc 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -3249,11 +3249,14 @@  void bthost_set_scan_enable(struct bthost *bthost, uint8_t enable)
 
 void bthost_set_ext_adv_params(struct bthost *bthost)
 {
+	const uint8_t interval_20ms[] = { 0x20, 0x00, 0x00 };
 	struct bt_hci_cmd_le_set_ext_adv_params cp;
 
 	memset(&cp, 0, sizeof(cp));
 	cp.handle = 0x01;
 	cp.evt_properties = cpu_to_le16(0x0013);
+	memcpy(cp.min_interval, interval_20ms, sizeof(cp.min_interval));
+	memcpy(cp.max_interval, interval_20ms, sizeof(cp.max_interval));
 	send_command(bthost, BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
 							&cp, sizeof(cp));
 }