From 1c1a583d780abb8f736cb0b7fc3e27ba8918caf8 Mon Sep 17 00:00:00 2001 From: Gatien Chapon <43855183+chapongatien@users.noreply.github.com> Date: Tue, 12 Apr 2022 20:56:23 +0200 Subject: [PATCH] [spinel] map `kMaxSpinelFrame` to `SPINEL_FRAME_MAX_SIZE` (#7580) The current implementation does not differentiate the max spinel frame size that is used to pack a spinel command and the radio spinel RX frame buffer size which could contain multiple frames. In radio_spinel_impl.hpp, only one spinel frame can be written when calling function `SendCommand` or `SendReset`. Therefore the aim of this commit is to allocate, in such a context, only a buffer of one frame instead of a buffer that could contain multiple frames. Signed-off-by: Gatien Chapon --- src/lib/spinel/radio_spinel.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/spinel/radio_spinel.hpp b/src/lib/spinel/radio_spinel.hpp index 7953a2b8d..c047dc894 100644 --- a/src/lib/spinel/radio_spinel.hpp +++ b/src/lib/spinel/radio_spinel.hpp @@ -858,7 +858,7 @@ public: private: enum { - kMaxSpinelFrame = SpinelInterface::kMaxFrameSize, + kMaxSpinelFrame = SPINEL_FRAME_MAX_SIZE, kMaxWaitTime = 2000, ///< Max time to wait for response in milliseconds. kVersionStringSize = 128, ///< Max size of version string. kCapsBufferSize = 100, ///< Max buffer size used to store `SPINEL_PROP_CAPS` value.