Commit graph

9523 commits

Author SHA1 Message Date
Lyle Zhu
af86a35b61 Bluetooth: SMP_BR: Avoid to derive LTK from invalid BR LK
The LTK should not be generated from BR link key if there is a LTK
exists and BR LK is weaker.

Do not drive LTK from BR LK in the case.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-17 07:04:58 +01:00
Herman Berget
8b909b4403 Bluetooth: Host: Remove experimental label from PAwR
The api has not changed since its introduction some time ago,
mark it as stable.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2025-03-14 17:56:18 +01:00
Pavel Vasilyev
886fabaf87 bluetooth: host: ecc: Change log level debug
This commit changes log level for already registered callback from
warning to debug as this is cause unnecessary noise and doesn't indicate
actual issue. Caller gets a certain error code for this case which can
be handled properly.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-03-14 14:40:34 +01:00
Lyle Zhu
218de8dc67 Bluetooth: L2CAP_BR: Code format
Change ```#if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL)
#if defined(CONFIG_BT_L2CAP_LOG_LEVEL_DBG)```
to `#if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL) &&
defined(CONFIG_BT_L2CAP_LOG_LEVEL_DBG)`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-14 05:47:48 +01:00
Lyle Zhu
d82844695e Bluetooth: L2CAP_BR: CID of data sending is invalid
There is a corner case that the channel is in disconnecting status,
due to there is a disconnect request sent from peer.
At this time, the channel is status is `BT_L2CAP_CONNECTED`. But it
has been removed from `conn->channels` by calling the function
`l2cap_br_remove_tx_cid`.
And the disconnect event is notified upper layer via the callback
`ops->disconnected`. The thread of the callback context is blocked
due to the the calling of `printk` in the callback function.

Then the pending lower priority thread, sending the data in this
l2cap channel, is activated. Then in the function
`bt_l2cap_br_send_cb`, a NULL pointer will be got according to the
given CID. And unexpected behavior happens when accessing a NULL
pointer, since the invalid channel pointer is not checked in
function `bt_l2cap_br_send_cb`.

Check the channel pointer after function `bt_l2cap_br_lookup_tx_cid`
called. If the channel pointer is invalid, return error code
`-ESHUTDOWN` directly.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-14 05:47:36 +01:00
Emil Gydesen
501b95ff9b Bluetooth: CSIP: Rename BT_CSIP_SET_MEMBER_NOTIFIABLE
Renamed BT_CSIP_SET_MEMBER_NOTIFIABLE to
BT_CSIP_SET_MEMBER_SIRK_NOTIFIABLE to be more specific.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-13 16:56:14 +00:00
Lyle Zhu
2ac116ea71 Bluetooth: SMP_BR: Derive LTK after LK refreshed
When the link key of BR is upgraded, the encrypt key refresh event
will be notified. The link key is upgraded from weak to strong.
The LTK of LE should be derived from strong link key.

Start SMP pairing procedure to try to derive LTK from LK.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-13 10:49:58 +01:00
Pavel Vasilyev
d3997c6eb0 bluetooth: mesh: set subscription address on response
This fixes an issue where a subsequent Config Model Subscription Add
message with the same virtual address UUID would result in a Config
Model Subscription Status message with the Address field incorrectly set
to 0.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-03-13 10:49:48 +01:00
Emil Gydesen
5918427278 Bluetooth: Host: Make bt_le_addr_is_bonded public
Some GATT services and profiles define specific behavior
based on whether the remote device is bonded or not.
The internal function, bt_addr_le_is_bonded, is the
only function to do this, but it was kept internal,
and could thus not be used for those services
without including hci_core.h.

The function has been moved to the public API
so that application can determine if a remote
address is bonded or not, and has been renamed
to not use the bt_addr namespace, but rather the
bt_le.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-13 10:48:19 +01:00
Emil Gydesen
1f26899229 Bluetooth: TBS: Ensure sending notifications
The existing implemented only attempted to send all notifications,
but if host was out of ATT TX buffers the notifications would fail
and the client may miss out on important information, and would be
a spec violation.

This commit refactors notificatios in TBS so that they are always
sent.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-13 10:27:59 +01:00
Lyle Zhu
9a04dfd85e Bluetooth: l2CAP_BR: Fix the response cannot be sent out issue
There is an issue that the L2CAP connect response function
`l2cap_br_conn_req_reply()` is called first. And then the ACL
disconnect function `bt_conn_disconnect()` is called following. But
the packet of `bt_conn_disconnect()` appears on the HCI bus first.

Add a flag `L2CAP_FLAG_DISCONNECT_ACL` to flag whether it is needed to
disconnect ACL connection.

Set the flag `L2CAP_FLAG_DISCONNECT_ACL` when result of the L2CAP
channel conn rsp is `BT_L2CAP_BR_ERR_SEC_BLOCK`.

Add a l2cap packet sent out callback `l2cap_br_conn_rsp_sent_cb()`.
When the callback triggered, disconnect the ACL connect with
`BT_HCI_ERR_AUTH_FAIL` if the flag `L2CAP_FLAG_DISCONNECT_ACL` has
been set.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-12 19:03:05 +01:00
Nirav Agrawal
438701fdd5 bluetooth: host: perform hci-reset in bt_disable()
- added HCI command to send hci-reset in bt_disable() func, and
  remove its call from the driver close() call.
- remove rsp buf pass to 'hci_reset_complete()' func as status is
  already checked under 'bt_hci_cmd_send_sync()'.

Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
2025-03-12 19:02:35 +01:00
Lyle Zhu
f349976937 Bluetooth: SSP: Fix MITM flag incorrect issue in pairing
There is a case that if the local is a peripheral and a L2CAP server
with the security level 3,the mitm should be set to make sure the
security level can reach level 3.

But in current implementation, the MITM is not set because the MITM
of `Authentication_Requirements` parameter of remote is not set. And
the security level will be level 2 after the security pairing
procedure complete.

Add a function `bt_l2cap_br_get_max_sec_level` to
get the max level of the registered servers.
`
Force set the MITM bit if the max level is bigger than level 2 and
pairing method is not `just works`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-12 07:14:25 +01:00
Alberto Escolar Piedras
c1a40abc6d subsys/bluetooth: Misc native_posix cleanup
Remove a kconfig dependency on BOARD_NATIVE_POSIX which
does not really exist anymore.
Replace a comment mention of native_posix with native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 02:27:36 +01:00
Lyle Zhu
d811f6921c Bluetooth: L2CAP_BR: Reject the conn req if sec levels do not match
If the ACL link has been encrypted and it has a authenticated link key,
it means the pairing procedure has been done. And the security level of
the link key can not be upgraded. In this case, if `conn->sec_level` is
less than the required security level of the L2CAP channel, reject the
L2CAP conn request.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-11 18:53:50 +01:00
Olivier Lesage
6f33793b41 bluetooth: Host: Rename CS tone antenna configurations
Improves readability by removing the need to check the table
to figure out how many antennas devices A and B are using.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-03-11 08:59:19 +01:00
Emil Gydesen
9d4cc4b49b Bluetooth: BAP: Add a set of suggested intervals to use with BAP
Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.

Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.

The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.

Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-11 08:58:51 +01:00
Lyle Zhu
1cfd624b3d Bluetooth: SDP: Notify upper layer if the response data len is 0
In current implementation, the SDP discovery complete event is not
notified when the response data length is 0.

Notify the discovery complete event if the response length is 0.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-10 21:49:41 +01:00
Thomas Deppe
4161ba2103 Bluetooth: Host: Fix Advertising Coding Selection as peripheral
Fix mistake in host implementation of Advertising Coding Selection.

The host should only try set the BT_LE_FEAT_BIT_ADV_CODING_SEL_HOST
when the observer role is enabled. If a broadcaster enables the
CONFIG_BT_EXT_ADV_CODING_SELECTION Kconfig option bluetooth will
fail to initialise.

Signed-off-by: Thomas Deppe <thomas.deppe@nordicsemi.no>
2025-03-10 21:31:12 +01:00
Lyle Zhu
ed45960870 Bluetooth: SDP: Fix the issue of not handling the next discovery req
The pending discovery request will not be handled in some cases.
The cases include,
- The received data length is not aligned with frame length
- The continuation status length is more than maximum value
- Total length of the response is less than the frame length
- Unknown operation code is received

There is also a case where the current discovery result was not
notified when processing the pending discovery request.
The cases include,
- Fail to send SDP request
- No tail room of received buffer to save the response data

Fix the issue by using the following steps,
- Notify the application that the discovery is done
- Process the pending discovery request

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-10 15:20:40 +01:00
Lyle Zhu
dcd8bcb88d Bluetooth: SSP: Reply a negative rsp if binding flags are mismatched
If the remote is in bondable mode, but the local is in non-bondable
mode, the local host shall respond to an IO capability request with
a negative response.

In current implementation, it does not check the bonding flags of the
both sides are consistent.

Fix the issue by checking the consistency of bonding flags of the both
sides. If they are not consistent, send a negative IO capability
response with the reason pairing not allowed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-10 15:03:04 +01:00
Lyle Zhu
1408614fd2 Bluetooth: SSP: bt_conn_unref is missing if pairing is not accepted
The `conn` is found by using function `bt_conn_lookup_addr_br()`, it
should be released by calling `bt_conn_unref()`. But `bt_conn_unref()`
is missing in the case that the pairing is not accepted.

Release the `conn` by calling `bt_conn_unref()` before exiting the
function `bt_hci_io_capa_req`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-10 15:02:48 +01:00
Lyle Zhu
0d36361b5d Bluetooth: SDP: Check data len consistency between total and received
Add fields `total_len` and `recv_len` to `struct bt_sdp_client`.

Save the total length of the response to `total_len`.
Save the received data length of the response to the `recv_len`.

Check the consistency between `total_len` and `recv_len` after all of
the response packets are received.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-10 08:58:38 +01:00
Rubin Gerritsen
65c7f1f269 Bluetooth: Controller: Kconfig: Add dependencies to ISO configs
The ISO configs set defaults based upon BT_ISO_MAX_CHAN and other
configs defined in `bluetooth/Kconfig.iso`.

By adding these dependencies the error messages resulting from
adding `CONFIG_BT_CTLR_PERIPHERAL_ISO=y` to a project configuration
file will become less confusing.

Now the build will output:
```
warning: BT_CTLR_PERIPHERAL_ISO (
defined at subsys/bluetooth/controller/Kconfig:976,
subsys/bluetooth/controller/Kconfig:984) was assigned the value 'y' but
got the value 'n'. See ...
```

Previously we would get:
```
warning: default value 0 on BT_CTLR_CONN_ISO_STREAMS
(defined at subsys/bluetooth/controller/Kconfig:993)
clamped to 1 due to being outside the active range ([1, 64])
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-03-07 20:35:45 +01:00
Lyle Zhu
1aa88f86b8 Bluetooth: SDP: Ignore the unexpected response
The response should not be handled if there is not a request has been
sent.

Ignore the response if the `session->param` is `NULL`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 20:18:51 +01:00
Lyle Zhu
86b765c0a9 Bluetooth: SDP: Ignore unsupported UUID
In current implementation, if the UUID of request is unknown, the
local variable `u` will not be updated, and the unknown UUID `u`
is used as the target to search it in the SDP record list. It may
result in irrelevant record being replied to the requester.

Ignore the unsupported UUID to fix the issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 20:18:31 +01:00
Lyle Zhu
7ec9f58b66 Bluetooth: SDP: Fix the error if continuation length is not 0
When the continuation length is not 0, there is a reported error.

In current implementation, the total length is only valid only when
the frame is the first block of the SDP response. For following
continuous frame, the total length is 0.

So, change the condition to `(total != 0 && frame_len > total)`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 20:16:38 +01:00
Troels Nilsson
8373f19bc2 Bluetooth: Controller: Add tests covering ticker without remainder support
Update Kconfig to not select BT_TICKER_REMAINDER_SUPPORT for nrf54L

Add BSim tests to cover using a ticker without BT_TICKER_REMAINDER_SUPPORT
and expire info enabled

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-03-07 20:02:49 +01:00
Troels Nilsson
df67f4ec13 Bluetooth: Controller: Fix building ticker without remainder support
A few things were not flagged by CONFIG_BT_TICKER_REMAINDER_SUPPORT
that should have been; This caused building without it to fail

Initialize remainder to 0 where used with ticker_next_slot_get_ext(),
since it may not get set if remainder support is off

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-03-07 20:02:49 +01:00
Théo Battrel
158870ec64 Bluetooth: Host: Use memset to initialize psa_mac_operation_t
In `db_hash_setup()` the state object for MAC operations was initialized
using `psa_mac_operation_init()`. This function was not always optimized
or inlined.

A way to reduce stack usage is to use `memset()` and set the object to
0. This is one of the option documented to initialize
`psa_mac_operation_t` object.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-03-07 19:59:24 +01:00
Emil Gydesen
1a6af2bfa6 Bluetooth: Audio: Modifed PAST checks to use public API
Use the recently added bt_le_get_local_features function as well
as bt_conn_get_remote_info to avoid using internal APIs to
check for PAST supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-07 19:58:23 +01:00
Emil Gydesen
4619611326 Bluetooth: Conn: Add const for conn in bt_conn_get_remote_info
The connection object is, and should not, be modified by the function.
Making it const makes it possible to do this simple operation
in functions that also won't change the conn object (i.e.
that uses `const`).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-07 19:58:23 +01:00
Emil Gydesen
44c5c1da3d Bluetooth: Host: Add API for reading LE controller features
The function supports reading multiple controller-based values.
It is effectively a copy of struct bt_dev_le but in a more
application-oriented definition.

It was chosen to keep the features as an array rather than a
64-bit value, as the comparison macros work on arrays and that
there already exists new bits > 64 in the core spec which is not
yet supported by Zephyr.

It is being smoke tested in a generic GATT client test,
as the individual values may depend on several Kconfig options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-07 19:58:23 +01:00
Aleksandr Khromykh
e075e08195 Bluetooth: Mesh: remove api prefix for static functions
Commit removes api prefix for static functions
in crypto psa.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-03-07 19:58:10 +01:00
Lyle Zhu
c0f7aefe55 Bluetooth: BR: Support limited discoverable mode
Add a Kconfig BT_LIMITED_DISCOVERABLE_DURATION to set the timeout for
limited discoverable mode.

Add a argument `limited` to function `bt_br_set_discoverable()` to
support the limited discoverable mode.
When enabling discoverable mode with `limited` is true, both write
LIAC and GIAC to controller and set the bit 13 of COD in function
`bt_br_set_discoverable()`. And start a delay worker with the timeout
CONFIG_BT_LIMITED_DISCOVERABLE_DURATION to disable the discoverable
mode.
When disabling discoverable mode, only set GIAC to controller and
clear bit 13 of COD.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 19:46:53 +01:00
Mark Wang
37ae587b64 bluetooth: avdtp: move the buf as callback parameter
if saving buf to another variable, usually the ref/unref
needs to be used. change to pass the buf as one parameter
of callback

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
0d253c5b45 bluetooth: a2dp: clean few unused codes lines
memset already clean the `buf`, don't need to set as NULL.
`avdtp_set_status` already set `req->status` based on `msg_type`,
don't need to check `msg_type` again.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
935fdd2147 bluetooth: a2dp: improve the readability
add more blank lines before or after the code block {}

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
e531295515 bluetooth: a2dp: optimize bt_a2dp_ep_info
bt_a2dp_ep_info is used in bt_a2dp_discover, and the max
discovered endpoints' info are already given in seps_info
of bt_a2dp_discover_param, so use pointer to point to the
seps_info of bt_a2dp_discover_param.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
8b1b79bf3c bluetooth: avdtp: handle the unsupported signal identifier
reject the cmd if the signal identifier is not supported

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
11c1ccbbc7 bluetooth: avdtp: split packet handler as cmd_handler and rsp_handler
use two handler array to process cmd and response separately,
make the functions shorter and codes more readable.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Mark Wang
1a4de907c8 bluetooth: a2dp: check the invalid avdtp packet
When the packet is invalid, reply the right error code or call
back error code to upper layer.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Vinayak Kariappa Chettimada
ec69ccb681 Bluetooth: Controller: Fix single timer direction finding support
Fix use of single timer software tIFS switching to support
direction finding.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:55:11 +01:00
Vinayak Kariappa Chettimada
7520742671 Bluetooth: Controller: Fix single timer clear event define name
Rename the single timer clear event define name based on
direction finding support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:55:11 +01:00
Vinayak Kariappa Chettimada
23d321d679 Bluetooth: Controller: Fix end time capture be on radio event end
Fix end time capture be on radio event end irrespective of
direction finding support. Let the timer clear use radio
end or radio phy end, for no direction finding or direction
finding support, respectively.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:55:11 +01:00
Vinayak Kariappa Chettimada
f67a94f47a Bluetooth: Controller: Fix single timer end time capture
Fix single timer use end time capture from being disabled
as end time and timer clear use the same PPI.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:55:11 +01:00
Vinayak Kariappa Chettimada
65d69ec176 Bluetooth: Controller: Fix active mode extended scanning assert
Fix active mode extended scanning assert raised when calling
radio_tmr_start_us() due to stale radio_tmr_end_get() value.
Active mode extended scanning did not drop reception of
ADV_EXT_IND PDU when setup to receive ADV_SCAN_RSP PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:55:11 +01:00
Vinayak Kariappa Chettimada
3a996c570b Bluetooth: Controller: Fix BT_CTLR_LOW_LAT_ULL dependency
Fix BT_CTLR_LOW_LAT_ULL dependency after changes in
commit 5119896c7d ("Bluetooth: Controller: Fix
BT_CTLR_LOW_LAT_ULL conditional code").

BT_CTLR_LOW_LAT_ULL is independent of BT_CTLR_LOW_LAT, where
the later prevents any ULL execution inside a radio event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-28 14:53:27 +01:00
Kyra Lengfeld
6464ffa3f9 Bluetooth: Host: Fix deadlock when failing to alloc on BT RX thread
This commit alignes the timeout value for allocating buffers within att
on the BT RX thread, making it consistent within att.c, see
bt_att_req_alloc.

We are inferring in many bt_gatt_* functions that if called from a BT RX
thread (which is inherently the case if called from a callback when
running a Bluetooth application), we don't block and instead return
-ENOMEM when the ATT request queue is full, avoiding a deadlock.
This promise is fulfilled within bt_att_req_alloc, where the timeout for
allocation of the request slab is set to K_NO_WAIT if we are on the BT
RX thread. Unfortunately, we break this promise in
bt_att_chan_create_pdu, where the timeout for allocation of the att pool
is still K_FOREVER and deadlocks can (and do) occur when too many
requests are sent yet the pool is depleted.

Note: Both req_slab and att_pool sizes are defined by
CONFIG_BT_ATT_TX_COUNT. If applications start getting -ENOMEM with this
change, they were at risk of such a deadlock, and may increase
CONFIG_BT_ATT_TX_COUNT to allocate the att pool for their requests.

Note: This possible deadlock has been flying under the radar, as
att_pools are freed when the HCI driver has sent it to the controller
(instead of when receiving the response, as it happens with req_slabs)
and due to the att_pool and the req_slab being both sized by
CONFIG_BT_ATT_TX_COUNT, and req_slab being allocated before and
returning -ENOMEM already if there is no space, it takes a more specific
situation to deplete the att_pool but not the req_slab pool at this
point.

Note: Ideally, we don't want functions to behave differently depending
on which thread they are running, and while this commit makes it more
consistent, it should be considered a workaround solution.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-02-28 10:10:01 +01:00
Johan Hedberg
05b16b971b Bluetoth: Host: Fix buffer allocation warnings in system workqueue
The buffer allocation in conn.c will trigger warnings if we try to use
anything else than K_NO_WAIT for the timeout when called from within the
system workqueue.

The calls in l2cap.c and att.c which may pass non-zero timeouts already
have proper handling for failed allocations, so make sure we use K_NO_WAIT
to avoid unnecessary warnings from conn.c.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-02-25 15:14:08 +00:00