This field is set and maintained, but not actually used for anything.
The only purpose for it would be to validate ACK numbers from peer,
but such a validation is now implemented by using send_seq field
directly.
Fixes: #4653
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Case #1: If ACK received and our retransmit (i.e. unacked) queue is
empty, it's error. It's incorrect because TCP requires ACK to set for
every packet of established connection. For example, if we didn't
send anything to peer, but it sends us new data, it will reuse the
older ack number. It doesn't acknowledge anything new on our side,
but it's not an error in any way.
Case #2: If retransmit queue is only partially acknowledged, it's an
error. Consider that we have 2 packets in the queue, with sequence
numbers (inclusive) 100-199 and 200-399. There's nothing wrong if
we receive ACK with number 200 - it just acknowledges first packet,
we can remove and finish processing. Second packet remains in the
queue to be acknowledged later.
Fixes: #5504
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Per RFC 793:
A new acknowledgment (called an "acceptable ack"), is one for which
the inequality below holds:
SND.UNA < SEG.ACK =< SND.NXT
If acknowledgement is received for sequence number which wasn't yet
sent, log an error and ignore it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Wrong buffer assigned for receiving the last 2 bytes in multi
byte reception of STM32F4 i2c driver. Change the buffer to
correct one.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Since no GPIO trigger is configured in hts221 sample application,
update prj.conf to enable TIGGER_NONE flag
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This reverts commit 2a7efb7419.
"choice" section in board Kconfig.defconfig introduces a dependency
from the sensor to the board. As a consequence a warning was generated
whenever the sensor was used on another board.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This reverts commit 2e20f49167.
"choice" section in board Kconfig.default introduces a dependency
from the sensor to the board. Then a warning was generated
whenever the sensor is used on another board
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Defining TRIGGER_MODE choices in board Kconfig.defconfig files
brings unwanted dependency and warning messages when using sensors
on other boards.
Change sensor configuration by enabling wanted trigger choice rather
than redefining choice.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The SAM0 series has up to 6 SPI ports. Add Kconfig options to match.
Similar to the 9033fb2f01, this patch
only defines the fields that are currently used and skips ones like
GPIO and IRQ priority that aren't.
Signed-off-by: Michael Hope <mlhx@google.com>
As title, we should update the existing observe_node when new attributes
are written from server side. Add the implementation to handle that.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
1. Read notification attributes set by server to setup the
minimum/maximum notification period of a observation request.
2. Reordering to check observe_node duplication first
(bailout earlier)
3. Simplify remove observe_node condition checking
NOTE: attributes are inheritable, priority: res > obj_inst > obj
Reference: LwM2M spec V1_0_1-20170704-A, section 5.1
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Since we've added storing notification attributes written by server.
We can now append these attributes as part of link-format for discover
op.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Implement write-attribute on obj/obj_inst/res according to LwM2M spec
20170704-A, sec 5.1.2. Support pmin/pmax/st/gt/lt parameters on WRITE
operation.
The basic idea is to add sys_slist_t to obj/obj_inst/res structure.
And attach struct lwm2m_attr to the list when attributes are written
from server side (implement lwm2m_write_attr_handler accordingly)
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
The ICMPv4 handler needs to unref the received echo reply packet
because we are returning NET_OK to caller. Similar change was done
for IPv6 earlier.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It appears the STM32F411XE doesn't support RNG so remove enabling it
from the SoC defconfig and flag an error if attempting to build the
driver on that SoC.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A fix for this issue is in progress, meanwhile warn the user that
they may be susceptible to this problem if they enable user mode on
an x86-based target that is not known to be immune.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead of wildcards we now are using environment variables to set the
path to Kconfig files for board and architecture. This break
documentation generation for Kconfig variables.
Using the env variables, we now set the path to what it used to be to
restore previous behavior.
Also, when something like this happens in the future, we should abort on
doc creation failure.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
What this test actually does is verify internal APIs for manipulating
the MMU specifically on the X86. It is not compatible with other arches.
Moved to live with the rest of the memory protection tests.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
According to STM32F4 reference manual, software should wait for BTF=1
before reading N-2 data byte.
Reference:
"For N >2 -byte reception, from N-2 data reception" section, page
853 of STM32F4 Reference manual.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Use two different variables for the distinct values LIBGCC_FILE_NAME
and LIBGCC_DIR and assert that each of them exists.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
CROSS_COMPILE is a KBuild feature that was dropped during the CMake
migration. It is now re-introduced. Documentation for it is still
lacking, but at least it now behaves as expected.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Sync the outdated comments with the code. E.g. there is no
toolchain-clang.cmake, but there is a toolchain-host-gcc.cmake.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
PTS requires the composition data of size that cannot be sent in
single PDU. This patch adds Configuration and Health Client models
to the root_models to increase the Elements size in Composition Data
Page 0.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Specifying a C standard triggered a compiler warning on Ubuntu (gcc
5.4.0) and a compiler error on Mac OS 10.12.6. Omit specifying the
standard and let the host toolchain use it's default instead. Tested
on Mac OS and Ubuntu 16.04.3.
This fixes#5640
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We don't need to store the full k_mem_block, rather just the
k_mem_block_id. In effect, this saves 4 bytes of memory per allocated
memory chunk. Also take advantage of the newly introduced
k_mem_pool_free_id API here.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The k_mem_pool_free API has no use for the full k_mem_block struct. In
particular, it only needs the k_mem_block_id. Introduce a new API
which takes only this essential struct. This paves the way to
simplify & improve the k_malloc/k_free implementation a bit.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When Kconfiglib was introduced it caused a significant performance
issue. This patch uses pruning to mitigate the performance issue.
The pruning exploits the fact that before the Kconfig database is
parsed we already know what ARCH and BOARD has been selected. So in
theory we could prune away all Kconfig sources that are not related to
the current ARCH or BOARD. In practice, it is only the Kconfig sources
in zephyr/arch/$ARCH and zephyr/board/$ARCH/ that are easy to prune.
Still, that is quite a few Kconfig sources. For qemu_x86 this patch
reduced the number of parsed Kconfig source files from 632 to
272. This pruning resulted in a incremental reconfiguration (time
cmake ..) speedup of 21% (0.56s to 0.46) and a clean build speedup of
4% (Using board qemu_x86 and sample hello_world).
Furthermore, it should be easier to maintain ARCH's and BOARD's
out-of-tree since the user now has a mechanism to redirect where
Kconfig sources are found. But this has not been explored.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Kconfiglib does not support merging fragments without parsing the
entire Kconfig "database". For Zephyr this means we no longer get a
performance gain from splitting up the fragment-merging and the
.config generation.
This patch removes the seperated merge step and it's associated
caching mechanism. Now we do a full Kconfig execution on every
reconfiguration.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We have been using a fork of the Linux kernel's Kconfig system to
configure the Zephyr tree. The issue is that this is a native tool
written in C that is not easy to compile for Windows. This patch
replaces the use of the conf executable with kconfig.py, a script that
uses Kconfiglib to generate the .config and autoconf.h files required to
compile Zephyr.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some projects use wildcards when sourcing a Kconfig file. Add
support for globbing the files that match the wildcards and process
them one by one.
Origin: https://github.com/carlescufi/Kconfiglib/tree/zephyr
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Import Kconfiglib, the Python Kconfig parsing library.
Origin: https://github.com/ulfalizer/Kconfiglib
Revision: 8d30e5bb1ad5cab16d1226cc5cd3a03d64664f5d
Note that this will in time replace doc/scripts/genrest/kconfiglib.py,
which is an earlier version and should not live in that folder.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Updated previously broken links to emulation setup install, instructions
and Getting Started Guide.
Also added a few clarifications for the prerequisites setup.
Fixes#5601
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The SAM0 has a 64 byte page (the programing unit) with 4 pages to a
row (the erase unit). This driver implements a read/modify/write to
emulate the byte level writes used by NFFS.
Signed-off-by: Michael Hope <mlhx@google.com>
* Added a figure explaining how layering of the posix arch
compares to the embedded builds
* One minor grammar change in last paragraph
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
In STM32 family, RNG IP is available only on F4 and L4 series.
Besides STM32F401 does not support is neither.
Get entropy driver available on STM32 devices supporting it and
generate a compilation issue on STM32 devices that do not own
the RNG IP.
Solves #5448
Signed-Off-By: Erwan Gouriou <erwan.gouriou@linaro.org>
On STM32L4 SoCs RNG is clocked by 48MHz domain.
Hence, besides clock activation, it requires 48M
domain to be enabled.
Tested on:
*nucleo_l476rg
*stm32l476g_disco
*disco_l475_iot1
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
SPI_MODE_GET() returns a bitfield. It is thus wrong to test if a bit is
set using the equality operator. The bit-wise AND operator must be used
instead.
This can be tested by setting the SPI in mode 3 (CPOL + CPHA). Currently
both tests will fail and the result is a SPI configured in mode 0. This
was confirmed using an oscilloscope. Applying the patch fixes the
polarity.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
We can have a spurious error while performing a transfer using IRQ. This
happens when the last message of the transfer is a read with a STOP
condition. We must disable the RX interrupt while waiting for the STOP
interrupt, otherwise we will get a spurious RX interrupt which will lead
to an error.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
STM32 UART driver uses a macro for clock initialization, that
is difficult to read and incompatible with needed changes to
fix STM32F0 series UART problems.
This change switches to using the full clock bus names in UART
init functions removing the macro-magic and increasing
readability.
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
The combination of
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL and
CONFIG_CLOCK_STM32_PLL_SRC_HSI
on SOCs with PREDIV1 support made use of the LL define
LL_RCC_PLLSOURCE_HSI_DIV_2, which is not defined for SOCs with
PREDIV1 support.
This exchanges LL_RCC_PLLSOURCE_HSI_DIV_2 with LL_RCC_PLLSOURCE_HSI
which is the appropiate source according to stm32f0xx_ll_rcc.h
line 473 and stm32f3xx_ll_rcc.h line 795.
Tested by compiling hello world for nucleo_f091rc board with HSI as
PLLSOURCE.
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>