nrf_802154: rev aaff0ad8570c2f7069ae9fc8f60153941275a6ae
This commit updates revision of the nrf_802154 component. Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
This commit is contained in:
parent
56e0b052df
commit
6efb0fdef0
|
@ -81,6 +81,17 @@ extern "C" {
|
|||
*/
|
||||
#define NRF_802154_RESERVED_DRX_ID_UPPER_BOUND (UINT32_MAX - 4)
|
||||
|
||||
/**
|
||||
* @brief Maximum number of simultaneously pending notifications the driver can issue.
|
||||
*
|
||||
* This parameter allows to determine the correct size for structures that process notifications
|
||||
* issued by the driver. It accumulates the maximum number of simultaneously pending notifications
|
||||
* that can result from successfully received frames, disregardable notifications, all supported
|
||||
* delayed operations and the latest requested immediate operation.
|
||||
*/
|
||||
#define NRF_802154_MAX_PENDING_NOTIFICATIONS \
|
||||
(NRF_802154_RX_BUFFERS + NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS + 4 + 1)
|
||||
|
||||
/**
|
||||
* @brief Initializes the 802.15.4 driver.
|
||||
*
|
||||
|
@ -1497,6 +1508,13 @@ nrf_802154_security_error_t nrf_802154_security_key_store(nrf_802154_key_t * p_k
|
|||
*/
|
||||
nrf_802154_security_error_t nrf_802154_security_key_remove(nrf_802154_key_id_t * p_id);
|
||||
|
||||
/**
|
||||
* @brief Remove all stored 802.15.4 MAC Security Keys from the nRF 802.15.4 Radio Driver.
|
||||
*
|
||||
* @note This function is not reentrant and must be called from thread context only.
|
||||
*/
|
||||
void nrf_802154_security_key_remove_all(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @defgroup nrf_802154_ie_writer Radio driver Information Element data injection feature.
|
||||
|
|
|
@ -202,6 +202,18 @@ extern "C" {
|
|||
#define NRF_802154_RX_BUFFERS 16
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS
|
||||
*
|
||||
* The number of slots in the driver's notification queue intended for notifications that can be
|
||||
* disregarded with no impact on the driver, for instance failed reception notifications.
|
||||
*
|
||||
* @note Setting this macro to 0 will cause the driver to not issue any disregardable notifications.
|
||||
*/
|
||||
#ifndef NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS
|
||||
#define NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def NRF_802154_NOTIFY_CRCERROR
|
||||
*
|
||||
|
|
|
@ -83,6 +83,13 @@ nrf_802154_security_error_t nrf_802154_security_pib_key_store(nrf_802154_key_t *
|
|||
*/
|
||||
nrf_802154_security_error_t nrf_802154_security_pib_key_remove(nrf_802154_key_id_t * p_id);
|
||||
|
||||
/**
|
||||
* @brief Removes all stored 802.15.4 MAC Security Keys from the nRF 802.15.4 Radio Driver.
|
||||
*
|
||||
* @note This function is not reentrant and must be called from thread context only.
|
||||
*/
|
||||
void nrf_802154_security_pib_key_remove_all(void);
|
||||
|
||||
/**
|
||||
* @brief Uses the 802.15.4 MAC Security Key stored previously in the nRF 802.15.4 Radio Driver.
|
||||
*
|
||||
|
|
|
@ -200,6 +200,14 @@ nrf_802154_security_error_t nrf_802154_security_pib_key_remove(nrf_802154_key_id
|
|||
return NRF_802154_SECURITY_ERROR_KEY_NOT_FOUND;
|
||||
}
|
||||
|
||||
void nrf_802154_security_pib_key_remove_all(void)
|
||||
{
|
||||
for (uint32_t i = 0; i < NRF_802154_SECURITY_KEY_STORAGE_SIZE; i++)
|
||||
{
|
||||
m_key_storage[i].taken = false;
|
||||
}
|
||||
}
|
||||
|
||||
nrf_802154_security_error_t nrf_802154_security_pib_key_use(nrf_802154_key_id_t * p_id,
|
||||
void * destination)
|
||||
{
|
||||
|
|
|
@ -1066,6 +1066,11 @@ nrf_802154_security_error_t nrf_802154_security_key_remove(nrf_802154_key_id_t *
|
|||
return nrf_802154_security_pib_key_remove(p_id);
|
||||
}
|
||||
|
||||
void nrf_802154_security_key_remove_all(void)
|
||||
{
|
||||
nrf_802154_security_pib_key_remove_all();
|
||||
}
|
||||
|
||||
#if NRF_802154_DELAYED_TRX_ENABLED && NRF_802154_IE_WRITER_ENABLED
|
||||
|
||||
void nrf_802154_csl_writer_period_set(uint16_t period)
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
* - frame received notifications for each receive buffer.
|
||||
*/
|
||||
#define NTF_PRIMARY_POOL_SIZE \
|
||||
(NRF_802154_RX_BUFFERS + NRF_802154_RSCH_DLY_TS_OP_DRX_SLOTS + 3)
|
||||
(NRF_802154_RX_BUFFERS + NRF_802154_RSCH_DLY_TS_SLOTS + 1)
|
||||
|
||||
/**
|
||||
* The implementation uses 8-bit integers to address slots with the oldest bit
|
||||
|
@ -85,10 +85,8 @@
|
|||
#endif
|
||||
|
||||
/** @brief Size of pool of slots for notifications that can be ignored.
|
||||
*
|
||||
* The pool needs to contain slots for failed receptions. Its size is chosen arbitrarily.
|
||||
*/
|
||||
#define NTF_SECONDARY_POOL_SIZE 4
|
||||
#define NTF_SECONDARY_POOL_SIZE NRF_802154_MAX_DISREGARDABLE_NOTIFICATIONS
|
||||
|
||||
/** @brief Bitmask that represents slot pool used.
|
||||
*/
|
||||
|
@ -205,6 +203,10 @@ static nrf_802154_queue_entry_t m_notifications_queue_memory[NTF_QUEUE_SIZE];
|
|||
|
||||
static volatile nrf_802154_mcu_critical_state_t m_mcu_cs;
|
||||
|
||||
#if (NRF_802154_MAX_PENDING_NOTIFICATIONS + 1) != (NTF_QUEUE_SIZE)
|
||||
#error "Mismatching sizes of notification queue and maximum number of pending notifications"
|
||||
#endif
|
||||
|
||||
/** @brief Allocate notification slot from the specified pool.
|
||||
*
|
||||
* @param[inout] p_pool Pointer to a pool of slots.
|
||||
|
|
|
@ -459,6 +459,12 @@ typedef enum
|
|||
SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PAN_COORD_GET =
|
||||
SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 65,
|
||||
|
||||
/**
|
||||
* Vendor property for nrf_802154_security_key_remove_all serialization.
|
||||
*/
|
||||
SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE_ALL =
|
||||
SPINEL_PROP_VENDOR_NORDIC_NRF_802154__BEGIN + 66,
|
||||
|
||||
} spinel_prop_vendor_key_t;
|
||||
|
||||
/**
|
||||
|
@ -1334,6 +1340,11 @@ typedef enum
|
|||
&(key_id).p_key_id, \
|
||||
&(key_id_size)
|
||||
|
||||
/**
|
||||
* @brief Spinel data type description for nrf_802154_security_key_remove_all.
|
||||
*/
|
||||
#define SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_REMOVE_ALL SPINEL_DATATYPE_NULL_S
|
||||
|
||||
/**
|
||||
* @brief Spinel data type description for return type for security commands.
|
||||
*/
|
||||
|
|
|
@ -1892,7 +1892,7 @@ bail:
|
|||
nrf_802154_security_error_t nrf_802154_security_key_remove(nrf_802154_key_id_t * p_id)
|
||||
{
|
||||
nrf_802154_ser_err_t res;
|
||||
nrf_802154_security_error_t err = NRF_802154_SECURITY_ERROR_NONE;;
|
||||
nrf_802154_security_error_t err = NRF_802154_SECURITY_ERROR_NONE;
|
||||
|
||||
SERIALIZATION_ERROR_INIT(error);
|
||||
|
||||
|
@ -1917,6 +1917,32 @@ bail:
|
|||
return err;
|
||||
}
|
||||
|
||||
void nrf_802154_security_key_remove_all(void)
|
||||
{
|
||||
nrf_802154_ser_err_t res;
|
||||
|
||||
SERIALIZATION_ERROR_INIT(error);
|
||||
|
||||
NRF_802154_SPINEL_LOG_BANNER_CALLING();
|
||||
|
||||
nrf_802154_spinel_response_notifier_lock_before_request(SPINEL_PROP_LAST_STATUS);
|
||||
|
||||
res = nrf_802154_spinel_send_cmd_prop_value_set(
|
||||
SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE_ALL,
|
||||
SPINEL_DATATYPE_NRF_802154_SECURITY_KEY_REMOVE_ALL,
|
||||
NULL);
|
||||
|
||||
SERIALIZATION_ERROR_CHECK(res, error, bail);
|
||||
|
||||
res = status_ok_await(CONFIG_NRF_802154_SER_DEFAULT_RESPONSE_TIMEOUT);
|
||||
SERIALIZATION_ERROR_CHECK(res, error, bail);
|
||||
|
||||
bail:
|
||||
SERIALIZATION_ERROR_RAISE_IF_FAILED(error);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void nrf_802154_csl_writer_period_set(uint16_t period)
|
||||
{
|
||||
nrf_802154_ser_err_t res;
|
||||
|
|
|
@ -626,6 +626,8 @@ nrf_802154_ser_err_t nrf_802154_spinel_decode_cmd_prop_value_is(
|
|||
// fall through
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE:
|
||||
// fall through
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE_ALL:
|
||||
// fall through
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PENDING_BIT_FOR_ADDR_SET:
|
||||
// fall through
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_PENDING_BIT_FOR_ADDR_CLEAR:
|
||||
|
|
|
@ -1769,6 +1769,25 @@ static nrf_802154_ser_err_t spinel_decode_prop_nrf_802154_security_key_remove(
|
|||
err);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode and dispatch SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE_ALL.
|
||||
*
|
||||
* @param[in] p_property_data Pointer to a buffer that contains data to be decoded.
|
||||
* @param[in] property_data_len Size of the @ref p_property_data buffer.
|
||||
*
|
||||
*/
|
||||
static nrf_802154_ser_err_t spinel_decode_prop_nrf_802154_security_key_remove_all(
|
||||
const void * p_property_data,
|
||||
size_t property_data_len)
|
||||
{
|
||||
(void)p_property_data;
|
||||
(void)property_data_len;
|
||||
|
||||
nrf_802154_security_key_remove_all();
|
||||
|
||||
return nrf_802154_spinel_send_prop_last_status_is(SPINEL_STATUS_OK);
|
||||
}
|
||||
|
||||
#if NRF_802154_DELAYED_TRX_ENABLED && NRF_802154_IE_WRITER_ENABLED
|
||||
|
||||
/**
|
||||
|
@ -2062,6 +2081,10 @@ nrf_802154_ser_err_t nrf_802154_spinel_decode_cmd_prop_value_set(const void * p_
|
|||
return spinel_decode_prop_nrf_802154_security_key_remove(p_property_data,
|
||||
property_data_len);
|
||||
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_SECURITY_KEY_REMOVE_ALL:
|
||||
return spinel_decode_prop_nrf_802154_security_key_remove_all(p_property_data,
|
||||
property_data_len);
|
||||
|
||||
#if NRF_802154_DELAYED_TRX_ENABLED && NRF_802154_IE_WRITER_ENABLED
|
||||
case SPINEL_PROP_VENDOR_NORDIC_NRF_802154_CSL_WRITER_PERIOD_SET:
|
||||
return spinel_decode_prop_nrf_802154_csl_writer_period_set(p_property_data,
|
||||
|
|
Loading…
Reference in New Issue