fix procedure after T300 expiry

This commit is contained in:
francescomani
2024-03-19 09:55:05 +01:00
parent 122a5ce9b8
commit 1fa6be2a3d
7 changed files with 22 additions and 24 deletions
-1
View File
@@ -1358,7 +1358,6 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
NR_UE_MAC_reset_cause_t cause)
{
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
switch (cause) {
case GO_TO_IDLE:
reset_ra(&mac->ra);
+6 -6
View File
@@ -86,26 +86,26 @@ void init_RA(NR_UE_MAC_INST_t *mac,
if (rach_ConfigDedicated) {
if (rach_ConfigDedicated->cfra){
LOG_I(MAC, "Initialization of 2-step contention-free random access procedure\n");
LOG_I(NR_MAC, "Initialization of 2-step contention-free random access procedure\n");
prach_resources->RA_TYPE = RA_2STEP;
ra->cfra = 1;
} else if (rach_ConfigDedicated->ext1){
if (rach_ConfigDedicated->ext1->cfra_TwoStep_r16){
LOG_I(MAC, "Setting RA type to 2-step...\n");
LOG_I(NR_MAC, "Setting RA type to 2-step...\n");
prach_resources->RA_TYPE = RA_2STEP;
ra->cfra = 1;
} else {
LOG_E(MAC, "Config not handled\n");
LOG_E(NR_MAC, "Config not handled\n");
}
} else {
LOG_E(MAC, "Config not handled\n");
LOG_E(NR_MAC, "Config not handled\n");
}
} else if (nr_rach_ConfigCommon){
LOG_I(MAC, "Initialization of 4-step contention-based random access procedure\n");
LOG_I(NR_MAC, "Initialization of 4-step contention-based random access procedure\n");
prach_resources->RA_TYPE = RA_4STEP;
ra->cfra = 0;
} else {
LOG_E(MAC, "Config not handled\n");
LOG_E(NR_MAC, "Config not handled\n");
}
switch (rach_ConfigGeneric->powerRampingStep){ // in dB
-2
View File
@@ -41,10 +41,8 @@
#include <asn_application.h>
#include "RRC/NR/nr_rrc_defs.h"
#include "RRC/NR/nr_rrc_config.h"
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
* output into the chosen string buffer.
+5 -2
View File
@@ -616,7 +616,7 @@ static void nr_rrc_handle_msg3_indication(NR_UE_RRC_INST_t *rrc, rnti_t rnti)
{
NR_UE_Timers_Constants_t *tac = &rrc->timers_and_constants;
switch (rrc->ra_trigger) {
case INITIAL_ACCESS_FROM_RRC_IDLE:
case RRC_CONNECTION_SETUP:
// After SIB1 is received, prepare RRCConnectionRequest
rrc->rnti = rnti;
// start timer T300
@@ -744,7 +744,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
LOG_A(NR_RRC, "SIB1 decoded\n");
nr_timer_start(&SI_info->sib1_timer);
if (rrc->nrRrcState == RRC_STATE_IDLE_NR) {
rrc->ra_trigger = INITIAL_ACCESS_FROM_RRC_IDLE;
rrc->ra_trigger = RRC_CONNECTION_SETUP;
// preparing RRC setup request payload in advance
nr_rrc_ue_prepare_RRCSetupRequest(rrc);
}
@@ -2221,6 +2221,9 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
void handle_t300_expiry(NR_UE_RRC_INST_t *rrc)
{
rrc->ra_trigger = RRC_CONNECTION_SETUP;
nr_rrc_ue_prepare_RRCSetupRequest(rrc);
// reset MAC, release the MAC configuration
NR_UE_MAC_reset_cause_t cause = T300_EXPIRY;
nr_rrc_mac_config_req_reset(rrc->ue_id, cause);
+1 -1
View File
@@ -105,7 +105,7 @@ typedef enum requested_SI_List_e {
// 3GPP TS 38.300 Section 9.2.6
typedef enum RA_trigger_e {
RA_NOT_RUNNING,
INITIAL_ACCESS_FROM_RRC_IDLE,
RRC_CONNECTION_SETUP,
RRC_CONNECTION_REESTABLISHMENT,
DURING_HANDOVER,
NON_SYNCHRONISED,