diff --git a/include/openthread/link.h b/include/openthread/link.h index e99b662a1..d1ce47404 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -441,18 +441,6 @@ OTAPI void OTCALL otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPerio */ OTAPI otShortAddress OTCALL otLinkGetShortAddress(otInstance *aInstance); -/** - * Set the Short Address for address filtering. - * - * @param[in] aInstance A pointer to an OpenThread instance. - * @param[in] aShortAddress The IEEE 802.15.4 Short Address. - * - * @retval OT_ERROR_NONE If successful. - * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * - */ -OTAPI otError OTCALL otLinkSetShortAddress(otInstance *aInstance, uint16_t aShortAddress); - /** * This function gets the address mode of MAC filter. * diff --git a/include/openthread/link_raw.h b/include/openthread/link_raw.h index b519df928..7a3c306e1 100644 --- a/include/openthread/link_raw.h +++ b/include/openthread/link_raw.h @@ -97,6 +97,18 @@ bool otLinkRawGetPromiscuous(otInstance *aInstance); */ otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable); +/** + * Set the Short Address for address filtering. + * + * @param[in] aInstance A pointer to an OpenThread instance. + * @param[in] aShortAddress The IEEE 802.15.4 Short Address. + * + * @retval OT_ERROR_NONE If successful. + * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. + * + */ +otError OTCALL otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress); + /** * Transition the radio from Receive to Sleep. * Turn off the radio. diff --git a/src/core/api/link_raw_api.cpp b/src/core/api/link_raw_api.cpp index 431320d5c..3c0c86fb2 100644 --- a/src/core/api/link_raw_api.cpp +++ b/src/core/api/link_raw_api.cpp @@ -59,7 +59,7 @@ bool otLinkRawIsEnabled(otInstance *aInstance) return static_cast(aInstance)->GetLinkRaw().IsEnabled(); } -otError otLinkSetShortAddress(otInstance *aInstance, uint16_t aShortAddress) +otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress) { return static_cast(aInstance)->GetLinkRaw().SetShortAddress(aShortAddress); } diff --git a/src/ncp/ncp_base_radio.cpp b/src/ncp/ncp_base_radio.cpp index 5b38f730f..2e6e50a88 100644 --- a/src/ncp/ncp_base_radio.cpp +++ b/src/ncp/ncp_base_radio.cpp @@ -335,7 +335,7 @@ template <> otError NcpBase::HandlePropertySet(void) SuccessOrExit(error = mDecoder.ReadUint16(shortAddress)); - error = otLinkSetShortAddress(mInstance, shortAddress); + error = otLinkRawSetShortAddress(mInstance, shortAddress); exit: return error;