The consequences of a wSequence mismatch are unspecified and are
primarily for debugging purposes. Our checks are a bit too strict, and
if the header check fails, the sequence is not updated, and the header
check subsequently fails. Rework the code to just log a warning on
mismatch and also reset OUT sequence counter the same way as the IN
sequence counter.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Align the OUT handling with the CDC NCM and change the logic to track
when the alternate data interface is set/reset instead of the class
implementation being part of the active configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When interface alternate is set back to zero, the implementation still
attempts to submit OUT transfers, but the addressed endpoint is actually
disabled. Change the logic a bit to track when the alternate data
interface is set/reset instead of the class implementation being part of
the active configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not fail in iface_start/iface_stop if sending notification fails,
just log the error and try to send connected notification when alternate
interface is set and network interface is started.
Do not block in notification send function and allow to submit more than
one notification which means that the last valid one will also be
delivered.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The Zephyr network interface should not be disabled by the USB device
functions. This sounds confusing, but in the current implementation they
are different ends of the connection.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We need to handle notifications periodically, for example, when the
interface alternate changes and we also need to track whether the
notification was actually transfered to the host. There is no need to
trigger notification work on iface_start/iface_stop when the USB
interface is not in active configuration. This commit intentianly
changes log level in the notification handling code.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
In the current implementation, the block length in the OUT direciton
should be equal to the transfer length.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The implementation should not assume that NDP is placed immediately
after NTH. According to the specification (revision 1.0), NDP can be
anywhere in the transfer buffer. There is also always a "terminating
zero datagram pointer entry", which we should also use to terminate the
datagram processing loop.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add the ability to select littlefs disk version
to maintain backward compatibility
with existing littlefs
with the same major disk version.
Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
Currently llext_link_plt() calculates offsets to relocation addresses
relative to the .text section and passes them to
arch_elf_relocate_global() and arch_elf_relocate_local(), where then
.text memory address is added to them. Instead it's more logical to
concentrate the entire calculation in the caller, which then also
removes the assumption, that all sections have the same VMA - LMA
offset from those functions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
With changes introduced in commit 6a3602a306
("net: buf: Clear `user_data` on allocation")
our memset() calls are redundant.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Core spec V5.4 Vol. 3 Part G 2.5.2.1 Robust Caching specifies
the conditions where Database Out Of Sync (0x12) error needs to
be returned as follows:
If a client that has indicated support for robust caching (by
setting the Robust Caching bit in the Client Supported Features
characteristic) is change-unaware then the server shall send an
ATT_ERROR_RSP PDU with the Error Code parameter set to Database
Out Of Sync (0x12) when either of the following happen:
• That client requests an operation at any Attribute Handle or
list of Attribute Handles by sending an ATT request.
• That client sends an ATT_READ_BY_TYPE_REQ PDU with Attribute
Type other than «Include» or «Characteristic» and an Attribute
Handle range other than 0x0001 to 0xFFFF.
Add the conditions to ATT_READ_BY_TYPE_REQ handler.
Signed-off-by: Chang Kim <changshik@meta.com>
The Bluetooth HCI USB transport layer implementation is provided by
"subsys/usb/device/class/bluetooth.c". The USB H4 Bluetooth function
implements a non-standard transport layer. There is no known host-side
equivalent that uses this protocol.
Note that the H4 protocol functionality is also provided by the
"subsys/usb/device/class/bluetooth.c".
Since that there are no real USB H4 Bluetooth users, remove the
implementation and sample without deprecation.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Output a CMake error when the ITS store module is enabled but no
implementation ended up enabled (due to unfulfilled prerequisites).
This is to make it more clear than undefined references at link time.
Not a fatal error because CMake cannot fail for the twister filtering
to work on the tests.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Remove the hard restriction on CONFIG_SECURE_STORAGE_ITS_MAX_DATA_SIZE.
SETTINGS_MAX_VAL_LEN is in practice not used by any settings backend
implementation.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
It becomes the new default when the secure_storage_its_partition
devicetree chosen property is defined as it is a preferred alternative.
See the help message of the
`CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS` Kconfig option
for more information.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
There are currently four types of roaming, 11r roaming, 11v roaming, 11k
roaming and legacy roaming, The priority of the roaming mode is
11r-->11v-->11k-->legacy roaming. If the ap does not support 11r/11v/11k
roaming, we will use legacy roaming. legecy roaming needs to do
full channel scan, which is the same as the general scan connection
process, so the legacy roaming time will be longer.
Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
This fixes an issue where wrong values were checked against block device
defaults. Kconfig values are used when no filesystem config values are
provided, and the buffers are sized according to the Kconfig values,
but the checks were only performed against filesystem config variables.
Signed-off-by: Djordje Nedic <nedic.djordje2@gmail.com>
Some ARC processor configurations have separate memory for code (ICCM)
and for data (DCCM). Such configurations are unsuitable for LLEXT,
except for some quite special cases. For now, disable LLEXT and its
tests for these devices completely.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
The default exponent is 0, will cause twt setup quick failed,
set exponent value derived from twt interval to fix it.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
In the case of IPV6 not enabled, when NET_SOCKETS_PACKET is enabled,
the sizeof(struct sockarr) will change to 20, the value of
MCUMGR_TRANSPORT_NETBUF_MIN_USER_DATA_SIZE is 8, which is not able
to pass the compilation, so I change its default value to 20.
Fixes#82757
Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
Add WIFI_SAP_IFACE_NO_IR state to keep same as hostapd_iface_state,
which is updated as the hostap upmerge.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
For CMD 'wifi ap status', removing HAPD related definition to make it
more commonly used for non-supplicant case.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Don't check 'HEAP_MEM_POOL_SIZE != 0', as HEAP_MEM_POOL_SIZE might be 0,
but HEAP_MEM_POOL_ADD_SIZE_xxx is defined, which means the actual heap
size is not zero. So check KERNEL_MEM_POOL instead.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
The user data size of the RFCOMM tx pool is zero. There is not enough
space to put the tx_meta data. Use CONFIG_BT_CONN_TX_USER_DATA_SIZE to
set the data size for the RFCOMM tx pool.
Signed-off-by: Make Shi <make.shi@nxp.com>
Most users won't be interested in the per-channel rules but only in the
country code, so, add a verbose option to hiden per-channel rules which
are too verbose.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In order to prepare for extending the options, convert to getopt long
for easier parsing of options.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit includes cleanups to `kernel_service`:
- `shell_tdata_dump()`:
Adjust formatting to align with `.clang-format`.
- `shell_stack_dump()`:
Update to pass `sh` directly instead of `user_data` since
it is already assigned.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Switch from using direct `strtoul` calls to `shell_strtoul`.
This change leverages the extensive error handling provided
by `shell_strtoul`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
As `strtoul`, `strtoll`, and `strtol` guarantee to set `endptr`,
the initial `NULL` can be omitted.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Simplify `uart_cb_handler` by directly using `dev` instead of `cfg->dev`,
as both hold the same value.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
In case the peer device has NO SDP record, the result is valid,
but the result->resp_buf is NULL, it would introduce a hardfault.
Therefore, also add a NULL pointer check for result->resp_buf.
Signed-off-by: Make Shi <make.shi@nxp.com>
Increase the maximum value of LOG_BUFFER_SIZE from 64 KB to 1 MB
to accommodate varying device requirements.
Signed-off-by: Jungo Lin <jungolin.tw@gmail.com>