From d43dd64b94460c6ead834045a87068a17c8323c7 Mon Sep 17 00:00:00 2001 From: Y_Tomita Date: Mon, 22 Oct 2018 14:12:41 +0900 Subject: [PATCH] Change not to watch timing in MSG2 and MSG4 procedure in L2 FAPI simulator because it's possible to differ timing(frame, subframe) between eNB and UE. --- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) mode change 100644 => 100755 openair2/LAYER2/MAC/eNB_scheduler_RA.c diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c old mode 100644 new mode 100755 index b637a92a96..98a500a23d --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -501,7 +501,9 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP, #endif { - if ((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) { + // In case of nFAPI, sometimes timing of eNB and UE become different. + // So if nfapi_mode == 2(VNF) , this function don't check timing to avoid Attach failure. + if (((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) || (nfapi_mode == 2)) { LOG_D(MAC, "[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, state %d\n", module_idP, CC_idP, frameP, subframeP, ra->state); @@ -1010,7 +1012,9 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, { // This is normal LTE case LOG_D(MAC, "generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP); - if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) { + // In case of nFAPI, sometimes timing of eNB and UE become different. + // So if nfapi_mode == 2(VNF) , this function don't check timing to avoid Attach failure. + if (((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP))||((nfapi_mode == 2)&&(cc->tdd_Config == NULL))) { // Get RRCConnectionSetup for Piggyback /*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block @@ -1421,7 +1425,9 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) if (ra->state == MSG2) generate_Msg2(module_idP, CC_id, frameP, subframeP, ra); - else if (ra->state == MSG4 && ra->Msg4_frame == frameP && ra->Msg4_subframe == subframeP ) + // In case of nFAPI, sometimes timing of eNB and UE become different. + // So if nfapi_mode == 2(VNF) , this function don't check timing to avoid Attach failure. + else if ((ra->state == MSG4 && ra->Msg4_frame == frameP && ra->Msg4_subframe == subframeP ) || (nfapi_mode == 2)) generate_Msg4(module_idP, CC_id, frameP, subframeP, ra); else if (ra->state == WAITMSG4ACK) check_Msg4_retransmission(module_idP, CC_id, frameP,