Commit graph

101098 commits

Author SHA1 Message Date
Qiankun Li
f44146a6cd samples: net: wifi: boards: rdrw612bga: Modify CONFIG_POSIX_MAX_FDS config.
[Reproduce issue]
1. Connect In-STA to Ex-AP
   wifi connect WiFi_STA_HE_1.1.8 1234567890 3 2 2

2. Start APUT with ACS using below commands
   wifi ap enable nxp-AP 161 1234567890 3

3. Connect Ex-STA to APUT and verify association using ping traffic

4. Now start two TCP server
  zperf tcp download -I ml 5001 192.168.0.252
  zperf tcp download -I up 6002 192.168.10.1

Observed behavior:
=============

Second TCP server fails to start

[Analysis]
1. After starting uap and a tcp server,
   there is only one allocatable fd resource
   left in the fdtable.
2. When two TCP clients try to establish a connection
   with the server at the same time, the second client
   cannot be assigned an fd, resulting in a failure.

[Fix]
Increase the maximum number of open file descriptors.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2024-09-02 12:33:50 -04:00
Yong Cong Sin
3754bb27f8 Revert "arch: riscv: ARCH_STACK_PTR_ALIGN should be 4 for RV32E"
This reverts commit 87b95be52a.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Yong Cong Sin
ed8dd0fa63 arch: riscv: stacktrace: undo the fp/sp alignment check in #76045
The change of alignment check in #76045 could be wrong and
isn't unnecessary to fix the stack traces output, undo it for
now.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Matt Rodgers
989fdadfe2 net: lib: http_server: prevent falsely matching HTTP headers
Using strncasecmp to match HTTP headers can give unexpected results when
the strings to be compared match up until the end of one string, but the
other string contains additional characters. This can result in falsely
matching a HTTP header value, for example:

strncasecmp("Upgrade-Something", "Upgrade", sizeof("Upgrade") - 1) --> 0

In this case we know that both strings are NULL terminated since one is
a string literal and we have just length-checked and explicitly NULL
terminated the other. So we can just use strcasecmp without a max
length.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-02 12:33:03 -04:00
Hyunsu Yoon
db890a201a net: lwm2m: fix buffer size check for U16 resource
The lwm2m_check_buf_sizes() function was not checking resources of
type LWM2M_RES_TYPE_U16, which could lead to potential overflows
when writing larger data types into U16 resources. Add a case for
LWM2M_RES_TYPE_U16 to properly validate the buffer size.

Fixes #77016

Signed-off-by: Hyunsu Yoon <piedroconti@naver.com>
2024-09-02 12:32:50 -04:00
Øyvind Rønningstad
5a08d537fe lwm2m_senml_cbor_encode.c: Fix line lengths
clang-format made lines too long

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7b0e202282 lwm2m_senml_cbor: Regenerate zcbor code using zcbor 0.9.0
And update the patch file and shell script

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
4fa098f5d0 doc: Add sections about zcbor 0.9.0
to release notes and migration guide.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7a10226590 west.yml: Update zcbor to 0.9.0
from 0.8.2

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Jukka Rissanen
27260c818e net: dns: Add more error codes to gai_strerror()
Add more DNS error code mappings that the gai_strerror()
function can return.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:22 -04:00
Jukka Rissanen
92fda17385 net: Make sure net_buf data size is large enough for IPv6
If IPv6 is enabled, the fixed size net_buf data needs to be
large enough so that the full IPv6 header with extensions
can fit to one net_buf packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:10 -04:00
Guennadi Liakhovetski
dd50ff5585 llext: add dependencies
When an LLEXT object uses symbols of another such object, it depends
on it. Such dependencies have to be tracked to prevent their
accidental unloading. Ideally we should be able to track arbitrary
numbers of such dependencies, but this is a bit difficult. In this
first implementation we use a fixed-size array, currently consisting
of 8 entries.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
c5e305fce6 llext: fix flag evaluation for section grouping
When deciding which sections to group together, only the low 3
section attribute bits are relevant, ignore the rest.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
a8db637ead llext: export a symbol needed for immediate logging
Using the immediate logging option from LLEXT modules requires
one more symbol export.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
fe609dd8e8 llext: look for symbols in other LLEXT objects too
LLEXT objects can also export symbols for use by other such objects.
That means, that when linking an LLEXT object we have to look for
unresolved symbols in previously loaded objects too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
19ccec6a03 llext: use EXPORT_SYMBOL() universally
Replace LL_EXTENSION_SYMBOL() with EXPORT_SYMBOL() in all tests and
samples.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
bd09a5c739 llext: make EXPORT_SYMBOL() universal
Currently LLEXT has two ways to export symbols:
EXPORT_SYMBOL() to exort symbols from the main firmware to extensions
LL_EXTENSION_SYMBOL() to export symbols from extensions
but it is possible to write code, that needs to export symbols
regardless of whether it is built into the main image or an
extension. And in fact there's no real need in two distinct macros -
we can use one for both cases and recognise at build time which
direction exporting is happening. This patch extends EXPORT_SYMBOL()
to also work from extensions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
92a7c772d9 llext: remove an unused variable
Remove a loop counter, that isn't actually used for anything.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Jordan Yates
ae046fe5ea adc: adc_nrfx_saadc: support ADC_ACQ_TIME_MAX
Support the `ADC_ACQ_TIME_MAX` define in addition to
`ADC_ACQ_TIME_DEFAULT`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-02 12:31:17 -04:00
Chaitanya Tata
d1e700e9d8 samples: wifi: Add nRF70 tests to twister
Now that we have a build only mode, this ensures that nRF Wi-Fi driver
builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
a449b748cb Revert "tests: wifi: nm: exclude nrf7002dk"
This reverts commit 65af3ab34c.

Build only mode is now supported without FW blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
803f59f3e1 drivers: wifi: nrf: Add support for twister CI build
Add a mode to build the driver without FW blobs, this is mainly for
twister to run and catch any build issues without depending on any FW
blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Pavel Vasilyev
2f02474448 bluetooth: host: adv: Release buf if failed to set addr
The `bt_id_set_adv_own_addr` function itself tries to allocate a buffer
for the command and it failes due to lack of buffers, it returns error.
However, the `le_ext_adv_param_set` function doesn't handle the error
properly and keeps its own allocated buffer.

This commit releases the allocated buffer.
Partially fixes mesh in #77241.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-02 12:30:18 -04:00
Szymon Janc
ad0c1e12f6 tests: bluetooth: tester: Fix buffer sizes on nRF5340
This was affecting multiple CAP/INI/UST qualification tests.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-09-02 12:30:06 -04:00
Gerard Marull-Paretas
726c8abf32 soc: nordic: nrf54l15: add missing include
Add nrf5x binding header, as NRF5X_REG_MODE_DCDC is used in a macro
comparison. Missing header prevented evaluation to become true and so
enable DC/DC module.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-02 12:29:51 -04:00
Vinicius Miguel
0492235d0d scripts: ci: Fix crash when vendor list is malformed
Also introduces friendly error message.

Signed-off-by: Vinicius Miguel <vmiguel1@gmail.com>
2024-09-02 12:03:03 +02:00
Derek Snell
894c5c8ae5 boards: shields: add NXP vendor name to shields
Update shield doc pages to list NXP vendor name in list of shields.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-09-02 12:01:18 +02:00
Simen Eilevstjønn
2c64fe7f37 Bluetooth: Implemented new DIS characteristics
Implemented new DIS characteristics:
    - UDI for medical devices
    - IEEE 11073-20601 Regulatory Certification Data List
    - System ID

Also fixed buffer overflow bug when assigning too long DIS string literals

Signed-off-by: Simen Eilevstjønn <simen.eilevstjonn@laerdal.com>
2024-09-02 12:00:52 +02:00
Nazar Palamar
eb406f80bc driver/bluetooth / cyw208xx: enable CYW20829_BT_FW_TX10DBM_POWER
Enable CYW20829_BT_FW_TX10DBM_POWER by default to get
best user experience experience out of the box.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
c16fcf160d west.yml: Update CYW20829 Bluetooth LE fw for PAwR support
Update CYW20829 Bluetooth LE fw for PAwR support
Commit#88d2529a3c5aee2e81947553bf6cbacb4671088c

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
120274b0b6 Bluetooth: Samples: periodical_adv_rps: Added sync wait delay
Problem:
on cyw208xx devices i see sometime `Timed out while synchronizing`
error in samples periodical_adv_rps/periodical_sync_rps.

log:
<err> bt_scan: Could not lookup connection handle from PAST
<err> bt_scan: Unknown handle 0x0000 for periodic advertising report
Timed out while synchronizing
...

After investigation i can confirm, the sync was created successful,
but in application (periodical_sync_rsp) terminated the sync when the
connection is not valid.

periodical_adv_rps doesn't have any mechanism to wait for sync and after
gatt write (subevent, response_slot information) it immediately
performs disconnection.

Solution:
Added sync wait delay before make disconnection, to ensure sync
is established before disconnection.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
9a112dc474 driver/bluetooth: Add setup of PUBLIC ADDR
Added setup of PUBLIC ADDR

NOTE: By default, the CYW208xx controller sets some
hard-coded static address.

To avoid address duplication, let's always override
the default address by using the HCI command
BT_HCI_VND_OP_SET_LOCAL_DEV_ADDR. So

1. when cyw208xx_setup gets BT_ADDR_ANY from the host,
   it will overwrite the default address, and the host
   will switch to using a random address (set in the hci_init
   function).

2. If user set the static address (by using bt_id_create)
   before bt_enable, cyw208xx_setup will set user defined
   static address.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
b8690f7ea4 Bluetooth: Samples: update response_cb in periodical_adv_rps
Remove print "Failed to receive response...", if receive
BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED.

Problem: with cyw920829m2evk_02 device periodic_adv_rsp returns
multiple messages  “Failed to receive response….” in the terminal
log.

This happens because controller generates
HCI LE Periodic Advertising Response Report event for each
RspSlot. Because no RSP_DATA is observed in the OTA, which
is no scan device to transmit RSP_DATA, no RSP_DATA can be
received. Therefore, Data Status is 0xFF in all of these events,
which finally cause the messages  “Failed to receive response….”

Data_Status = 0xFF is expected because nothing is received
for that Rsp Slot.

Per spec, it’s not mandatory to generate these events,
So another vendors (e.g. Nordic)  might skip the HCI event
generation if Data_Status = 0xFF.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
5a113ca271 driver/bluetooth / cyw208xx: update condition for select PAwR FW
Select PAwR if enabled following features:
- BT_PER_ADV_RSP
- BT_PER_ADV_SYNC_RSP

Remove dependency BT_AIROC_CUSTOM for AIROC_CUSTOM_FIRMWARE_HCD_BLOB

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
261344c6c7 soc: infineon/cyw20829: Update SYS_CLOCK_HW_CYCLES_PER_SEC
Update SYS_CLOCK_HW_CYCLES_PER_SEC to 96000000

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Flavio Ceolin
4902f189ae dts: xtensa: intel_adsp: Set soft-off state as disabled
The 'soft-off' state must be used when explicitly request by calling
`pm_state_force`. Set this state as disabled in dts ensures that the
pm policy manager will not use this state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-02 11:54:08 +02:00
Fabrice DJIATSA
7fd3a785a3 boards: st: add nucleo_u031r8 board support
add board support for nucleo_u031r8

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Fabrice DJIATSA
195e85c4cb dts: arm: st: add stm32u031 dtsi files
provide support for the STM32U031 serie

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Fabrice DJIATSA
21150edc05 soc: st: stm32: add soc for stm32u031
select soc for stm32u031 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Thomas Stranger
d09e1d6e8f samples: boards: stm32: backup_sram: add magic value
Stores a magic value togetter with the counter value, and resets the
counter in case that magic does not match.
A small magic value is not ideal, but should be good enough for the
sample and avoids pulling in a additional dependency e.g. on crc.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Thomas Stranger
cc36e40357 boards: st: stm32h5 nucleo boards: support backup sram
Mark backup sram as supported and document it.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Thomas Stranger
0e09d8903d dts: arm: st: stm32h5: add backup sram to all socs
This commit moves the backup sram definition to the
series base dtsi file, the size is overwritten for socs
which have a bigger bkpsram.

The backup SRAM is available on all stm32h5 mcus.
stm32h503/523/533 have 2k
stm32h562/563/573 have 4k

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Benjamin Cabé
f6c232ec2e samples: modules: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Also fixed a couple invalid or missing table of contents to have
proper document hierarchy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-02 11:51:37 +02:00
Erwan Gouriou
63f31261d1 boards: st: Fix arduino_gpio support
On stm32h735g_disco, `arduino_gpio` is declared while the connector is not
actually described.
On stm32h750b_dk, connector description was simply not included.

All these are blocking tests trying to make profit of arduino gpio
connectors.
Fix these.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-02 11:50:54 +02:00
Aleksander Wasaznik
2f86faffba Bluetooth: Host: Minor doc and rename for LE remote feature exchange
Rename `BT_CONN_AUTO_FEATURE_EXCH` to `BT_CONN_LE_FEATURES_EXCHANGED`,
and add some comments for readability.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-09-02 11:50:25 +02:00
Tim Lin
32a19ea28c drivers/espi: it8xxx2: Fix mask when SRAM size not the power of 2
When using the it8xxx2bx chip, because the SRAM size is 60k and
not a power of 2, using (CONFIG_SRAM_SIZE - 1) results in an
incorrect value for the h2ram base address mask.
Therefore, the mask is declared as GEMASK(19, 0) here.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-09-02 11:49:52 +02:00
Adrian Bonislawski
b9a4900c30 drivers: dma: intel_adsp_hda: change L1 exit defaults
DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be set by default
for all  Intel ACE platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-09-02 09:09:07 +02:00
Krystof Sadlik
16cdd5b852 Drivers: Counter: Added flag for counting up
Tmr and dtmr drivers were missing a flag which tells the
counter_is_conting_up function that the counter is counting up. So I've
added the flag

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-09-02 09:07:57 +02:00
Daniel Leung
060538ee28 logging: fix color being shown even if disabled
If CONFIG_LOG_BACKEND_SHOW_COLOR is disabled, error and warning
lines are still being outputted with color, which is contrary to
what the Kconfig says. So change the color settings for error
and warning lines to no color if this Kconfig is disabled.

The log_output test is also amended to account for this.
Though the test is not skipped as no color is still some colors
(... well... maybe).

Fixes #77150

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-02 09:07:19 +02:00
Quy Tran
b461a3fd53 boards: renesas: update xtal clock frequency on Renesas RA boards
- Update the wrong value of xtal frequency on EK-RA6M1
- Update documentation of EK-RA6M2 regarding to clock description

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-02 09:06:37 +02:00