Skip to content

Commit

Permalink
Issue #1318 - Fixed where LastDownFCnt update takes place for LoRaWAN…
Browse files Browse the repository at this point in the history
… 1.1.x
  • Loading branch information
mluis1 committed Jul 19, 2022
1 parent 9218d00 commit e71e80a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mac/LoRaMacCrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,15 +682,12 @@ static LoRaMacCryptoStatus_t GetLastFcntDown( FCntIdentifier_t fCntID, uint32_t*
{
case N_FCNT_DOWN:
*lastDown = CryptoNvm->FCntList.NFCntDown;
CryptoNvm->LastDownFCnt = CryptoNvm->FCntList.NFCntDown;
break;
case A_FCNT_DOWN:
*lastDown = CryptoNvm->FCntList.AFCntDown;
CryptoNvm->LastDownFCnt = CryptoNvm->FCntList.AFCntDown;
break;
case FCNT_DOWN:
*lastDown = CryptoNvm->FCntList.FCntDown;
CryptoNvm->LastDownFCnt = CryptoNvm->FCntList.FCntDown;
break;
#if ( LORAMAC_MAX_MC_CTX > 0 )
case MC_FCNT_DOWN_0:
Expand Down Expand Up @@ -759,12 +756,15 @@ static void UpdateFCntDown( FCntIdentifier_t fCntID, uint32_t currentDown )
{
case N_FCNT_DOWN:
CryptoNvm->FCntList.NFCntDown = currentDown;
CryptoNvm->LastDownFCnt = currentDown;
break;
case A_FCNT_DOWN:
CryptoNvm->FCntList.AFCntDown = currentDown;
CryptoNvm->LastDownFCnt = currentDown;
break;
case FCNT_DOWN:
CryptoNvm->FCntList.FCntDown = currentDown;
CryptoNvm->LastDownFCnt = currentDown;
break;
#if ( LORAMAC_MAX_MC_CTX > 0 )
case MC_FCNT_DOWN_0:
Expand Down

0 comments on commit e71e80a

Please sign in to comment.