According to RFC7959 page 30, "The end of a block-wise transfer is
governed by the M bits in the Block options, _not_ by exhausting the
size estimates exchanges."
Therefore, we should check the M bit instead of total size (which
is not always available, too)
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When the controller is configured to have its worker and job
be run at different interrupt priority, check for mayfly
priority being equal was incorrect.
Fixed by conditionally compiling the correct check of mayfly
priority level.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixed a defect wherein anchor for first scanner event was in
the past (when looking for a free timeslice to avoid
overlapping with master role events) when actually there
were no master roles active. This defect caused the scanner
role to assert, when started with other roles active (eg.
advertiser), when trying to catch-up to current tick.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This reverts commit 3c23c6f53d ("Bluetooth: controller:
Fix assert due to stale tick count") as this leads to
connection events to be skipped, failing conformance tests.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This reverts commit b5235207d3 ("Bluetooth: controller:
Fix for scanner Rx window hang") as this leads to
connection events to be skipped, failing conformance tests.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If either UDP or TCP is enabled but not both, then connectivity
fails. This was a side effect of commit 3604c391e ("net: udp:
Remove NET_UDP_HDR() macro and direct access to net_buf")
Jira: ZEP-2380
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Commands for objdump and nm where hardcoded in size_report
script, which failed on MacOS as it tried to use ones from
Xcode. Fixed the script to pick the right objdump and nm
from the toolchain being used to build the application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Its possible that #size-cells is 0 (ie i2c bus). So we should handle
either #address-cells or #size-cells being 0 in extract_reg_prop. This
means that the reg property in reduced map will end up being an integer,
so we need to convert it to a list with one element. We also need to
not output any address-cell or size-cell related info if the respective
cell is 0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
New top-level dts/ folder and description added.
Fixed error in bullet list in subsys/ description (needed
a blank like before the list.
Alphabetized folder list (subsys/ was listed after tests/)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When IPv6 fragments were sent, the last IPv6 fragmented packet
was accessing NULL pointer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fix calculation of T_Terminate and other procedure timers by
using ceil on calculated connection interval units.
This fixes TP/CON/MAS/BI-02-C [Master T_Terminate Timer] and
TP/CON/SLA/BI-02-C [Slave T_Terminate Timer] in LL.TS.5.0.0.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Ulrich Solli Myhre <ulmy@nordicsemi.no>
Fix implementation so that both slave and master behave same
during connection setup and generate disconnection complete
with reason 0x3e (connection failed to be established).
This fixes TP/CON/ADV/BV-02-C [Accepting Connections
Timeout] in LL.TS.5.0.0.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Ulrich Solli Myhre <ulmy@nordicsemi.no>
Whenever not using the whitelist the resolving list is traversed to
verify that the device is allowed depending on its current privacy mode.
In the case where the device is not found by address in the resolving
list, allow the request to go through, since we are then dealing with an
unknown devices and the resolving list restrictions do not apply.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Commit 1bc2fdc70 ("dts: arm: STM32 boards use DT to configure I2C")
added a new Kconfig option, HAS_DTS_I2C, which should be set when the
target supports configuration of I2C peripherals via Device Tree.
Currently, STM32 targets select this. However, the fact that
HAS_DTS_I2C has no default is causing prompting when building Zephyr
on other targets with DTS. To avoid this and allow builds to complete
as usual, have HAS_DTS_I2C default to n.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This causes num of packets command handling to dead lock since it
is done on RX buffer destroy if used on TX it may not be destroyed
on time causing.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This disable debug options in order for the image to fit in boards
such as arduino_101 and quark_se_c1000_devboard.
For convenience this adds another configuration file with as it was
available previously which can be build using:
make CONF_FILE=prj_dbg.conf
JIRA: ZEP-2378
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The specification states that the AdvA in a Scan Request packet should
be identical to the one sent in the original advertising packet, so
check this when processing a Scan Request.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When the initiator is using an RPA and we match it using the filtering,
we should return early and allow the device packet through instead of
going through the whole resolving list.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The specification states that filter policies shall be ignored for
directed advertising, so reflect this behaviour in the code.
Additionally when the local device is using RPAs but the peer uses an
identity address, the resolving list index needs to be updated when
traversing the RL to reflect that there has indeed been a device match
even though the IRK match did not happen.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The AdvA in the CONN_IND packet must match the AdvA in the advertising
packet that triggered it regardless of the advertising type.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Added BUILD_ASSERT check for Tx and Rx thread priorities.
The Tx thread priority shall be higher than Rx thread
priority in order to correctly detect transaction violations
in ATT and SMP protocols. The Number of Completed Packets
for a connection shall be processed before any new data is
received and processed for that connection.
The Controller's priority receive thread priority shall be
higher than the Host's Tx and the Controller's Rx thread
priority.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Until Zephyr has infrastructure to enable/disable the
reception of multicast frames we disable the hardware
multicast frame filter completly and pass all multicast
frames to the upper layer and let that deal with them.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Some README files referenced wiki articles that have been
moved to the doc area on the website.
Fixes#668
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When the ARP message is received when the device is starting up,
the network interface might not yet have IPv4 address setup
correctly. In this case, the IP address pointer could be NULL
and we must not use it for anything.
Fixes#752
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We can use the chosen property "zephyr,console" to determine what uart
should be used as the console and find its name to generate a define for
CONFIG_UART_CONSOLE_ON_DEV_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since we support uart0 on the cc2650 sensortag we should have a
reference for zephyr,console in chosen for it. This will be useful as
we start to generate Kconfig defines based on zephyr,console.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch add I2C to supported features and I2C section for
96b_carbon, nucleof401re and olimexino_stm32
It also adds serial port section to 96b_carbon and olimexino_stm32
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Frequency tolerance for LFRC after calibration for nRF5x
Series ICs is between 251 and 500 ppm as per Product
Specification. For more details refer to:
http://infocenter.nordicsemi.com/
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Verbose output now prints the value of the raw data provided by
soc.c file. The page directories are printed with the correct
address ranges for each required region.
Updated the page table number calculation and also updated other
calculations which use this information.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Coverity reported false positives, add comment about these in
the code.
Jira: ZEP-2344
Jira: ZEP-2345
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch fixes a regression which the original patch introducing
this code (improving concurrent connection handling) had on
*sequential* connection handling. Without this patch, with the
default CONFIG_NET_TCP_BACKLOG_SIZE of 1, after each connection
request, there was 1s (ACK timeout) "dead time" during which new
connection wasn't ptocessed.
This is because k_delayed_work_remaining_get() was checked the
wrong way. But there's no need to use k_delayed_work_remaining_get()
at all, instead just call k_delayed_work_cancel() and dispatch on
its return code.
Note that there's still a problem of synchronizing access to
the global array tcp_backlog, as worker (which modifies it) may
preempt packet handling code (which also modifies it).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The sequence number validator was checking the seq numbers
incorrectly. This caused some valid RST packets to be dropped
and the TCP stream to hang.
Added also a TCP test case that tests the seq validator.
Jira: ZEP-2289
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Usually it is not enough to have just one IPv6 multicast
address defined for the network interface. So allocate three
IPv6 multicast addresses for the network interface as IPv6
by default uses multicast a lot. This hopefully will avoid
some mysterious errors if the addresses run out.
Note that this will increase memory usage a bit so you might
need to lower the count in your conf file if memory is low.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
No need to set the main stack size as the test runs just fine
without it.
Jira: ZEP-2341
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The commit 210c30805b ("net: context: Close connection fast
if TIME_WAIT support is off") was not a proper way of closing
the connection. So if Zephyr closes the connection (active close),
then send FIN and install a timer that makes sure that if the peer
FIN + ACK is lost, we close the connection properly after a timeout.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The commit 00ac0487b0 ("net: context: Remove tcp struct SYN-ACK
timer handling") removed also the passive close ACK timer.
Adding that ACK timer back so that we can close the connection
properly even if the last ACK from peer is lost.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This adds a second vendor service testing if service changed indications
works with more than one change in a row and as a bonus it implements
echo attribute which notifies any data that is written to it:
> ACL Data TX: Handle 3585 flags 0x00 dlen 9
ATT: Write Command (0x52) len 4
Handle: 0x0013
Data: 0000
< ACL Data RX: Handle 3585 flags 0x02 dlen 9
ATT: Handle Value Notification (0x1b) len 4
Handle: 0x0013
Data: 0000
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With introduction of bt_gatt_service_unregister it is now possible to
unregister service at runtime.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>