Avoid null pointer access by checking that Ethernet device has
PTP clock before trying to get the actual PTP clock device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In order to follow threads by name in the debug output,
output a thread name if CONFIG_THREAD_NAME is enabled.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
So far net config initialization code relied on number of services
needed by application. This was fine as long as all enabled
services (e.g. CONFIG_NET_IPV4=y, CONFIG_NET_IPV6=y) were selected by
project configuration as "needed" (e.g. CONFIG_NET_CONFIG_NEED_IPV4=y,
CONFIG_NET_CONFIG_NEED_IPV6=y). Problem appeared for example when both
IPv4 and IPv6 were enabled (CONFIG_NET_IPV4=y, CONFIG_NET_IPV6=y), but
only IPv6 was marked as "needed" (CONFIG_NET_CONFIG_NEED_IPV6=y). In
such situation number of required services was equal to 1. When IPv4
setup was completed, this resulted in returning from net_config_init()
function. Application code failed, because IPv6 was still not
functional.
Do not rely on number of services anymore, as it is error prone. Use
flags instead to mark which services are ready. Compare those flags with
the flags passed to net_config_init() (selected in project configuration
in most cases) to decide whether network configuration has completed
already or not.
Also introduce services_notify_ready() and services_are_ready() helper
functions to isolate implementation details from the logic.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
With current design there is single semaphore (called 'waiter') for
wakeing up initialization thread. This thread should then check for
number of protocols that still need to be initialized. This happens now
only when waiting on 'waiter' semaphore times out.
Do not check for k_sem_take(&waiter) return value, as all needed
information about protocols being initialized already is in 'counter'
semaphore.
Fixes: #25358
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Unit test code requires IPv6 to be ready. Select
CONFIG_NET_CONFIG_NEED_IPV6=y to ensure that.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Unit test code requires IPv6 to be ready. Select
CONFIG_NET_CONFIG_NEED_IPV6=y to ensure that.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
zperf takes a potentially unaligned netowrk packet, casts it to a
struct, and then dereferences the fields. This causes a crash on
cores that don't support unaligned access such as the Cortex-M0+.
Use the UNALIGNED_GET helper instead.
Signed-off-by: Michael Hope <mlhx@google.com>
Add command to register a receive callback to the net_context used for
the TCP connection that is opened with 'net tcp connect'. The receive
callback will simply print the number of bytes received and inform if
the connection is closed. This makes it possible to test both the tx
and rx paths with the net shell.
Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
Convert the description comment at the top of the file to a
documentation string. That string then maybe viewed with the --help
argument. Also, rework a bit the documentation string: remove usage,
since that is provided by the help message of the argparse module.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
It might happen that while we are waiting for the response
to one of our query, we receive a query to resolve another name.
Previously this would make the current name resolution to fail because
only responses were expected to be received.
Signed-off-by: Léonard Bise <leonard.bise@gmail.com>
Clarify that number of bytes_written means bytes number of bytes
written belongs to the user's payload.
Added API note for emphasize that any flush write should be
the last write operation in any writes row.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
stream_flash_bytes_written() returned number o bytes physically
written to the flash. This number might be bigger than the requested
number as is aligned to the device write-block-size.
stream_flash_bytes_written() should return number of bytes
written requested by the user.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
iProc PCIe EP IP is present in Broadcom PCIe offload chips.
Add iProc PCIe EP driver to provide basic PCIe EP functionality.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Shivaraj Shetty <shivaraj.shetty@broadcom.com>
Introduce common API to achieve data transfer using memcpy
to/from outbound region of PCIe EP.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Add public APIs for PCIe endpoint driver:
- EP configuration space read/write
- Mapping/Unmapping of Host buffer and PCIe outbound region
- Raise interrupt to Host
These are minimal base APIs to make PCIe EP functional.
Also, add a Kconfig and an empty CMakeLists.txt for drivers to extend.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
This helps distingush between fatal errors if logging isn't
enabled.
As detailed in comments, pass a reason code which controls
the QEMU process' return value.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
For some reason GCC 9.x doesn't seem to be able to realize that set_num
will always be > 0 and so the local variable status will always be
initialized. Use a do {} while instead to keep it happy.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
tested on mimxrt1060_evt
MEMORY_NOCACHE is needed
test on frdmk64f
special test slot need configure with
CONFIG_DMA_TEST_SLOT_START
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
1. expand PERIPHERAL_TO_PERIPHERAL
2. add slot size to 128 as i.MX-rt has 127 slot
3. add link_channel member in dma_conf which is used to
support chain channel
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
for RT series CONFIG_NOCACHE_MEMORY need enabled
for Kinetis series CONFIG_DMA_TEST_SLOT_START for test
modify the target and dest alignment
frdmk64f need replace strlen to sizeof in irq callback
clean the unused receive buffer, so output is tidy
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Fixes: #26096
In some cases DTC may be installed, but in a non-working state.
In such cases, CMake will abort processing with an cryptic error.
This commit now handles dtc version errors and print a warning., and
CMake processing continues.
dtc is an optional component and failures should not break CMake run.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
mqtt_utf8 structure is used to store the client_id, user_name, password,
topic, will_message.
There is no reason for the mqtt code to modify such data, therefore we
can constify the utf8 pointer.
This would also means that theses client, topic, ... strings can be
safely stored in ROM.
Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
Now there's an audio reference section move the i2s docs there
as the audio section is a better fit.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Fix missing implementation of initialization of common
advertising header bit fields when new auxiliary channel PDU
is instantiated. This caused corrupt invalid Bluetooth
Device address being copied from uninitialised previous
auxiliary PDU instead of copying from primary channel PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update compile.sh and added test_script, so that
bsim_test_advx bsim_test application is built and run in
CI.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>