Skip to content

Commit 2b6d662

Browse files
author
Antti Kauppila
committed
LoRa: reset_mac_parameters put to correct place
1 parent 845532f commit 2b6d662

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

features/lorawan/lorastack/mac/LoRaMac.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,9 +1881,6 @@ lorawan_status_t LoRaMac::mlme_request( loramac_mlme_req_t *mlmeRequest )
18811881
if (LORAMAC_IDLE != _params.mac_state) {
18821882
return LORAWAN_STATUS_BUSY;
18831883
}
1884-
if (MLME_JOIN == mlmeRequest->type) {
1885-
reset_mac_parameters();
1886-
}
18871884

18881885
mlme.reset_confirmation();
18891886

@@ -1916,6 +1913,9 @@ lorawan_status_t LoRaMac::mlme_request( loramac_mlme_req_t *mlmeRequest )
19161913
}
19171914
// Reset variable JoinRequestTrials
19181915
_params.join_request_trial_counter = 0;
1916+
1917+
reset_mac_parameters();
1918+
19191919
_params.sys_params.channel_data_rate =
19201920
lora_phy->get_alternate_DR(_params.join_request_trial_counter + 1);
19211921

0 commit comments

Comments
 (0)