Skip to content

Commit c47b841

Browse files
committed
Add new comments
1 parent 35f6998 commit c47b841

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,10 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
13681368
( DownLinkCounter != 0 ) )
13691369
{
13701370
// Duplicated confirmed downlink. Skip indication.
1371+
// In this case, the MAC layer shall accept the MAC commands
1372+
// which are included in the downlink retransmission.
1373+
// It should not provide the same frame to the application
1374+
// layer again.
13711375
skipIndication = true;
13721376
}
13731377
}
@@ -1404,6 +1408,7 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
14041408
MacCommandsBufferIndex = 0;
14051409
}
14061410

1411+
// Process payload and MAC commands
14071412
if( ( ( size - 4 ) - appPayloadStartIndex ) > 0 )
14081413
{
14091414
port = payload[appPayloadStartIndex++];
@@ -1413,6 +1418,7 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
14131418

14141419
if( port == 0 )
14151420
{
1421+
// Only allow frames which do not have fOpts
14161422
if( fCtrl.Bits.FOptsLen == 0 )
14171423
{
14181424
LoRaMacPayloadDecrypt( payload + appPayloadStartIndex,

0 commit comments

Comments
 (0)