[efr32] Radio: Use assert to detect issues when interacting with RAIL (#4482)

This commit is contained in:
Diego Ismirlian
2020-01-17 10:59:34 -08:00
committed by Jonathan Hui
parent f947eefa51
commit c4f32fd907
+4 -4
View File
@@ -698,11 +698,11 @@ static void processNextRxPacket(otInstance *aInstance)
length = packetInfo.packetBytes + 1;
// check the length in recv packet info structure
otEXPECT(length == packetInfo.firstPortionData[0]);
// check the length in recv packet info structure; RAIL should take care of this.
assert(length == packetInfo.firstPortionData[0]);
// check the length validity of recv packet
otEXPECT(length >= IEEE802154_MIN_LENGTH && length <= IEEE802154_MAX_LENGTH);
// check the length validity of recv packet; RAIL should take care of this.
assert(length >= IEEE802154_MIN_LENGTH && length <= IEEE802154_MAX_LENGTH);
otLogInfoPlat("Received data:%d", length);