Commit 726cebaa authored by luis_pereira87's avatar luis_pereira87

Create function to enable nr_rrc_processing_timer

parent bc7a4046
...@@ -401,7 +401,7 @@ bool nr_rrc_disabled_mac_scheduling(const module_id_t Mod_instP, ...@@ -401,7 +401,7 @@ bool nr_rrc_disabled_mac_scheduling(const module_id_t Mod_instP,
struct rrc_gNB_ue_context_s *ue_context_p = NULL; struct rrc_gNB_ue_context_s *ue_context_p = NULL;
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP); ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP);
if (ue_context_p != NULL) { if (ue_context_p != NULL) {
if(ue_context_p->ue_context.rrc_processing_timer > 0) { if(ue_context_p->ue_context.nr_rrc_processing_timer > 0) {
ret = true; ret = true;
} }
} else { } else {
......
...@@ -376,8 +376,8 @@ typedef struct gNB_RRC_UE_s { ...@@ -376,8 +376,8 @@ typedef struct gNB_RRC_UE_s {
//GTPV1 F1-U TUNNELS //GTPV1 F1-U TUNNELS
uint32_t incoming_teid[S1AP_MAX_E_RAB]; uint32_t incoming_teid[S1AP_MAX_E_RAB];
uint32_t rrc_processing_timer; uint32_t nr_rrc_processing_timer;
uint32_t rrc_processing_delay; uint32_t nr_rrc_processing_delay;
uint32_t ul_failure_timer; uint32_t ul_failure_timer;
uint32_t ue_release_timer; uint32_t ue_release_timer;
uint32_t ue_release_timer_thres; uint32_t ue_release_timer_thres;
......
...@@ -140,6 +140,13 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) { ...@@ -140,6 +140,13 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1; RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1;
} }
void enable_nr_rrc_processing_timer(rrc_gNB_ue_context_t *ue_context_pP,
NR_SubcarrierSpacing_t subcarrierSpacing,
uint32_t delay_ms) {
ue_context_pP->ue_context.nr_rrc_processing_timer = 1;
ue_context_pP->ue_context.nr_rrc_processing_delay = delay_ms << subcarrierSpacing;
}
///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------///
...@@ -724,9 +731,10 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -724,9 +731,10 @@ rrc_gNB_generate_defaultRRCReconfiguration(
NULL, NULL,
ue_p->masterCellGroup); ue_p->masterCellGroup);
int common_scs = rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; enable_nr_rrc_processing_timer(ue_context_pP,
ue_context_pP->ue_context.rrc_processing_timer = 1; rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
ue_context_pP->ue_context.rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS<<common_scs; NR_RRC_PROCESSING_DELAY_MS);
free(ue_context_pP->ue_context.nas_pdu.buffer); free(ue_context_pP->ue_context.nas_pdu.buffer);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n");
...@@ -990,9 +998,9 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( ...@@ -990,9 +998,9 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
NULL, NULL,
cellGroupConfig); cellGroupConfig);
int common_scs = rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; enable_nr_rrc_processing_timer(ue_context_pP,
ue_context_pP->ue_context.rrc_processing_timer = 1; rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
ue_context_pP->ue_context.rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS<<common_scs; NR_RRC_PROCESSING_DELAY_MS);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
...@@ -1167,9 +1175,9 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( ...@@ -1167,9 +1175,9 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
NULL, NULL,
NULL); NULL);
int common_scs = RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; enable_nr_rrc_processing_timer(ue_context_pP,
ue_context_pP->ue_context.rrc_processing_timer = 1; RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
ue_context_pP->ue_context.rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS<<common_scs; NR_RRC_PROCESSING_DELAY_MS);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
...@@ -1272,9 +1280,10 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( ...@@ -1272,9 +1280,10 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
NULL, NULL,
NULL); NULL);
int common_scs = RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; enable_nr_rrc_processing_timer(ue_context_pP,
ue_context_pP->ue_context.rrc_processing_timer = 1; RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
ue_context_pP->ue_context.rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS<<common_scs; NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP->ue_context.pdu_session_release_command_flag = 1; ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
...@@ -1825,9 +1834,9 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( ...@@ -1825,9 +1834,9 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
NULL, NULL,
NULL); NULL);
int common_scs = RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; enable_nr_rrc_processing_timer(ue_context_pP,
ue_context_pP->ue_context.rrc_processing_timer = 1; RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
ue_context_pP->ue_context.rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS<<common_scs; NR_RRC_PROCESSING_DELAY_MS);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
...@@ -3447,10 +3456,10 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -3447,10 +3456,10 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
} }
} }
if (ue_context_p->ue_context.rrc_processing_timer > 0) { if (ue_context_p->ue_context.nr_rrc_processing_timer > 0) {
ue_context_p->ue_context.rrc_processing_timer++; ue_context_p->ue_context.nr_rrc_processing_timer++;
if(ue_context_p->ue_context.rrc_processing_timer >= ue_context_p->ue_context.rrc_processing_delay) { if(ue_context_p->ue_context.nr_rrc_processing_timer >= ue_context_p->ue_context.nr_rrc_processing_delay) {
ue_context_p->ue_context.rrc_processing_timer = 0; ue_context_p->ue_context.nr_rrc_processing_timer = 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment