-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bt mesh and bt host fixes from upstream #2514
Bt mesh and bt host fixes from upstream #2514
Conversation
bd6869a
to
43191e1
Compare
When cherry-picking use |
* The `bt_dev.le.conn_ready` list is accessed by the tx_processor which runs in a workqueue, but `bt_conn_data_ready` can be called from different threads so we need to make sure that nothing will trigger a context switch while we are manipulating the list since sys_slist_*() functions are not thread safe. * This only happens if call to `bt_conn_data_ready` is performed from a preemptive task which can happen depending on the application. Signed-off-by: Yago Fontoura do Rosario <[email protected]> (cherry picked from commit 9f77362) Signed-off-by: alperen sener <[email protected]>
* Two mocks were missing in kernel mocks Signed-off-by: Yago Fontoura do Rosario <[email protected]> (cherry picked from commit ee32613) Signed-off-by: alperen sener <[email protected]>
uuid needs to be keept in pb_gatt_cli server context until the client is connected to server, otherwise, since we only kept the pointer from the net_buffer, any incoming unprovisioned beacon before the connection is established may overwrite uuid. Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 37cdfe8) Signed-off-by: alperen sener <[email protected]>
…cases Extending existing provisioning test code to use PB-GATT and adding test cases for provisioning over PB-GATT. Test names are changed to represent both provisioning brearers. Enabled required kconfigs for PB-GATT and GATT proxy features in overlay_gatt.conf. Test argument prov-bearer is added to provisioning tests to select bearer. Following tests are renamed and extended to use PB-GATT - pb_adv_multi - pb_adv_no_oob - pb_adv_oob_auth_ib_pk - pb_adv_oob_auth_ignore_oob_pk - pb_adv_oob_auth_oob_pk - pb_adv_reprovision PB-GATT test cases will run only with PSA encryption since tinycrypt is to be deprecated. Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 917683a) Signed-off-by: alperen sener <[email protected]>
By using `SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO` we can ensure that BT subsystems always get loaded after BT, and BT Mesh after both of them. This solves the host having to register a GATT service in a delayed manner, as we are sure to now register the GATT service after sc_commit sets `SC_LOAD`. Signed-off-by: Kyra Lengfeld <[email protected]> (cherry picked from commit 64d8713) Signed-off-by: alperen sener <[email protected]>
Commit: - adds dependency of the mbedtls psa usage on secure storage - removes PSA ITS emulator and enables usage of the secure storage in ble mesh bsim tests - enables secure storage in all ble mesh and related samples Signed-off-by: Aleksandr Khromykh <[email protected]> (cherry picked from commit 967b096) Signed-off-by: alperen sener <[email protected]>
…lots for mesh MESH PTS tests require different number of keys, as an example; only one netkey requires 8 key slots and there are test cases that use at least two netkeys which consume the default 16 slots, so it is better to have enough slots all times. Setting slot count to 32. Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 35aea49) Signed-off-by: alperen sener <[email protected]>
…ssage PDU size According to MshDFUv1.0, section 6.2.3.5, the Firmware Distribution Receivers List message is not limited by the size of the receivers list: ``` The number of selected entries shall be limited by the following: - The number of entries shall not exceed the value of the Entries Limit field from the Firmware Distribution Receivers Get message. - The number of entries shall not cause the message payload to exceed the maximum Access PDU size. ``` Thus, this assertion is incorrect as it doesn't allow to have the receivers list bigger than number of maximal Access PDU size. Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit 6463d15) Signed-off-by: alperen sener <[email protected]>
Removed similar prj.conf files and added overlays instead to avoid duplicate code. Renamed some test files for consistency. Signed-off-by: Stine Akredalen <[email protected]> (cherry picked from commit 724d32c) Signed-off-by: alperen sener <[email protected]>
Iterate over the list of connections to find a connection that is able to send data, instead of returning NULL if the first connection can't send data. This solves the problem with starvation of other connections. Signed-off-by: Ahmed Ahmed <[email protected]> (cherry picked from commit 0998716) Signed-off-by: alperen sener <[email protected]>
Assert that the previous connection in the list and the tmp element in the loop are different to the current connection. Otherwise, if the same connection was somehow added twice it could result in an infinite loop. Signed-off-by: Ahmed Ahmed <[email protected]> (cherry picked from commit 2edddbd) Signed-off-by: alperen sener <[email protected]>
Add check that the command buffer claimed in `bt_le_create_conn_cancel` is not `NULL`. Fixes a fault caused by providing the `NULL` buffer to `bt_hci_cmd_state_set_init`. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit 7365bcf13350f7027811ffba4b363dc432e9ff98) Signed-off-by: alperen sener <[email protected]>
psa_crypto_init was bounded to CONFIG_BT_HOST_CRYPTO_PRNG and used to be called under prng_init. Updating the ifdef condition and appropriating the function name for crypto init. Also it is better to make sure psa_crypto_init called by host. Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 22de0b3732476c8b16a4c11a7c1724f57918e790) Signed-off-by: alperen sener <[email protected]>
…'t result in 0 Ensure that ~(link.rx.seg) & SEG_NVAL doesn't result in 0. Fixes #84804 Coverity-CID: 393090 Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit fcf09dd0ad61e932dd0fee39ee0b4ae5adc2c88e) Signed-off-by: alperen sener <[email protected]>
…ntial overflow Explicitly cast `BT_MESH_TRANSMIT` output to avoid potential overflow. Fixes #84759 Fixes #84749 Fixes #84702 Coverity-CID: 487624 Coverity-CID: 487648 Coverity-CID: 487722 Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit f82c0e85b09d8b8716a37d50225cea62926ebf49) Signed-off-by: alperen sener <[email protected]>
…enough This commit checks that ATT MTU value returned by `bt_gatt_get_mtu` is greater or equal to 3 to prevent integer overflow. Fixes #84693 Coverity-CID: 487743 Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit 038173acdadd507049579f2996f49e9f141a5b4b) Signed-off-by: alperen sener <[email protected]>
…on issue Explicitly cast Kconfig option value to avoid truncation issue reported by Coverity. Fixes #84697 Coverity-CID: 487737 Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit b7f16f10414c0df1e75937e2f55de7edc79f57d0) Signed-off-by: alperen sener <[email protected]>
…eanless The first why introduce ADV_FLAG_PROXY_START see here(zephyrproject-rtos/zephyr#58826) The main core change is to mark ADV_FLAG_PROXY as moving to the last enabled proxy instead of before. But introducing the ADV_FLAG_PROXY_START flag seems meaningless. Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit bcac572ab477b4421063bfaf9d8a5cf833dc5100) Signed-off-by: alperen sener <[email protected]>
Remove START_PENDING flag, and replace with bt_mesh_adv_is_empty_by_tag not only make adv_ext.c more readable, but also enhancement In previous implementation, after proxy started, will check this flag, and when the flag is true, will direct stop proxy and re-enter schedule, but has one problem, this flag set true, but buf will be empty, such as when sending mesh relay messages will for-each every sets, until find not-active, but also set previous set START_PENDING flags, so will cause proxy advertising started->stop->started. Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit 2ebdcfa963a56cded34fa77b5681345ced682050) Signed-off-by: alperen sener <[email protected]>
…advertiser Add some configuration for test adv_ext.c Signed-off-by: Lingao Meng <[email protected]> Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit f5bd2170d1e4bbc3367c56081bf8d684dfa140f1) Signed-off-by: alperen sener <[email protected]>
Commit removes the double cdb node entry storing into the settings if device was reprovisioned over nppi interface. Signed-off-by: Aleksandr Khromykh <[email protected]> (cherry picked from commit 4bb595718da6dbb52c65c14243da510d146565b4) Signed-off-by: alperen sener <[email protected]>
Adds a macro returning a string representation of a Bluetooth address. This allows you to print multiple addresses in a single printk or LOG... call. Signed-off-by: Håvard Reierstad <[email protected]> (cherry picked from commit 997814cf8c7fcfdb0cb912d6b48efe08486c6583) Signed-off-by: alperen sener <[email protected]>
Adds two macros to the babblekit library: * DEFINE_FLAG_STATIC * TEST_ASSERT_NO_MSG Signed-off-by: Håvard Reierstad <[email protected]> (cherry picked from commit c2c4f2e0d110edaeb12c47a4a81f69a895d28a7d) Signed-off-by: alperen sener <[email protected]>
Commit does the following changes: * Use functionality from the `babbelkit` library for common functions related to flags, test progression (failing, passing etc.) and synchronization between two devices. Locally defined equivalents are removed. * Removes the files containing only functionality that is provided by the `babblekit` library. * Remove the `test_pre_init_f` and `test_tick_f` functions (commonly implemented as `test_init` and `test_tick`) from the modified tests. These functions are not needed as they were only used to fail the test if a device didn't complete the test within a certain time frame. This is already handled by the `sim_length` argument used in the test scripts. Signed-off-by: Håvard Reierstad <[email protected]> (cherry picked from commit 7737483c0612d6d692c70d43f8dc1c6791f4922b) Signed-off-by: alperen sener <[email protected]>
Increase CONFIG_BT_BUF_CMD_TX_COUNT to avoid deadlock when running out of buffers. See #77241 for the reference. This fixes Mesh Provisioning Service tests (MESH/NODE/MPS). Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit 6c35d372dd201647fd7fc97e070da20421ad077b) Signed-off-by: alperen sener <[email protected]>
…ze kconfig Different test layers need different stack sizes for BTP CMD thread and also AutoPTS might need to overwrite this config based on test case. Increase the stack size for mesh tests. Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 3cab4fe0dc589a4babf3584021e7e5ee68f596e4) Signed-off-by: alperen sener <[email protected]>
Remove the experimental flag from BT_MESH_USES_TFM_PSA. Signed-off-by: Ingar Kulbrandstad <[email protected]> (cherry picked from commit 45f233ba619079a0403a11deac802d62cceaf137) Signed-off-by: alperen sener <[email protected]>
xfer_progress_complete should be checked instead of end callback Signed-off-by: alperen sener <[email protected]> (cherry picked from commit 3fdb81cd1fee384939c41726484b70b0e62ebcec) Signed-off-by: alperen sener <[email protected]>
…targets. Mesh currently works with trusted storage on real targets. Until secure storage is supported by default disable it. Signed-off-by: alperen sener <[email protected]>
43191e1
to
615d949
Compare
Added my sign |
PR includes fixed for both host and mesh