Rework USB_DeviceNotificationTrigger(). Fix style.
Drop messages from USB_DeviceEhciCancel().
MCUX EHCI driver notifies about canceled transfers,
but there is no specific code for this event in
usb_device_callback_message_struct_t, the only way to
recognize it is to check the length value.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
NET_OFFLOAD interfaces do not handle ICMP request. Request to send ICMP
packet resulted in NULL pointer dereference in net_if_tx() later
on. Prevent that by detecting NET_OFFLOAD interfaces early in icmpv4
module.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Enhance error reporting by returning immediately when the calling
function reports an error.
Signed-off-by: Andrei Laperie <andrei.laperie@intel.com>
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Return the final return value from Docker script when running echo
client in the container, first for UDP and then TCP, for both IPv4
and IPv6.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This is a copy of rand32_timer.c that uses
z_do_read_cpu_timestamp32() instead of k_cycle_get_32(),
with some logic to ensure different values when called in
rapid succession missing.
Like the other driver, its reported values are not random,
it's a testing generator only.
This appears to have no advantages over rand32_timer.c,
just remove it. In QEMU emulation, the reported TSC values
tend to have the lowest five bits zeroed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The variable needs to be an atomic_t, and in one case it was
being incremented outside of an atomic_inc/atomic_add.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The test itself handles correctly whether gen_isr_table
style dynamic interrupts are supported or not, there's
no need for an alternate scenario.
The tests work fine on riscv32 now, remove the exclusion.
Add a github link as to why Nios II is still excluded.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The author of this test case seems to have been under the
mistaken impression that interrupts are locked in ISRs, which
is untrue.
The only reason this ever passed, anywhere, was a race between
the timer firing and the zassert_not_equal() check in
offload_function. If the busy_wait call is moved after the timer
is started, this fails everywhere.
We do not re-use the timer object from the previous case,
resolving some crashes observed on riscv.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The test tries to mask CPU interrupts and then enable a k_timer,
passing if it didn't fire.
This is totally defeated if the interrupt just fires on another
CPU that doesn't have interrupts masked.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This logic should be using the sched_lock and not its own
separate lock for these two functions.
Some simplications were made; z_thread_single_resume and
z_thread_single_suspend were only used in one place, and there was
some redundant logic for whether to reschedule in the suspend case.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This was silently corrupting memory on x86-64.
Enable CONFIG_TEST so that this is detected properly,
and increase the stack size appropriately.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
User is currently able to enable verbose packet debugging for
received packets. This commit enables the same for sent packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adding the ability to set and get pthread names by defining
some non-standard extension functions that were first
introduced by Glibc.
Similar to zephyr thread naming, these allow for thread
tracking and debugging even when using the more portable
posix API.
Though Glibc was the originator, the current POSIX functions
have return codes based on Oracle's adopted spec, so these
functions follow suit. The Oracle and Glibc function
prototypes match.
Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
With this patch, the specific flag IWDG_STM32_START_AT_BOOT
is replaced by the zephyr generic WDT_DISABLE_AT_BOOT.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Improve settings example snippet so that it builds and works as
expected. For usability purposes, add print of stored value.
Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
More clear and detailed description of choices, and explicit
recommendations for users. Based on a question on the mailing list.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Refactor old state handling in bt_conn_set_state to use switch statement
instead of if statements.
This will give us warning about enum values not covered.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix connection complete event handling when the local RPA is not valid.
This can happen when the controller was not instructed to use an RPA
address, or the local IRK was set to an all zero IRK.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This allows flash_img.c to be used outside of mcuboot scope.
Add new call to not break existing code.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
In Core v5.2, Vol 6, Part B, Section 4.6.9 it is stated that it is
mandatory to support the PHY procedure if any PHY other than 1M is
supported.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
For the time being this 2M is only selectable for !nRF51 platforms.
Coded PHY is only selectable for nRF platforms supporting Coded PHY.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Currently only supports Unix time.
‘get’ subcommand returns date in format “Y-m-d H:M:S”
‘set’ subcommand format is ‘[Y-m-d] <H:M:S>’
The ‘set’ subcommand is implemented with basic date validation.
For user convenience of small adjustments to time the time argument
will accept H:M:S, :M:S or ::S where the missing field(s) will be
filled in by the previous time state.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
While CONFIG_ARCH_POSIX in general isn't compatible with Zephyr POSIX
subsys (because CONFIG_ARCH_POSIX itself is implemented on top of
POSIX, so there're obvious conflicts), apply workaround to allow to
at least use clock_gettime() and clock_settime() functions.
This change is grounded in upcoming support for date manipulation
commands for Zephyr shell, which are implemented using functions
above. There's no guarantee that CONFIG_ARCH_POSIX and Zephyr POSIX
subsys will coexist for any other usecase. (But the change is
relatively clean and is definitely in the right direction of
prototyping ways of such a coexistance.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
(cherry picked from commit 4a05644bce81f4792c018964d29c1158f1982d1e)
According to the Zephyr VS HCI specification:
Only Read_Version_Information and Read_Supported_Commands commands are
mandatory.
Check for supported Read Supported Features command before issuing this
command to the controller.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Make BT_CTLR_OPTIMIZE_FOR_SPEED option so that it is not
user selectable for nRF51x series SoC with encrypted
connections support.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Newer XDS firmware fails to flash correctly with higher adapter clock
speed. Using a slower speed for now to prevent errors.
Fixes#21372
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Newer XDS firmware fails to flash correctly with higher adapter clock
speed. Using a slower speed for now to prevent errors.
Fixes#21372
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
OpenThread has api to make use of radios energy scan feature.
Implemented this api in zephyr. This allows thread to perform energy
scan when needed.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Implement function and necessary callbacks to handle Energy Scan feature
of the nRF radio driver needed by some radio stacks.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add the Energy Scan capability to the possible capabilities list.
Create new energy scan callback function type to make its usage
more readable.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add a simple test to verify that the bind() can be called multiple
times if AF_PACKET is set and there are multiple network interfaces
in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the system has more than one network interface, then it should
be possible to bind a AF_PACKET socket to each interface if the
network interface index is set when bind() is called. This was
not possible earlier as the code was always using default network
interface with AF_PACKET socket bind().
Fixes#23153
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>