The original implementation select the port
as best_port when stepsRemoved is equal to
the one of best_vector.
When challenger is from announce message
set in GPTP_PA_INFO_SUPERIOR_MASTER_PORT,
its stepsRemoved is the same as in the message.
When challenger is from master_priority
copied in GPTP_PA_INFO_UPDATE,
its stepsRemoved is [stepsRemoved of bestVector]+1.
Thus, we should add one to the challenger's
stepsRemoved in comparsion to avoid useless
update of bestVector.
Signed-off-by: Yusuke Omae <s1413091@gmail.com>
More complex suspend and resume scheme might require exactly defined
location of this variable due to platform peculiar SW and HW requirement.
DTS zephyr,memory-region node with nodelabel `pm_s2ram` shall be used to
automatic definition of linker section for such objective.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/94000.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
Basic support for open charge point protocol v1.6 as native stack with
below functionality
1. Framework for ocpp stack and central system communication using RPC over
websocket according to occp-j.
2. Core profile with basic PDU
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Co-authored-by: Sanjay Vallimanalan <sanjay@linumiz.com>
AICS gain mode does not prevent local nor remote operations from changing
the gain setting value. The gain setting value shall simply be ignored if
in the BT_AICS_MODE_AUTO_ONLY or BT_AICS_MODE_AUTO modes, but the local
application and remote devices can still modify the gain setting value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit adds support for the frame space update feature
to the bluetooth host.
This is mainly just a wrapper around the frame space update
HCI command and event.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Fix BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE define, as this was
not working correctly without brackets around
CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE.
Also fix CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE help,
as this was talking about remote featues, where this only
applies for local features.
Also update for new CONFIG_BT_CONN_DYNAMIC_CALLBACKS kconfig
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Providing a wrong address to the connect() call by the application is no
reason to assert, connect() should just return an error in such case.
Therefore remove the faulty assert and replace it with error log
instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The rest of the network (and generally Zephyr subsystem code) use the k_
prefixed variants for memory allocation, which results in data goin in
the _system_heap rather than the stdlib z_malloc_heap.
The code in getaddrinfo use the z_ ones as well apart from the actual
getaddrinfo implementation, which seems like an oversight, change it to
use k_calloc and k_free as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add initial support for the Cortex-M52 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
The write_ct function calls bt_cts_send_notification and if
bt_cts_send_notification fails to send a notification (e.g.
if there are no clients subscribed), it would return an
error, and thus send a ATT error response to the client,
even if the value was actually written.
This commit changes the behavior so that the notification
does not affect the return value (as it is not directly
linked to the write itself), but rather just logs it if
it fails to send the notification.
The notification can failed to be send for 2 main reasons:
1) The application returns an error on fill_current_cts_time
2) bt_gatt_notify fails to notify due to missing buffers
The first we cannot do much about. For the latter we can
either just live with the missing notification, or implement
a retry if we run out of buffers. For this simple fix the
former was chosen, but can be revisited if it turns out
to be a significant problem.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since the SDUs are now allocated by the application
and the host does not care about the SDU sizes, the check
is useless.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit allows to the user to control the use or not of dynamic
connection callbacks.
The stack is not using the dynamic connection callbacks so they are
only needed if the applications want to use it.
Setting it to true for backwards compatibility.
With dynamic connection callbacks
FLASH: 176600 B 512 KB 33.68%
RAM: 27428 B 64 KB 41.85%
IDT_LIST: 0 GB 32 KB 0.00%
Without dynamic connection callbacks
FLASH: 176376 B 512 KB 33.64%
RAM: 27428 B 64 KB 41.85%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
This commit registers the connection callbacks using BT_CONN_CB_DEFINE,
which ensures they are set up at link time rather than runtime.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
This commit registers the connection callbacks using BT_CONN_CB_DEFINE,
which ensures they are set up at link time rather than runtime.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
Fix the build error when hostapd enterprise is enabled, it should use
new wifi_set_enterprise_credentials API, instead of
wifi_set_enterprise_creds.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This change addresses an alignment problem reported by UBSAN by
using a copy of the address. This avoids the need for extensive
rework to support *_raw variants in the routing layer.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
LwM2M engine does not allow strings to be truncated as it would
lead to invalind UTF-8 strings.
However, some content formatters were truncating, so I fixed at least
these
* plain text
* TLV
* SenML CBOR
* SenML JSON
* JSON
* CBOR
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
We should not block erasing pending images when using ramload with
revert mode, because uploading multiple confirmed images with the same
version would brick the device (preventing future FW updates). Update
the dependencies of img_mgmt_slot_in_use to account for this.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
boot_fetch_active_slot needs to map the slot number to a flash ID, as
this is what the DFU subsystem expects when interacting with the flash
partition.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Much like in RAMLOAD mode, RAMLOAD_WITH_REVERT requires that mcuboot
subsystem fetch bootloader information via the retention subsystem.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Fix default value of BT_TICKER_REMAINDER_GET, it will be
selected based on enabled Controller features. This is not
needed by minimal peripheral role.
Fix depends on for BT_CTLR_CONN_RANDOM_FORCE as it is
applicable when more than one simultaneous connections is
supported. Again, this is not needed by minimal peripheral
role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>