Commit graph zephyr/subsys
Author SHA1 Message Date
Tim Pambor
43503a7ef1 net: stats: add packet filter statistics
Add the packet filter statistics to the periodic network
statistics output. This was already part of the
`net stats` command output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-02 12:59:18 -04:00
Tim Pambor
68c2bf3cbb net: stats: add DNS statistics
Add the DNS statistics to the periodic network
statistics output. This was already part of the
`net stats` command output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-02 12:59:18 -04:00
Tim Pambor
607786d459 net: stats: add IGMP statistics
Add the IGMP statistics to the periodic network
statistics output. This was already part of the
`net stats` command output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-02 12:59:18 -04:00
Tim Pambor
02cbd83aad net: stats: sync TCP stats fields with net stats
Display the same TCP statistics fields in the periodic
network statistics output as in the net stats command
output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-02 12:59:18 -04:00
Tim Pambor
8de28cac40 net: stats: add per-TC drop counts
Add per-TC dropped packet counts to the periodic
network statistics output. This was already part
of the `net stats` command output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-02 12:59:18 -04:00
Swamidas Nampalli
ab2670e8b5 net: ipv6: fix NS packet leak when pending queue is non-empty
net_ipv6_send_ns() allocates a local NS packet (pkt) and, when called
with a pending data packet, may queue that data packet in the neighbor
pending_queue while neighbor discovery is in progress.

If the pending_queue is already non-empty, the function appends the new
data packet and returns without sending a new NS, as intended. However,
the freshly allocated NS packet is neither sent via net_send_data() nor
released. Only the data packet (pending) is queued; the NS packet (pkt)
is a separate allocation that never reaches the TX path, so it is never
released.

Under sustained traffic to an unresolved IPv6 neighbor (e.g. high-rate
UDP), each hit of this branch leaks one TX net_pkt and its buffers,
eventually exhausting CONFIG_NET_PKT_TX_COUNT / CONFIG_NET_BUF_TX_COUNT.

Fix by calling net_pkt_unref(pkt) before returning on this path.

Update the IPv6 neighbor discovery test accordingly. The previous test
assumed that a pending NS reply timer meant one TX packet and buffer
were still allocated, and adjusted the expected pool counts by one.
After fixing the leak, that assumption is no longer true: the timer may
still be pending even though the temporary unsent NS packet has already
been released. Remove that stale accounting assumption so the test
matches the corrected packet ownership behavior.

Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
2026-07-02 13:06:03 +01:00
Yangbo Lu
329fd5e9f3 net: gptp: fix port checking in gptp_set_port_number
The gptp port number to set should be less than GPTP_PORT_START +
CONFIG_NET_GPTP_NUM_PORTS, but not GPTP_PORT_END which was actual
the last gptp port number in used.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-07-02 13:05:24 +01:00
Pieter De Gendt
6aee90ba05 net: lib: coap: client: Wake poll() when a request is scheduled
coap_client_schedule_poll() only gives the recv semaphore, which wakes
the recv thread when it is idle but does not interrupt a poll() that is
already blocked. A request submitted mid-poll - in particular one whose
socket changed after a reconnect - is then not watched until the current
poll() returns, up to COAP_PERIODIC_TIMEOUT later, so its response is
invisible for that window.

Write the recv-thread wakeup eventfd from schedule_poll() so a blocked
poll() returns at once and the recv loop rebuilds fds[] with the current
socket set. The eventfd is the same channel cancellation already uses;
the resulting ack-sem pulse is harmless since the cancel path resets it
under the cancel mutex before waiting. Update the eventfd documentation
to cover the dual use.

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-07-02 13:03:25 +01:00
Bas van Loon
291ef321fb net: core: Use net_verdict enum instead of an int to improve debugability.
Simply change int ret to enum net_verdict as its the right return type
from net_if_recv_data().

Signed-off-by: Bas van Loon <s.r.vanloon@outlook.com>
2026-07-02 12:59:12 +01:00
Bas van Loon
4eb007af46 net: bridge: Fix fatal memory leak in bridge mode.
When the decision is made to keep the current packet for
further (local) processing it should not return NET_OK as
this will ultimately cause a serious leak of RX packets.

Cleanup logic a bit so we can follow the decision tree a bit
easier and fix the original bug by keeping the NET_CONTINUE
and return the proper new local interface from the bridge
function as we happen to have it ready there alredy.

Signed-off-by: Bas van Loon <s.r.vanloon@outlook.com>
2026-07-02 12:59:12 +01:00
Flavio Ceolin
b9d0efcbab mgmt: updatehub: Fix OOB read in probe fallback parsing
memcpy(metadata_copy, metadata, strlen(metadata)) omits the trailing
NUL, so the later strlen(metadata_copy) in the fallback parse path
can read past the allocation and feed an oversized length into
json_obj_parse().

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-07-02 12:54:48 +01:00
Flavio Ceolin
220a1d0afb fs: ext2: prevent overflow when copying volume name
Use strncpy instead of strcpy when writing the volume name into
the superblock so that an oversized cfg->volume_name cannot overrun
the fixed-size s_volume_name field.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-01 23:45:16 -04:00
Fabio Baltieri
a5191c40ef drivers,subsys: use min3/max3 instead of nested MIN/MAX
Replace nested MIN/MAX macro calls with the min3/max3 APIs which are
safer (evaluate arguments only once) and cleaner.

Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-07-01 23:44:58 -04:00
Peter Mitsis
13c5a31962 fido2: Replace workq thread with thread_id
Resolves a build warning caused by use of the deprecated k_work_q
'thread' field.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-07-01 17:06:35 -04:00
Petr Buchta
030cbd8f6f dfu: Fix mcuboot_shell to use boot_fetch_active_slot()
This commit makes mcuboot_shell use boot API to determine active image
slot. Previously it used static zephyr_code_partition to determine this
which wasn't compatible with use of blinfo.

Signed-off-by: Petr Buchta <petr.buchta@nxp.com>
2026-07-01 17:04:53 -04:00
Pieter De Gendt
9d1082464e net: lib: coap: client: Do not hold lock in callback
An application may hold its own lock while calling coap_client_req()
(which takes the client lock), and the response callback may in turn
take that same lock. Holding the client lock across the callback is then
an AB-BA deadlock. Invoke the callback with the lock released.

Releasing the lock lets other threads touch the request while its
callback runs. Keep the slot stable: skip in-callback slots in
get_free_request() and defer their release on cancel (no reuse or reset
under a running callback), and snapshot the observe/multicast flags so a
concurrent deregister cannot change how the current response is
finalised.

A cross-thread cancel can no longer block on the lock to deliver
-ECANCELED while a callback runs, so it records the error and the recv
thread delivers it once that callback returns.

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-07-01 14:32:21 -04:00
Pieter De Gendt
739bdb1e95 net: if: drop redundant multicast join when DAD is disabled
When DAD is disabled, iface_ipv6_start() called join_mcast_nodes() with
the first multicast address slot (mcast[0]), passing a multicast address
where a unicast one is expected to derive the solicited-node group. The
join is also redundant: rejoin_ipv6_mcast_groups() runs just before this
in notify_iface_up() and (re)joins the all-nodes and per-address
solicited-node groups regardless of DAD.

Remove the bogus join and rely on rejoin_ipv6_mcast_groups().

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
2026-07-01 15:27:43 +01:00
Pieter De Gendt
133963e6d3 net: if: join solicited-node mcast group when DAD is disabled
net_if_ipv6_addr_add() tied the solicited-node multicast group join to
DAD being active, so adding an IPv6 address to an already-up interface
with CONFIG_NET_IPV6_DAD disabled never joined the group. Such addresses
could not answer neighbor solicitations and were unreachable.

Join the group whenever ND is enabled on a multicast-capable link
(RFC 4291 ch 2.8), independently of DAD.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
2026-07-01 15:26:57 +01:00
Joakim Andersson
9dae6a2435 net: tls: Add credential shell command to get expiry date
Add a shell command to get the expiry date of a TLS credential.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2026-07-01 15:26:10 +01:00
Joakim Andersson
5685c3107f net: tls: Implement credential expiry API in trusted backend
Implement the get expiry API in the trusted backend.
In the trusted backend we can read out the certificate from the secure
storage and then parse it using the mbedtls X.509 certificate parser to
extract the expiry date from the certificate.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2026-07-01 15:26:10 +01:00
Joakim Andersson
440d21ceeb net: tls: Implement credential expiry API in volatile backend
Implement the get expiry API in the volatile backend.
In the volatile backend we have direct access to the credential data,
so we can use the mbedtls X.509 certificate parser to extract the expiry
date from the certificate.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2026-07-01 15:26:10 +01:00
Joakim Andersson
46c993a199 net: tls: Add helper to get expiry from X.509 certificate
Add a helper function to get the expiry time from a TLS credential.
This can be used by TLS credential backends that have access to the raw
certificate data and can parse it to get the expiry time.

The helper function uses MbedTLS to parse the X.509 certificate and
extract the expiry time.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2026-07-01 15:26:10 +01:00
Robert Lubos
f751c1fca7 net: sockets: deliver buffered data before recv() error
When a stream socket had a pending error (for example after the peer
reset the connection), zsock_recv_stream_timed() returned the error
immediately, without first delivering data that had already been
received and queued before the connection was closed.

As a result, data that arrived just before a peer RST could be lost,
even though the application should be able to read it before observing
the error.

Drain the receive queue first, and only report a pending error
once there is no more buffered data left to deliver.

Assisted-by: Cursor:Claude Opus 4.8
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-07-01 15:25:54 +01:00
Robert Lubos
075fbcede8 net: sockets: implement SO_LINGER socket option
Implement the SO_LINGER socket option for TCP sockets, gated behind the
new NET_CONTEXT_LINGER Kconfig option (disabled by default). The option
takes a struct net_linger argument and is stored in the net_context.

It is honored when the socket is closed:

 - with linger enabled and a zero timeout, close() aborts the connection
   immediately by sending a RST segment instead of performing a graceful
   FIN close,
 - with linger enabled and a non-zero timeout, close() blocks until the
   connection has been closed by the stack or the timeout (in seconds)
   expires, in which case the connection is aborted with a RST.

The blocking wait is implemented at the net_context level, using a
dedicated semaphore signalled by the TCP stack once the connection is
closed. The linger timeout itself is tracked by a TCP work item which
aborts the connection with a RST when it expires.

Besides being a standard BSD socket option, SO_LINGER is convenient in
testing, as it provides an easy way to abort a connection with a RST
when needed, instead of always closing it gracefully.

Assisted-by: Cursor:Claude Opus 4.8
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-07-01 15:25:54 +01:00
Anas Nashif
ba38f4b943 net: lwm2m: fix off-by-one NUL write in JSON get_string
get_string() checked string_length > buflen, accepting a string exactly
as long as the buffer. buf[string_length] = '\0' then wrote one byte
past the end.

Change the guard to string_length >= buflen.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-01 15:25:45 +01:00
Anas Nashif
dbc00c7a78 net: lwm2m: treat negative oma_tlv_get returns as errors
Two multi-resource TLV decode loops used `(len2 = oma_tlv_get(...))` as a
truthy condition. A negative return value (parse error) is non-zero and
would be treated as a successful read, causing the loop to continue with
an invalid TLV.

Change both loop conditions to `> 0` so negative returns terminate the
loop.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-01 15:25:45 +01:00
Chaitanya Tata
d8065e9f87 Revert "net: ethernet: check mac address when bringing a eth iface up"
This reverts commit 481035cf8e.
As nRF Wi-Fi is broken with this commit.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-07-01 15:25:36 +01:00
Sven Göthel
c665aaba05 posix: cond: Allow statically initialized cond to pthread_cond_broadcast
[POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_cond_broadcast.html)
requires the condition variable `pthread_cond_t` to be initialized.
Hence a static initialization with `PTHREAD_COND_INITIALIZER`
shall be supported, as it is for `pthread_cond_signal` already.

Testing
- ZTests are included.
- Manually tested on two platforms

Note:
This feature is used in the
[GNU C++ Library](https://gcc.gnu.org/onlinedocs/libstdc++/manual/)'s
pthread multithreading implementation, e.g. `ext/concurrence.h`.

For details, please see
[Zephyr SDK `pthread` Toolchain](https://github.com/sgothel/zephyr-sdk-pthread-toolchain).

Signed-off-by: Sven Göthel <sgothel@jausoft.com>
2026-07-01 15:25:10 +01:00
Kapil Bhatt
f1359b4b23 net: lib: Move Wi-Fi credentials from Experimental to Supported
Move the Wi-Fi credentials management from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Zihao Gao
e9df6e1635 Bluetooth: Host: Add bt_le_per_adv_update_did() API
Add a new API bt_le_per_adv_update_did() that sends the
LE Set Periodic Advertising Data HCI command with operation
set to 0x04 (Unchanged Data). This instructs the controller
to update only the Advertising Data Identifier (DID) in the
ADI field without modifying the advertising data payload.

This is useful when the application wants to signal to
scanners that the periodic advertising train has new
information available (via DID change) without actually
changing the data content.

Also add a corresponding shell command 'per-adv-update-did'
for testing purposes.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
Assisted-by: Kiro:claude-opus-4.6
2026-07-01 15:24:41 +01:00
Tim Pambor
b311d2b3b5 net: support reserving L2 header with priority-only tagged frames
Add support for reserving L2 headers,
CONFIG_NET_L2_ETHERNET_RESERVE_HEADER=y, when working with priority-only
tagged frames, CONFIG_NET_VLAN_COUNT=0.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-01 05:25:15 -04:00
Tim Pambor
97ea7fa620 net: remove lldp_pkt flag
Remove lldp_pkt flag from net_pkt structure and related functions.
The lldp_pkt flag is no longer needed as the LLDP protocol can be
identified by the protocol type in the packet.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-01 05:24:02 -04:00
Tim Pambor
183e4f82ee net: remove ptp_pkt flag
Remove ptp_pkt flag from net_pkt structure and related functions.
The ptp_pkt flag is no longer needed as the PTP protocol can be
identified by the protocol type in the packet.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-01 05:24:02 -04:00
Anas Nashif
eb761d6d29 debug: fix mipi stp unaligned access with clang
The fast nibble-copy path in the MIPI STP decoder assumes unaligned
multiword accesses are safe on Cortex-M.

With clang on mps2/an385 this can still generate unaligned accesses in
the optimized path, causing a UsageFault in debug.mipi_stp_decoder.

Disable the fast path for clang (and when unaligned trapping is
enabled), falling back to the existing byte-wise safe path.

Assisted-by: GitHub Copilot:GPT-5.3-Codex
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-01 05:22:24 -04:00
Andre Heinemans
63bcf7a59e fs: shell: allow mounting rpmsgfs file system
Add RPMsgFS fs type to the mount command.

Usage: fs mount rpmsgfs <mount-point> [<remote-path>]

mount-point: Mount point path on local system
remote-path: Path within the exported directory on remote to where the
             mount-point is mapped to. [Default: "/"]

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2026-07-01 05:22:03 -04:00
Andre Heinemans
6204f6dd72 fs: add rpmsgfs file system
RPMsgFS allows mounting directories on a remote core using RPMsg. This
protocol is originally made in NuttX but has also implementations in
Linux.

To mount this file system, call fs_mount() with type: "FS_RPMSGFS" and put
the remote path in the .fs_data field as a zero terminated string.

The remote path points to the path on the remote that should be mapped
to the local mount point. The remote path must be an existing path
within the exported path on the remote file system.

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2026-07-01 05:22:03 -04:00
Tomas Galbicka
b6fe144fb9 ipc: service: backends: add RPMSG-Lite backend
Add a new IPC service backend based on the RPMsg-Lite library.
The backend implements the ipc_service_backend ops (open, close,
register/deregister endpoint, send, send_nocopy, get/drop TX buffer,
hold/release RX buffer) on top of the RPMsg-Lite virtio transport.

A new DT binding (nxp,ipc-rpmsg-lite) is introduced to describe
each RPMsg-Lite link instance: shared memory region, role (host/remote),
link-id, MBOX channels, and per-instance buffer/priority tunables.
Multiple links share a single MBOX channel pair via the
notification-parent property; platform_notify() dispatches the
encoded vector_id to the correct link.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2026-07-01 05:20:27 -04:00
Etienne Carriere
b9c806ece5 lorawan: use diamond include for non-local header files
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.

This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ find subsys/lorawan/ -type f -exec \
    ./scripts/check_quoted_includes.py -w {} \;

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 18:23:17 -04:00
Etienne Carriere
e1083595d9 dfu: use diamond include for non-local header files
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.

This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ find subsys/dfu/ -type f -exec \
    ./scripts/check_quoted_includes.py -w {} \;

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 18:23:07 -04:00
Gerhard Jörges
645c94fdd8 net: dns: fix index in dns_resolve_init_locked for server details
The same index `i` was used for `servers` and `ctx->servers`, but since
these may be different, this resulted in strange entries in the log; for
example, mDNS was displayed for non-mDNS servers.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2026-06-30 11:53:33 -04:00
Adrian Bonislawski
a85e1787bf logging: mtrace: add support for multi slot logging
Add CONFIG_LOG_MULTI_SLOT option that allows routing log messages
from different CPU cores into separate debug window slots. Each
core gets its own mtrace slot, enabling the host to read per-core
log data independently.

Key changes:
- Add CONFIG_LOG_MULTI_SLOT Kconfig option (depends on SMP,
  INTEL_ADSP_DEBUG_SLOT_MANAGER and LOG_CORE_ID_PREFIX)
- Allocate per-core debug window slots in mtrace_init()
- Route log output to the correct slot based on originating core ID
  using log_output context mechanism

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2026-06-30 11:52:49 -04:00
Emil Gydesen
7139b387c9 Bluetooth: Host: Disallow setting BT_MAX_PAIRED=0 when BT_SMP=y
The text states that the minimum is 1, but it is possible to
set the value to 0 even when CONFIG_BT_SMP=y.

This commit changes this so that the option and text matches.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-06-30 11:52:40 -04:00
Tim Pambor
c74133ec98 net: shell: fix alignment of dropped pkts
Fix alignment of dropped packets count for each traffic class
in shell stats output. The dropped packets column was not aligned
properly with the header, making it harder to read the output.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-06-30 06:49:38 -04:00
Etienne Carriere
64c41a237c shell: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" subsys/shell/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Etienne Carriere
5b77dca73c sensing: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" subsys/sensing/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Etienne Carriere
d83b30656d pmci: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" subsys/pmci/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Etienne Carriere
78460ee560 net: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" subsys/net/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Yago Fontoura do Rosario
b58bb6c3f7 bluetooth: audio: Fix BAP broadcast sink PA sync in privacy scenarios
Remove Source_Address_Type from the receive state matching criteria in
find_recv_state_by_sink_fields_cb(). In privacy scenarios, a Broadcast
Source may advertise using a resolvable private address (RPA) or an
address type that differs from what the BASS client originally wrote.
The previous address type comparison caused the lookup to fail, preventing
the sink from ever attempting PA synchronization with a valid source.

Per BASS 3.1.1.4, the server identifies the Broadcast Source to
synchronize with by comparing Adv_SID (from ADV_EXT_IND) and
Broadcast_ID (from AUX_ADV_IND) only. Address type is not part of
the identification criteria.

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2026-06-30 06:47:08 -04:00
Yago Fontoura do Rosario
7ab8791734 Bluetooth: Controller: Retrieve adv pdu from ADV_IND instead of SYNC_IND
* Fix adva value when assembling the periodic sync frame

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2026-06-30 06:47:00 -04:00
Emil Gydesen
c167604d02 Bluetooth: BAP: Require BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE > 19
Change the BAP roles to require
BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE to be at least 19.
This is the minimal amount of cfg data required to support LC3,
which is mandated by BAP.

Adding this requirement should not really affect any existing
applications, given that it was the default.

Adding this requirement allows us to remove a bunch of guards
since we can rely on Kconfig to ensure it's non-0.

BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE may still be set to a lower value
in case the audio API is used without BAP.

ASCS can technically be used without BAP, but currently it is very
tied to BAP and thus the requirement was also added for ASCS until
the BAP depdenency is changed in the future.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-06-30 06:46:14 -04:00