With this changes, device will check if AP support Neighbor Report or
not before trigger roaming. No need to issue 11k command to enable 11k,
if AP supports Neighbor Report, device will trigger 11k roaming with
priority.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
As an error-handling strategy. The client then can recover from this
depending on the error and the number of occurrences.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As their handling is not that similar and mixing them both affects
code readability. This patch does not affect functionality and does
not break any testsuite under rtio API.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
There's no use-case covering this case and enforcing it will allow
simplify the logic for processing items with each of these items when
mutually exclusive.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Update the HTTP service API to allow setting per-service configuration,
currently it is only custom socket creation callback,
but in the future it can be extended with other parameter
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Introduce pm_device_driver_deinit() which is required to fully
support device_deinit(). This function shall be called by drivers
when device_deinit() is called.
If PM_DEVICE is enabled, it will
simply check whether the device is either SUSPENDED or OFF, this
will prevent device_deinit() on a device which is currently in
use, and ensure the device is in the correct state if device_init()
is called later.
If PM_DEVICE is not enabled, it will invoke the SUSPEND action which
mirrors the pm_device_driver_init() behavior. Note that TURN_OFF
action is not called since the device is deinitialized after this
call.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The client list is filled from the bonding table at registration
but this should only be done once like the callback registration
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
In current implementation, the UUID 128 is not well supported. The
found issue includes,
Issue 1: No clear byte order of the UUID 128 in local SDP record.
Issue 2: No clear byte order of the UUID 128 of the SDP discover
parameter.
For issue 1,
Add the description to note that if the SDP attribute type is
`BT_SDP_UINT128`, `BT_SDP_INT128`, and `BT_SDP_UUID128`, the byte
order should be little-endian.
And swap the 128bit from little-endian to big-endian when responding
the peer SDP discovery request.
For issue 2,
Add the description to note that if the SDP discovery type is
`Service Search` and `Service Search Attribute`, and UUID is UUID 128,
the passed UUID data of the discovery request parameter should be
represented as the little-endian byte-order sequence.
And swap the 128bit from little-endian to big-endian when packing the
SDP discovery packet.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Enable double buffering on isochronous feedback endpoint to avoid
sending ZLP instead of feedback information.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Enable double buffering on data OUT endpoints to allow USB stack to
enqueue next transfer as soon as possible. This is especially useful
when operating at High-Speed where there is significantly less time
between subsequent SOF packets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Change the macros to have only one plus operator per term. This is
purely stylistic change, no functional changes.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
In case of fatal network error (i.e. when the LwM2M client runs out of
retries), call lwm2m_engine_stop() to cleanup any allocated resources
for the client. The engine is dead at that point anyway so the
application needs to recover.
If this isn't done, it is theoretically possible to restart the LwM2M
client (with lwm2m_rd_client_start() which does not report an error in
such case), which in turn could lead to resource leaks (like for
example the observer list is reinitialized) if the application
didn't call lwm2m_rd_client_stop() first. Calling lwm2m_engine_stop()
ensures that all resources are freed even if the application doesn't
call stop before restarting.
Stopping the engine is also needed when the network error occurs when
de-registering - in such case the engine goes straight into the IDLE
state, where it's possible to restart the client and thus reinitialize
the observer lists.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add missing error checks for mutex locks after the mutexes
were changed to not use K_FOREVER which should not be done in
the BT RX thread.
A larger overhaul of how mutexes are using within the scan delegator
should be considered, as there are a lot of locks and unlocks when
handling the callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Error codes fall into two main categories:
case 1: NOT_SUPPORT_XXX. This means that the configuration of the
parameter is not supported locally.
case 2: INVALID_XXX. This means that the parameter is not configured or
duplicated in the set_config_req command.
Currently the protocol only supports SBC, so it is only checked for SBC
parameters.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Add tests to make sure that if neighbor cache does not contain
info for neighbor link layer address, we can queue packets
and re-send them when the neighbor cache contains the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
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>