Skip to content

Commit b945d7a

Browse files
edmontcarlescufi
authored andcommitted
openthread: align platform code to ARM PSA changes
Align `otPlatRadioSetMacKey` with latest upstream changes. Signed-off-by: Eduardo Montoya <[email protected]>
1 parent 3884931 commit b945d7a

File tree

1 file changed

+8
-8
lines changed
  • subsys/net/lib/openthread/platform

1 file changed

+8
-8
lines changed

subsys/net/lib/openthread/platform/radio.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,33 +1005,33 @@ uint64_t otPlatRadioGetNow(otInstance *aInstance)
10051005
#endif
10061006

10071007
#if defined(CONFIG_IEEE802154_2015)
1008-
void otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode,
1009-
uint8_t aKeyId, const otMacKey *aPrevKey,
1010-
const otMacKey *aCurrKey, const otMacKey *aNextKey)
1008+
void otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId,
1009+
const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey,
1010+
const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType)
10111011
{
10121012
ARG_UNUSED(aInstance);
1013-
__ASSERT_NO_MSG(aPrevKey != NULL && aCurrKey != NULL &&
1014-
aNextKey != NULL);
1013+
__ASSERT_NO_MSG(aKeyType == OT_KEY_TYPE_LITERAL_KEY);
1014+
__ASSERT_NO_MSG(aPrevKey != NULL && aCurrKey != NULL && aNextKey != NULL);
10151015

10161016
uint8_t key_id_mode = aKeyIdMode >> 3;
10171017

10181018
struct ieee802154_key keys[] = {
10191019
{
10201020
.key_id_mode = key_id_mode,
10211021
.key_index = aKeyId == 1 ? 0x80 : aKeyId - 1,
1022-
.key_value = (uint8_t *)aPrevKey->m8,
1022+
.key_value = (uint8_t *)aPrevKey->mKeyMaterial.mKey.m8,
10231023
.frame_counter_per_key = false,
10241024
},
10251025
{
10261026
.key_id_mode = key_id_mode,
10271027
.key_index = aKeyId,
1028-
.key_value = (uint8_t *)aCurrKey->m8,
1028+
.key_value = (uint8_t *)aCurrKey->mKeyMaterial.mKey.m8,
10291029
.frame_counter_per_key = false,
10301030
},
10311031
{
10321032
.key_id_mode = key_id_mode,
10331033
.key_index = aKeyId == 0x80 ? 1 : aKeyId + 1,
1034-
.key_value = (uint8_t *)aNextKey->m8,
1034+
.key_value = (uint8_t *)aNextKey->mKeyMaterial.mKey.m8,
10351035
.frame_counter_per_key = false,
10361036
},
10371037
{

0 commit comments

Comments
 (0)