Commit graph

22128 commits

Author SHA1 Message Date
Chaitanya Tata
59ff12656f net: l2: wifi: Fix the default keepalive value
30s is too aggressive for most APs, and hostapd also uses 5mins as the
default value.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-08-04 19:55:27 +01:00
Malte Werschy
6ceb672194 net: sockets: ensure socket obj core is only linked once
Repeated linking of socket object cores can corrupt the linked list.

Fixes: #93587

Signed-off-by: Malte Werschy <werschy.m@gmail.com>
2025-08-04 11:55:34 +01:00
Venetia Furtado
44b4fff164 logging: backend: mqtt: Fixed MQTT compiler warning
Added const qualifier to fix the compiler warning

Signed-off-by: Venetia Furtado <venetiarosita@gmail.com>
2025-08-04 11:53:39 +01:00
Håvard Reierstad
7debc8a8f5 Bluetooth: Host: Add conn rsp param check
Check whether the connection response parameters both with and without
ECRED are within the valid ranges from the Bluetooth Core Specification
(part 3.A.4 v6.0). Changes validation checks in requests to match the
same pattern.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-08-04 11:52:01 +01:00
Bas van Loon
88a09e6379 fs: Implement fstab devicetree integration for EXT2
Device tree and/or automount support was not present and might be useful
when for example the settings module needs early access to a filesystem.
This patch adds support to mount an EXT2 filesystem automatically. The
implementation chosen is to provide the drive name matching a disk
drive specified in the device tree ie on an (e)MMC or SD card.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-08-02 13:18:15 +02:00
Jamie McCrae
77f19eb1b5 fs: zms: Add FLASH_MAP dependency
ZMS does not work without this and gives compilation errors, fix
this by adding the correct dependency

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2025-08-01 19:38:48 +01:00
Anas Nashif
6c85528cbe tracing: ctf: fix arguments for timer_status_sync
In the metadata, found that timer_status_sync_pending was missing the
timeout parameter. Noticed when tracing tests/kernel/common.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-08-01 19:38:40 +01:00
Anas Nashif
d794732087 tracing: ctf: add missing k_sleep events
In a096b34835 which introduced tracing of k_sleep, the events in the
metadata file were missed causing issues when running with babeltrace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-08-01 19:38:40 +01:00
Emil Gydesen
8788f8ba26 Bluetooth: BAP: Add target latency and phy to codec_cfg
The codec configuration operation for unicast (ASCS) contain
both a target PHY and a target latency value that was previously
just hardcoded by the client and unavailable by the server.

This commit adds them to the bt_audio_codec_cfg struct so that
applications can both set and get these values.

The default values used by BT_AUDIO_CODEC_CFG use the same
values as the client would previously set.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-08-01 19:37:31 +01:00
Lauren Murphy
c792d78cb3 llext: add fixes for various tests on mwdt / harvard arch
Adds fixes to get LLEXT tests to work for NSIM VPX on MWDT.

Excludes prelocated extensions for MWDT for now.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-08-01 19:36:59 +01:00
Lauren Murphy
a444f7ded8 llext: add reloc and symbols for mwdt
Adds relocation and symbols generated by MWDT while using it
for NSIM VPX5.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-08-01 19:36:59 +01:00
Lauren Murphy
a4274f884b llext: dynamic heap support for harvard arch
Adds support for LLEXT_HEAP_DYNAMIC with Harvard architecture.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-08-01 19:36:59 +01:00
Lauren Murphy
944aa8174c llext: run on harvard arch with static heaps
Splits LLEXT static heap into an instruction heap placed in
instruction memory and a data heap placed in data memory.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-08-01 19:36:59 +01:00
Lauren Murphy
92db7bcf11 llext: compile llext with arc mwdt on nsim vpx5
Allow users to compile LLEXTs with the MetaWare Design Toolchain.
Provides utility to dramatically shrink bloated extensions by removing
unused section names left behind by MWDT strip. Test extensions will
not fit in NSIM VPX5 memory otherwise; each is reduced from ~16k to ~1k.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-08-01 19:36:59 +01:00
Håvard Reierstad
2b42a1d81d Bluetooth: Host: Add l2cap credit param checks
Adds a missing requirement from Core Spec V6.0 Vol 3.A chapters 10.1
and 10.2 to ignore L2CAP_FLOW_CONTROL_CREDIT_IND packets with the
credit value set to 0.

Matches existing credit-related functions by checking that the CID
is in the dynamic range (you can't add credits to fixed channels).

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-08-01 12:20:43 -04:00
WenBin Zhang
b54f4386bd net: shell: Move to a separate Kconfig file
Move it to a separate Kconfig file and move it under the net/lib/shell.
When using menuconfig, it helps to reduce the confusion of network
configuration options.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-08-01 07:46:11 -04:00
Seppo Takalo
d0cba34c7f net: lwm2m: Prevent QUEUE_RX_OFF while waiting for CoAP Ack
The LwM2M RD client state machine have no knowledge of ongoing
observations or any other CoAP traffic and might trigger
QUEUE_RX_OFF state while engine is still waiting for Ack.

This can happen if CoAP Ack timeout is longer than
CONFIG_LWM2M_QUEUE_MODE_UPTIME and response is lost or taking
longer than QUEUE_MODE_UPTIME.

When observation is lost, CoAP Ack may be send, but socket is not
listening anymore if its closed or not polled while in RX_OFF and this
stops observation.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-08-01 07:39:16 -04:00
Emil Gydesen
b76f09dc04 Bluetooth: ISO: Fix issue with BIS tx_complete
BIS termination as broadcaster is handled different
than ACL and CIS, and in rare chances the
tx_complete for BIS may not have been completed in
the system workqueue before iso_new was called for the
same bt_conn struct (e.g. via bt_iso_cig_create), which
would perform

k_work_init(&conn->tx_complete_work, tx_complete_work);

but where conn->tx_complete_work still existed in
the system workqueue, which would cause the list
of pending items on the system workqueue to be removed
as the `next` pointer would be NULL.

This also adds an assert in bt_conn_new to prevent this
issue from appearing again.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-31 17:14:21 -04:00
Jonas Spinner
91ec38d7e0 Bluetooth: Classic: SDP: Replace magic numbers
Replace magic UUID sizes with `sizeof(uint8_t) +
BT_UUID_SIZE_{16,32,128}`.

Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
2025-07-31 17:10:57 -04:00
Jukka Rissanen
6797fa642d net: sockets: Allow test to override DNS timeout
The minimum 1 sec timeout for getaddrinfo() call is too long
when executing queries from network tests. So allow test to override
the minimum and set it to very low value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-31 17:10:45 -04:00
Jukka Rissanen
80e458ce7b net: dns: Resolve localhost name
Allow user to query localhost name and get a localhost address
127.0.0.1 or ::1 back. This is only enabled if loopback driver
is used as the use case does not make much sense otherwise.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-31 17:10:45 -04:00
Jukka Rissanen
cb163d1f28 net: dns: Resolve local hostname
Make sure that if user has enabled hostname support, we are
able to query it and get a local IP address back.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-31 17:10:45 -04:00
Jonas Spinner
6fd48df18f rtio: workq: Remove unused Kconfig option
* Remove `RTIO_WORKQ_STACK_SIZE` as it is no longer used.
* Fix description of `RTIO_WORKQ_THREADS_POOL_STACK_SIZE`.

Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
2025-07-31 16:51:14 -04:00
WenBin Zhang
d01edb10e1 tracing: Fix k_mem_slab_free tracing systemview
Fix k_mem_slabe_free tracing error.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-07-31 10:53:30 +01:00
Hui Bai
1198d78898 hostap: Update 11k roaming mechanism
With this changes, device will check if AP support Neighbor Report or
not before trigger roaming. No need to issue 11k command to enable 11k,
if AP supports Neighbor Report, device will trigger 11k roaming with
priority.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2025-07-31 10:53:19 +01:00
Flavio Ceolin
56e2b01e53 bt: controller: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-31 10:52:49 +01:00
Flavio Ceolin
4ae867b12d bt: audio: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-31 10:52:49 +01:00
Flavio Ceolin
39cf9bd0c0 net: ip: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2025-07-31 10:52:49 +01:00
Flavio Ceolin
1ccf9391bc shell: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2025-07-31 10:52:49 +01:00
Flavio Ceolin
805701da49 bt: host: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2025-07-31 10:52:49 +01:00
Luis Ubieda
d3628fc284 rtio: multishot: Stop resubmitting multishot items on error
As an error-handling strategy. The client then can recover from this
depending on the error and the number of occurrences.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-31 10:52:08 +01:00
Luis Ubieda
7b4644cb50 rtio: executor: split handling of one-shot and multi-shot completions
As their handling is not that similar and mixing them both affects
code readability. This patch does not affect functionality and does
not break any testsuite under rtio API.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-31 10:52:08 +01:00
Luis Ubieda
5505182b43 rtio: Assert multishot flag is not combined with txn or chained
There's no use-case covering this case and enforcing it will allow
simplify the logic for processing items with each of these items when
mutually exclusive.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-31 10:52:08 +01:00
Andrey Dodonov
286362087d net: http: service: extend HTTP service with config
Update the HTTP service API to allow setting per-service configuration,
currently it is only custom socket creation callback,
but in the future it can be extended with other parameter

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2025-07-30 17:32:43 -04:00
Bjarki Arge Andreasen
cd16d17dca pm: device: introduce pm_device_driver_deinit()
Introduce pm_device_driver_deinit() which is required to fully
support device_deinit(). This function shall be called by drivers
when device_deinit() is called.

If PM_DEVICE is enabled, it will
simply check whether the device is either SUSPENDED or OFF, this
will prevent device_deinit() on a device which is currently in
use, and ensure the device is in the correct state if device_init()
is called later.

If PM_DEVICE is not enabled, it will invoke the SUSPEND action which
mirrors the pm_device_driver_init() behavior. Note that TURN_OFF
action is not called since the device is deinitialized after this
call.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 22:56:02 -04:00
Yago Fontoura do Rosario
d3cc63ac71 Bluetooth: PACS: Fix duplicated entries in client list
The client list is filled from the bonding table at registration
but this should only be done once like the callback registration

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2025-07-29 11:21:58 +01:00
Lyle Zhu
af42036ca6 Bluetooth: Classic: SDP: Improve UUID 128 support
In current implementation, the UUID 128 is not well supported. The
found issue includes,
Issue 1: No clear byte order of the UUID 128 in local SDP record.
Issue 2: No clear byte order of the UUID 128 of the SDP discover
parameter.

For issue 1,
Add the description to note that if the SDP attribute type is
`BT_SDP_UINT128`, `BT_SDP_INT128`, and `BT_SDP_UUID128`, the byte
order should be little-endian.

And swap the 128bit from little-endian to big-endian when responding
the peer SDP discovery request.

For issue 2,
Add the description to note that if the SDP discovery type is
`Service Search` and `Service Search Attribute`, and UUID is UUID 128,
the passed UUID data of the discovery request parameter should be
represented as the little-endian byte-order sequence.

And swap the 128bit from little-endian to big-endian when packing the
SDP discovery packet.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-07-29 11:21:37 +01:00
Tomasz Moń
223d23a34d usb: device_next: uac2: Double buffering on feedback endpoint
Enable double buffering on isochronous feedback endpoint to avoid
sending ZLP instead of feedback information.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-29 11:20:56 +01:00
Tomasz Moń
f9ac3181ff usb: device_next: uac2: Do not leak buffer on failed enqueue
Release receive buffer on failed endpoint enqueue.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-29 11:20:56 +01:00
Tomasz Moń
2f343bf572 usb: device_next: uac2: Double buffering on data OUT endpoints
Enable double buffering on data OUT endpoints to allow USB stack to
enqueue next transfer as soon as possible. This is especially useful
when operating at High-Speed where there is significantly less time
between subsequent SOF packets.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-29 11:20:56 +01:00
Tomasz Moń
673f32428c usb: device_next: uac2: Remove unnecessary plus signs
Change the macros to have only one plus operator per term. This is
purely stylistic change, no functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-29 11:20:56 +01:00
Yusuke Omae
bd432c2727 net: gptp: add missing stepsRemoved assignment
The stepsRemoved of masterPriorityVector was
left unassigned when the best_port is not itself.

Signed-off-by: Yusuke Omae <s1413091@gmail.com>
2025-07-29 11:20:32 +01:00
Robert Lubos
279de669b5 net: lwm2m: Stop the LwM2M engine in case of fatal network error
In case of fatal network error (i.e. when the LwM2M client runs out of
retries), call lwm2m_engine_stop() to cleanup any allocated resources
for the client. The engine is dead at that point anyway so the
application needs to recover.

If this isn't done, it is theoretically possible to restart the LwM2M
client (with lwm2m_rd_client_start() which does not report an error in
such case), which in turn could lead to resource leaks (like for
example the observer list is reinitialized) if the application
didn't call lwm2m_rd_client_stop() first. Calling lwm2m_engine_stop()
ensures that all resources are freed even if the application doesn't
call stop before restarting.

Stopping the engine is also needed when the network error occurs when
de-registering - in such case the engine goes straight into the IDLE
state, where it's possible to restart the client and thus reinitialize
the observer lists.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-29 11:18:36 +01:00
James Roy
2ebf82ca5f subsystem: usb: device_next: Fix unchecked return value in usbd_cdc_ecm
Fix unchecked return value scanned by Coverity.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-07-29 11:18:20 +01:00
Emil Gydesen
220571efcb Bluetooth: CCP: Check conn type before access by index
Ensure that the connection type of the provided bt_conn is
an LE connection.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-28 16:45:17 -04:00
Emil Gydesen
0347d92072 Bluetooth: BAP: SD: Add missing error checks for mutex locks
Add missing error checks for mutex locks after the mutexes
were changed to not use K_FOREVER which should not be done in
the BT RX thread.

A larger overhaul of how mutexes are using within the scan delegator
should be considered, as there are a lot of locks and unlocks when
handling the callbacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-28 16:44:58 -04:00
Cheng Chang
afcce53220 bluetooth: host: a2dp:error_code should be detailed in set_config_rsp
Error codes fall into two main categories:
case 1: NOT_SUPPORT_XXX. This means that the configuration of the
parameter is not supported locally.
case 2: INVALID_XXX. This means that the parameter is not configured or
duplicated in the set_config_req command.

Currently the protocol only supports SBC, so it is only checked for SBC
parameters.

Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
2025-07-28 16:43:29 -04:00
Cheng Chang
f4153476cd bluetooth: host: a2dp: Fix null ops before calling configured callback
If stream->ops is NULL and not checked, it works fail.

Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
2025-07-28 16:40:39 -04:00
Jukka Rissanen
ec4d6786fd tests: net: ipv6: Test packet queing when sending NS
Add tests to make sure that if neighbor cache does not contain
info for neighbor link layer address, we can queue packets
and re-send them when the neighbor cache contains the data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-28 08:53:19 -04:00
Jukka Rissanen
31329e6acb net: ipv6: Allow NS timeout to be configured
Allow user to configure how long to wait for neighbor
advertisement.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-28 08:53:19 -04:00