Skip to content

Commit b3c97b0

Browse files
maciejbaczmanskirlubos
authored andcommitted
[nrf fromtree] net: openthread: upmerge to 7761b81
additionaly, implement `otPlatRadioResetCsl` functionality Signed-off-by: Maciej Baczmanski <[email protected]> (cherry picked from commit 0f1747e)
1 parent 93c590c commit b3c97b0

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

drivers/ieee802154/ieee802154_nrf5.c

+6
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,12 @@ static int nrf5_configure(const struct device *dev,
901901
uint8_t element_id;
902902
bool valid_vendor_specific_ie = false;
903903

904+
if (config->ack_ie.purge_ie) {
905+
nrf_802154_ack_data_remove_all(false, NRF_802154_ACK_DATA_IE);
906+
nrf_802154_ack_data_remove_all(true, NRF_802154_ACK_DATA_IE);
907+
break;
908+
}
909+
904910
if (config->ack_ie.short_addr == IEEE802154_BROADCAST_ADDRESS ||
905911
config->ack_ie.ext_addr == NULL) {
906912
return -ENOTSUP;

include/zephyr/net/ieee802154_radio.h

+9
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,15 @@ struct ieee802154_config {
12411241
* in CPU byte order
12421242
*/
12431243
uint16_t short_addr;
1244+
1245+
/**
1246+
* Flag for purging enh ACK header IEs.
1247+
* When flag is set to true, driver should remove all existing
1248+
* header IEs, and all other entries in config should be ignored.
1249+
* This means that purging current header IEs and
1250+
* configuring a new one in the same call is not allowed.
1251+
*/
1252+
bool purge_ie;
12441253
} ack_ie;
12451254
};
12461255
};

modules/openthread/platform/radio.c

+16
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,22 @@ otError otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, otShort
12941294
return result ? OT_ERROR_FAILED : OT_ERROR_NONE;
12951295
}
12961296

1297+
otError otPlatRadioResetCsl(otInstance *aInstance)
1298+
{
1299+
struct ieee802154_config config = { 0 };
1300+
int result;
1301+
1302+
result = radio_api->configure(radio_dev, IEEE802154_CONFIG_CSL_PERIOD, &config);
1303+
if (result) {
1304+
return OT_ERROR_FAILED;
1305+
}
1306+
1307+
config.ack_ie.purge_ie = true;
1308+
result = radio_api->configure(radio_dev, IEEE802154_CONFIG_ENH_ACK_HEADER_IE, &config);
1309+
1310+
return result ? OT_ERROR_FAILED : OT_ERROR_NONE;
1311+
}
1312+
12971313
void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTime)
12981314
{
12991315
ARG_UNUSED(aInstance);

west.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ manifest:
301301
revision: 214f9fc1539f8e5937c0474cb6ee29b6dcb2d4b8
302302
path: modules/lib/open-amp
303303
- name: openthread
304-
revision: 00076aff3ae571db7c90509ec9dc293457098c35
304+
revision: 7761b81d23b10b3d5ee21b8504c67535cde10896
305305
path: modules/lib/openthread
306306
- name: percepio
307307
path: modules/debug/percepio

0 commit comments

Comments
 (0)