The cbprintf formatter cbvprintf_exteral_formatter_func has a typo
in it with a missing 'n'. So add it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add support for setting sync-word and iq-inverted in lora_modem_config. By
being able to set the sync-word it's possible to send "raw" public-network
packets using lora_send and using iq-inverted both uplink and downlink
messages can be sent.
Signed-off-by: Tim Cooijmans <timcooijmans@gmail.com>
This extends the bt_conn_info with security information. This is needed
by LE Audio profiles to check if security requirements are met.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The bt_conn_get_security and bt_conn_enc_key_size do not
modify the conn thus the parameter can be guarded with const modifier.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
CONFIG_ISR_STACK_SIZE and CONFIG_ARC_EXCEPTION_STACK_SIZE are
used in arc asembler code without C wrapper on them with following
manner:
---------------------------->8----------------------------
/#define INIT_STACK z_interrupt_stacks
/#define INIT_STACK_SIZE CONFIG_ISR_STACK_SIZE
mov_s sp, INIT_STACK
add sp, sp, INIT_STACK_SIZE
---------------------------->8----------------------------
In result we can get stack unaligned if we have
CONFIG_ISR_STACK_SIZE or CONFIG_ARC_EXCEPTION_STACK_SIZE
values unaligned. There is no point to have unaligned stack
size - so let's check against such configurations in
compile time.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
The macro DT_FOREACH_STATUS_OKAY_NODE is only available if devicetree
is supported. Using it for platforms that do not support devicetree
causes compilation errors.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
prevent `Wundef` warnings from occurring due to
missing CONFIG_ symbols and __cplusplus.
Signed-off-by: Christoph A Schnetzler <Christoph.Schnetzler@husqvarnagroup.com>
230ddd9a7f added unreachable path hint for assertion failure. Xcc does
not support __builtin_unreachable and this was defined as a call to
ASSERT, which generated some recursion.
Replace the definition with __builtin_trap() to work around this issue.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove the Kconfig option for configuring the maximum value of the CAN-FD
Data Length Code in order to ensure standard compliance.
Allowing users to configure the max DLC allows the user to save a number of
bytes per CAN frame in RAM, but it also renders the Zephyr CAN-FD
implementation non-compliant with the CAN-FD standard.
There are no guarantees that a Zephyr CAN-FD node will not receive a CAN
frame with a DLC higher than the Kconfig limit, which opens up for all
sorts of bugs when trying to handle received CAN-FD frames.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Upcoming versions of breathe highlight code embedded in Doxygen blocks.
In this case, the Devicetree fragment contained invalid syntax leading
to Sphinx warnings.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This reverts commit 5b2ba9aaeb, restoring
commit 0224f2c508.
Restore the original change now that the underlying issue has been fixed
in 6cfb18686e.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
i2c_transfer_async is the asynchronous version of i2c_transfer where
the completion of the transfer is notified to the caller using a callback.
This can be used in conjuction with the common callbacks and datatypes
in async.h for directly doing an async transfer with an IPC object
to notify a thread.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Because the fixup files do not exist anymore, stop using "unfixed"
naming in favor of "generated".
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Devicetree fixup files existed previous to the current stable Devicetree
API. While they served their purpose, they are no longer necessary nor
used in-tree. This patch drops support for this legacy feature.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Channels are not unique across bands, they need to be interpreted along
with frequency band. Add a separate band parameter that supports 2.4, 5
and 6 GHz bands.
Also, 6GHz has maximum channel of 233 (as of now), so, change the
maximum channel to that, this is a global maximum, per-band channel
validation is left to the offload driver as that depends on regulatory
rules (not a simple maximum check).
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
MFP (Management frame protection) a.k.a PMF (protected management
frames) is now a mandatory feature for certification esp. for WPA3.
Support is added for both scan and connect similar to security type.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
SAE password is similar to WPA2 password but without any length
restrictions, so, add a separate optional field, if this is not given we
can fallback to WPA2 password (psk).
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
This is a variant of standard PSK which uses KDF instead of PRF for
key generation, see section Table 9-151 in [1].
[1] - https://standards.ieee.org/ieee/802.11/7028/
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
This commit adds the `CODE_UNREACHABLE` hint at the end of the
assertion failure branch so that the compiler takes note of the assert
function not returning when an assertion fails.
This prevents the compiler from generating misguided warnings assuming
the asserted execution paths.
It also introduces the `ASSERT_TEST` Kconfig symbol, which indicates
that the "assert test mode" is enabled. This symbol may be selected by
the tests that require the assert post action function to return
without aborting so that the test can proceed.
Note that the `CODE_UNREACHABLE` hint is specified only when the assert
test mode is disabled in order to prevent the tests from crashing when
the assert post action function returns.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Change introduces authentication callbacks used only for specified
BLE connection. The feature can be used by devices that require
reporting specific bonding capabilities only when pairing using
vendor-specific procedures.
If per-connection authentication callbacks are defined for given
connection, they are used instead of global authentication
callbacks. SMP latches authentication callbacks during the first
access to prevent updating the callbacks while pairing.
Fixes: #38336
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Updates the ztest_test_fail() function to allow failures in setup.
When executed, a failed assert will fail every test in the suite owning
the setup function. This was verified by adding a suite which asserts
in the setup function and has a test that should pass. During
exeuction, ztest marks the test as failing.
In order to verify exection I also added 2 new APIs:
- ZTEST_EXPECT_FAIL(suite_name, test_name)
- ZTEST_EXPECT_SKIP(suite_name, test_name)
Signed-off-by: Yuval Peress <peress@google.com>
Change the clock control driver API to not call device_is_ready() in every
API call. It is up to the caller to ensure that the clock control device is
ready before calling a clock control API function.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The def command Indicates that a comment block contains documentation
for a #define macro. This is useful if the comment block documents a
macro not adjacent to it, e.g.
```c
/**
* @def MAX(x,y)
* @brief Computes the maximum of @a x and @a y.
*/
#ifdef XXX
#define MAX(x,y) ...
#endif
```
However, it is not necessary if the comment is adjacent to the
definition, e.g.
```c
/**
* @brief Computes the maximum of @a x and @a y.
*/
#define MAX(x,y) ...
```
This patch removes all unnecessary def entries in-tree.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
In the continuation of the previous commit, replace _OPT_ by _DOMAIN_
in macros relating to this feature.
hen, adapt drivers and tests to this new wording.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Wi-Fi protocol uses EAPoL ether type frames for authentication, so, add
support for that ether type so that they are not dropped.
Though we have NET_ETHERNET_FORWARD_UNRECOGNISED_ETHERTYPE to allow
unknown frames to be passed up the stack, but this might cause
performance penalty.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Now that we can iterate over all the status "okay" devicetree nodes
directly using <zephyr/devicetree.h>, use that along with a new helper
macro to pre-declare all possible struct devices.
Unlike the previous implementation, which declared devices even for
disabled nodes, we restrict the new mechanism to only declaring
devices for status "okay" nodes. This keeps drivers honest by not
pre-declaring devices for disabled nodes, which should not be
allocated in the first place.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add two new utility macros for iterating over the entire tree, along
with tests.
I have a use case for DT_FOREACH_STATUS_OKAY_NODE() right now, but I
think it makes sense to define both of them right away for
completeness.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This header makes extensive use of devicetree macros, but it does not
include zephyr/devicetree.h. Fix it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
NET_BUF_POOL_FIXED_DEFINE locates net_buf_data in __noinit section,
it does not guarantees that data buffer will aligned.
There is wifi driver which required network buffers to be aligned.
Changes:
line below (from NET_BUF_POOL_FIXED_DEFINE macro):
static uint8_t __noinit net_buf_data_##_name[_count][_data_size];
is updated to:
static uint8_t __noinit net_buf_data_##_name[_count][_data_size]
__net_buf_align;
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Separate closing lwm2m context from closing socket. This patch is required
for the rd client to take more control over lwm2m context and the socket.
The goal is to close the socket and to keep the lwm2m context if this is
needed.
Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
This macro compares two integers from 0 to 255 at compile time, using
the preprocessor.
Signed-off-by: Kumar Gala <galak@kernel.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This change makes the files which are part of this changeset comply to
the project's coding style rules as defined in .clang-format.
This required addition of some forward declarations and additional
dependencies into header files as some of them depended on the order of
header inclusion which was changed due to alphabetical ordering of
includes.
Background: .clang-format states "SortIncludes:true" which will force
re-ording of include-statements which in turn might break the build if
header file inclusion is not order-independent.
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
New API for suspend and resume LwM2M engine.
New event LWM2M_RD_CLIENT_EVENT_ENGINE_SUSPENDED for indicate
application that engine is suspended.
Simplify stack suspend and resume state same time for queue mode.
New CONFIG_LWM2M_RD_CLIENT_SUSPEND_SOCKET_AT_IDLE for enable skip socket
close at RX_OFF_IDDLE state that socket is only suspended and close is
called only when connection is resumed.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Current API allowed to get notified when the maximum system latency
changes, however, a single callback was allowed. The design was intended
for SoC specific actions when latency changes. However, in some cases
drivers may also want to know the current maximum latency to perform
local actions if other parts of the system modify it.
This patch updates the API with a pair of subscribe/unsubscribe calls to
achieve such goal. Tests have been updated to show how the API can be
used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add the "zephyr/" prefix to various #include statements that are
preventing the CI form running with LEGACY_INCLUDE_PATH=n.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Added API function +int settings_storage_get(void **storage)
which allows to get storage instance used by the
settings backed to store its records.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Extend current implementation of vendor-specific HCI events related
with Zephyr Fatal Error. The extended event is able to carry Zephyr
system wide fatal error as well as Controller related assertion.
That gives a possibility to use the event by bt_ctlr_assert_handle
or k_sys_fatal_error_handler to send information about unrecoverable
failures over HCI interface.
There are added two types of errors to Zephyr Fatal Error event:
- system fault error like e.g. Hard Fault. This one caries reason of
a fault and a stack frame in the data field. The stack frame is
defined for Corte-M SoCs only.
- Controller assert. The data field caries file name and line of code
where an assert happened.
Except that the extended event can be used by Host, it can serve as a
debug mean to conformance testing of the Controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
After some analysis I found out that there's no machine timer provided
by the "riscv" vendor. There are some specs for the mtime/mtimecmp
registers (this is why we can have a single driver), but the actual
register layout or implementations differ amongst vendors. GD32 uses the
Nuclei implementation, named "system timer" in their documentation. This
patch aligns with vendor specs.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Mesh Profile Specification errata 11310
Section 4.4.4.1
"This model shall support model publication, as defined in Section
4.2.2 of the Mesh Profile specification and model subscription,
as defined in section 4.2.3 of the Mesh Profile specification."
Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Spell out BT_ATT_ERR_* instead of using less specific "ATT error code".
Co-authored-by: Emil Gydesen <Thalley@users.noreply.github.com>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>