If we do not know the neighbor link address, we need to send
neighbor solicitation message to net. While waiting neighbor
advertisement, there might be other packets that we want to
send to that neighbor. Queue those packets so that all of them
can be sent when NA message is received.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit adds support for the extended feature set
feature. This includes:
- hci boilerplate
- kconfigs, including one for a max local feature page
- reading remote features is done by a command and callback
- this is not linked into the auto feature request on
connection as this procedure can take quite a few connection
events, and we do not want to delay the user
- added the commands to the bt shell
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Previously, the version complete event had to come after
the remote feature complete event for the notify_remote_info
function to be called.
This becomes less practical when adding the read all remote
features complete event, as this can take some time. Meaning
the order of events is not predictable.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
- Added "wifi config" command.
- Add OKC parameter to "wifi config" command.
Set okc to 1 to enable opportunistic key caching.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Fix assertion in ull_conn under race between connection
termination and processing of HCI Reset command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ULL Tx Ack FIFO's first index being advanced beyond a
recorded ack_last value in a node_rx when under race.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Keep-alive probes have seq number set to SND.NXT - 1 and may or may not
contain an octet of data. The latter case was not handled properly
therefore add a special case when validating seq number to response to
keep-alive probes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Support the case that 11k parameter can be set before wifi connection.
This field should not be cleared by connection.
Neighbor report will be cleared before start_roaming.
So wifi_connect don't need to clear 11k params.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This commit resolves a bug where the USB Endpoint
provided by the HID driver was incorrect when in
High Speed mode.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
Refactor certificate processing code to eliminate duplication and
enable reuse across modules that require enterprise support.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
The Tx rate was previously stored as an integer, which caused loss of
precision for rates like 8.6 Mbps or 34.4 Mbps due to integer division.
The change will update data type to float.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
The sh->ctx->uninit_cb needs to be set before posting the
SHELL_SIGNAL_KILL to the event, like the k_poll based code did prior to
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Commit adds destruction of the persisted in PSA ITS key if
mesh does not own it (zero bit in the bitmap of persisted keys).
This is not standard mesh behavior, but might happen
if something happens between removing key data in mesh and
in the crypto library (for example power off in bettwen).
Previously, mesh wasn't able to import key with gotten stuck
key id. The current fix reproduces more robust behavior.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit adds the tracing macros and functions related
specifically to the k_msgq_put_front API.
Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
Fix Max Chunk reporting during Block_Information_Get:
If friendship is established, then max possible chunk size for transfer
is reported according to friend's queue size.
ChunkSize = (FndQ sz * Bytes per seg (12)) - Opcode(1) - Chunk_Num (2)-
8 byte MIC (max)
= (FndQ sz * 12) - 11
This allows all segments of Chunk_Transfer messages to fit in a friend
queue. If this is not done, friend queue keeps overflowing
systematically causing unstable PULL_MODE transfers.
Fix Chunk requests:
Adapt number of requested chunks according to current friend queue size.
If friend queue is too small, at least 1 chunk is requested.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
MISRA-C says the right hand of a logical and should not contain side
effect operations. Instead nest the branches to get the same logic
without the MISRA-C rule breakage.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
When building with CONFIG_OPENTHREAD_INTERFACE_EARLY_UP enabled,
`is_up` is undefined (since 596844a).
Signed-off-by: Lorenz Clijnen <github@lorc.be>
Signed-off-by: Lorenz Clijnen <l.clijnen@edna.eu>
As lwm2m_notify_observer_path() now reads attributes for the updated
resource, value_conditions_satisfied() does not need to read the
attributes again, it can just reuse the already available data.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When updating a resource, the LwM2M library verified pmin attribute on
all resources/objects in the observer path list and chose the smallest
value. While this make sense for determining the lower-boundary for the
next notification time, it could lead to unnecessary notifications being
generated too early if the updated resource had a higher pmin value
configured on it.
Therefore, when checking notification criteria for an updated resource,
check the pmin value for that resource path and if set and higher than
the lowest pmin value evaluated for the observer list, use it instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The mutex is being used as a simple binary semaphore. It is not
recursed so we don't need to track thread ownership nor lock count.
Exchange the mutex for a binary semaphore to save resources and
speed up shell.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Due to the alignment and granularity requirements of memory allocation,
setup->wLength is shorter than the allocated buffer size.
This lead to responses larger than what the host requested, which it
rejected. Fix it by using the minimum between the allocated size, the
struct size, and the wLength requested.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Some OSes like MacOS use shorter UVC 1.1 probe/commit messages even when
UVC 1.5 is supported, without bUsage, bBitDepthLuma, bmSettings,
bMaxNumberOfRefFramesPlus1, bmRateControlModes bmLayoutPerStream.
Accept messages of arbitrary size to safely be processed, ignoring all
missing fields, improving standard compliance.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Check if there actually is data to copy before calling memcpy() to
prevent potentially calling memcpy() with NULL value pointer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
* Simplify the logic of the get_number() function to address the corner
cases reported by UBSAN regarding byte-swapping signed integer values.
The existing logic was actually only valid for little-endian systems,
as it expected that the bytes written from the packet buffer will be
stored at the beginning of the int64_t memory, plus the actual
byte-swapping with signed integer casts inside was hard to follow.
Switch to a plain uint8_t buffer for integer readout, and use
dedicated system function to convert the big-endian data in the buffer
into unsigned integer in the system endianness, followed by the final
cast to a signed value.
* Add explicit cast to uint32_t in put_objlnk() to prevent warning about
not-fitting integer after byte shift, and update the result type to
uint32_t as well.
* Switch to buffer with sys_put_be16/32/64 when writing integers due to
similar warnings about byte-swapping signed values.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify if the integer value being parsed does not overflow int64_t type
and report an error in such cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify if the integer value being parsed does not overflow int64_t type
and report an error in such cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Check if value pointer is not NULL before passing it to memcmp() inside
lwm2m_engine_set(). As the function actually expects that the value
pointer can be NULL in case resource value is cleared (there is a test
case for such behavior), validate that len value is actually 0 if NULL
value is provided, to avoid unexpected behavior in other parts of the
function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As packets need to be forwarded between Wi-Fi/Eth interface and
OpenThread interface, routing support has to be re-enabled and
configurable through prj.conf file.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fix FS shell using fixed 'storage_partition' nodelabel instead of
accessing the DT defined partition from the zephyr,fstab,littlefs
node partition property.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
The modem modules cmux module is currently directly coupled to the
presence of specific modems, rather than being selected by drivers
for whatever hardware wants to request the default MTU of 127 bytes.
This commit the makes the device drivers (for now, modem_cellular)
select the symbol, thus decoupling the modem modules from the
presence of any specific device.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This commit implements zephyr filesystem operations for virtiofs
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit adds virtiofs functions implementing fuse operations required
to enable zephyr filesystem support
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
When preparing LLEXT ELF sections only invalidate instruction cache
of executable sections. Also skip the step on platforms, managing
cache at the application level.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The shell subsystem currently uses k_poll for signalling. However,
k_poll is only used for simple event signals, results are not used.
Replacing the k_poll with k_event greatly simplifies the code, and
saves 4 struct k_poll_signal and 4 struct k_poll_event (one of which
was entirely unused) while costing a single struct k_event, for
every shell instance. It also allows us to not select POLL,
as we are using the simpler EVENTS instead.
A quick test build of the shell test suite on an nrf54l15 produces
the following build info:
using EVENTS:
FLASH: 71592 B 1428 KB 4.90%
RAM: 9872 B 188 KB 5.13%
IDT_LIST: 0 GB 32 KB 0.00%
using POLL
FLASH: 75524 B 1428 KB 5.16%
RAM: 11224 B 188 KB 5.83%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Separate CON responses do no have a reply callback registered (as no
response is expected), however are still registered for retransmission
on the pending list. Therefore, we not only need to check for empty
ACKs for such case but for RESET packets as well. However, this cannot
be done before "reply" processing, as some of the reply handlers
(notifications namely) check for RESET replies.
Therefore, add a final check for the RESET response after the existing
"reply" logic. In such case, just remove the pending response packet
from the retransmission queue, and release resources.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When using a separate response mechanism in LwM2M client, the
acknowledged flag is used to notify the engine that the request has been
acknowledged already with an empty ack and a separate CON response
should be sent. The same flag however is used by the retransmission
mechanism, to check if the CON request sent by the client has been
acknowledged by the peer.
As separate responses use the flag both ways, it has to be cleared
before sending the separate CON reply. Otherwise, the retransmission
logic assumes the reply has already been acknowledged and skips the
retransmission.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
BT_CTLR_LOW_LAT_ULL_DONE is used to reduce CPU usage in LLL
context by delegating the done event dequeue to ULL_HIGH
context.
Building a HCI Controller with BT_CTLR_LOW_LAT_ULL_DONE had
assertion when used with BlueZ stack.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix flash sync start from repeatedly forcing connection
event be skipped. Space new flash operation to be placed
in the past so that it does not force itself on to an
overlapping connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Compilation fails with an "index outside of array bounds" error:
In function 'find_memory_region',
inlined from 'gdb_mem_can_read' at \
zephyr/subsys/debug/gdbstub/gdbstub.c:93:7:
zephyr/subsys/debug/gdbstub/gdbstub.c:65:21: warning: array subscript \
idx is outside array bounds of 'const struct gdb_mem_region[0]' \
[-Warray-bounds]
65 | r = &gdb_mem_region_array[idx];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
zephyr/subsys/debug/gdbstub/gdbstub.c: In function 'gdb_mem_can_read':
zephyr/subsys/debug/gdbstub/gdbstub.c:42:36: note: while referencing \
'gdb_mem_region_array'
42 | __weak const struct gdb_mem_region gdb_mem_region_array[0];
|
Use a single element array to fix the problem.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Incorporate the basic RTK API as well as a basic client integration
(serial) as a way to receive and publish the RTK data.
Signed-off-by: Luis Ubieda <luisf@croxel.com>