Commit graph zephyr/subsys
Author SHA1 Message Date
Emil Gydesen
b908885ec9 Bluetooth: TBS: Remove BT_TBS_SUPPORTED_FEATURES
Remove the Kconfig option BT_TBS_SUPPORTED_FEATURES as it was
not used by the subsystem, but only by applications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:08:42 -04:00
Emil Gydesen
f8b573e7a3 Bluetooth: CCP: Modify get_bearer_uci to use output buffer
Modify bt_ccp_call_control_server_get_bearer_uci to
store the bearer UCI in an output buffer, instead of just
providing the pointer.

The reason for this is to make the result thread safe, and
avoid the user/application having a direct pointer to
internal storage.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:08:29 -04:00
Erdem Simsek
a71a9fd9d1 ipc_service: icmsg: Update state information before bound request
Set state before bound callback. The callback may trigger
icmsg_send which requires CONNECTED state.

Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
2026-03-16 10:08:08 -04:00
Emil Gydesen
5f5f198289 Bluetooth: CAP: Make CAP cancel thread safe
The functions bt_cap_commander_cancel and
bt_cap_initiator_unicast_audio_cancel were not thread safe,
and calling these while handling e.g. a notifications
or a write response could cause fatal errors.

This commit modifies active_proc so that all access to it
is guarded by a mutex.

Some functions were modified to take the active_proc as an
argument, instead of calling bt_cap_common_get_active_proc
for performance reasons.

This also means that all the atomic fields can now be
treated like regular fields. This has not been done in this
commit to keep the changes minimal.

The design is that only the function that calls
bt_cap_common_get_active_proc should unlock it again.
If a function gets the actice_proc as an argument, it should
not unlock or complete it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:47 -04:00
Emil Gydesen
6750321dfc Bluetooth: BAP: UC: Do not set up data path twice
Move the call to bt_bap_setup_iso_data_path to the state_changed
clause in unicast_client_ep_streaming_state.

bt_bap_setup_iso_data_path should only be called once, as calling it
again would be rejected by the controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:30 -04:00
Lauren Murphy
8bcc333e65 llext: custom sections for heap
Places heaps in custom sections with default placements.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2026-03-16 10:07:20 -04:00
Emil Gydesen
7eea50b0c6 Bluetooth: BAP: UC: Simplify disconnect handler
A recent change in the host made it so that CIS always
disconnect before the ACL. This means that we do not need
to handle the case when the ACL disconnects before the CIS,
and the ACL and CIS disconnect handlers can thus be
simplified.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:09 -04:00
Emil Gydesen
ead2218beb Bluetooth: Controller: Moved non-advanced Kconfigs from adv feats
Move BT_CTLR_ADV_AUX_SET, BT_CTLR_ADV_SYNC_SET and
BT_CTLR_ADV_DATA_BUF_MAX out from the menu "Advanced features"
as they are not really advances, and users should be able to
adjust these values without enabling BT_CTLR_ADVANCED_FEATURES.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:06:34 -04:00
Peter Ujfalusi
4d8b77c6c3 logging: mtrace: Reset host and dsp pointer during init
After power on the slot memory used for mtrace has not been initialized
and it's content is filled with 0xff.
The first log out will try to use 0xffffffff as host and dsp pointer, which
is not something which should be done.

Set both pointers to 0 as after DSP reset this is the expected value on
host side and also on firmware side.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2026-03-16 10:05:50 -04:00
Arthur Gay
65af02827e net: lib: http_server: Fix missing error check for websocket key
The call to psa_hash_compute may silently fail if Zephyr is not compiled
with support for the SHA1 algorithm enabled. This leads to an invalid
Sec-WebSocket-Accept response header.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-16 12:33:22 +01:00
Arthur Gay
bb1cf2579f net: lib: http_server: Fix missing dependency
The websocket server needs SHA1 algorithm to compute response header
Sec-Websocket-Accept.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-16 12:33:22 +01:00
TOKITA Hiroshi
a0f37226d5 fb: cfb: Use signed-integer for API that specifies coordinations
Change the arguments of `cfb_invert_area`, `cfb_print`, and
`cfb_draw_(point|line|rect|circle)`, which used unsigned integers to
specify coordinates to signed integers.

This is because coordinate are usually specify with real numbers,
so it is difficult to use unless negative numbers are accepted.
We clip drawings outside the drawable area on the implementation side.

Accordingly, we will update the API version to 0.10.0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-03-16 12:19:40 +01:00
Make Shi
6c56ca835c bluetooth: shell: avrcp: improve avrcp shell commands
Improve AVRCP shell commands by adding success messages after
operations complete, including passthrough (PRESSED/RELEASED)
and get_caps command.

Signed-off-by: Make Shi <make.shi@nxp.com>
2026-03-15 16:28:27 +01:00
Aleksandr Mirlenko
4911512c60 bluetooth: host: add IPT in the CS reflector subfeature
Add support for the IPT in the CS reflector subfeature
in the Bluetooth host stack.

Signed-off-by: Aleksandr Mirlenko <aleksandr.mirlenko@nordicsemi.no>
2026-03-14 06:00:09 +01:00
Yongxu Wang
62f53cccde pm: device: replace magic number with named constant
Introduce enum pm_device_deps_region to replace the magic number
used when iterating through device dependency array regions in
power_domain_add_or_remove().

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-03-14 05:59:45 +01:00
Zafer SEN
5d8ed77db6 sockets: increase CONNECT and TLS timeout ranges for NTN support
Expand the allowed range for NET_SOCKETS_CONNECT_TIMEOUT and
NET_SOCKETS_TLS_CONNECT_TIMEOUT from 60s to 300s. Satellite and
NTN links can experience very high RTT, making the previous
60s maximum too small for reliable connect() and TLS handshake
operations.

Increasing the upper bound allows applications and overlays to
set longer, realistic timeout values when operating over high
latency networks such as NTN.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-03-13 14:30:46 -07:00
Seppo Takalo
bc86bf20cb net: l2: ppp: Allow using zero asyncmap locally
The L2 PPP driver was not working for any other
Async-Control-Character-Map values than 0xffffffff.

This was caused by two issues:
* modem_ppp.c was expecting CONTROL field to be always escaped.
* lcp.c was decoding async_map values wrongly. Either as 16bit,
  or raw 32bit, instead of big-endian 32 bit.

Now it should be safe to default my_options.async_map to a zero.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-13 16:33:05 +01:00
Seppo Takalo
412d48ef31 net: l2: ppp: Async-Control-Character-Map updated too early
When peer sends the Async-Control-Character-Map option on LCP
phase, Zephyr correctly responsed with Configure-Ack.
But the LCP negotiation phase have not been finnished yet,
so the remote end may not expect us to immediately
update the value.

This is seen when trying to use Zephyr's PPP stack against
PPPD from Linux, where default asyncmap option is zero.

However, if we delay the update of the asyncmap to the network phase,
it works just fine.

Fixes #105291

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-13 16:32:32 +01:00
Yongxu Wang
11dc0bde67 pm: device_system_managed: add warning log for resume failures
Add error logging in pm_resume_devices() to report when a device
fails to resume. This improves debuggability by making resume
failures visible in the system log.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-03-13 14:45:17 +01:00
Jiafei Pan
4773cb1aa0 pm: state: only define variable for enabled CPU Core
Only define variable for enabled CPU Core to fix the following building
warning in case of any CPU Core is not enabled but with "cpu-power-states"
dts node property:

zephyr/subsys/pm/state.c:15:43: warning: 'pmstates_DT_N_S_cpus_S_cpu_0'
defined but not used [-Wunused-const-variable=]

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2026-03-13 14:45:02 +01:00
Michael Ellerman
5d653fcfd4 net: lib: http_server: Reject over length websocket key header
If CONFIG_HTTP_SERVER_MAX_HEADER_LEN is increased from the default of
32, a compiler warning pops in the HTTP websocket code:

    zephyr/subsys/net/lib/http/http_server_http1.c:
    In function 'on_header_value':
    zephyr/subsys/net/lib/http/http_server_http1.c:898:33:
    warning: 'strncpy' output may be truncated copying between 0 and 32
    bytes from a string of length 47 [-Wstringop-truncation]
      898 |          strncpy(ctx->ws_sec_key, ctx->header_buffer,
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      899 |                  MIN(sizeof(ctx->ws_sec_key), offset));
          |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This comes from:

                if (ctx->websocket_sec_key_next) {
    #if defined(CONFIG_WEBSOCKET)
                         strncpy(ctx->ws_sec_key, ctx->header_buffer,
                                 MIN(sizeof(ctx->ws_sec_key), offset));
    #endif

If eg. header_buffer is 48 bytes and holds a string >= 32 bytes then
ws_sec_key can end up non-nul terminated. That can then lead to buffer
overflow in handle_http1_to_websocket_upgrade().

Add a check to make sure the header value fits in ws_sec_key, if not
reject the request with a HTTP 500. The websocket key is not expected to
be > 31 bytes.

Once the check is in place, it's safe to use memcpy() for the copy, and
then add the terminating nul manually.

Signed-off-by: Michael Ellerman <mpe@oss.tenstorrent.com>
2026-03-13 07:09:44 +01:00
Jordan Yates
bdc5ab30a1 debug: thread_analyzer: default THREAD_RUNTIME_STATS
`THREAD_RUNTIME_STATS` is not a requirement for the thread analyzer to
operate, merely useful. Switch the control to `configdefault` to leave
it enabled by default, while allowing both applications to disable the
option with `CONFIG_THREAD_RUNTIME_STATS=n` and for alternate defaults
to be specified elsewhere.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-13 07:09:04 +01:00
Pieter De Gendt
aad056a7bc net: lib: coap: observer: Use struct net_sockaddr_storage
Replace the incomplete struct net_sockaddr with net_sockaddr_storage for
CoAP observers.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-12 14:06:27 -05:00
Pieter De Gendt
134e06c7d9 net: lib: coap: server: Use struct net_sockaddr_storage
Replace the net_sockaddr struct with a net_sockaddr_storage struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-12 14:06:27 -05:00
Li Long
bf31fab429 net: wifi: shell: Add check for iface type when get iface
When we start uAP by specifying the network interface "-i" like this:
    wifi ap enable … -i 1
(here: 1 is STA iface, 2 is uAP iface)

Currently, get_iface() uses interface index to choose the network
interface, but we do not check if the selected interface is correct
type.

So if the user specified interface is valid interface, we then verify
that it matches the given type. If there is no match, we return an
error and do not select a default type interface.

Signed-off-by: Li Long <li.long@nxp.com>
2026-03-12 14:06:05 -05:00
Lyle Zhu
96f8077b95 bluetooth: Classic: l2cap: refactor R-bit handling for RET mode
Refactor the Retransmission Disable (R) bit handling in L2CAP BR/EDR
to reuse the existing L2CAP_FLAG_REMOTE_BUSY flag instead of
maintaining separate R-bit tracking flags.

The previous implementation used dedicated flags (
`L2CAP_FLAG_RECV_FRAME_R` and `L2CAP_FLAG_RECV_FRAME_R_CHANGED`) to
track the R-bit state, which duplicated the functionality of
L2CAP_FLAG_REMOTE_BUSY and added unnecessary complexity.

Key changes:
- Remove `L2CAP_FLAG_RECV_FRAME_R` and
  `L2CAP_FLAG_RECV_FRAME_R_CHANGED` flags
- Update `bt_l2cap_br_update_r()` to directly use
  `L2CAP_FLAG_REMOTE_BUSY` for tracking remote busy state
- Trigger I-frame retransmission when R-bit transitions from 1 to 0
- Update I-frame and S-frame header packing to set R-bit based on
  local busy state in retransmission mode
- Simplify I-frame sending logic by consolidating remote busy checks
- Remove redundant R-bit checks in data pull path
- Add RET mode specific handling in S-frame reception for RR and REJ
  frames
- Enhance `bt_l2cap_br_chan_recv_complete()` to support both RET and
  ERET modes with proper local busy state management
- Set S-frame type to REJ when local busy and in RET mode

These changes eliminate code duplication and make the remote busy
state management more consistent across the L2CAP implementation.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 12:09:04 -04:00
Lyle Zhu
4b56a573b5 bluetooth: Classic: l2cap: fix retransmit timer start condition
Fix the retransmit timer start logic to account for remote busy state
in L2CAP BR/EDR flow control.

The previous implementation would start the retransmit timer when there
are outstanding unacknowledged I-frames, but it didn't check if the
remote side is in a busy state (RNR received). Starting the timer while
the remote is busy is incorrect since the remote cannot process I-frames
until it sends an RR to clear the busy condition.

Add a check for L2CAP_FLAG_REMOTE_BUSY before starting the retransmit
timer to ensure the timer is only started when the remote side is ready
to receive I-frames.

This prevents unnecessary timer expirations and retransmissions when the
remote peer has signaled it cannot accept additional I-frames.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 12:09:04 -04:00
Lyle Zhu
7e1757e4e1 bluetooth: Classic: l2cap: refactor I-frame retransmission logic
Refactor the I-frame retransmission mechanism to improve clarity and
correctness in L2CAP BR/EDR flow control.

The previous implementation used multiple flags (L2CAP_FLAG_PDU_RETRANS
and L2CAP_FLAG_REQ_SEQ_UPDATED) to track retransmission state, which
made the logic complex and error-prone. This change introduces a
per-window retransmit flag and dedicated helper functions to manage
retransmission of all unacknowledged I-frames.

Key changes:
- Replace L2CAP_FLAG_PDU_RETRANS with L2CAP_FLAG_RET_I_FRAME for
  timeout-triggered retransmission of the first unacked I-frame
- Replace L2CAP_FLAG_REQ_SEQ_UPDATED with L2CAP_FLAG_RET_I_FRAMES for
  retransmission of all unacked I-frames
- Add `retransmit` flag to `bt_l2cap_br_window` structure to track
  which I-frames need retransmission
- Add `l2cap_br_retransmit_i_frames()` to mark all outstanding I-frames
  for retransmission
- Add `l2cap_br_stop_retransmit_i_frames()` to clear retransmission
  state
- Add `l2cap_br_get_ret_win()` to retrieve the next I-frame marked
  for retransmission
- Update `l2cap_br_ret_fc_data_pull()` to handle both single I-frame
  timeout retransmission and bulk retransmission separately
- Fix window memory management to only free newly allocated windows on
  error, not retransmitted ones
- Update S-frame handlers (RR, REJ, RNR) to use new retransmission
  helpers instead of setting flags directly
- Update comment for L2CAP_FLAG_RET_I_FRAME to clarify it handles
  timeout retransmission

These changes make the retransmission logic more explicit and easier
to maintain while ensuring proper flow control behavior.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 12:09:04 -04:00
Lyle Zhu
2ea6bfab67 bluetooth: Classic: l2cap: fix S-frame sending logic
There is a corner case that the S-frame (RR) needs to be sent. And
there is an I-frame (and only one I-frame) is in pending. But the
I-frame is pending for waiting for ack instead of sending. In this
case, the S-frame (RR) will not be preformed.

The previous implementation incorrectly checked for pending data
before sending S-frames, which could prevent timely acknowledgments.

Fix the S-frame sending logic to ensure proper flow control in L2CAP
BR/EDR channels.

Simplify the S-frame sending mechanism by removing the dedicated
S-frame buffer allocation and transmission path. Instead, rely on
the existing data ready mechanism to trigger S-frame transmission
when needed.

Key changes:
- Remove S-frame specific macros and flags for identifying S-frames
- Change `l2cap_br_send_s_frame()` to only set the pending flag
  instead of allocating and sending buffers directly
- Remove error handling paths that would disconnect on S-frame send
  failures since S-frames are now queued through the normal path
- Simplify `l2cap_br_get_next_sdu()` and `l2cap_br_ret_fc_data_pull()`
  by removing S-frame specific handling
- Update `bt_l2cap_br_chan_recv_complete()` to always return 0

These changes ensure S-frames are sent promptly for flow control
regardless of pending I-frames in the transmission queue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 12:09:04 -04:00
Lyle Zhu
6e6eac656d bluetooth: Classic: l2cap: Correct segment buffer size
Fix buffer pool allocation size for BR/EDR L2CAP non-basic modes by
using the appropriate macro that accounts for SDU segmentation
overhead.

The previous implementation used BT_L2CAP_BUF_SIZE() which is designed
for basic mode and does not account for the additional overhead
required when segmenting SDUs in retransmission or flow control modes
(I-frame control field, FCS, and SDU length field).

- Replace BT_L2CAP_BUF_SIZE() with BT_L2CAP_RT_FC_MAX_SDU_BUF_SIZE()
- Ensures sufficient buffer space for segmented I-frames
- Aligns buffer allocation with recent MPS and MTU calculation fixes

This prevents potential buffer overruns when transmitting segmented
SDUs in non-basic modes.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 09:20:02 -05:00
Lyle Zhu
a61edf6f04 bluetooth: Classic: l2cap: simplify get_pdu_len() MPS calculation
Simplify the PDU length calculation in get_pdu_len() by using the
configured MPS value directly without manual adjustments for overhead.

The previous implementation attempted to manually calculate available
payload space by subtracting header/tail sizes and then adding back
the SDU length field size, which was unnecessarily complex and
error-prone.

- Remove manual calculation of actual_mps with header/tail overhead
- Use br_chan->tx.mps directly as the MPS limit
- Remove special handling for start segments (SDU length field
  adjustment)
- Simplify logic: return pdu_len if within MPS, otherwise return MPS

The MPS value already represents the maximum PDU size that can be
transmitted, so no additional adjustments are needed. This aligns with
the recent fixes to MPS validation and MTU calculation.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 09:20:02 -05:00
Lyle Zhu
236775f226 bluetooth: Classic: l2cap: extract SDU length before MPS validation
Fix incorrect MPS validation for segmented I-frames by extracting the
SDU length field before checking payload size against MPS.

When an I-frame has SAR (Segmentation and Reassembly) set to START,
it contains a 2-byte SDU length field that precedes the actual payload.
The previous implementation validated buf->len against MPS before
removing this header, causing false positives when the SDU length field
pushed the total size over MPS.

- Extract SAR field from control header for all L2CAP modes
- Initialize SAR to UNSEG by default
- Pull SDU length (2 bytes) when SAR indicates START segment
- Perform MPS validation after SDU length extraction
- Move net_buf_simple_save/restore to encompass SDU length handling

This ensures MPS validation checks only the actual payload size,
preventing spurious disconnections for legitimate segmented transfers.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 09:20:02 -05:00
Lyle Zhu
e785ab7278 bluetooth: Classic: l2cap: fix RX MTU calculation for non-basic modes
Fix incorrect RX MTU calculation when retransmission/flow control modes
are enabled. The previous implementation did not account for I-frame
overhead (control field and FCS), which could cause MTU to exceed the
maximum I-frame payload.

- Add l2cap_br_get_rx_mtu() helper to calculate proper RX MTU
- Discount extended control field size (4 bytes) when enhanced
  retransmission or streaming mode is enabled
- Discount standard control field size (2 bytes) for basic mode
- Always discount FCS size (2 bytes) as it may be required by peer
- Add assertion to validate MTU meets minimum requirements
- Update l2cap_br_check_chan_config() to use new MTU calculation

This ensures the negotiated MTU fits within the I-frame payload limits
and prevents buffer overruns in non-basic L2CAP modes.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 09:20:02 -05:00
Jordan Yates
ca0815a856 net: lib: sntp: output response delay
Add a new field to the `sntp_time` struct which is an estimate of the
delay between the SNTP server sending the response and the SNTP client
(the application) receiving it. This information can then be used by
the caller to correct for the systemic bias introduced by non-zero
network latencies.

Includes internal variable naming to make it clearer which timestamps
are which.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-12 11:34:52 +01:00
Flavio Ceolin
b92d516907 random: ctr-drbg: Use PSA crypto instead of MBED TLS
Change ctr_drb random implementation to use PSA Crypto API.
Since name convention is very different and PSA abstracts the
algorithm used to generate CSPRNG, file and Kconfig options were
changed. Current symbols were deprecated and just select the new
one.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-03-12 11:32:15 +01:00
Håvard Reierstad
71092f19a7 Bluetooth: Host: Fix stale dynamic CID reuse
Currently, the CID for dynamic channels are not cleared on reuse.
l2cap_chan_alloc_cid() sees the non-zero CID and skips allocation.
If another dynamic channel (e.g. EATT) has claimed that CID in the
meantime, the reused CID collides and the remote rejects with
BT_L2CAP_LE_ERR_SCID_IN_USE.

This commit adds clearing of bt_l2cap_le_chan.rx.cid to
`l2cap_chan_rx_init()`, to match the pattern for how state is cleared
for bt_l2cap_le_chan.tx in `l2cap_chan_tx_init()`. As a consequence of
this, the function calling the CID-allocating function on the server
side (`l2cap_chan_add()`) is moved after the init functions.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-03-12 09:04:10 +00:00
Kai Cheng
d9cdc215fc Bluetooth: SPP: Add rfcomm server unregister interface
Add bt_rfcomm_server_unregister() to support unregistering an
RFCOMM server for a channel.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-12 09:02:56 +00:00
Kai Cheng
5574ababa2 Bluetooth: RFCOMM: Use sys_slist_t for server list
Replace the manual linked list (using _next pointer) for RFCOMM
servers with sys_slist_t. This enables use of slist utility functions
like sys_slist_find_and_remove(), which is needed to support server
unregistration in a subsequent commit.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-12 09:02:56 +00:00
Mark Wang
fab8ea782a bluetooth: avdtp: Fix the avdtp tx keeps raising
Move the avdtp_tx_raise() call from avdtp_tx_processor() into
avdtp_tx_frags() to ensure the tx is not raised if there is no idle
net_buf.
The issue is: the `avdtp_tx_raise` is called always to trigger the
worker to run again, it will keeps occupying the cpu if there is pending
tx, but there is no idle net_buf. After moving the calling to
`avdtp_tx_frags`, it is only called when there is still idle net_buf.
After the previous avdtp sending net_buf is released, the `avdtp_tx_cb`
is called, and the `avdtp_tx_raise` will be triggered again.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-03-12 09:02:38 +00:00
Josuah Demangeon
8d669364e6 usb: device_next: uvc: fix ordering of frame interval
Fix the qsort comparison function that was hitting an integer underflow.
Some video sources such as video-sw-generator have UINT32_MAX for maximum
frame interval (arbitrarily slow), which made the comparison underflow,
which in turn lead to frame interval being listed in the wrong order,
breaking Windows support.

Fixes #101259.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-03-11 23:18:21 -04:00
Henrik Brix Andersen
0f8e72a7c2 usb: device_next: reduce log level to debug for internal status logs
Reduce the log level to debug for a number of internal status logs within
the USB device_next stack.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-03-11 20:55:57 -04:00
Henrik Brix Andersen
032cc60ba8 Revert "arch: arm: cortex_a_r: Add CPU load"
This reverts commit 10a23b39a2.

Fixes: #105316

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-03-12 00:10:09 +01:00
Make Shi
2791b7cb16 bluetooth: avrcp: Move SDP registration to callback registration
Move AVRCP SDP record registration and  AVCTP server register from
bt_avrcp_init() to callback registration functions to align with
other Bluetooth Classic profiles.

Signed-off-by: Make Shi <make.shi@nxp.com>
2026-03-11 17:55:04 +00:00
Fin Maaß
52c254af76 net: add Kconfig option for checksum offloading
Adds a Kconfig option to detect if checksum offloading
is supported by any driver and one to activate it.

Main benefit is that `net_if_need_calc_rx_checksum()` and
`net_if_need_calc_tx_checksum()` are now inline and therefore the
compiler can optimize more, when checksum offloading is not supported.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-11 17:52:13 +00:00
Jisheng Zhang
10a23b39a2 arch: arm: cortex_a_r: Add CPU load
Add calls to sys_trace_idle_exit before leaving idle state
to track CPU load.

Extend CPU_LOAD to CPU_AARCH32_CORTEX_R and CPU_AARCH32_CORTEX_A, thus
we can support CPU_LOAD for all CPU_CORTEX.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
2026-03-11 17:51:09 +00:00
Jordan Yates
0bf99fa4e4 net: ip: net_core: remove conn_mgr_if_used on RX
Remove the unconditional `conn_mgr_if_used` call on data reception.
Receiving data ends up being a poor metric for "interface in use" in
many situations. This is especially the case when connected to networks
with broadcast packets that are not necessarily relevant for us, such as
ARP discovery requests.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-11 17:50:02 +00:00
Aleksandr Khromykh
5b7c8c777d bluetooth: mesh: fix rpr null dereference
Commit adds checking that the PB-ADV bearer has been
closed before opening the PB-Remote link for NPPI
interface. NPPI interface callbacks are NULL if
PB-ADV server bearer is still open.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-03-11 17:49:04 +00:00
Pieter De Gendt
5eebc58806 logging: backend: net: Use struct net_sockaddr_storage
Replace struct net_sockaddr with struct net_sockaddr_storage.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-11 11:41:40 +01:00
Fin Maaß
cb29348da1 random: xoshiro128: remove unneeded SYS_INIT
Inside the init function, it was only checked if the
entropy device is ready and if it is not ready a error code
is returned. This is useless as the return codes of SYS_INIT()
functions are not used or saved, in difference to device inits.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-11 11:40:15 +01:00
Jordan Yates
4a2374c7a1 net: lib: sntp: SNTP_UNCERTAINTY consistent time sources
When comparing time sources for `CONFIG_SNTP_UNCERTAINTY` to validate
the server responses, `dest_ts_us` and `orig_ts_us` need to be
constructed from the same time sources and have the same offsets applied
in order for math operations to be valid.

Fixes #105101

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-10 18:00:49 -07:00