net: openthread: upmerge to 7761b81

additionaly, implement `otPlatRadioResetCsl` functionality

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
This commit is contained in:
Maciej Baczmanski 2024-01-23 14:56:03 +01:00 committed by Carles Cufí
commit 0f1747e4e7
4 changed files with 32 additions and 1 deletions

View file

@ -901,6 +901,12 @@ static int nrf5_configure(const struct device *dev,
uint8_t element_id;
bool valid_vendor_specific_ie = false;
if (config->ack_ie.purge_ie) {
nrf_802154_ack_data_remove_all(false, NRF_802154_ACK_DATA_IE);
nrf_802154_ack_data_remove_all(true, NRF_802154_ACK_DATA_IE);
break;
}
if (config->ack_ie.short_addr == IEEE802154_BROADCAST_ADDRESS ||
config->ack_ie.ext_addr == NULL) {
return -ENOTSUP;

View file

@ -1241,6 +1241,15 @@ struct ieee802154_config {
* in CPU byte order
*/
uint16_t short_addr;
/**
* Flag for purging enh ACK header IEs.
* When flag is set to true, driver should remove all existing
* header IEs, and all other entries in config should be ignored.
* This means that purging current header IEs and
* configuring a new one in the same call is not allowed.
*/
bool purge_ie;
} ack_ie;
};
};

View file

@ -1296,6 +1296,22 @@ otError otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, otShort
return result ? OT_ERROR_FAILED : OT_ERROR_NONE;
}
otError otPlatRadioResetCsl(otInstance *aInstance)
{
struct ieee802154_config config = { 0 };
int result;
result = radio_api->configure(radio_dev, IEEE802154_CONFIG_CSL_PERIOD, &config);
if (result) {
return OT_ERROR_FAILED;
}
config.ack_ie.purge_ie = true;
result = radio_api->configure(radio_dev, IEEE802154_CONFIG_ENH_ACK_HEADER_IE, &config);
return result ? OT_ERROR_FAILED : OT_ERROR_NONE;
}
void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTime)
{
ARG_UNUSED(aInstance);

View file

@ -301,7 +301,7 @@ manifest:
revision: da78aea63159771956fe0c9263f2e6985b66e9d5
path: modules/lib/open-amp
- name: openthread
revision: 00076aff3ae571db7c90509ec9dc293457098c35
revision: 7761b81d23b10b3d5ee21b8504c67535cde10896
path: modules/lib/openthread
- name: percepio
path: modules/debug/percepio