Commit graph

617 commits

Author SHA1 Message Date
Vincent Tardy
a52490f85e ieee802154 : stm32wba: ED conversion to RSSI in dBm
The ED value measured during ED scanning is converted
to RSSI in dBm at the ieee802154 driver level before
it is reported to upper layer through the scan callback.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 16:34:28 +01:00
Vincent Tardy
7c3ac51f1b drivers: ieee802154: stm32wba: fix issue if mac keys value null
Fix issue in the function
stm32wba_802154_configure_mac_key() : avoid keys copy
in case of the value field of first key in the mac_key
pointer is null.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 16:30:26 +01:00
Vincent Tardy
611c93944f drivers: ieee802154: stm32wba: add 802.15.4 configuration types support
Add support of configuration types :
- IEEE802154_CONFIG_FRAME_COUNTER_IF_LARGER
- IEEE802154_CONFIG_FRAME_COUNTER
- IEEE802154_CONFIG_MAC_KEYS

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-05 11:13:44 +00:00
Vincent Tardy
0bc65088a3 drivers: ieee802154: Restore channel during driver start api
Restore the channel in the stm32wba_802154_start()
function because channel is reset by the link layer
when the stm32wba_802154_ral_sleep() is called
in the stm32wba_802154_stop() function.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-03 11:15:26 +01:00
Vincent Tardy
9b5182fea1 drivers: ieee802154: Manage continuous reception config in start/stop
Disable continuous reception when ieee802154 stop
is called.
Configure continuous reception when ieee802154 start
is called.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-03 11:15:26 +01:00
Xavier Razavet
204952a8f0 samples: openthread: shell: mcxw .conf files updated
Enabling the IEEE802154 CSL endpoint to support MCXW72 as a SEED role.
prj-ot-host.conf and sample.yaml corrected for compilation purpose.

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2026-02-23 16:59:43 +00:00
Xavier Razavet
3cd56a424c drivers: ieee802154: mcxw ieee802154 CSL receiver correction
CSL receiver is managed as follows:
	- Started in mcxw_tx() when CSL period is configured
	- Synchronized in set_csl_sample_time() for RX slots
	- Stopped after PHY operations in SAP handlers

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2026-02-23 16:59:43 +00:00
Alessandro Manganaro
82db777687 drivers: ieee802154: stm32wba: align with radio power hook
Update the stm32wba 802.15.4 driver to integrate the new SoC-level
radio power management.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2026-02-13 09:51:52 -06:00
Baptiste Coffin
67316cc394 drivers: ieee802154: mcxw: fix Enhanced ACK IE parsing
The mcxw driver was parsing Thread Vendor-Specific ACK Probing IE
with hardcoded token positions, assuming LQI at offset 6, Link
Margin at offset 7, and RSSI at offset 8. This failed when tokens
were in a different order or when fewer than 3 metrics were present.

Parse the IE length field and iterate through all tokens, matching
them by value (0x01=RSSI, 0x02=Link Margin, 0x03=LQI) instead of
position. This supports 1-2 metrics in any order as per Thread 1.2.

Signed-off-by: Baptiste Coffin <baptiste.coffin_1@nxp.com>
2026-02-11 16:33:36 +01:00
Jamie McCrae
3a9189aa3e drivers: Update to use SOC_SERIES_NRF Kconfigs without X suffix
Updates usage of the old Kconfig to use the new Kconfig

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-20 13:21:38 +00:00
Alexandre Bailon
3d11f60b58 ieee802154: cc13xx_cc26xx: Make filter more reliable
The radio driver updates the filters but never submit
the new ones to the radio core.
The filters was only applied later thanks, probably during
a channel selection that was happening often.
Update the driver stop RX operation and restart it using
the new filters.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2026-01-12 11:53:47 +01:00
Alexandre Bailon
06503ceb02 ieee802154: cc13xx_cc26xx: Improve channel selection
When using OpenThread, set_channel operation may be called often
with the same channel number.
Everytime, even if the channel has not changed, the driver stop all
the radio operations, restart the synthesizer and then restart RX
operations.
This behavior prevents OpenThread joiner to work correcly.
This updates the driver to only stop radio operations if this is really
required.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2026-01-12 11:53:47 +01:00
Vincent Tardy
7273479e43 soc: st: stm32wba: hci_if: allow forcing ISR registration
Add parameter to the link_layer_register_isr() to force
or not the link layer isr registration in case of multiple
function calls.
This change fixes the interrupt service when resuming
from a PM standby state.

Update Bluetooth hci_stm32wba.c driver and
IEEE 802.15.4 ieee802154_stm32wba.c driver accordingly.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2025-12-18 14:50:58 +00:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Xavier Razavet
aef5728e57 drivers: ieee802154: mcxw ieee802154 driver updated
To support the SSED attachment, the IEEE802154_MCXW_CSL_ACCURACY
default value shall be 50.

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2025-12-15 17:09:20 +00:00
Xavier Razavet
91079cf825 drivers: ieee802154: SSED attachment management
Few functions have been corrected to the SSED attachment for the
MCXW72 as leader :
- mcxw_tx():
  tx_frame.tx_delay corrected.
  Adjusts the scheduled transmission start time to account for the SHR
  duration (160us) as requested by the OpenThread radio API.

- mcxw_rx_thread():
  Stores the frame counter and key ID from a
  security-enabled enhanced ACK into the received packet's metadata
  for cryptographic verification.

- mcxw_tx_started() added:
  Notifies the registered event handler that a frame transmission has
  started, passing the frame buffer as context.

- pd_mac_sap_handler(): timestamp corrected

- mcxw_configure(): IEEE802154_CONFIG_EVENT_HANDLER case updated

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2025-12-15 17:09:20 +00:00
Damian Krolik
1a6ff4f8e4 drivers: ieee802154: remove unused IEEE802154_CSL_DEBUG
The Kconfig option is not used anywhere for a while.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-12-12 09:57:00 -05:00
Simon Piriou
9aa69e6bc1 drivers: ieee802154: nrf5: improve debug logs
This commit prefixes "0x%x" debug logs with the entity, and prints the
"set" parameter when updating a filter.

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-12-01 12:23:56 -05:00
Jukka Rissanen
882387eeaa drivers: ieee802154: Properly namespace AF_UNSPEC by NET_AF_UNSPEC
Couple of AF_UNSPEC need to be replaced by NET_AF_UNSPEC so that
OpenThread tests will pass.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-24 08:47:05 +01:00
Jukka Rissanen
985d1c0351 net: Convert IEEE 802.15.4 drivers to use renamed network APIs
Rename network symbols in IEEE 802.15.4 drivers to use the renamed
network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Josuah Demangeon
30950b888d style: drivers: sort Kconfig and CMake includes
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00
Mathieu Choplain
21b2283fc5 drivers: *: stm32: use series-agnostic STM32 LL headers
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in STM32 drivers.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-14 12:19:48 +02:00
Xavier Razavet
76a102a8bd drivers: ieee802154: mcxw_get_eui64() updated to manage MAC address
The mcxw_get_eui64() function allows to provide a persistent MAC
address if it does not exist

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2025-11-13 20:42:22 -05:00
Raffael Rostagno
9ca6920d98 drivers: ieee802154: esp32: Todo's review
Review todo items to make sure points are solved.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:12:14 +02:00
Raffael Rostagno
7d46b82568 drivers: ieee802154: esp32: Fix start/stop API
Fix start/stop driver API implementation. OT stack expects these
functions to only put IEEE802.15.4 in sleep mode and back in RX
mode when calling start. Fixes ifconfig down/up cycling as well
as nodes staying in leader role and not forming a network.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:12:14 +02:00
George Stefan
e25a7417f1 drivers: ieee802154: mcxw: disable poll optimization
The 802.15.4 PHY has the poll optimization enabled by default.
Disable it until the driver state machine is updated.

Signed-off-by: George Stefan <george.stefan@nxp.com>
2025-10-24 01:10:20 +03:00
Alessandro Manganaro
077e5a3584 drivers: ieee802154: STM32WBA cube fw 1.7.0 updates
Changes required to update STM32WBA ieee802154 driver
according STM32WBA Cube FW 1.7.0 version.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2025-10-16 12:16:31 -04:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Rafał Kuźnia
3d63165050 drivers: ieee802154: nrf5: Remove temporary API migration code
The new nrf-802154 now has the updated API signatures. The migration
code is no longer needed.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-09-29 12:47:02 -04:00
Vincent Tardy
dc89803697 drivers: ieee802154: add support of 802.15.4 for STM32WBA
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in ST's dedicated folder
hal_stm32 (modules/hal/stm32).

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2025-09-26 20:44:45 -04:00
Jason Kridner
1f03dcfa0c cc13xx_cc26xx: select CRC with SubG driver
This was previously only selected when the 2.4GHz driver was
enabled, but SubG can be enabled without the 2.4GHz driver.

Build tested using:

```
west build -b beagleconnect_freedom -d \
 build/bcf/ot_coap samples/net/openthread/coap
west flash -d build/bcf/ot_coap
```

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
2025-09-24 19:20:49 -04:00
Rafał Kuźnia
92b1346f91 drivers: ieee802154: nrf5: Add temporary API migration code
The transmit functions will return an error code, instead of a boolean
value. To prepare for this, the API calls are temporarily implemented in
two variants, for old and new API declarations.

The presence of new API will be detected by the use of
NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE macro, which will be
unconditionally defined by a newer nrf-802154 driver.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-09-22 13:31:17 -04:00
Yangbo Lu
15dc8d78f2 net: pkt: support common usage of control block
Supported common usage of control block for any layer.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-09-15 14:06:56 -04:00
Rafał Kuźnia
3cccfa5f64 drivers: ieee802154: nrf5: prevent negative timestamps
The nrf-802154 driver may be unable to acquire a valid timestamp under
rare conditions. In such case, the nrf_802154_received_timestamp_raw
reports time=NRF_802154_NO_TIMESTAMP.
The shim implementation must not calculate the PHR timestamp when
receiving this value, because doing so results in an assert in
ptp_packet.h due to a negative time value.
When the driver is unable to capture the timestamp, the packet is
assigned zero as its timestamp.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-07-19 13:39:58 -04:00
Rafał Kuźnia
5925d718ef drivers: ieee802154: nrf5: drop packets that are too long
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.

The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-07-19 13:23:06 -04:00
Martin Jäger
cba8b33c3d drivers: ieee802154: Add implementation for ESP32 series
Initial commit of the IEEE 802.15.4 driver using Espressif HAL.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-06-26 11:12:34 +02:00
Cristian Bulacu
b3cc778c87 drivers: ieee802154: update mcxw ieee802154 driver
Updated driver based on changes done in SDK 25.06.00-pvw2.
Update hal_nxp to include BLE LL and IEEE 802.15.4 PHY NBU
combo firmware for MCXW72 boards.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-06-12 09:34:16 -07:00
Cristian Bulacu
5cf2d4585e drivers: ieee802154: Fix resolution in mcxw_get_time function.
Updated mcxw_get_time function to output its result in nanosecond
resolution and updated code accordingly.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-06-12 09:34:16 -07:00
Vincent van der Locht
a06ded8db6 drivers: ieee802154: added raw mode to mcxw ieee802154 driver
Add support for raw mode of mcxw ieee802154 driver.

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2025-05-29 23:25:41 +02:00
Andrei Menzopol
137199b19f drivers: ieee802154: fix mcxw ieee802154 driver
Fix mcxw_cca function.
Remove not used / not implemented caps.
Select counter as dependency.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-05-27 09:16:04 +02:00
Alexandre Bailon
db496c7a76 drivers: ieee802154: cc13xx_cc26xx: Don't filter beacon for OpenThread
OpenThread network discovery was not working.
The radio driver is filtering the beacon packets whereas
this is required for OpenThread.
Allow receiving beacon packets.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2025-05-13 22:20:55 -04:00
Alexandre Bailon
c1bce30fe5 drivers: ieee802154: cc13xx/26xx: Add support of 802.15.4 ED Scan
This adds support of ED scanning to cc13xx/cc26xx.
This could be required to select the least busy channel
or to found neighboring networks.

Note:
Although the scanning is working, OpenThread still fails
to discover OpenThread networks.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2025-04-28 12:54:59 -05:00
Damian Krolik
1e64c29ac3 drivers: ieee802154: nrf5: support reading EUI64 from UICR on nRF54L
Extend the existing code for reading EUI64 from UICR to
support nRF54L SoC series as well.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-04-28 16:41:23 +02:00
Benjamin Cabé
9dd1dbbbc6 drivers: ieee802154: fix spelling of "written"
s/writen/written/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-21 11:41:46 +00:00
Andrei Menzopol
f7167ed606 drivers: ieee802154: add mcxw ieee802154 driver
Add mcxw ieee802154 driver
Fix compliance errors for added files.
Update function names to snake_case style.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Tom Hughes
5bb029893e drivers: ieee802154: Remove unused function
Building with clang warns:

drivers/ieee802154/ieee802154_dw1000.c:277:24: error: unused function
'dwt_reg_read_u16' [-Werror,-Wunused-function]
static inline uint16_t dwt_reg_read_u16(const struct device *dev,
                       ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 07:52:18 +01:00
Martin Jäger
2a95996a03 drivers: ieee802154: nrf5: cast payload ptr to void for debug output
Without this fix I get an MPU fault in samples/net/openthread/shell/
with CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y.

Related commit: a7224830ce

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-14 13:26:47 +01:00
Martin Jäger
6046368e59 drivers: ieee802154: unify FCS configuration in L2 packet
Use the same Kconfig for all drivers to configure if the FCS bytes
(checksum) should be included in the packets passed to L2.

The description is slightly reworded to make clear that it does not
only affect the length, but the packet content itself.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-07 11:52:51 +01:00
Martin Jäger
9d3d67d3d1 drivers: ieee802154: b91: fix status variable type in RX ISR
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-12-30 19:47:05 +01:00
Pieter De Gendt
45be45d7e0 drivers: crypto: Place API into iterable section
Add wrapper DEVICE_API macro to all crypto_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-06 12:13:37 +01:00