Commit Graph

65595 Commits

Author SHA1 Message Date
Andrei Emeltchenko b970c4daef net: capture: Remove unneeded variable
Remove unused remote_addr_len variable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 12:28:35 +02:00
Andrei Emeltchenko 3d42168c74 net: ipv4: Remove double assignment
Remove double assignment of cfg variable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 12:28:35 +02:00
Andrei Emeltchenko e0e1a12eba net: ipv6: Remove double assignment
Value of nexthdr is already assigned several lines above.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 12:28:35 +02:00
Andrei Emeltchenko c27b72b331 net: ethernet: Remove double assignment
Variable type would be assigned at the block end.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 12:28:35 +02:00
Andrei Emeltchenko 77c694178f net: ppp: Fix stored value never read warning
Move declarations to the debug block where they are actually used.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 12:28:35 +02:00
Emil Gydesen b2c8fa9c53 Bluetooth: Shell: Fix unused variable in iso.c
The `iso_qos` was only used for connected ISO, but
was placed outside of the CONFIG_BT_ISO_UNICAST
guard, such that for broadcast ISO-only it was unused.

Move the declaration and renamed to cis_iso_qos.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-22 12:28:21 +02:00
Vinayak Kariappa Chettimada 87fec9d98d boards: nrf5340dk_nrf5340_cpunet: Remove explicit BT_HCI_VS enable
Remove explicit BT_HCI_VS enable, this will be enabled when
the used Controller selects BT_HAS_HCI_VS.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:28:05 +02:00
Vinayak Kariappa Chettimada 048619639d boards: nrf5340dk_nrf5340_cpunet: Disable BT_ECC support
Disable BT_ECC support in network core to reduce RAM usage.
ECC implementation can instead be supported in the Host
running in the application core.

This is also to keep hci_uart (nRF52 Series) and hci_rpmsg
(nRF53 Series) have the same support features. ECC is not
enabled in hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:28:05 +02:00
Sylvio Alves 54ca96f523 soc: esp32: opt to make device handles in dram
ESP32 linker loader needs all sections to be align correctly.
When MCUBoot is enabled, device handles provide by device-handles.ld
does not make the ALIGN(4) at the end, which breaks the loader
initialization. This PR make sure that this particular section
is placed in DRAM instead.

For now this is a workaround until this can be handled in loader script.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:43 +02:00
Sylvio Alves 3335e612f1 samples: subsys: esp32s2: add configuration file
This sample won't work without custom configuration.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Sylvio Alves 8e04acab3b linker: esp32: fix flash linking reference
Referenced spi_flash_rom_patch.c object was wrongly
linked, which can cause crash due to flash cache disabled
operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Sylvio Alves b8dbe08425 soc: esp32s2: fix invalid storage address
Fix duplicated storage address.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Sylvio Alves fdd47f39be soc: esp32: fix flash write blocks size
Current write block size does not guarantee proper
write operation, what might cause corrupted data.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Benjamin Björnsson 1a246ba5c0 samples: sensor: fxos8700: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Benjamin Björnsson 82901bd563 drivers: sensor: fxos8700: Update driver to use gpio_dt_spec
Simplify driver by using gpio_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Benjamin Björnsson 47b3e65290 drivers: sensor: fxos8700: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Benjamin Björnsson 1e44af1e2c drivers: sensor: lis3mdl: Update driver to use gpio_dt_spec
Simplify driver by using gpio_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:02 +02:00
Benjamin Björnsson 37b59c3427 drivers: sensor: lis3mdl: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:02 +02:00
Nicolas Pitre 0a386dbe6c build: make Zephyr stdint convention enforcing configurable
There are  few cases where removing this enforcement is desirable:

- linking against binary C++ libs with incompatible type mangling

- linking against system provided headers i.e. native_posix

- compiling with legacy code that assumes a different convention

So let's create a Kconfig symbol for it. This is IMHO a good compromize
compared to using the %"PRId32" abomination everywhere otherwise.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-06-22 12:26:46 +02:00
Benjamin Björnsson e06359f616 drivers: sensor: fxas21002: Update driver to use gpio_dt_spec
Simplify driver by using gpio_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:25:52 +02:00
Benjamin Björnsson 5f4be73ba0 drivers: sensor: fxas21002: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:25:52 +02:00
Sjors Hettinga 4243e8e99c net: tcp: Do not capture tx_sem during retransmission
As the stack can safely keep allocating data during retransmission mode
there is no need to take the tx_sem during retransmission any more.

Data stored in the send_data buffer will be transmitted upon the ack of
the data for which an ack is pending. This the application being fully
stalled when the TCP connection enters retransmission mode.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2022-06-22 12:25:40 +02:00
Sjors Hettinga 17f94d3f96 net: tcp: Revert: Do not accept new data in retransmission mode
After the window_full function has been fixed by looking at the
send_data_total instead of the unacked_len. There is no risk
in sending data in transmission mode.

This reverts commit 0088aaefa0.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2022-06-22 12:25:40 +02:00
Martin Jäger ac47200150 boards: arm: nucleo_f446re: use can2 instance for testing
Choose can2 as the zephyr,canbus instance and add necessary settings
for testing of the STM32 dual CAN driver implementation.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-06-22 12:25:26 +02:00
Martin Jäger 1bd9e366be drivers: can: stm32: support for dual CAN instances
CAN1 and CAN2 share the memory for the filter banks.

This commit adds an offset for filters installed for CAN2, allowing to
use both CAN instances simultaneously.

The hardware allows to freely split the avalable 28 filters between
CAN1 and CAN2. In order to simplify the driver implementation, it only
supports an equal split of 14 filters per instance. This is the same
amount of filters as available in MCUs with only a single CAN.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-06-22 12:25:26 +02:00
Martin Jäger c02454ef03 drivers: can: stm32: rework internal functions
Remove two functions which were only called from one place and did
not improve readibility of the code.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-06-22 12:25:26 +02:00
Martin Jäger b666afa13e drivers: can: stm32: use DT_INST_FOREACH for driver setup
This commit unifies the driver initialization for can1 and can2
instances so that a single macro can be used.

Enabling the master clock for can2 as introduced in 8ab81b02 had to
be moved to devicetree in order to have the same CAN_STM32_CONFIG_INST
macro for all instances.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-06-22 12:25:26 +02:00
Troels Nilsson eabdf16087 Bluetooth: host: Fix resume failing with extended advertising
Fix advertising failing to resume with BT_ADV_PERSIST set in
bt_hci_le_adv_set_terminated due to BT_ADV_ENABLED not getting
cleared before bt_le_adv_resume gets called

Signed-off-by: Troels Nilsson <trnn@demant.com>
2022-06-22 12:25:10 +02:00
Troels Nilsson 0f892ff8c8 Bluetooth: host: Fix missing endianness conversions
Fix missing endianness conversion for props in le_ext_adv_param_set
and bt_le_per_adv_set_param

Signed-off-by: Troels Nilsson <trnn@demant.com>
2022-06-22 12:25:10 +02:00
Carlo Caione 1608c8adba pm: Introduce CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE
Sometimes we want to entirely decouple the system PM from the device PM,
leaving the devices to manage its own power states using the runtime PM.

This is currently not possible because the suspend / resume code path is
triggering the device PM hooks even when the runtime PM is enabled.

Introduce a new PM_DEVICE_RUNTIME_EXCLUSIVE symbol to allow the platform
to skip the device PM triggers on suspend / resume.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-22 12:24:43 +02:00
Wojciech Slenska e757f188c8 drivers: serial: atmel_sam: Added hw flow control
Patch added hw flow control to usart driver

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2022-06-22 12:24:22 +02:00
Henrik Brix Andersen b39960a5df boards: arm: twr_ke18f: enable I2C bus recovery
Enable I2C bus recovery for LPI2C0 and LPI2C1 on the NXP TWR-KE18F
development board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-06-22 12:24:08 +02:00
Henrik Brix Andersen 83206a425f boards: arm: mimxrt1024_evk: enable I2C bus recovery
Enable I2C bus recovery for LPI2C4 on the NXP i.MX RT1024 Evaluation Kit
board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-06-22 12:24:08 +02:00
Henrik Brix Andersen b7624bc5cf drivers: i2c: mcux: lpi2c: add bus recovery support
Add I2C bus recovery support to the NXP MCUX LPI2C driver. Since the LPI2C
peripheral block does not natively support I2C bus recovery, recovery is
performed using GPIO bitbanging.

Fixes: #42574

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-06-22 12:24:08 +02:00
Emil Gydesen 93eccad72f samples: Bluetooth: Fix timeout for iso_broadcast
The timeout was accidentally changed from 60 seconds
to 0.6 seconds.

This commit also fixes the number of prints, since we are now
sending at 10ms intervals.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-22 12:23:52 +02:00
Vinayak Kariappa Chettimada 1f2cbbf318 tests: Bluetooth: bsim: Add GATT Write test
Add BabbleSim test to verify central_gatt_write and
peripheral_gatt_write.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:22:29 +02:00
Vinayak Kariappa Chettimada 8e5e0bd45e samples: Bluetooth: peripheral and central GATT write command use
Samples peripheral_gatt_write and central_gatt_write to
demonstration use of GATT Write Command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:22:29 +02:00
Vinayak Kariappa Chettimada e994ec1557 Bluetooth: Controller: Fix Tx Buffer allocation for Encryption Request
Encryption request is enqueued in thread context from the Tx
buffer pool, so that it is serialized alongwith the already
enqueued data buffers ensuring they are transmitted out to
peer before encryption is setup. Allocate additional Tx
buffers to accommodate simultaneous encryption setup across
active connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:22:29 +02:00
Yinfang Wang 540ab5eb4c tests: sched: preempt: Fix the skipped testing when enabling SMP
When SMP feature is enabled on board, this test suite will skip.
Enable the test suite by removing the filter.
Note that these testings only run SMP platform on single core
which are handled by setting MP_NUM_CPUS=1 in prj.conf.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-06-22 12:22:01 +02:00
Morten Priess 44f8166c3b test: bluetooth: Fix hci_test_app iso_data_pool element size
Size of ISO RX data pool did not account for the EDTT timestamp.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-06-22 12:21:16 +02:00
Morten Priess ca8457d882 Bluetooth: controller: Fixes for ISO from IAL testing
- Prevent NULL-pointer dereferencing if datapath is created late
- Support SDU fragment complete-counting for framed case

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-06-22 12:21:16 +02:00
Nirosharn Amarasinghe fc107a0775 Bluetooth: controller: Unified ISO-AL TX SDU fragment count
Implemented incrementing TX SDU fragment count such that it indicates
the number of completed SDU fragments in the PDU being emitted for both
unframed and framed transmission.

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-06-22 12:21:16 +02:00
Nirosharn Amarasinghe 64c9a521d4 tests: bluetooth: Reworked ISO-AL RX unit tests
Fixes incorrect use of the test framework and updates tests according
to the new test API.

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-06-22 12:21:16 +02:00
Nirosharn Amarasinghe af37b444d4 Bluetooth: controller: fix for some problems in ISO-AL RX and HCI
HCI:
-- Discarded data from HCI ISO Data packets from controller to host if
   data has been lost

ISO-AL:
-- Corrected iso_interval in latency calculations
-- Updated handling and release of SDUs for error conditions / padding
   at the last PDU for the SDU
-- Updated prioritisation of error status in released PDUs
-- Included error spooling exit on based on payload number to SDU
   mapping for unframed reassembly
-- Updated sequence number handling for framed recombination

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-06-22 12:21:16 +02:00
Morten Priess ef28184af2 Bluetooth: controller: Asynch stop of ISO resume ticker in disable
Do not use ull_ticker_stop_with_mark for ISO one-shot resume ticker, but
stop without checking result. If active this will stop it, otherwise it
is ignored. Also, this prevents calling lll_disable twice.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-06-22 12:21:16 +02:00
Morten Priess 3d4215d6a3 Bluetooth: controller: LLCP and ISOAL Fixes for EBQ LL tests
- Prioritize CIS_REQ handling in (old) LLCP
- Reject if CIS_REQ uses exisiting CIS ID

These fixes prevent assertions in /LL/CIS/PER/BV-38-C.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-06-22 12:21:16 +02:00
Ola Tangen Kulseng 38628f409e net: lwm2m: Add LwM2M shell commands for start&stop
Added start, stop and update to the shell.
Refactored the event_cb of the rd_client_info struct into the ctx,
as it was needed in the shell script.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-06-22 12:17:52 +02:00
Ola Tangen Kulseng 3e50624e39 net: lwm2m: Added commands to the lwm2m_client shell
Added read, write and execute commands to the shell.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-06-22 12:17:52 +02:00
Anas Nashif bc38f25178 intel_adsp: fix typo PLATFORM_INIT_LPRSRAM -> PLATFORM_INIT_LPSRAM
Fix typo in define preventing initialization of LPSRAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-22 12:16:41 +02:00
Gerard Marull-Paretas 4946a15f15 soc: arm: gigadevice: use common API headers
Stop relying on <soc.h> to access HAL APIs. Use generic, per-API headers
instead. Note that <soc.h> has been left as is for now, since ARM MPU
relies on a fragile chain of includes/type definitions.

This change should improve compilation efficiency, as we no longer pull
APIs that are not needed. A similar approach is followed by STM32
drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-06-22 18:41:19 +09:00