diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index 3f5a9f725..f58606828 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -2429,7 +2429,7 @@ void Mac::UpdateCsl(void) uint8_t channel = GetCslChannel() ? GetCslChannel() : mRadioChannel; if (mLinks.UpdateCsl(period, channel, Get().GetParent().GetRloc16(), - &Get().GetParent().GetExtAddress())) + Get().GetParent().GetExtAddress())) { if (Get().IsChild()) { diff --git a/src/core/mac/mac_links.hpp b/src/core/mac/mac_links.hpp index 8de50f392..592d48e0b 100644 --- a/src/core/mac/mac_links.hpp +++ b/src/core/mac/mac_links.hpp @@ -471,7 +471,7 @@ public: * @retval TRUE if CSL Period or CSL Channel changed. * @retval FALSE if CSL Period and CSL Channel did not change. */ - bool UpdateCsl(uint16_t aPeriod, uint8_t aChannel, otShortAddress aShortAddr, const otExtAddress *aExtAddr) + bool UpdateCsl(uint16_t aPeriod, uint8_t aChannel, ShortAddress aShortAddr, const ExtAddress &aExtAddr) { bool retval = false; diff --git a/src/core/mac/sub_mac.hpp b/src/core/mac/sub_mac.hpp index 2a472d5f5..b0cf14566 100644 --- a/src/core/mac/sub_mac.hpp +++ b/src/core/mac/sub_mac.hpp @@ -386,7 +386,7 @@ public: * @retval TRUE if CSL Period or CSL Channel changed. * @retval FALSE if CSL Period and CSL Channel did not change. */ - bool UpdateCsl(uint16_t aPeriod, uint8_t aChannel, otShortAddress aShortAddr, const otExtAddress *aExtAddr); + bool UpdateCsl(uint16_t aPeriod, uint8_t aChannel, ShortAddress aShortAddr, const ExtAddress &aExtAddr); /** * Returns parent CSL accuracy (clock accuracy and uncertainty). diff --git a/src/core/mac/sub_mac_csl_receiver.cpp b/src/core/mac/sub_mac_csl_receiver.cpp index bef89c579..1b75e3af6 100644 --- a/src/core/mac/sub_mac_csl_receiver.cpp +++ b/src/core/mac/sub_mac_csl_receiver.cpp @@ -107,7 +107,7 @@ exit: return; } -bool SubMac::UpdateCsl(uint16_t aPeriod, uint8_t aChannel, otShortAddress aShortAddr, const otExtAddress *aExtAddr) +bool SubMac::UpdateCsl(uint16_t aPeriod, uint8_t aChannel, ShortAddress aShortAddr, const ExtAddress &aExtAddr) { bool diffPeriod = aPeriod != mCslPeriod; bool diffChannel = aChannel != mCslChannel; diff --git a/src/core/radio/radio.hpp b/src/core/radio/radio.hpp index 321ac4b12..4d35a3f18 100644 --- a/src/core/radio/radio.hpp +++ b/src/core/radio/radio.hpp @@ -540,7 +540,7 @@ public: * @retval kErrorFailed Other platform specific errors. * @retval kErrorNone Successfully enabled or disabled CSL. */ - Error EnableCsl(uint32_t aCslPeriod, otShortAddress aShortAddr, const otExtAddress *aExtAddr); + Error EnableCsl(uint32_t aCslPeriod, Mac::ShortAddress aShortAddr, const Mac::ExtAddress &aExtAddr); /** * Resets CSL receiver in radio. @@ -980,9 +980,9 @@ inline void Radio::UpdateCslSampleTime(uint32_t aCslSampleTime) otPlatRadioUpdateCslSampleTime(GetInstancePtr(), aCslSampleTime); } -inline Error Radio::EnableCsl(uint32_t aCslPeriod, otShortAddress aShortAddr, const otExtAddress *aExtAddr) +inline Error Radio::EnableCsl(uint32_t aCslPeriod, Mac::ShortAddress aShortAddr, const Mac::ExtAddress &aExtAddr) { - return otPlatRadioEnableCsl(GetInstancePtr(), aCslPeriod, aShortAddr, aExtAddr); + return otPlatRadioEnableCsl(GetInstancePtr(), aCslPeriod, aShortAddr, &aExtAddr); } inline Error Radio::ResetCsl(void) { return otPlatRadioResetCsl(GetInstancePtr()); } @@ -1087,7 +1087,7 @@ inline Error Radio::ReceiveAt(uint8_t, uint32_t, uint32_t) { return kErrorNone; #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE inline void Radio::UpdateCslSampleTime(uint32_t) {} -inline Error Radio::EnableCsl(uint32_t, otShortAddress aShortAddr, const otExtAddress *) +inline Error Radio::EnableCsl(uint32_t, Mac::ShortAddress aShortAddr, const Mac::ExtAddress &) { return kErrorNotImplemented; }