diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index d1318993c..302277d67 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -2071,6 +2071,11 @@ exit: return error; } +template <> otError NcpBase::HandlePropertyGet(void) +{ + return mEncoder.WriteInt8(otPlatRadioGetRssi(mInstance)); +} + template <> otError NcpBase::HandlePropertyGet(void) { return mEncoder.WriteInt8(otPlatRadioGetReceiveSensitivity(mInstance)); diff --git a/src/ncp/ncp_base_dispatcher.cpp b/src/ncp/ncp_base_dispatcher.cpp index 5d0718359..d7e0e7d08 100644 --- a/src/ncp/ncp_base_dispatcher.cpp +++ b/src/ncp/ncp_base_dispatcher.cpp @@ -80,6 +80,9 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey) case SPINEL_PROP_PHY_CHAN: handler = &NcpBase::HandlePropertyGet; break; + case SPINEL_PROP_PHY_RSSI: + handler = &NcpBase::HandlePropertyGet; + break; case SPINEL_PROP_PHY_RX_SENSITIVITY: handler = &NcpBase::HandlePropertyGet; break; @@ -171,9 +174,6 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey) case SPINEL_PROP_PHY_FREQ: handler = &NcpBase::HandlePropertyGet; break; - case SPINEL_PROP_PHY_RSSI: - handler = &NcpBase::HandlePropertyGet; - break; case SPINEL_PROP_NET_IF_UP: handler = &NcpBase::HandlePropertyGet; break; diff --git a/src/ncp/ncp_base_mtd.cpp b/src/ncp/ncp_base_mtd.cpp index 9263d609d..9cedc3401 100644 --- a/src/ncp/ncp_base_mtd.cpp +++ b/src/ncp/ncp_base_mtd.cpp @@ -221,11 +221,6 @@ exit: return error; } -template <> otError NcpBase::HandlePropertyGet(void) -{ - return mEncoder.WriteInt8(otPlatRadioGetRssi(mInstance)); -} - otError NcpBase::CommandHandler_NET_SAVE(uint8_t aHeader) { return PrepareLastStatusResponse(aHeader, SPINEL_STATUS_UNIMPLEMENTED);