Commit bd7f837f authored by luis_pereira87's avatar luis_pereira87

Fix after merge

parent 44c0c8d3
......@@ -349,6 +349,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This updates the timers running at MAC layer
nr_mac_update_timers(module_idP, frame, slot);
// This schedules the BWP switching
schedule_nr_bwp_switch(module_idP, frame, slot);
// This schedules MIB
schedule_nr_mib(module_idP, frame, slot);
......
......@@ -1992,8 +1992,10 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
NR_BWP_t *genericParameters = get_dl_bwp_genericParameters(sched_ctrl->active_bwp,
RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon,
sib1);
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
sched_ctrl->rrc_processing_timer = (10 << genericParameters->subcarrierSpacing); // RRCSetup 10 ms
uint32_t delay_ms = bwpList ? 16 : 10;
sched_ctrl->rrc_processing_timer = (delay_ms << genericParameters->subcarrierSpacing);
}
else {
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) RA Procedure failed at Msg4!\n", UE_id, ra->rnti);
......
......@@ -741,6 +741,12 @@ rrc_gNB_generate_defaultRRCReconfiguration(
LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n");
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
rrc->configuration.pdsch_AntennaPorts,
......@@ -753,7 +759,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
0,
ue_context_pP->ue_context.rnti,
NULL,
NR_RRC_PROCESSING_DELAY_MS);
delay_ms);
/* Free all NAS PDUs */
for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
......@@ -1021,6 +1027,12 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
cellGroupConfig);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n");
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
rrc->configuration.pdsch_AntennaPorts,
......@@ -1033,7 +1045,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
0,
ue_context_pP->ue_context.rnti,
NULL,
NR_RRC_PROCESSING_DELAY_MS);
delay_ms);
/* Free all NAS PDUs */
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
......@@ -1208,6 +1220,12 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
NULL);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
......@@ -1220,7 +1238,7 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
0,
ue_context_pP->ue_context.rnti,
NULL,
NR_RRC_PROCESSING_DELAY_MS);
delay_ms);
/* Free all NAS PDUs */
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
......@@ -1326,6 +1344,12 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
......@@ -1338,7 +1362,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
0,
ue_context_pP->ue_context.rnti,
NULL,
NR_RRC_PROCESSING_DELAY_MS);
delay_ms);
/* Free all NAS PDUs */
if (nas_length > 0) {
......@@ -1891,6 +1915,12 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
......@@ -1903,7 +1933,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
0,
ue_context_pP->ue_context.rnti,
NULL,
NR_RRC_PROCESSING_DELAY_MS);
delay_ms);
/* Free all NAS PDUs */
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
......@@ -1978,7 +2008,25 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP
NULL,
masterCellGroup);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS);
uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ?
NR_RRC_PROCESSING_DELAY_MS + NR_RRC_BWP_SWITCH_DELAY_MS : NR_RRC_PROCESSING_DELAY_MS;
rrc_mac_config_req_gNB(ctxt_pP->module_id,
0,
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
0,
0,
0,
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon,
NULL,
NULL,
0,
ue_context_pP->ue_context.rnti,
NULL,
delay_ms);
nr_rrc_data_req(ctxt_pP,
DCCH,
......
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