Make sure that SO_TXTIME socket option can be set and get.
Verify also that TX time is passed properly to network device
driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The SO_TXTIME socket option can be used by the application to
tell the network device driver the exact moment when the
network packet should be sent.
This feature is also implemented in Linux.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add BSD socket sendmsg() API that can be used to send data to peer
and also pass ancillary data to lower level of the network stack.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
These are needed in sendmsg implementation. See RFC 3542 for
details of the msghdr struct and the macros that are used
to manipulate it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User could have set something to optval in getsockopt() and we
need to copy the data to kernel optval so that the socket family
code can use the value for something.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the allocated net_pkt is larger than the network interface MTU,
then check if the IPv6 fragmentation is enabled and allow larger
net_pkt length as the IPv6 fragmentation will split the packet into
suitable parts.
Fixes#16354
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The net_pkt_pull() needs to move all the remaining data in the
net_buf instead of just the pull amount.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Existing test checking value returned by k_delayed_work_remaining_get()
verified two cases:
1) The k_delayed_work_remaining_get() should return 0 for non-submitted
work.
2) The k_delayed_work_remaining_get() should return value greater or
equal to the timeout value of just submitted work.
Unfortunately, the second check is not correct. The value returned
by the k_delayed_work_remaining_get() just after submitting delayed
work should be:
- Equal to timeout of the submitted work if no timer interrupt was
executed between submitting work and checking remaining time.
OR
- Less than timeout of the submitted work if a timer interrupt was
executed between submitting work and checking remaining time.
This commit changes the test accordingly taking under account the
error caused by back and forth conversion between ms and ticks.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Set advertisers state flags so that previous advertise params does not
affect the current advertiser state.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable use of settings system in controller and introduce settings for
company_id and subversion_number.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
So far we supported normal (10 bit) and low-power (8 bit) modes. Add
support for high-resolution mode as a third option.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Liteeth exposes two memory regions:
* set of rx/tx buffers (aka slots) to exchange packets,
* control and status registers.
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Same deal as in commit eba81c6e54 ("yaml: Remove redundant document
separators"), for some newly added stuff.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The uart node in the native_posix dts has a reg property, but there are
no registers associated with the uart. So remove the property and
remove the unit address associated with the reg (now that its removed).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch reorders designated initializers to satisfy C++ requiring
that designated initializers appear in the same order as the members
they initialize.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
This patch adds `extern "C"` linkage directives so the header files can
be included by C++ source files.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
Clarify a little bit how to fetch and compile Babblesim.
So users will not need to have repo installed,
and to guide them to add the variables to their shell init
script
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This patch introduces a dedicated work queue for handling the events
from ISR (i.e. for notifying the USB device stack, for executing the
enpoints callbacks, etc.). The system work queue cannot be used for
this purpose as it might be used in applications for scheduling USB
transfers and this could lead to a deadlock when the USB device stack
would not be notified about certain event because of a system work
queue item waiting for a USB transfer to be finished.
The FIFO named so far `work_queue` is renamed to `usbd_evt_fifo`
to better indicate its purpose and to avoid confusion.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
After the removal of the virtualcom DT node in 5071eee, using the chosen
node is no longer functional. Instead the Kconfig
CONFIG_UART_CONSOLE_ON_DEV_NAME is used to locate the correct UART.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
No binding has anything but 'version: 0.1', and the code in scripts/dts/
never does anything with it except print a warning if it isn't there.
It's undocumented what it means.
I suspect it's overkill if it's meant to be the binding format version.
If we'd need to tell different versions from each other, we could change
some other minor thing in the format, and it probably won't be needed.
Remove the 'version' fields from the bindings and the warning from the
scripts/dts/ scripts.
The new device tree script will give an error when unknown fields appear
in bindings.
The deletion was done with
git ls-files 'dts/bindings/*.yaml' | xargs sed -i '/^\s*version: /d'
Some blank lines at the beginning of bindings were removed as well.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Updated fs shell sample readme to state the requirement of a 32-bit
version of libfuse while building for native_posix board
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Make the Upper and Lower Link Layer split architecture
implementation of the controller as the default when
building Zephyr Bluetooth Low Energy controller support
in applications.
Noticeable missing feature (porting) in comparison to old
architecture implementation is, Advanced scheduling of
connection events.
The missing features will subsequently be submitted
upstream.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Rename the controller Kconfig option BT_LL_SW to
BT_LL_SW_LEGACY in preparation towards switch to new Link
Layer implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
File system API functions that operate on paths are passed both the
absolute path including the mount point prefix, and the mount point
within which the path lies.
Unfortunately it's not entirely trivial to convert an arbitrary path
within the file system space to an absolute path within its mount point,
because the path may be to the mount point itself and not end with a
directory separator. The effect is that a file system implementation
like nffs may be given an empty path when "/" is required.
Add an implementation module that does this transformation and use it to
transform paths within each filesystem wrapper.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Conditional compile the use of Rx Pool used to dispatch ULL
context generated messages towards LL thread context, which
is presently only used in connections.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Certain Thread implementations (notably ARMs) require a DHCPv6
implementation.
Allow the usage of the relevant OpenThread configuration parameters in
Zephyr.
Signed-off-by: Markus Becker <markus.becker@tridonic.com>
Commit 948ef47cf4 ("dts: riscv32: Add rv32m1 zero-riscy core") put
common ri5cy and zero_riscy DT parts in rv32m1.dtsi, with two separate
rv32m1_ri5cy.dtsi rv32m1_zero_riscy.dtsi files that #include it.
The two interrupt multiplexers are defined in the common rv32m1.dtsi
file, but rv32m1_ri5cy.dtsi rv32m1_zero_riscy.dtsi each only specify
'interrupts' for one of them. Since 'interrupts' is 'category: required'
in openisa,rv32m1-intmux.yaml, this leads to warnings (or errors with
the new DT parser).
Disable (status = "disabled") the two interrupt multiplexers in the
common rv32m1.dtsi file and enable them in the board-specific files to
fix it. Required props. are only checked for enabled nodes.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The property is required on all SPI clients, but was missing from
several devicetree nodes. Set it, using the capitalized version of the
node alias when present, with "jedec,spi-nor#0" as the fallback.
Closes#17662
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
In most of the cases the fixed-clock node is not referenced by the
Zephyr code, making the label property just a burden.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>