diff --git a/drivers/ieee802154/ieee802154_nrf5.c b/drivers/ieee802154/ieee802154_nrf5.c index e099b2f33a9..60f45edb9c7 100644 --- a/drivers/ieee802154/ieee802154_nrf5.c +++ b/drivers/ieee802154/ieee802154_nrf5.c @@ -499,13 +499,9 @@ static bool nrf5_tx_immediate(struct net_pkt *pkt, uint8_t *payload, bool cca) }, }; -#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE nrf_802154_tx_error_t result = nrf_802154_transmit_raw(payload, &metadata); return result == NRF_802154_TX_ERROR_NONE; -#else - return nrf_802154_transmit_raw(payload, &metadata); -#endif } #if NRF_802154_CSMA_CA_ENABLED @@ -522,13 +518,9 @@ static bool nrf5_tx_csma_ca(struct net_pkt *pkt, uint8_t *payload) }, }; -#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE nrf_802154_tx_error_t result = nrf_802154_transmit_csma_ca_raw(payload, &metadata); return result == NRF_802154_TX_ERROR_NONE; -#else - return nrf_802154_transmit_csma_ca_raw(payload, &metadata); -#endif } #endif @@ -585,13 +577,9 @@ static bool nrf5_tx_at(struct nrf5_802154_data *nrf5_radio, struct net_pkt *pkt, uint64_t tx_at = nrf_802154_timestamp_phr_to_shr_convert( net_pkt_timestamp_ns(pkt) / NSEC_PER_USEC); -#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE nrf_802154_tx_error_t result = nrf_802154_transmit_raw_at(payload, tx_at, &metadata); return result == NRF_802154_TX_ERROR_NONE; -#else - return nrf_802154_transmit_raw_at(payload, tx_at, &metadata); -#endif } #endif /* CONFIG_NET_PKT_TXTIME */ diff --git a/modules/hal_nordic/Kconfig b/modules/hal_nordic/Kconfig index b8b65937475..7be30750627 100644 --- a/modules/hal_nordic/Kconfig +++ b/modules/hal_nordic/Kconfig @@ -203,6 +203,20 @@ config NRF_802154_PENDING_EXTENDED_ADDRESSES config NRF_802154_ENCRYPTION bool "nRF 802.15.4 AES-CCM* authentication & encryption" depends on !CRYPTO_NRF_ECB + select NRF_802154_IE_WRITER + select NRF_802154_SECURITY_WRITER + help + Enable module for encryption and authentication of outgoing frames and Acks. + +config NRF_802154_IE_WRITER + bool "Information element writer" + help + Enable data injection for some Information Element types. + +config NRF_802154_SECURITY_WRITER + bool "Security frame counter writer" + help + Enable injection of security frame counter. config NRF_802154_SECURITY_KEY_STORAGE_SIZE int "nRF 802.15.4 security key storage size" diff --git a/modules/hal_nordic/nrf_802154/CMakeLists.txt b/modules/hal_nordic/nrf_802154/CMakeLists.txt index 957019ff1e6..1f504242cb2 100644 --- a/modules/hal_nordic/nrf_802154/CMakeLists.txt +++ b/modules/hal_nordic/nrf_802154/CMakeLists.txt @@ -70,12 +70,20 @@ endif() if (CONFIG_NRF_802154_ENCRYPTION) target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_ENCRYPTION_ENABLED=1) - target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_SECURITY_WRITER_ENABLED=1) - target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_IE_WRITER_ENABLED=1) else () target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_ENCRYPTION_ENABLED=0) - target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_SECURITY_WRITER_ENABLED=0) +endif () + +if (CONFIG_NRF_802154_IE_WRITER) + target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_IE_WRITER_ENABLED=1) +else () target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_IE_WRITER_ENABLED=0) +endif () + +if (CONFIG_NRF_802154_SECURITY_WRITER) + target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_SECURITY_WRITER_ENABLED=1) +else () + target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_SECURITY_WRITER_ENABLED=0) endif() if (NOT CONFIG_IEEE802154_NRF5 AND NOT CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT AND CONFIG_NRF_802154_SL_OPENSOURCE) diff --git a/west.yml b/west.yml index d0e76dbc576..4df2b937a46 100644 --- a/west.yml +++ b/west.yml @@ -200,7 +200,7 @@ manifest: groups: - hal - name: hal_nordic - revision: d0cef2363e572679deba0e796ef6c77f1188bb04 + revision: 979a58d0829108b57f10e90b6c3fc35ab6206e4b path: modules/hal/nordic groups: - hal