Commit 0504659e authored by wujing's avatar wujing

fix RM778 PRACH failure by adding reset RA when CRNTI_ACK in extract_harq

parent 2f4c21ce
...@@ -1475,9 +1475,9 @@ fill_nfapi_harq_information(module_id_t module_idP, ...@@ -1475,9 +1475,9 @@ fill_nfapi_harq_information(module_id_t module_idP,
harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling
} }
harq_information->harq_information_rel10_tdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL10_TDD_TAG; harq_information->harq_information_rel10_tdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL10_TDD_TAG;
harq_information->harq_information_rel10_tdd.n_pucch_1_0 = LTE_DL_FRAME_PARMS *frame_parms = &RC.eNB[module_idP][CC_idP]->frame_parms;
cc->radioResourceConfigCommon->pucch_ConfigCommon. harq_information->harq_information_rel10_tdd.n_pucch_1_0 = get_Np(frame_parms->N_RB_DL,cce_idxP,0) +
n1PUCCH_AN + cce_idxP; cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP;
harq_information-> harq_information->
harq_information_rel10_tdd.number_of_pucch_resources = 1; harq_information_rel10_tdd.number_of_pucch_resources = 1;
} else { } else {
...@@ -3861,6 +3861,20 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id, ...@@ -3861,6 +3861,20 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
sched_ctl->round[CC_idP][harq_pid]++; sched_ctl->round[CC_idP][harq_pid]++;
} }
} }
RA_t *ra = &RC.mac[mod_idP]->common_channels[CC_idP].ra[0];
for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
if ((ra[ra_i].rnti == rnti) && (ra[ra_i].state == MSGCRNTI_ACK) && (ra[ra_i].crnti_harq_pid == harq_pid)) {
LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid],frameP,subframeP);
if(num_ack_nak == 1 && harq_indication_tdd->harq_data[0].bundling.value_0 == 1) {
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{
if(sched_ctl->round[CC_idP][harq_pid] == 7){
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}
}
break;
}
}
} }
break; break;
case 1: // Channel Selection case 1: // Channel Selection
......
...@@ -2843,6 +2843,14 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -2843,6 +2843,14 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,frame_parms->Ncp,0); tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,frame_parms->Ncp,0);
} }
}else{ }else{
if (cc->tdd_Config && frame_parms->N_RB_UL == 100) {
while ( (tbs < UE_template->ul_total_buffer) && (rb_table[rb_table_index]<(frame_parms->N_RB_UL-3-first_rb[CC_id])) &&
((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) {
rb_table_index++;
tbs = get_TBS_UL(mcs,rb_table[rb_table_index])<<3;
tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,frame_parms->Ncp,0);
}
} else {
while ( (tbs < UE_template->ul_total_buffer) && (rb_table[rb_table_index]<(frame_parms->N_RB_UL-2-first_rb[CC_id])) && while ( (tbs < UE_template->ul_total_buffer) && (rb_table[rb_table_index]<(frame_parms->N_RB_UL-2-first_rb[CC_id])) &&
((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) { ((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) {
rb_table_index++; rb_table_index++;
...@@ -2850,6 +2858,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -2850,6 +2858,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,frame_parms->Ncp,0); tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,frame_parms->Ncp,0);
} }
} }
}
if ( rb_table[rb_table_index]<3 ) { if ( rb_table[rb_table_index]<3 ) {
rb_table_index=2; rb_table_index=2;
} }
......
...@@ -71,11 +71,16 @@ fill_rar(const module_id_t module_idP, ...@@ -71,11 +71,16 @@ fill_rar(const module_id_t module_idP,
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4 rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
if(N_RB_UL == 25){ if(N_RB_UL == 25){
ra->msg3_first_rb = 1; ra->msg3_first_rb = 1;
}else{ }else{
if (cc->tdd_Config && N_RB_UL == 100) {
ra->msg3_first_rb = 3;
} else {
ra->msg3_first_rb = 2; ra->msg3_first_rb = 2;
} }
}
ra->msg3_nb_rb = 1; ra->msg3_nb_rb = 1;
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
......
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