Commit graph

86920 commits

Author SHA1 Message Date
Johan Hedberg 58ba0e1e26 modules: acpica: Fix CMakeLists.txt style
Fix indentation to use spaces (instead of tabs) and remove the
unnecessary repetition of the condition inside endif().

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-08 15:12:02 +00:00
Seppo Takalo d69d4013d3 net: lwm2m: Fix blockwise response code
In CoAP blockwise the client is supposed to
respond with 2.31 Continue code on Ack. This was recently
broken when Block1 parsing was moved after the initialization
of reponse packet. We need separate CoAP API to modify the code
of existing CoAP packet.

Also Ack packet should contain the Block1 options, even the
last one.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-08 15:11:36 +00:00
Erwan Gouriou 614df97a49 tests: counter_basic_api: Test subseconds on nucleo_wba52cg
Enable STM32 RTC subsecond test on nucleo_wba52cg.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Erwan Gouriou ee75020c0a boards: nucleo_wba52cg: Enable RTC node
Set LSE as domain clock.
Configure rtc prescaler accordingly.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Erwan Gouriou 9e74efd159 dts: stm32wba: Add rtc node
Add RTC node for stm32wba series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Erwan Gouriou 645de482f0 drivers: counter: Add support for stm32wba devices
Implement RTC support in counter driver for STM32WBA devices.

Changes are made according to the following specificities:
- Similarly to STM32U5, it is not connected to EXTI.
- On this series, there is no bit in BCDR register to enable RTC. Enabling
RTC is done directly via the RCC APB register bit

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Erwan Gouriou bf8a055b4b include: dt-bindings: stm32wba_clocks.h: Add RTC_SEL macro
Add a dt macro to allow configuring RTC domain clock.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Magdalena Kasenberg a2210bde63 bluetooth: audio: delegator: Use BT_ATT_ERR_WRITE_REQ_REJECTED
If the total length of the opcode and parameter values of Broadcast
Receive State characteristic operation is incorrect, the server shall
respond with an ATT Error Response and the Error Code set to Write
Request Rejected (0xfc), instead of 0x0d
(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN).

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-11-08 15:10:39 +00:00
Francois Ramu a0db07888f drivers: flash: stm32 ospi driver active wait during init
Wait with k_busy_wait instead of k_sleep during the peripheral init.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-08 15:10:29 +00:00
Aleksandr Khromykh 7a32e1d84b samples: Bluetooth: Mesh: add main stack for mesh provisioner
The current main stack size is not enough for any platform.
This commit stack size was checked for nrf52840 and nrf5340.
Everything works.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Aleksandr Khromykh c5ee143d77 Bluetooth: Mesh: no more tinycrypt in ble mesh tfm image
PR allows to get rid of tinycrypt objects from
the final binary of the ble mesh apps based on
PSA TFM crypto.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Robert Lubos 83f9fc4ce2 net: ip: Add hidden Kconfig symbol for IP fragmentation
Instead of consistently checking for both, IPv4 and IPv6 fragmentation
in several places, add a hidden Kconfig symbol which indicates that some
IP fragmentation has been enabled (either IPv4 or IPv6 or both).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos c724cf99f4 net: pkt: Add explicit flag to indicate packet is IP reassembled
The current logic to determine whether a packet is IP reassembled is
flawed, as it only worked in certain conditions (which was ok, as the
conditions were satisfied for the current use case, but now it's a
public function). Therefore, add an explicit flag that indicates whether
a packet is IP reassembled or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos f505dc528e tests: net: checksum_offload: Add tests involving IP fragmentation
Add test cases verifying proper checksum calculation involving
IPv4/IPv6 fragmentation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 5f8a73f6cb tests: net: checksum_offload: Move test code into helper function
Further reduce code duplication by moving test code for similar test
cases into a helper function, parametrized based on the test case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 736888be0c tests: net: checksum_offload: Move net context init to helper function
Move code responsible for net context initialization, repeated over
multiple test cases, to a helper function to reduce code duplication.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 24abc4307b net: Verify L4 checksum unconditionally for reassembled packets
In case of reassembled IP packets, we cannot rely on checksum
offloading as the drivers/HW has no means to verify L4 checksum before
the fragment is reassembled. Therefore, for such packets, verify L4
checksum in the software unconditionally.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 76a256ea57 net: pkt: Add function to check if packet was reassembled at IP level
Move the existing code verifying that the net_pkt was reassembled at IP
level to a helper function, as it will be needed in other places as
well. Additionally, add packet family check before accessing union
fields.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 2836d0701d net: ip: Set net_context on the final fragment
IPv4/6 fragmentation did not set the net_context pointer on the fragment
packet and in result the send callback registered on net_context was not
called. Therefore, copy the net_context pointer from the original packet
to the final fragment to ensure that the registered callback is called.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 64e615263a net: ipv6: Set IP header length on the fragmented packet
IPv6 fragmentation code did not set the IP header field on the
fragment net_pkt.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 0c1c939d9e net: ipv6: Remove invalid/unneeded code from fragmentation logic
Skipping both next_hdr_off and last_hdr_off and filling last_hdr
variable doesn't make much sense, as this effectively moves the packet
cursor inside/behind the last (L4) header with no particular meaning.
Plus the last_hdr variable isn't really used anywhere, which kind of
proves the point. Therefore, remove the unused variable and needless
net_pkt operations.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 13a22e6814 net: ipv6: Calculate checksum before fragmentation
In case the stack has to fragment the IPv6 packet, calculate the
checksum before fragmentation (if haven't done so).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 887a3a321d net: ipv4: Calculate checksum before fragmentation
In case the stack has to fragment the IPv4 packet, calculate the
checksum before fragmentation (if haven't done so).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 08879ea7fb net: ip: Add option to force checksum calculation
Modify internal L4 protocols APIs, to allow to enforce checksum
calculation, regardless of the checksum HW offloading capability.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos eadd933607 net: Set a flag when checksum has been computed
Set checksum flag on the net_pkt, when checksum is calculated in
software.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Robert Lubos 98b46340f2 net: pkt: Add flag indicating checksum status
Add new net_pkt checksum, which indicate checksum status on the packet
(i. e. whether it has already been calculated or not).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-08 15:09:37 +00:00
Kamil Piszczek b182c92af5 tests: bsim: bluetooth: host: privacy: peripheral: add RPA check
Modified the BabbleSim test for the Bluetooth test under the
host/privacy/peripheral category. Added the RPA check in the scan
callback context of the scanning tester device to validate if the
DUT advertising address is correct.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-08 15:09:22 +00:00
Kamil Piszczek 069bd8376c tests: bsim: bluetooth: host: privacy: peripheral: test after reboot
Extended the scope of the BabbleSim test for the Bluetooth test under
the host/privacy/peripheral category. The tests ensures correct RPA
advertising after the system a reboot when the Bluetooth identities
are preloaded from the Settings subsystem.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-08 15:09:22 +00:00
Kamil Piszczek 29a67338d1 bluetooth: id: fix uninitialized RPA for non-default identities
This change fixes uninitialized RPA values for advertising sets of
non-default Bluetooth identities. The regression has been introduced
in the following commit:

8d6b206064

The follow-up fix for the default Bluetooth identity has been
introduced in a separate commit:

88c20b9cdd

Non-default Bluetooth identities can be loaded from the Settings
subsystem. In this case, RPAs of related advertising sets to these
identities are left uninitialized as the bt_id_create() function
context is not executed. As a result, the RPA is not created for
advertising sets of non-default Bluetooth identities, and the
advertising is started with the 00:00:00:00:00:00 address.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-08 15:09:22 +00:00
Bernt Johan Damslora 5fc7304878 drivers: mfd: npm1300: Add separate initialization priority
Enables setting the initialization priority of the nPM1300 independently
from other MFDs.

Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
2023-11-08 15:09:06 +00:00
Bernt Johan Damslora 950e25578a drivers: mfd: npm6001: Add separate initialization priority
Enables setting the initialization priority of the nPM6001 independently
from other MFDs.

Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
2023-11-08 15:09:06 +00:00
Nazar Palamar d8606727df boards: arm: cy8cproto-062-4343w: enable WIFI feature
Enable WIFI feature for cy8cproto-062-4343w board.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar 4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar 5c3abe9197 drivers: bluetooth: rename BT_CYW43XXX to BT_AIROC
rename BT_CYW43XXX to BT_AIROC to be compatible with
WIFI_AIROC

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar 1fd080b8cf drivers: sdhc: added Infineon CAT1 SDHC/SDIO driver
Added initial version of Infineon CAT1 SDHC/SDIO driver

Added initial version of binding file for Infineon CAT1 SDHC/SDIO
driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Hake Huang cf053d07e3 test: twister: test_runner remove line number check in log
1. remove the line number check in test vector
2. log_info is not a static method anymore, change test

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-11-08 07:49:49 -05:00
Alberto Escolar Piedras 4df07224f8 drivers ieee802154_nrf5: Fix infinite loop for simulation on stop
With CSL enabled, when nrf5_stop is called,
nrf_802154_sleep_if_idle() will be called, and if the radio is
busy with another task, another IEEE802154_EVENT_RX_OFF event
will be pended right away, resulting in another call
to nrf5_stop(), effectively busy waiting until the
radio has reached idle.

In simulation, this whole operation (busy wait loop) is
done without letting the CPU sleep, in an infinite loop,
and therefore without letting any time pass
(note that in the POSIX architecture,
no time passes if the CPU does not go to sleep).
And therefore the radio will never be done with whatever
it is doing, resulting in the simulation being stuck
in this loop.

Let's add a very minor delay to this loop, which is
conditionally compiled only for the POSIX architecture.
Which effectively mimics the time it takes for the CPU
to loop thru, let's time pass, and allows the radio
to eventually be done.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-08 11:07:30 +01:00
Dat Nguyen Duy c6b86d5b1b drivers: mdio: mdio nxp s32 netc should depend on eth netc driver
MDIO is currently initialized in the ETH NXP S32 NETC
driver for Physical Station Interface (PSI), so do not
try to build the MDIO driver if the ETH driver is not built

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-08 10:10:50 +01:00
Dat Nguyen Duy 09be84eb77 drivers: nxp_s32_netc: remove dependency to NET_TEST
There is no require to prevent building nxp s32 netc
shim driver if NET_TEST is set, so just remove this
unnecessary dependency

Fix #64944

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-08 10:10:50 +01:00
Jamie McCrae 07328c4afa doc: migration-guide: 3.6: Add note on MCUboot Kconfig
Adds a note about how to replicate the functionality of the now
removed MCUboot mass erase Kconfig option

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-08 10:10:43 +01:00
Andrej Butok 583fd8a79e doc: slist: fix duplicated sys_sfnode_flags_get()
Replace duplicated sys_sfnode_flags_get() by sys_sfnode_flags_set().

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-08 10:10:27 +01:00
Andrej Butok dc92b32ceb doc: fix link to extensions.cmake
"cmake/extensions.cmake" does not exist. The link is broken.
Fix it to correct one "cmake/modules/extensions.cmake".

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-08 10:10:02 +01:00
Andrej Butok 5730dd6fb7 doc: fix typos
Add missed "space".
Add missed "been".

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-08 10:09:44 +01:00
Jamie McCrae 5d3ae7690a west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  0c0470e294dcfb52aab92299356a5f3caa0aa52b

Brings following Zephyr relevant fixes:
 - e9fccef5 boot_serial: Fix missing response if echo command
   disabled
 - 013c9e76 boot: zephyr: board: various: Remove size optimisation
 - 0a8bbbf4 boot: zephyr: Fix USB configs
 - d5c963c5 boot: zephyr: serial_adapter: Add error if main thread
   not preemptible
 - 822b6cb7 boot: zephyr: serial_adapter: Fail if USB CDC enabled
   with console

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-08 10:09:13 +01:00
Jamie McCrae 38060ea2a0 tests: boot: mcuboot_recovery_retention: Move USB CDC to USB device
Moves the USB CDC device to the USB CDC port instead of wrongly
using the serial port, this was not used but is needed to prevent a
build error added to MCUboot which prevents using the same device
for console and serial recovery chosen nodes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-08 10:09:13 +01:00
Alberto Escolar Piedras e60878e7eb nrf52_bsim: Remove nfct peripheral from DT
This board HW models do not yet support the NFCT peripheral,
let's remove the DT node to avoid the driver being selected.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-08 10:09:05 +01:00
Przemyslaw Bida 2a4350dfd2 net: openthread: Adding snoop entries kconfig.
Adding missing `CONFIG_OPENTHREAD_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES`
to thread kconfig file.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-11-08 10:08:58 +01:00
Alberto Escolar Piedras 56816ceb52 manifest: Update nrf hw models to latest
* Update the HW models module to
a715dcc179f1a71f51c574165958b72fe932ae3f

Including the following:
* a715dcc irq_ctrl: Fix interrupt name getter
* b9e1f00 Makefile: For 5340 build both HAL versions as separate libraries
* 68aa50b Makefile: Set default target to compile and fix makefiles rules
* 0cf5ea9 nrfx_glue: Provide a stubbed NRFX_DELAY for builds without Zephyr
* b0d95c2 doc: Update required Nordic nrfx version to 3.2

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-08 10:08:50 +01:00
Aleksandr Khromykh b6f20d67c2 Bluetooth: Mesh: fix On-Demand API usage
On-Demand proxy client API has been changed but
usage of this API in shell test was missed.
Commit fixes this API usage.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 10:08:36 +01:00
Aleksandr Khromykh 50d17a0d52 Bluetooth: Mesh: split gatt client and solicitation pdu sending
The ability to send the solicitation PDU doesn't
depend on GATT Client role.
Commit makes independent one functionality from
another.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 10:08:36 +01:00