Commit graph

41120 commits

Author SHA1 Message Date
Göran Weinholt
eef8e67ea7 net: ppp: ipcp: do not require a peer address
It is not unusual that the peer does not provide an IP address in the
ipcp negotiation. But because ppp is a peer-to-peer protocol, we do
not actually need to know the peer's address to use the network.

Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
2020-03-10 14:09:10 +02:00
Luuk Bosma
63b22d7015 drivers/ethernet/eth_gecko: auto-negotiate after link up
Move auto-negotiate sequence from driver initialization to link up event
Previously when booting without ethernet cable connected the
initialization would fail and never recover.
Now we can connect the ethernet cable any time and multiple times.

This also drastically reduces boot time to main.

Logging Link up and Link down events.
Logging speed and duplex from eth_gecko logger instead of eth_gecko_phy.

Signed-off-by: Luuk Bosma <l.bosma@interay.com>
2020-03-10 14:08:51 +02:00
Robert Lubos
56566ad497 net: sockets: tls: Fix net_context referencing
TLS sockets did not increase refcount of a net_context running TCP,
which could lead to a crash upon TCP disconnection.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-03-10 14:08:20 +02:00
Flavio Ceolin
6e25ebf269 drivers: modem: Remove invalid comparison
pin is an unsigned variable so there is no meaning check if it is less
than zero.

CID :208407
CID :208408
CID :208410

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-10 13:03:03 +02:00
Jukka Rissanen
9d4fbb2912 crc: Add crc8 implementation and tests
Add crc8 implementation and unit tests for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-03-10 12:53:53 +02:00
Jukka Rissanen
2d992baa42 net: ipv6: Add network interface to various debug prints
Useful when figuring out where the device is sending the
network packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-03-10 12:39:13 +02:00
Maureen Helm
2c95d04c35 boards: arm: Fix broken links in nxp board docs
Fixes broken links in several imx rt and lpc board documentation pages.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-03-10 12:21:36 +02:00
Alberto Escolar Piedras
87c9b7ec1b CODEOWNERS: Add daor-oti and wopu-ot to several directories
daor-oti and wopu-ot also want to be added automatically as
reviewers to POSIX arch, native_posix, nrf52_bsim and bsim
related test apps.
(see CODEOWNERS for more info about which each is interested on)

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-03-10 12:20:27 +02:00
Mikkel Jakobsen
98eb316bdf scripts: build.py: make _sanity_check() case insensitive on windows
When checking build directory against cache on windows, certain
corner cases can end up failing the comparison because of case
difference on an otherwise identical path. This can be avoided
by ignoring case on windows.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2020-03-10 12:19:35 +02:00
Joakim Andersson
94e1620c03 Bluetooth: host: Fix host resolving peer identity in connection complete
Fix host resolving the peer identity address in enhanced connection
complete event when the resolving list in the controller is full and
resolution is done in the host.
Move the handling from legacy connection complete into enhanced
connection complete event so that it is done for both connection
complete events.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-03-10 12:18:09 +02:00
Trond Einar Snekvik
db330cb06a Bluetooth: Mesh: Segmented TX to groups
Implements several changes to the transport layer segmented tx to
improve group message performance:
- Moves retransmit counter to tx context instead of per packet. As every
  unacked packet is sent every retransmit, the retransmit counters would
  be the same in each segment. This makes it easier to control progress.
- Delays the scheduling of the retransmit until the completion of the
  last segment by adding a seg_pending counter. This is essentially the
  same as the old behavior, except that the old behavior might retrigger
  the sending before all segments are finished if the advertising is
  slow.
- Allows the group transmits to stop as soon as all retransmits have
  been exhausted, instead of timing out waiting for acks that won't
  come. This allows group tx to finish without error.
- Fixes a bug where a failed TX would block IV update.
- Cancels any pending transmissions of acked segments.
- Reduces log level for several common group tx scenarios that aren't
  erronous.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-03-10 12:17:13 +02:00
Trond Einar Snekvik
2f27e0ce84 Bluetooth: Mesh: CDB for config client in shell
When available, the shell will use the CDB when configuring. This
replaces the default key for configuration and self-provisioning,
ensuring that there aren't multiple key values for the same indexes.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-03-10 12:16:31 +02:00
Wayne Ren
f67592f2e6 tests: enable mpu gap filling tests for arch which supports it
* arc supports mpu gap filling now.
* these tests can be used for any arch which supports mpu gap
  filling.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-03-10 11:58:03 +02:00
Wayne Ren
acf9675bfc arch: arc: implement MPU_GAP_FILLING for mpu version 3
when MPU_GAP_FILLING is configured, the default mpu entry
(kernel read + kernel write) will be used to fill the gaps
among mpu entires to avoid dynamic mpu region splitting.
This will bring better performance in thread switch but fewer
constraints on privileged codes.

when MPU_GAP_FILLING is not configured, a sw-based mpu dynamic
region splitting is used to bypass the limitation of no mpu region
overlap in hardware. This approach will consume more hardware
mpu entries and more time in thread switch.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-03-10 11:58:03 +02:00
Wayne Ren
85f591e866 arch: arc: enable MPU_REQUIRES_NON_OVERLAPPING_REGIONS for arc mpu ver 3
arc mpu ver3 does not allow mpu region overlap, so need to enable
MPU_REQUIRES_NON_OVERLAPPING_REGIONS.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-03-10 11:58:03 +02:00
Johan Hedberg
99c3949e9f release: post release patch level = 99
Set patchlevel to 99 after release.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 11:57:47 +02:00
Johan Hedberg
9518bd19b7 release: Zephyr 2.2.0
Bump version to 2.2.0 final.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 10:49:52 +02:00
Johan Hedberg
883f1aede0 doc: Update generated version list for 2.2.0
Add 2.2.0 to the version pick list. Also remove old versions so that
the oldest one is the LTS release.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 10:49:52 +02:00
Johan Hedberg
ee4a28e127 doc: release notes: Update contents for 2.2.0
Finalize the release notes for Zephyr 2.2.0.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 10:49:52 +02:00
Anas Nashif
497fe4267a release: update sanitycheck footprint file
Update for latest release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-03-09 23:40:45 +02:00
Carles Cufi
dad082d170 doc: gsg: Link to the gatekeeper section from the toolchains
Add a warning about the Gatekeeper issues that Catalina introduces in
the section about GNU Arm Embedded.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
4a45ceaf62 doc: gsg: Remove duplicate information for Windows
The GSG already includes the setup instructions. Remove the
duplicate that existed in installation_win.rst.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
e35f86aae6 doc: gsg: Remove duplicate information for macOS
The GSG already includes the setup instructions. Remove the duplicate
that existed in installation_mac.rst.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
a997a803a3 doc: gsg: Minor macOS clarification
The check for updates sequence applies to Mojave and later versions.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
David Brown
dfc276f1be doc: release notes: Update v2.2 for security
Add additional CVEs addressed in this release.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-03-09 21:37:25 +02:00
Francois Ramu
abd8ca94c2 soc: arm: stm32g474 config device
This patch aligns the Kconfig.defconfig.stm32g474re to the
Kconfig.defconfig.stm32g431rb

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-09 17:26:40 +02:00
Francois Ramu
cea65cb9cc board: arm: nucleo_g474re reflashing board
Reflash the nucleo_g474re successively

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-09 17:26:40 +02:00
Gerson Fernando Budke
2cfb11e050 drivers: ieee802154: rf2xx: Rem trx_state variable
The rx timeout timer callback need update trx_state variable and this
variable is protected by a mutex. Because of that, when compiling the
system with CONFIG_ASSERT=y the system reports 'ASSERTION FAIL
[!arch_is_in_isr()] @ ZEPHYR_BASE/kernel/include/ksched.h:262'.

This refactor the driver remove trx_state variable dependency and
consequently removes phy_mutex and rx timeout timer to be compliant
with kernel rules.

Fixes: #23198

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Gerson Fernando Budke
4c6ee8b3d9 boards: arm: atsamr21_xpro: Fix corrupted frames on rf2xx
When using internal IEEE 802.15.4 transceiver AT86RF233 at SPI speeds
above 6MHz was detected that frame buffer read returns corrupted data.
This set spi-max-frequency to 6MHz at atsamr21_xpro.dts to ensure best
relation of performance vs reliability.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Gerson Fernando Budke
be56e36fe4 drivers: ieee802154: rf2xx: Add RX improvements
The current version of at86rf2xx RX implementation don't uses advanced
capabilities offer by the transceiver. This access SRAM space to gatter
PHR information in parallel with transceiver frame reception. It allows
improve RX reception by handling properlly the frame protection feature
removing transceiver states changes.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Gerson Fernando Budke
287f654e68 drivers: ieee802154: rf2xx: Refactor rf2xx_thread_main
Current rf2xx_thread_main code have too many if/for/while imbrication.
Extract methods from rx2xx_thread_main for better readability.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Gerson Fernando Budke
d4f39742ea drivers: ieee802154: rf2xx: Add SRAM read method
Add SRAM read method to enable advanced uses on at86rf2xx driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-03-09 14:17:06 +02:00
Wayne Ren
5f0650b596 arch: arc: fix the bug of blt in syscall
blt is signed comparsion, if r6 is a negative number created by
malicious code, it will pass the check, bring a secure risk.

use blo (unsinged comparison) to do the check.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-03-09 10:08:18 +02:00
Johan Hedberg
bf8caf3956 doc: release notes: Remove TBD entry from Build and Infrastructure
There's presumably no more items coming to this section, so remove the
TBD bullet point.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-07 21:00:10 +02:00
Johan Hedberg
6ec317b2de doc: release notes: Add some information for ARC
ARC didn't have many changes, but there's a bunch of irq-related
fixes since the last release, so mention these.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-07 21:00:10 +02:00
Flavio Ceolin
4b2fc256cf sys: usermode: Document 0 size buffer memory check
Documenting that 0 size buffer has undefined behavior.
See: https://github.com/zephyrproject-rtos/zephyr/pull/23239

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-07 13:12:51 +02:00
Flavio Ceolin
8ed4b62dc0 syscalls: arm: Fix possible overflow in is_in_region function
This function is widely used by functions that validate memory
buffers. Macros used to check permissions, like Z_SYSCALL_MEMORY_READ
and Z_SYSCALL_MEMORY_WRITE, use these functions to check that a
pointers passed by user threads in a syscall.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-07 13:12:51 +02:00
Armand Ciejak
38a2e2cf89 drivers: eth: mcux: Write correct data into override register
Do not use the content of the status register to write into the
override register because it may have unpredictable effect,
instead to a read/modify/write on the override register.

Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
2020-03-07 09:23:47 +02:00
Armand Ciejak
a3d413c51a drivers: eth: mcux: Fix PHY access in eth_mcux_phy_setup
It is necessary to poll the ENET_EIR_MII bit before reading
the data register as explained in the i.MX RT1060 reference
manual in chapter 41.7.17.4.
Use PHY_* functions from NXP HAL to correctly access the PHY
registers.

Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
2020-03-07 09:23:47 +02:00
Andrew Boie
d6d42bef97 drivers: gpio: fix syscall handlers
No driver object checks were being performed for 3 APIs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-07 09:22:50 +02:00
Andrew Boie
f669b7cb9f drivers: kscan: fix syscall handlers
No check of the driver object was being performed for two
APIs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-07 09:22:50 +02:00
Ioannis Glaropoulos
61fc061fc4 tests: kernel: userspace: extend bad syscall-ID test-case
Extend the bad syscall-ID test case to cover
erroneously supplied larged unsiged syscall-ID
values.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-07 09:22:23 +02:00
Ioannis Glaropoulos
502b67ceba arch: arm: aarch32: userspace: fix syscall ID validation
We need an unsigned comparison when evaluating whether
the supplied syscall ID is lower than the syscall ID limit.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-07 09:22:23 +02:00
Martí Bolívar
fe6107f2b3 doc: finish reworking the board porting guide
Now that the west parts of this file are in better shape, it seems a
shame not to flesh out the rest a bit more.

It's been a while since we looked at this document, as it's still
referring to boards (like Arduino 101) that are no longer supported by
Zephyr, and is generally lacking in concrete, step-by-step advice
for going from zero to working board.

Let's fix that.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-06 19:31:06 +02:00
Daniel Leung
c3701f51d7 adc: mchp_xec: right justify ADC output data under 10-bit res
This enables the ADC output data to be shifted right when using
10-bit resolution. Or else, data would be left justified as if
it's doing 12-bit ADC with the right 2 bits filled with zeroes.

Fixes #23202

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-06 19:29:09 +02:00
Daniel Leung
7f2996b061 west: update Microchip HAL to latest version
This includes the following changes:
- modules: Fix bugs in ECIA and PECI headers
- modules: Fix bug in MEC1501 TACH header
- mec1501: fix bits for setting 10-bit ADC resolution

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-06 19:29:09 +02:00
Stephanos Ioannidis
9aed7fb040 drivers: serial: uart_sam0: Fix interrupt connection
This commit fixes the multiple SERCOM interrupt handling for the SAM
D5x and E5x devices by replacing the obsolete device tree symbol with
the new `DT_INST` symbol.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-03-06 18:34:12 +02:00
Johan Hedberg
80ea034f7d doc: release notes: Include LoRa in major features
Add LoRa to the major feature list of 2.2.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-06 18:26:05 +02:00
Joakim Andersson
bb42abdd7c Bluetooth: host: Fix LE SC OOB authentication and id for central role
If the application has used bt_le_oob_get_local to retrieve the OOB
RPA address and OOB authentication information the central role should
use this RPA address for the next RPA timeout period.

The central role always refreshes the RPA address for the initiator,
this will make the OOB information not usable as the peer cannot
recognize the central role since the RPA address is changed.
Check if the initiator can use the address for the duration of the of
remaining RPA period.

Fix central role using the advertiser identity when setting the private
address. The central role should only use the default identity.

Regressions from:
fbe3285bfa
and
4876a8f39a

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-03-06 18:25:48 +02:00
Alexey Eremin
6f3f3c230c Bluetooth: Make macro definition compatible with 7-2018-q2-update g++
In C++ designated initializers require that designators used in the
expression must appear in the same order as the data members.

In addition, 7-2018-q2-update version of g++ doesn't support
implicit member initialization, so all members must be
initialized.

Signed-off-by: Alexey Eremin <a.eremin.msu@gmail.com>
2020-03-06 11:27:46 +02:00