In large networks there can be many DNS responses, make the DNS info queue
size configurable to prevent dropping messages
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
When modem_pipe_notify_closed() is removed from pipe->close() call,
we rely on the UART callback to notify when the UART is closed.
If we call uart_rx_disable() twice, we might lose the callback,
and the pipe status stays open.
This happens when modem_cellular_run_shutdown_script_event_handler() calls
modem_pipe_close_async() followed by modem_cellular_enter_state(IDLE)
which also calls modem_pipe_close_async().
Prevent side-effects of calling the close twice, by checking the already
existing atomic bit.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules.
This also documents the usage for each command.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Rather than manually checking the number of arguments and printing an
error message, let the shell subsytem handle the validation for us by
indicating all arguments as required.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Convert USB device shell command help strings to use the
SHELL_HELP() macro instead of inline help text.
This aligns the USB device shell with the updated shell help
formatting used across the tree and ensures consistent
presentation of command descriptions and argument usage.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The "@funcprops" Doxygen alias was originally introduced to list all
the function properties that apply to a given function (e.g. isr_ok,
etc.) in the form of a bullet list. However, since commit a258ab32d1
that is no longer the case and all the properties are rendered as
qualifiers (https://www.doxygen.nl/manual/commands.html#cmdqualifier)
and therefore no longer need to be grouped in a separate list.
This commit also ensure all aliases for the actual qualifiers use
`@qualifier` notation instead of `\qualifier` to be consistent with
our Doxygen guidelines.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The net_buf was always initialized with net_buf_simple_init_with_data
which was a bit wasteful as we only need to do that once. Since `inst`
is `static`ally allocated, we can check for `.data == NULL`.
Additionally the read callbacks expect the buffer to be 0-initialized
between each usage, which wasn't the case. We can use the `buf.len`
to determine how many bytes we need to reset to `0`.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This check was asserting on the wrong struct size and was not taking in
the architecture configured cache line size. The build assert now checks
the right struct size and takes into account the configured cache line
size or sets a default.
Additional makes the check entire opt in.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
OP_DELAY requires embedding in the submission queue entry a _timeout
struct which can push the struct size over the specified 64 byte (cache
line) limit.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
zsock_send() does not necessarily have to send the entire data. Use the
recently introduced function zsock_send_all().
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Depending on the server, functions, and client application, we may
get out of transfers very quickly. To throttle here may allow
submitted transfers to be finished.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
UHC transfer handling and assignment of completed transfers to URB
sequences relies on the buf->size. For that, we can just use variable
net_buf pools instead of fixed. Perhaps it gives us also better
utilization of the buffer.
Add Kconfig optons to configure pool size and number of buffers
and use large default pool size for native_sim platform.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Make request completion handling a bit more robust when, for whatever
reason, the connection has been closed. Do not implicitly clear the USB
device pointer on client disconnect, to allow the completion callback to
clean up. Before handling USBIP_RET_SUBMIT, check whether the device is
still exported, and if not, just drop completed transfer.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The mutex should be held when calling dns_resolve_init_locked as mentioned
in a comment above the function.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The current way of setting the public address using
`bt_hci_driver_api::setup` does not work well in split builds
where host and controller runs on different cores/socs/boards.
This approach requires each HCI driver and each `hci_<transport>`
application to implement the setup and pass the information on
to the next layer.
Zephyr already defines a vendor-specific command that can be used
to set the public address (`bt_hci_cp_vs_write_bd_addr`).
Use this in `bt_enable` after opening the HCI transport and before
initializing the id module. This makes the setup independent of
hci transport and only depends on a controller that implements the
Zephyr HCI VS commands.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
Move the Kconfig template to configure the number of instances in, for
example, functions or class drivers, to a common directory.
This makes it less confusing when used in host support.
Template was not used in CDC ECM function and can be removed.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The static global UUID variable in the GATT shell module was shared across
all concurrent discover and read-by-uuid operations, creating a potential
race condition where one operation could overwrite the UUID before another
completed. Move UUID storage into the per-operation gatt_op_context
structure to isolate UUID state for each operation. This enables safe
concurrent operations without data corruption.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
for checking the first two chars of a string
we don't need to get the full lenght, we can simply
just check the 2 chars, especially as we already check
the first one already.
in `fs_opendir` we only need to check the first char.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The friendly name buffer sizes used the URI length, but since
the friendly name is specifically not an URI that did not make
sense. Added a new Kconfig option to configure the maximum
supported friendly name, which is shared between both TBS
and the TBS client, similar to the other max Kconfig options.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change comment from "increasing" order to "decreasing"
since the 0th indexed Pstate must have the highest
threshold.
Signed-off-by: Sean Kyer <sean.actor@gmail.com>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>