Commit graph zephyr/drivers/ieee802154
Author SHA1 Message Date
Cristian Bulacu
78ec4981f4 drivers: ieee802154: Guard MCXW driver under CONFIG_NET_L2_OPENTHREAD
The MCXW IEEE 802.15.4 driver is now compiled only when CONFIG_NET_L2
is enabled. This allows a vendor-specific radio.c implementation to be
used without requiring networking stack support.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2026-07-30 07:46:38 -05:00
David Girle
c251684f0d drivers: ieee802154: esp32: report transmission failures
esp_ieee802154_transmit_failed() received the transmission error and
discarded it, unlocking tx_wait exactly like the success path does. As a
result k_sem_take() in esp32_tx() returned 0 for a frame that lost channel
access or was never acknowledged, and the driver reported a successful
transmission to the upper layer. OpenThread was told the frame had been
sent and therefore never retransmitted it, so the frame was dropped
silently with no error reported anywhere.

Store the error reported by the callback and translate it into the return
values documented for the tx() operation in ieee802154_radio.h: -EBUSY for
a busy medium and -ENOMSG for a missing or invalid ACK. The OpenThread
platform layer maps these to OT_ERROR_CHANNEL_ACCESS_FAILURE and
OT_ERROR_NO_ACK respectively, both of which trigger a retransmission.

Clear ack_frame and ack_frame_info at the start of every transmission.
A transmission that fails produces no ACK, and one that times out never
reaches handle_ack(), so in both cases the pointers from the previous
transmission stayed live and handle_ack() released a frame that had
already been released. Clear ack_frame_info alongside ack_frame in
handle_ack() as well, so the pair is never left half valid.

Measured on an ESP32-C6 joined to a live Thread network sharing a channel
with three other nodes: a test sending five UDP datagrams and requiring all
five to be reflected failed on roughly half of all boots before this change
and passed 30 consecutive boots afterwards. The errors reported by the
callback were CCA_BUSY and NO_ACK.

Signed-off-by: David Girle <davidgirle@gmail.com>
2026-07-23 16:20:51 +02:00
Mathieu Choplain
d310b65d7b drivers: ieee802154: fix CMakeLists formatting issues
Fix formatting issues in the driver class' listfile which caused CI
compliance checks failures.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-22 14:15:13 +01:00
Mathieu Choplain
21a39d0169 drivers: ieee802154: stm32wba: check correct variable for blobs_verify
Compatible existence should indeed be checked using the autogenerated
Kconfig option DT_HAS_ST_STM32WBA_IEEE802154_ENABLED as intended by the
code in the listfile; however, in CMake, Kconfig options have the
`CONFIG_` prefix as in C!

Update the listfile to check for compatible existence using the proper
variable (i.e., with the `CONFIG_` prefix).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-22 14:15:13 +01:00
David Boullie
654006d521 drivers: ieee802154: Add CSL support for Silabs EFR32
Modify existing Silicon Labs EFR32 driver and defconfigs
in order to support Coordinated Sampled Listening.

Signed-off-by: David Boullie <David.Boullie@silabs.com>
2026-07-14 16:38:51 -04:00
David Boullie
1fb769ba84 drivers: ieee802154: silabs_efr32: Fix Enhanced ACK path
Add steps to remove stale metadata from Enhanced ACK path,
along with correctly using key identifier context.

Signed-off-by: David Boullie <David.Boullie@silabs.com>
2026-07-14 16:38:51 -04:00
Vincent Tardy
c956191164 drivers: ieee802154: stm32wba: add CONFIG_BUILD_ONLY_NO_BLOBS for CI tests
Adds an option to enable CI tests without binary blobs.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-07-06 11:30:01 -04:00
Vincent Tardy
a2133bc6a9 ieee802154: drivers: stm32wba : Add module blobs dependencies to Kconfig
Add blobs presence dependency to the KConfig IEEE802154_STM32WBA

Add zephyr_blobs_verify() CMake function for STM32 HAL

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-07-06 11:30:01 -04:00
Phuc Hoang
c36f91098d drivers/ieee802154: ieee802154_silabs_efr32 enhancement
Hello, it's great that this driver has finally been released,
and I'm very impressed with the sheer amount of code. I'm reading
it and can't understand everything, but I have a few questions.

- `silabs_efr32_filter`: I see that the Zephyr API requires setting
and unsetting filters, and the Silabs platform also supports unsetting
filters, but why do we return ENOTSUP when the set variable is false?

- `silabs_efr32_cca` isn't implemented and returns ENOTSUP, but
I see a function called `unslotted_csma_ca_channel_access`
in the upper layer that retrieves the return value of
`ieee802154_radio_cca` (this function wraps the cca API).
If it returns an error other than EBUSY, it will be considered
a fatal error and abort the transmission.
I wonder if it's advisable to return 0 (no errror) so it means
that the CCA software doesn't do anything because the CCA
hardware has already performed the task?

- I've added a variable `testing`
if the `CONFIG_IEEE802154_CARRIER_FUNCTIONS`
configuration is enabled.

Signed-off-by: Phuc Hoang <donp172748@gmail.com>
2026-07-02 13:04:44 +01:00
Romain Jayles
1bcb3de8a6 soc: st: stm32wbax: add PM S2RAM support
Add STM32WBAx suspend-to-RAM support and hook the SoC-specific
implementation into the build when CONFIG_PM_S2RAM is enabled.

Select the custom S2RAM marking capability and add the STM32WBAx S2RAM
support source file.

Update the suspend-to-RAM path to clear the hardware standby flag as early
as possible after resume. Use standby_entered as a software indicator to
track whether standby was effectively entered and cleared, so resume
handling only restores radio state when needed.

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2026-06-29 13:50:45 -05:00
Vincent Tardy
55d081e0e2 soc: stm32wbax: use static direct IRQ registration for radio irq
Replace runtime dynamic IRQ registration
with static direct IRQ registration.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-06-29 13:50:16 -05:00
Michael Zimmermann
0de966cf9f drivers: ieee802154: silabs: check result of TX FIFO writes
If the TX FIFO is too small, these calls can fail. While this usually
doesn't happen, I ran into this issue while porting this driver to
efr32mg13p and was wondering why sending data doesn't work properly.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-24 11:46:44 +02:00
Michael Zimmermann
ef69bc8627 drivers: ieee802154: silabs: fix encryping data poll packets
Sleep End Devices (SED) use data poll packets to check if the coordinator
has data to send. These packets use the type
IEEE802154_FRAME_TYPE_MAC_COMMAND, which as an additional field inside the
part of the header thats supposed to be part of the authenticated data
rather than the encrypted payload.

sl_802154_get_mhr_length has to detect this situation and adjust the
returned header size accordingly. The check is modeled after what the
function FindPayloadIndex does inside of the openthread source code. That
code is used, if the device doesn't support IEEE802154_HW_TX_SEC.

Before this fix, neither Wireshark nor the receiver of the message were
able to decrypt the message. This caused sleepy devices to be unable to
communicate.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-24 11:46:36 +02:00
Michael Zimmermann
f8638b9f9a drivers: ieee802154: silabs: improve TX error handling
- tx_errno was set before giving the semaphore in several places. This can
  cause the tx function to use the old value.
- The code tried to wait for an ACK even if the tx has failed. This caused
  a dead lock. To solve this without relying on the order in which the ack
  and the TX result are received, a new variable `ack_errno` is introduced,
  so the success of the ack can be tracked and waited for separately.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-24 11:46:34 +02:00
Anas Nashif
ea1fbf3588 driver: fix various typos
Fixed various typos under drivers/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-17 10:12:27 -04:00
Baptiste Coffin
ef3da3c7a7 drivers: ieee802154: mcxw: fix channel desync after temporary operations
- Added `phy_channel` to track actual PHY hardware state
- Created `rf_change_channel()` as single entry point for all changes
- Implemented `rf_restore_main_channel()` for automatic restoration
- Added `rf_restart_rx_if_enabled()` helper to avoid code duplication
- Restored `rf_set_channel()` as low-level PHY configuration helper

Signed-off-by: Baptiste Coffin <baptiste.coffin_1@nxp.com>
2026-06-17 10:05:49 -04:00
Sylvio Alves
de5f5a9fd0 drivers: ieee802154: esp32: handle rx queue-full case
Replace a leftover placeholder in the rx queue-full branch with an
error log.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-16 10:27:27 +02:00
Marek Matej
8aaabb2a94 drivers: ieee802154: ESP32 buffered receiver path and HW caps
Add frame buffering before delivering packets to speed up HAL frame
release.
Update IEEE802154 hw capabilities.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2026-06-15 18:35:57 -04:00
David Boullie
3fcb1466a4 modules: hal_silabs: Add openthread init function
Add compilation of sl_openthread library to silabs 15.4 radio
driver to enable RAIL operations for OpenThread.

Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
2026-06-02 20:18:17 -04:00
David Boullie
bd89985e60 drivers: ieee802154: Add support of 802.15.4 for EFR xG24
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in Silabs' dedicated folder
hal_silabs (modules/hal/silabs).

Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
2026-06-02 20:18:17 -04:00
Guillaume Legoupil
a63034734e drivers: ieee802154: mcxw_get_eui64() get IEEE802154 address using NVMEM
The IEEE 802.15.4 address is moved from flash hw_params_partition
to internal IFR0.
Abstraction layer is done by using CONFIG_NVMEM.

Signed-off-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
2026-05-20 14:07:54 +02:00
Vincent Tardy
22436297bd drivers: ieee802154: stm32wba: Add CSMA_CA backoffs config request
Add IEEE802154_CONFIG_CSMA_CA_BACKOFFS configuration handling in
the ieee802154 driver.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-18 15:18:13 +01:00
Vincent Tardy
4c4385cfa2 drivers: ieee802154: stm32wba: fix tx packet handling issues
Copy the information filled in the Tx packet by the link layer
during IEEE 802.15.4 transmission before exiting the
stm32wba_802154_tx() function.
Drop the packet from the Tx_done callback issued by the
link layer after a radio reset.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-18 15:18:13 +01:00
Marek Matej
b17c9a0d46 drivers: ieee802154: handle ack only with L2
Prevent build errors when NET_L2 is disabled.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2026-05-14 15:14:15 +02:00
Sylvio Alves
36ac2822f5 soc: espressif: sync with latest hal_espressif
Update hal_espressif revision and adapt drivers and linker
scripts to the new HAL APIs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-12 17:16:50 +02:00
Vincent Tardy
416b4ea4a5 drivers: ieee802154: stm32wba: error code update
update the ieee802154 driver to be compliant
with LL update integrating 802.15.4 error code
unification change

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-05 14:07:04 -05:00
Radu Alexe
f5dcdc7677 drivers: ieee802154: mcxw: set RX state in accordance with rx_on_idle
setting RX state in accordance with rx_on_when_idle

Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
2026-04-22 08:09:55 -05:00
Pisit Sawangvonganan
a847abf22c drivers: fix typo in (i2s, i3c, ieee802154, input)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/i2s`
- `drivers/i3c`
- `drivers/ieee802154`
- `drivers/input`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Andrei Menzopol
940f8da2f8 drivers: ieee802154: mcxw: Fix double free
pd_mac_sap_handler gPdDataInd_c case shouldn't free msg
as it is already freed by the rx_thread. The msg is put
in rx_msgq queue through k_msgq_put which does a shallow
copy.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2026-03-27 13:59:36 -05:00
Andrei Menzopol
f831a4ee7a drivers: ieee802154: mcxw: return EALREADY in start/stop functions
Start/stop functions should return -EALREADY is the setup is already set.
If start/stop functions are called multiple times they trigger an assert.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2026-03-24 15:42:41 -05:00
Vincent Tardy
2a71bd41ff soc: stm32: ble and link layer threads initialization change
Ble host and link layer threads initialization is no more done
during the system initialization.
Add stm32wba_ble_ctlr_thread_init() and
stm32wba_ll_ctlr_thread_init() functions calls
during ble and ieee802.15.4 driver initialization

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-19 16:58:28 +01:00
Holt Sun
37d6ffa989 drivers: ieee802154: mcxw: require dedicated counter
When lptmr0 is reserved as the system timer, the MCXW IEEE 802.15.4
radio cannot rely on a separate counter device being instantiated for it.
The fallback to the kernel cycle counter is also not a valid replacement
for hardware timestamping in all timer configurations.

Add a counter phandle to the MCXW binding, wire the MCXW7x boards in scope
to use lptmr1 as a dedicated non-system-timer counter, and make the driver
consume that devicetree-provided counter directly.

This keeps the fix narrow to the boards enabled in this PR while removing
the fragile hard-coded lptmr0/lptmr1 selection logic.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-03-18 08:45:36 -05:00
Vincent Tardy
3a9637ea27 drivers: ieee802154: stm32wba: handle rx failure notification
Rx packet notified from low layer with an
error status are skipped and the rx failure
is notified to upper layer through
the IEEE802154_EVENT_RX_FAILED event

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-18 18:19:26 +09:00
Jamie McCrae
f22592cbc5 tree: Replace FIXED_PARTITION_* macro usage with PARTITION_*
Replaces usage of these deprecated macros with ones that support
fixed and mapped partition compatibles. Also includes an update to
hal_espressif which also (rightly or wrongly) has zephyr specific
code in it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00
Alberto Escolar Piedras
5926c43353 drivers: ieee802154: Remove uses of net logging helper macros
These macros are private to the net subsystem, let's not use them in
drivers.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-03-17 18:21:28 -04:00
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