Commit Graph

85173 Commits

Author SHA1 Message Date
Florian Grandel
fce4788415 drivers: ieee802154: cc13xx_cc26xx_subg: fix oper. state
The driver API now distinguishes between operational UP/DOWN states as
required by Zephyr's network API and receiver on/off states as an
internal driver state for improved standard conformance.

This change closes the gap between the driver API requirements and the
implementation in this respect.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Florian Grandel
016d3bed5c drivers: ieee802154: cc13xx_cc26xx_subg: improve locking
Replaces the mutex by a semaphore for ISR readiness as requested by the
driver API specification.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Florian Grandel
26a0ef15c4 drivers: ieee802154: cc13xx_cc26xx_subg: check for RX up
Checks whether the receiver is already on before trying to switch it on.
This also closes a gap wrt the driver API specification.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Florian Grandel
35cfe00e91 drivers: ieee802154: cc13xx_cc26xx_subg: remove redundant code
Removes redunant reset statements that update immutable data.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Florian Grandel
128354ae17 drivers: ieee802154: cc13xx_cc26xx_subg: simplify static funcs
Restructuring and renaming of driver-internal functions for improved
readability and maintainability:
- distinguish between externally exposed API methods
  (cc13xx_cc26xx_sub_* prefix) and internal helper methods
  (drv_* prefix).
- extract a few functions to reduce complexity and improve re-use

Also removes unnecessary initial runtime blanking of static (.bss) data
in the newly introduced extracted buffer initialization functions.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Florian Grandel
c81c38114a drivers: ieee802154: cc13xx_cc26xx_subg: minor cleanup
Cleans up includes and a few other minor non-functional errors in the
CC13/26xx driver.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-05 12:01:29 +03:00
Aleksandr Khromykh
0ba6e80a12 Bluetooth: Mesh: fix settings work queue size for rpr
If RPR server is used then Mesh settings work queue
requires more size during provisioning procedure.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-10-05 09:44:00 +01:00
Torsten Rasmussen
c7779bec8c cmake: stub zephyr_set(... SCOPE ...) function in package helper
Fixes: #63011

Custom targets are not available in script mode, which cause snippet
loading to fail when using package helper.

Lookup of snippets is supported by package helper, thus allowing twister
to filter test cases based on snippets.

However, loading of snippets itself is not supported as snippets make
use of Zephyr scoping, which uses custom targets, something that is not
available in script mode.

Therefore overload the `zephyr_set()` function, so that CMake package
helper can be used together with snippets.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-10-05 09:43:28 +01:00
Flavio Ceolin
3521c95c2f fs: fuse: Fix possible buffer overflow
Ensure that the path in fuse_fs_access_readdir does not overflow
the local buffer.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-05 09:42:17 +01:00
Daniel DeGrasse
14d88c6dc8 tests: drivers: flash: remove platform_allow filter
Prior to commit 903a79431, drivers.flash.common.default would have
executed on any platform that passed the filter condition. With the
addition of the platform_allow filter, this is no longer the case, and
is masking issues such as those seen in #62963. Remove the
platform_allow filter to return this test to the previous behavior.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-05 09:39:38 +01:00
Martin Åberg
ccbbb493da tests: kernel: Add qemu_leon3 to no-multithreading tests
Add qemu_leon3 target to the tests that list below. These set
CONFIG_MULTITHREADING=n.

- tests/kernel/mem_heap/mheap_api_concept
- tests/kernel/mem_slab/mslab_api
- tests/kernel/threads/no-multithreading
- tests/kernel/timer/timer_api

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2023-10-05 09:37:10 +01:00
Jun Lin
db8855aaa3 driver: crypto: SHA: npcx: change to support npcx4
The pre-alloacted size of the buffer for the SHA ROM API code increases
in npcx4 chip. This commit adds a new property context-buffer-size to
sha0 DT node in npcx9 and npcx4 separately. The driver can pre-allocate
buffer with the correct size based on the property.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-10-05 09:14:05 +01:00
Flavio Ceolin
66d76d4afa doc: vuln: Add CVEs under embargo
Add placeholders for CVEs under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-05 09:13:53 +01:00
Flavio Ceolin
78f24b0a27 doc: release: 3.5 Add CVEs under embargo
Add CVEs fixed that are under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-05 09:13:53 +01:00
Erwan Gouriou
6d56851eb5 boards: frdm_k64f: Add uart-mcumgr chosen
Since frdm_k64f is used as example in mcumgr sample with serial transport,
make it ready for compilation.

Fixes #63520

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-05 11:11:48 +03:00
Alperen Şener
85fa412201 bluetooth: tester: add support for variable static oob size
Adding variable static auth size support to be compatible
both mesh 1.0.1 and mesh 1.1.

Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
2023-10-05 09:20:33 +02:00
Emil Gydesen
e962fda0ee Bluetooth: Audio: Fix BAP Broadcast source reconfig param count
The check for number of streams in a subgroup was reversed, so
it would never allow for correct values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-05 09:19:56 +02:00
Flavio Ceolin
078967671c doc: vuln: Add information about CVE-2023-4264
Information about CVE-2023-4264

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-04 21:46:57 +03:00
Flavio Ceolin
e9e698e4f1 doc: release: 3.5 Add info about CVE-2023-4264
Add CVE-2023-4264 info to release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-04 21:46:57 +03:00
Wojciech Slenska
dcf6327d6a net: context: set context->local for offloaded iface
Currently context->local is not set for offloaded interface.
This change move net_offload_bind call after set of context->local.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2023-10-04 20:29:33 +02:00
Mario Jaun
01bdd845db drivers: i2c: stm32: disable reload mode at the end of a transfer
Fixes an issue that reload mode is not disabled in case of an error.
From this case the driver could not recover because in msg_init()
no new transfer could be initialized.

Signed-off-by: Mario Jaun <mario.jaun@gmail.com>
2023-10-04 20:25:20 +02:00
Daniel DeGrasse
d487794dd6 drivers: i2s: i2s_mcux_sai: fix logging statements for k_mem_slab
Since 2f003e59 reworked the structure of k_mem_slab information fields,
we need to update the logging statements in the i2s_mcux_sai driver to
access these fields correctly.

Fixes #63527

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-04 20:25:09 +02:00
Grzegorz Swiderski
9bbf7e5a48 scripts: domains: Convert Domain to a dataclass
For conciseness.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-04 18:04:18 +02:00
Grzegorz Swiderski
652b0a8a98 scripts: domains: Support initialization only from YAML
By requiring a full-on YAML fragment, the Domains class can rely on
pykwalify to do the heavy lifting with validating types and structure.
Remove support for loading domains from a dictionary, so that we don't
ever have to replicate the same checks on the input, and we can instead
have a single entry point.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-04 18:04:18 +02:00
Grzegorz Swiderski
f82e2ef043 scripts: domains: Tighten up initialization
Do extra checks to reject inconsistent `domains.yaml` contents early:

   default: app
   build_dir: /path/to/build
   domains:
     - name: image_1
       build_dir: /path/to/build/image_1
     - name: image_2
       build_dir: /path/to/build/image_2
   flash_order:
     - image_1
     - image_2
     - unknown

This example lists "image_1" and "image_2" as known domains, but an
entry for the default "app" is missing, which should never be allowed.
A valid `domains.yaml` file shall also not contain extra domains under
`flash_order`, such as "unknown", which doesn't appear under `domains`.
Either of these cases can now be caught while initializing an instance
of the Domains class.

It follows that a valid `domains.yaml` file must always contain a list
of domains with at least one entry - the default image. Since `default`
is a required key in the YAML schema, `domains` should be required too.
Thus, empty lists will be rejected by pykwalify, so the questionable
warning for "no domains defined; this probably won't work" can be axed.

Fixes #63166

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-04 18:04:18 +02:00
Fabio Baltieri
2f64ac9ab6 doc: release: add 3.5 change and release notes about bq274xx
Few channels of this driver were using the wrong units, add a note
pointing out that this needs a matching change in any application using
them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:19:24 +01:00
Fabio Baltieri
761dac4fa7 doc: release: add 3.5 add build time checking release notes
Add few notes about the change in build time priority cheking and the
new initlevels target.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:19:24 +01:00
Fabio Baltieri
9eaa6a2798 doc: release: add 3.5 migration notes about CONTAINER_OF
Add a migration note entry about CONTAINER_OF type checking for the
k_work use case. This was common enough that it's probably worth a note
pointing at the conversion function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:19:24 +01:00
Fabio Baltieri
a51593b8fa doc: release: add 3.5 input notes and migration guide
Add 3.6 release notes and migration guide for various changes in the
input subsystem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:19:24 +01:00
Fabio Baltieri
6f0a5961e3 drivers: i2c: i2c_nrfx_twim: fail gracefully on dma max size
Different nRF52 devices have different maximum TWI DMA transfer size,
and it's easy to hit the limit with i2c displays on nrf52832 (8 bit) and
nrf52810 (10 bit). Currently neither the driver or the hal validate the
limit, leading to random NACK errors when trying to transfer more data.

Add a check on the driver to fail gracefully when going over the limit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:17:15 +01:00
Fabio Baltieri
591c1bb867 bindings: move cst816s and cap1203 to input
These two have been converted from kscan to input already, move the
bindings over to match the change.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:05:05 +01:00
Jeppe Odgaard
e2d7ba093e boards: doc: Add serial programming for mimx8mq_evk
Extend the programming section with serial programming using `screen` and
`xmodem`.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-10-04 16:36:20 +02:00
Alberto Escolar Piedras
e851725e62 boards nrf52_bsim docs: Minor updates
Minor updates both to make it more consistent with the
nrf53bsim documentation, and include more links
and a small section about the C library choice.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-04 16:35:41 +02:00
Alberto Escolar Piedras
d12fac706d boards nrf_bsim docs: Update common documentation
Update the documentation describing the bsim boards overall
to match the current reality.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-04 16:35:41 +02:00
Alberto Escolar Piedras
84f76e42da boards nrf_bsim docs: Add documentation for nrf5340bsim
Add documentation for the newly introduced nrf5340bsim boards.
And rename the nrf52bsim documentation file as it is not the only
one anymore.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-04 16:35:41 +02:00
Alberto Escolar Piedras
8b78eecfd6 boards posix: Fix in POSIX arch common description
Minor updates as now we have also native_sim, so we
should not only refer to native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-04 16:35:41 +02:00
Moritz Stötter
099d67902e bluetooth: audio: add support for cpp in bap.h
Small patch adding extern "C"

Signed-off-by: Moritz Stötter <hi@moritzstoetter.dev>
2023-10-04 16:35:04 +02:00
Benjamin Cabé
f7f8acaf03 doc: remove instructions regarding numbered steps
"Numbered steps" were dropped a long time ago in a previous revamp of
the stylesheet, so dropping instructions related to them in the
documentation guidelines.

Also remove unecessary mention to "how to build the doc" as it's
already mentioned as a note at the top of the document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 15:05:31 +01:00
Benjamin Cabé
ce15b5af0c doc: gsg: remove unused numbered steps
There used to be a dedicated style to number headings in a .rst document
but there is currently no actual stylesheet for it, and the added value
 is somewhat limited: dropping the associated directive from the GSG.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 15:05:31 +01:00
Henrik Brix Andersen
df156d7faf dts: bindings: can: reword the CAN controller bindings descriptions
Reword the descriptions for the bus-speed, sample-point, bus-speed-data,
and sample-point-data CAN controller devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-04 14:53:39 +01:00
Mateusz Kapala
3c0c634340 bluetooth: tests: Improve bondable_per_connection bsim test
Added fail on pairing_failed callback for both central and peripheral.
Added pairing status checks in peripheral.

It has been done to test the case when multi-role BT device tried to
pair without bonding (peripheral role) while already previously bonded
with the same device on another Bluetooth identity as it seems that
there was an issue with it previously.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2023-10-04 14:53:26 +01:00
Mateusz Kapala
7a1b194a97 bluetooth: host: smp: Add runtime check for central-specific path
Added run-time BT_CENTRAL role check for the path that was
central specific and did not have such check.

When multi-role BT device tried to pair without bonding (peripheral role)
while already previously bonded with the same device on another
Bluetooth identity, pairing failed.
It executed central-specific code, which should not be executed in case
when the device acts as peripheral (as it is even opt-out from code when
CONFIG_BT_CENTRAL is not enabled).

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2023-10-04 14:53:26 +01:00
Emil Gydesen
c6cecef120 Bluetooth: Controll: Fix dead code in ll_setup_iso_path
In ll_setup_iso_path cis is only ever set if CONFIG_BT_CTLR_CONN_ISO
is enabled, and similarly adv_stream is only ever set if
CONFIG_BT_CTLR_ADV_ISO is enabled.

The two assignments were reported as dead code by Coverity due
to this, which has been fixed by guarding the code with
the respective Kconfigs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-04 14:52:54 +01:00
Daniel DeGrasse
dbdbc64d94 tests: drivers: regulator: clean up testcase.yaml for voltage test
Clean up testcase definition for voltage test, by moving the
LPCXpresso55s36 board overlay file into the boards/ folder of the test,
as well as adding a fixture to the testcase so that it will only be
executed on properly configured boards.

Fixes #62884

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-04 14:52:40 +01:00
Nicola Guerrera
93beac7a69 docs: update sha256 for SDK
Update sha256.sum urls to 0.16.3 in index.rst and
installation_linux.rst.

Signed-off-by: Nicola Guerrera <guerrera.nicola@gmail.com>
2023-10-04 14:52:25 +01:00
Evgeniy Paltsev
1234b4919d Revert "boards/arc/qemu_arc: Disable use of branch delay slots"
This reverts commit 8084ea55b7.

The rootcause is fixed in the ARC QEMU which is in SDK 0.16.3.
As we've updated SDK in upstream CI we can revert this
workaround.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-10-04 14:52:03 +01:00
Rait Rääk
6c2da47e4c bluetooth: conn: Fix forced pairing request handling
BT_SECURITY_FORCE_PAIR option gets overridden when CONFIG_BT_SMP_SC_ONLY
or CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is defined. Cache the bit value
before overrides.
Add explicit forced pair handling to existing security level check.
Functionality did not change as this was done implicitly due to integer
comparison for enums.
Add extra clarification to the method doc.
Signed-off-by: Rait Rääk <raitraak@gmail.com>
2023-10-04 14:49:58 +01:00
Grzegorz Chwierut
fd6f3c5a2a twister: Fix quarantine performance issue
When using a quarantine file with more than 512 unique
entries, than time of matching quarantine increases
significantly. This is because regexp cache size is
512. Add precompiled regexp entries to the quarantine
as a fix.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-10-04 14:49:38 +01:00
Benjamin Cabé
0e6bef270e doc: drivers: counter: cleanup Doxygen docs
Properly document structs and convert some @defgroups to @name'd
headings that are more appropriate.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 14:48:56 +01:00
Yong Cong Sin
39433f0669 drivers: intc: plic: define all registers' offset in the driver
Define all the register offset directly in the driver according
to the RISCV PLIC specification as they are not configurable,
see: https://github.com/riscv/riscv-plic-spec.

Updated devicetrees that has PLIC accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-04 09:06:28 -04:00