This adds BT_GATT_DISCOVER_ATTRIBUTE which can be used to discover any
type of attribute in a given range.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Those are not considered Descriptors and shall be discovered with
use of BT_GATT_DISCOVER_CHARACTERISTIC.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When discovering descriptor Find Information procedure is used which
does not allow any filtering by the server so it will return all
attributes in the given range including services and characteristics.
Fixes#14265
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Maybe this is some "just in case" thing that got copied around. There's
no need to have a blank line at the beginning or end of Kconfig files.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The socket-can code expects to have "struct can_frame" from
application when it calls send(). We then have to convert to
"struct zcan_frame" as that is what the driver expects.
Same thing when receiving data. We just convert to
"struct can_frame" and pass that to application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use USB transfer API for data transfer. Simplify notification count,
removing delayed work, use usb_transfer() logic instead.
Fixes#14127
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use reverse order for bitfields on big-endian architectures. Treat
all PDU data as little-endian and add conversions as needed. Treat
access address as 4-byte value instead of u32_t to avoid flipping
endianness.
Signed-off-by: Wolfgang Puffitsch <wopu@oticon.com>
By specifying the controller directly when selecting the default
BT_HCI_TX_STACK_SIZE, an external controller may rely on the final
default value when none of the in-tree controllers are used.
The value is increased to 1024 to accomodate the current worst-case
stack size.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
This moves the vendor-specific HCI command/event configuration
definitions out of bluetooth/common into bluetooth. This allows
the controller itself to indicate its support for vendor-specific
commands/events.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Remove use of select to "force" enabling other configs in subsys/fs
and subsys/net/l2. The forcing will cause infinite kconfig recursion.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Now that IPv4 options are handled, ICMPv4 echo reply must be created
taking into account that IPv4 header length can be variable. So instead
of cloning and rewriting (that would copy the useless options), let's
allocate and copy only the payload.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
IPv4 header length might be bigger than struct net_ipv4_hdr if there are
options appended to it.
Fixes#11618
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
IPv4 header might come with options, unlike IPv6, these are not
encapsulated in option header but are fully part of the IPv4 header.
Zephyr must handles these. Now silently ignoring their content and
setting the cursor to the payload properly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is probably the only place where net_pkt_alloc_from_slab() is going
to be used.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is meant for very particular use case as only logging uses that.
Where it makes entirely sense for it to send the logs through its own
slab/pool in order to not drain the core slabs/pools.
So enabling the new API to manage that. That has to be used with
net_context for the buffer pool. So one has to first allocate the
net_pkt from external slab, set the context and then (and only then)
allocate buffer. Basically, only net_context will uses that scheme
anyway.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Update reserved function names starting with one underscore, replacing
them as follows:
'_k_' with 'z_'
'_K_' with 'Z_'
'_handler_' with 'z_handl_'
'_Cstart' with 'z_cstart'
'_Swap' with 'z_swap'
This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.
Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.
Various generator scripts have also been updated as well as perf,
linker and usb files. These are
drivers/serial/uart_handlers.c
include/linker/kobject-text.ld
kernel/include/syscall_handler.h
scripts/gen_kobject_list.py
scripts/gen_syscall_header.py
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This patch introduce logging to settings.
Error in stored data record might occurred in runtime, so
better to switch assertion to error logging.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Though core system is able to manage packet timestamping internaly (gptp
requires it for instance), it might be necessary to enable/disable
packet timestamping from net context directly.
Currently this will be only used by the tx timestamp test. So this
support is disabled by default. (And gptp does not require it anyway).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is required if traffic class is enabled, so allocated packets from
net_context do get the right priority set.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
That can be useful on some tests which will not have any interface but
still allocate net_pkt. Also, one may allocate a packet with buffer not
knowing yet the interface it will be send through.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Appears within an 'if IMG_MANAGER'.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
subsys/usb/Kconfig 'source's subsys/usb/class/Kconfig (which in turn
'source's subsys/usb/class/netusb/Kconfig) within an
'if USB_DEVICE_STACK', so the dependencies on USB_DEVICE_STACK added
within those files are redundant.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
subsys/bluetooth/common/Kconfig and subsys/bluetooth/host/Kconfig are
'source'd within 'if BT' and 'if BT_HCI', in subsys/bluetooth/Kconfig,
so there's no need to add those dependencies within them.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
subsys/net/lib/lwm2m/Kconfig.ipso is 'source'd within an 'if LWM2M', in
subsys/net/lib/lwm2m/Kconfig, so the 'depends on LWM2M' is redundant.
The 'depends on NET_IPV4' and 'depends on NET_L2_OPENTHREAD' are within
corresponding 'if's in the same file.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Generally when DFU is in progress, the system is not expected to
be doing anything else in addition. Hence, a completion signal
would help the system to know that DFU is over and it can proceed
towards next tasks.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Some of these are from 'source'ing a file within a menu that has a
'depends on NET_L2_ETHERNET' (in drivers/ethernet/Kconfig) and then
adding another 'depends on NET_L2_ETHERNET' within it.
Similarly, subsys/net/l2/ethernet/Kconfig sources files within an
'if NET_L2_ETHERNET'.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Disable low power/deep sleep modes when they are not enabled in Kconfig.
Otherwise if only low power modes are enabled (but no deep sleep),
Zephyr will try to swich to the lowest power mode (deep sleep) anyway,
only to discover that it's not availiable, resulting in no low power
mode at all being used.
By disabling the modes here if they are not enabled in Kconfig,
policy_residency will switch to the lowest low power mode instead.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
In case it was detected that RTT host was not present
backend was still performing single sleep or busy wait
round before dropping data. That was degrading log
processing performance.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Commit 766101c was a wrong fix as NETUSB_MTU is the actual network MTU.
Instead of using this value in EEM/ECM drivers, a relevant value should
be set for each there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This reverts commit 8cb5d083cb53627964ed72fb9fa3fb7a5219739f.
This was breaking tests on master due to missing dependency that is
still being reviewed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If system clock runs fast k_cycle_get_32(), which is the timestamp
source, wraps often (few minutes). This patch changes default
timestamp function to use k_uptime_get_32() if system clock
frequency is higher than 1 MHz and k_cycle_get_32() otherwise.
If system clock runs at 1 MHz, counter will wrap every 71.5 minutes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This is done to conform with how the rest of the socket APIs are
implemented during socket offload. Otherwise link error would
result due to the symbol being redefined in lib/os/fdtable.c.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
As per RFC2131 4.1.1 requires we wait a random period
between 1 and 10 seconds before sending the initial
discover. But tests can not wait that longer. So this
option helps test to configure the value to minimum.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Previously, _prf function was used when present and _vprintk
was used otherwise. _prf supports reacher formatting but at
cost of 3k flash and >250 bytes on stack. Stack usage then
depended on which function was used and that was causing
troubles when trimming stack sizes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>