Commit eb17629d authored by rmagueta's avatar rmagueta

nr_generate_Msg4 support for multiple RA procedures

parent 6a16fe9e
xw2 Fix_SA_SIB1 NRUE_usedlschparallel NR_FR2_initsync_fixes NR_SA_F1AP_5GRECORDS NR_SA_F1AP_5GRECORDS_lts NR_UE_CONFIG_REQ_FIXES NR_UE_SA NR_cleanup_PUCCH_resources NR_multiplexing_HARQ_CSI_PUCCH NR_scheduling_CSIRS NR_scheduling_request RFquality benetel_config_file_fix bugfix-nr-t-reordering bugfix_gnb_rt_stats_html ci_quectel_support ci_test_nsa_fix_quectel_nic detached-w16-test develop develop-CBRA-v3 develop-CCE develop-NR_SA_F1AP_5GRECORDS develop-NR_SA_F1AP_5GRECORDS-hs develop-NR_SA_F1AP_5GRECORDS-v3 develop-SA-CBRA develop-SA-CBRA-CUDU develop-SA-CBRA-Msg5 develop-SA-CBRA-lts develop-SA-CBRA-ulsch-lts docker-improvements-2021-april episys-merge fix-physim-deploy fix-realtime fix_coreset_dmrs_idx fix_nr_ulsim fixgtpu gnb-realtime-hotfix hack-exit-gnb-when-no-enb-nsa integration_2020_wk15 integration_2021_wk13_b integration_2021_wk13_b_fix_tdas integration_2021_wk13_b_fixed integration_2021_wk16 integration_2021_wk17_a integration_2021_wk17_b integration_2021_wk18_a integration_2021_wk18_b integration_2021_wk19 integration_w5GC_CBRA_test multiple_ssb_sib1_bugfix nr-dl-mimo-2layer nr-dmrs-fixes nr-pdcp-srb-integrity oairu physim-build-deploy physim-deploy-handle-error-cases prb_based_dl_channel_estimation rh_ci_add_runtime_stats rh_ci_add_uldlharq_stats rh_ci_gsheet_rt_monitoring rh_ci_nsa_test_n310 rh_ci_phy_test_improve rh_ci_test_benetel rh_ci_test_nsa rh_ci_test_nsa_wk16 rh_ci_test_nsa_wk17_b rh_ci_test_nsa_wk17b test_nsa_gtpu_fix test_rt-fix_phy-test usrp_stop_cleanly 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 benetel_gnb_rel_2.0 benetel_enb_rel_2.0
No related merge requests found
...@@ -475,7 +475,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, ...@@ -475,7 +475,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id];
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
uint8_t total_RApreambles = 64; uint8_t total_RApreambles = MAX_NUM_NR_PRACH_PREAMBLES;
uint8_t num_ssb_per_RO = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present; uint8_t num_ssb_per_RO = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
int pr_found; int pr_found;
...@@ -624,16 +624,16 @@ void nr_initiate_ra_proc(module_id_t module_idP, ...@@ -624,16 +624,16 @@ void nr_initiate_ra_proc(module_id_t module_idP,
NR_COMMON_channels_t *cc = &mac->common_channels[CC_id]; NR_COMMON_channels_t *cc = &mac->common_channels[CC_id];
for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) {
NR_RA_t *ra = &cc->ra[i]; NR_RA_t *ra = &cc->ra[i];
LOG_D(MAC, "RA[state:%d]\n", ra->state); LOG_D(NR_MAC, "RA[state:%d]\n", ra->state);
switch (ra->state) { switch (ra->state) {
case Msg2: case Msg2:
nr_generate_Msg2(module_idP, CC_id, frameP, slotP, ra); nr_generate_Msg2(module_idP, CC_id, frameP, slotP, ra);
break; break;
case Msg4: case Msg4:
nr_generate_Msg4(module_idP, CC_id, frameP, slotP); nr_generate_Msg4(module_idP, CC_id, frameP, slotP, ra);
break; break;
case WAIT_Msg4_ACK: case WAIT_Msg4_ACK:
nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP); nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP, ra);
break; break;
default: default:
break; break;
...@@ -1055,14 +1055,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1055,14 +1055,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
} }
} }
void nr_generate_Msg4(module_id_t module_idP, void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra) {
int CC_id,
frame_t frameP,
sub_frame_t slotP) {
gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; gNB_MAC_INST *nr_mac = RC.nrmac[module_idP];
NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id];
NR_RA_t *ra = &cc->ra[0];
if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) {
...@@ -1285,16 +1281,12 @@ void nr_generate_Msg4(module_id_t module_idP, ...@@ -1285,16 +1281,12 @@ void nr_generate_Msg4(module_id_t module_idP,
} }
} }
void nr_check_Msg4_Ack(module_id_t module_id, void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra) {
int CC_id,
frame_t frame,
sub_frame_t slot) {
LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n"); LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n");
gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id];
NR_RA_t *ra = &cc->ra[0];
ra->state = RA_IDLE; ra->state = RA_IDLE;
} }
...@@ -1303,7 +1295,7 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ ...@@ -1303,7 +1295,7 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){
NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[0]; NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[0];
LOG_D(MAC,"[gNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra->rnti); LOG_D(MAC,"[gNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra->rnti);
ra->state = IDLE; ra->state = RA_IDLE;
ra->timing_offset = 0; ra->timing_offset = 0;
ra->RRC_timer = 20; ra->RRC_timer = 20;
ra->rnti = 0; ra->rnti = 0;
......
...@@ -355,15 +355,9 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP, ...@@ -355,15 +355,9 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra); void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra);
void nr_generate_Msg4(module_id_t module_idP, void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra);
int CC_id,
frame_t frameP,
sub_frame_t slotP);
void nr_check_Msg4_Ack(module_id_t module_id, void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra);
int CC_id,
frame_t frame,
sub_frame_t slot);
void nr_process_mac_pdu( void nr_process_mac_pdu(
module_id_t module_idP, module_id_t module_idP,
......
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