Add CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 to nucleo_l053r8_defconfig.
All STM32 boards seem to have this defined.
Makes samples with ksleep work properly.
Signed-off-by: Anthony Kreft <anthony.kreft@gmail.com>
Fix an out of bound access in the native_posix uart driver,
when generating the string to autoattach a terminal to the UART.
(The space for the null termination was missing)
Fixes: #14401
Coverity issue CID: 195855
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
fcntl() may (very unlikely) fail when setting the new pseudoterminal
to non-blocking.
Let's check for this condition, handle it, and in the process
silence a coverity issue.
Fixes#14396
Coverity CID: 195872
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When user disconnects the USB cable, peripheral should be
immediately disabled, howewer a delay may occur when driver
events are processed from a workqueue or higher-priority
thread/ISR is active. This may lead to a fake resume/reset
event (peripheral-specific behavior). This fix drops such
events when cable is detached.
Fixes#13822
Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
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>
Ensure that no I2C start condition is inserted between messages of
a same transfer, except if explicitely requested (restart flag).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Ensure that no I2C start condition is inserted between messages of
a same transfer, except if explicitely requested (restart flag).
This fix issue with I2C register write functions.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Out-of-tree Kconfig frontends need to know which environment variables
are exported by Zephyr to Kconfig.
To support this we allow additional Kconfig python frontend targets to
be specified from out-of-tree.
This support was added on request by a third-party with a custom
Kconfig frontend.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Since NET_L2_BT no longer "select"s BT and the rest of required BT
features, enable them within the defconfig file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
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>
When we build with newlib we don't set -nostdinc. In that case make
sure that we leave it to the toolchain to set the system include paths.
The one exception to leaving to the toolchain to set the system include
paths is the path to the newlib headers. Since we build
with -ffreestanding we need to make sure the newlib header path is the
before the toolchain headers. Otherwise the toolchain's 'freestanding'
headers get picked up and that causes issues (for example getting PRI*64
defined properly from inttypes.h due to __STDC_HOSTED__ being '0').
For newlib we accomplish this by having the only system header specified
by zephyr_system_include_directories() being just the newlib headers.
Note: for minlibc we leave things alone as things just happen to work as
the -I include of the libc headers takes precedence over -isystem so we
get the libc headers over the toolchain ones. For the newlib case it
appears that setting both -I and -isystem for the same dir causes the
-I to be ignored.
Fixes#14310
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Configure lvgl defaults for imx rt boards in their respective board
defconfigs rather than the lvgl sample application.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Removing the TX timeout handling in the GMAC driver (commit 18b07e09e0)
revealed some issues with the way hardware priority queues work.
For cases with both hardware priority queues enabled, with the default
recommended delta bandwidths (0% - 75%), the lower priority queue (0%)
is hardly able to send any packets. This became visible, because without
the timeout mechanism, we quickly ran out of available TX buffers if
there were multiple packets being queued to the queue.
Here is an excerpt from 802.1Q, chapter 34.3.1 which describes how Qav
bandwidth sharing SHOULD work:
The deltaBandwidth(N) for a given N, plus the deltaBandwidth(N) values
for any higher priority queues (larger values of N) defines the total
percentage of the Port’s bandwidth that can be reserved for that queue
and all higher priority queues. For the highest priority queue, this
means that the maximum value of operIdleSlope(N) is deltaBandwidth(N)%
of portTransmitRate. However, if operIdleSlope(N) is actually less
than this maximum value, any lower priority queue that supports the
credit-based shaper algorithm can make use of the reservable bandwidth
that is unused by the higher priority queue. So, for queue N-1, the
maximum value of (operIdleSlope(N) + operIdleSlope(N-1)) is
(deltaBandwidth(N) + deltaBandwidth(N1))% of portTransmitRate.
However in reality, the lower priority queues (N-1) on the SAM GMAC
hardware DO NOT use the bandwidth available from the higher priority
queues (N).
This commits fixes the issue by changing the defaults. These are still
set to the recommended 75% (total), but this percentage is split between
the priority queues manually.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
There is a log message printed for the non-priority queue (Queue 0). Add
the same message for the priority queues too when they are enabled, and
a corresponding message when the queue is not used (set to idle).
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Throughout the manual, the queues GMAC is equipped with are identified
by a number - Queue 0, Queue 1 and Queue 2.
However in the context of Qav, the queues are identified with a
character (note that there are only two queues as Qav is not used for
the non-priority queue) - Queue A and Queue B.
Queue B and Queue 2 are also called "the highest priority queues".
Based on that, the previous implementation was using the following
mapping:
Queue 1 - Queue A
Queue 2 - Queue B
However when running some specific tests, that is for example forcing
all the traffic to Queue 1, it showed that this queue is actually
affected by the Queue B registers. Similarly, Queue 2 seems to be
affected by the Queue A registers.
Based on that observation, this commit changes the registers used to
work with the following mapping:
Queue 1 - Queue B
Queue 2 - Queue A
Note that this is based solely on observations, there is nothing in the
datasheet that confirms this, and the "highest priority" label suggests
it is otherwise.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This option is meant to be used only for debugging. Use it to force all
traffic to be routed through a specific hardware queue. With this option
enabled it is easier to verify whether the chosen hardware queue
actually works.
This works only if there are four or fewer RX traffic classes enabled as
the SAM GMAC hardware supports screening up to four traffic classes.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
One of the function parameter in conversion functions can be
make const (because we are not changing it).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The CANBUS sockets require "struct can_frame" to be used in order to be
compatible with Linux code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The CANBUS sockets require can_filter to be used in order to be
compatible with Linux code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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>
Added a warning that will abort build without disks.
Added a default configuration for nrf52840_pca10056.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
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>
If pkt allocation fails, then prepare to handle NULL pointer.
Coverity-CID: 195880
Coverity-CID: 195816
Fixes#14413Fixes#14395
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch checks the return values of setsockopt.
Fixes: #14392, #14402
Coverity-CID: 195897, 195848
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Get things started for the 1.4 release notes.
Individual teams will update their appropriate sections.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
If pkt allocation fails, then prepare to handle NULL pointer.
Coverity-CID: 195835
Fixes#14409
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The interface name is IFNAMSIZ long so we must not copy it
full which would overwrite the terminating null byte.
Coverity-CID: 195770
Fixes#14419
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add initial sections for the Bluetooth host stack, as well as a simple
diagram of the various protocol & profile layers.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Overhaul the Bluetooth documentation to split it into manageable units
and include additional information, such as architecture and tooling.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
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>
Add a note installing programs manually on your Windows system: you may
need to update the Windows PATH so the system can file these programs.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
As there is no shell submodules any more, the "zperf" command
needs to be written in every command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>