diff --git a/openair1/PHY/LTE_TRANSPORT/edci.c b/openair1/PHY/LTE_TRANSPORT/edci.c index 5687bd721e..d8d0f88254 100755 --- a/openair1/PHY/LTE_TRANSPORT/edci.c +++ b/openair1/PHY/LTE_TRANSPORT/edci.c @@ -290,7 +290,7 @@ void generate_mdci_top (PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF) { - LTE_eNB_MPDCCH *mpdcch= &eNB->mpdcch_vars[subframe&2]; + LTE_eNB_MPDCCH *mpdcch= &eNB->mpdcch_vars[subframe&1]; mDCI_ALLOC_t *mdci; int coded_bits; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 960437b935..374cccb239 100755 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -614,7 +614,9 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) eNB->pdcch_vars[subframe&1].num_pdcch_symbols = DL_req->dl_config_request_body.number_pdcch_ofdm_symbols; eNB->pdcch_vars[subframe&1].num_dci = 0; eNB->phich_vars[subframe&1].num_hi = 0; - +#ifdef Rel14 + eNB->mpdcch_vars[subframe&1].num_dci = 0; +#endif LOG_I(PHY,"NFAPI: Frame %d, Subframe %d (ul_subframe %d): received %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config \n", frame,subframe,ul_subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu); diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 10867b4e8f..a18191f8cf 100755 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -917,6 +917,7 @@ typedef struct { #ifdef Rel14 uint8_t rach_resource_type; uint8_t msg2_mpdcch_repetition_cnt; + uint8_t msg2_mpdcch_done; uint8_t msg4_mpdcch_repetition_cnt; uint8_t msg2_narrowband; uint8_t msg34_narrowband; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 2a5375579e..88ab9b1d39 100755 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -251,6 +251,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s first_rb = narrowband_to_first_rb (&cc[CC_idP], RA_template->msg2_narrowband); if ((RA_template->msg2_mpdcch_repetition_cnt == 0) && (mpdcch_sf_condition (eNB, CC_idP, frameP, subframeP, rmax, TYPE2, -1) > 0)) { + RA_template->msg2_mpdcch_done = 0; // MPDCCH configuration for RAR LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2 for CE Level %d, Programming MPDCCH %d repetitions\n", module_idP, frameP, subframeP, RA_template->rach_resource_type-1,reps); @@ -308,7 +309,9 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s if (RA_template->msg2_mpdcch_repetition_cnt > 0) { // we're in a stream of repetitions - if (RA_template->msg2_mpdcch_repetition_cnt == reps) { // this is the last mpdcch repetition + if ((RA_template->msg2_mpdcch_repetition_cnt == reps)&& + (RA_template->msg2_mpdcch_done == 0)){ // this is the last mpdcch repetition + RA_template->msg2_mpdcch_done = 1; if (cc[CC_idP].tdd_Config == NULL) { // FDD case // wait 2 subframes for PDSCH transmission if (subframeP > 7) @@ -329,7 +332,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s if ((RA_template->Msg2_frame == frameP) && (RA_template->Msg2_subframe == subframeP)) { // Program PDSCH - LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH %d\n", module_idP, frameP, subframeP); + LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n", module_idP, frameP, subframeP); RA_template->generate_rar = 0; dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; @@ -373,6 +376,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s add_msg3 (module_idP, CC_idP, RA_template, frameP, subframeP); fill_rar_br (eNB, CC_idP, RA_template, frameP, subframeP, cc[CC_idP].RAR_pdu.payload, RA_template->rach_resource_type - 1); // DL request + LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming TX Req %d\n", module_idP, frameP, subframeP); eNB->TX_req[CC_idP].sfn_sf = (frameP << 4) + subframeP; TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus]; TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble