From 0508f19c090b50aeebd598a66eff5c3300b3e8c3 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 8 Aug 2019 08:32:05 -0700 Subject: [PATCH] [config] fix config option OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER (#4068) This commit fixes the wrong name used in `npc_uart.cpp`. Note that this config parameter is part of `configure.ac` definitions. --- src/ncp/ncp_uart.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ncp/ncp_uart.cpp b/src/ncp/ncp_uart.cpp index ecf6ace2a..8c70c14b8 100644 --- a/src/ncp/ncp_uart.cpp +++ b/src/ncp/ncp_uart.cpp @@ -91,9 +91,9 @@ NcpUart::NcpUart(Instance *aInstance) , mRxBuffer() , mUartSendImmediate(false) , mUartSendTask(*aInstance, EncodeAndSendToUart, this) -#if OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER , mTxFrameBufferEncrypterReader(mTxFrameBuffer) -#endif // OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#endif // OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER { mTxFrameBuffer.SetFrameAddedCallback(HandleFrameAddedToNcpBuffer, this); @@ -133,11 +133,11 @@ void NcpUart::EncodeAndSendToUart(void) { uint16_t len; bool prevHostPowerState; -#if OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER NcpFrameBufferEncrypterReader &txFrameBuffer = mTxFrameBufferEncrypterReader; #else NcpFrameBuffer &txFrameBuffer = mTxFrameBuffer; -#endif // OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#endif // OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER while (!txFrameBuffer.IsEmpty() || (mState == kFinalizingFrame)) { @@ -257,7 +257,7 @@ void NcpUart::HandleFrame(otError aError) if (aError == OT_ERROR_NONE) { -#if OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER size_t dataLen = bufLength; if (SpinelEncrypter::DecryptInbound(buf, kRxBufferSize, &dataLen)) { @@ -265,7 +265,7 @@ void NcpUart::HandleFrame(otError aError) } #else super_t::HandleReceive(buf, bufLength); -#endif // OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#endif // OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER } else { @@ -308,7 +308,7 @@ void NcpUart::HandleError(otError aError, uint8_t *aBuf, uint16_t aBufLength) otNcpStreamWrite(0, reinterpret_cast(hexbuf + 1), static_cast(strlen(hexbuf) - 1)); } -#if OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER NcpUart::NcpFrameBufferEncrypterReader::NcpFrameBufferEncrypterReader(NcpFrameBuffer &aTxFrameBuffer) : mTxFrameBuffer(aTxFrameBuffer) @@ -373,7 +373,7 @@ void NcpUart::NcpFrameBufferEncrypterReader::Reset(void) mDataBufferReadIndex = 0; } -#endif // OPENTHREAD_CONFIG_NCP_SPI_ENABLENEL_ENCRYPTER +#endif // OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER } // namespace Ncp } // namespace ot