Commit 6bae0fed authored by heshanyun's avatar heshanyun

Merge remote-tracking branch 'origin/develop' into fujitsu_lte_contribution

parents f757d140 c2058d17
......@@ -806,10 +806,6 @@ void update_ue_timers(module_id_t module_idP,frame_t frameP, sub_frame_t subfram
UE_scheduling_control->ret_cnt[CC_id],
UE_scheduling_control->aperiodic_ri_received[CC_id]
);
pthread_mutex_lock(&(UE_scheduling_control->rlc_out_of_resources_lock));
UE_scheduling_control->rlc_out_of_resources_cnt = 0;
pthread_mutex_unlock(&(UE_scheduling_control->rlc_out_of_resources_lock));
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63;
......
......@@ -1237,19 +1237,64 @@ generate_Msg4(module_id_t module_idP,
}
} // CCE Allocation feasible
} else {
LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
ra->Msg4_subframe ++;
ra->Msg4_delay_cnt++;
if (ra->Msg4_delay_cnt==10) cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
if (ra->Msg4_subframe == 10) {
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
ra->Msg4_subframe = 0;
if (ra->Msg4_delay_cnt==10){
fill_nfapi_rnti_release(module_idP, ra->rnti);
put_UE_in_freelist(module_idP,ra->rnti,0);
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
}else{
if(mac->common_channels[CC_idP].tdd_Config != NULL) {
switch(mac->common_channels[CC_idP].tdd_Config->subframeAssignment) {
case 1:
if((ra->Msg4_subframe == 0) || (ra->Msg4_subframe == 5)){
ra->Msg4_subframe = ra->Msg4_subframe+4;
}
else if((ra->Msg4_subframe == 4) || (ra->Msg4_subframe == 9))
{
if(ra->Msg4_subframe == 9){
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
}
ra->Msg4_subframe = (ra->Msg4_subframe+1)%10;
}
break;
case 2:
if((ra->Msg4_subframe == 0) || (ra->Msg4_subframe == 5)){
ra->Msg4_subframe = ra->Msg4_subframe+3;
}
else if((ra->Msg4_subframe == 3) || (ra->Msg4_subframe == 8))
{
ra->Msg4_subframe = ra->Msg4_subframe+1;
}
else if((ra->Msg4_subframe == 4) || (ra->Msg4_subframe == 9))
{
if(ra->Msg4_subframe == 9){
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
}
ra->Msg4_subframe = (ra->Msg4_subframe+1)%10;
}
break;
default:
printf("%s:%d: TODO\n", __FILE__, __LINE__);
abort();
// TODO need to be complete for other tdd configs.
}
} else {
ra->Msg4_subframe ++;
if (ra->Msg4_subframe == 10) {
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
ra->Msg4_subframe = 0;
}
}
}
LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x) Msg4 frame %d subframe %d\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti, ra->Msg4_frame, ra->Msg4_subframe);
}
} // msg4 frame/subframe
} // else rach_resource_type
......
......@@ -2691,6 +2691,7 @@ add_new_ue(module_id_t mod_idP,
UE_info->UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0;
UE_info->UE_sched_ctrl[UE_id].ta_update = 31;
/* default slice in case there was something different */
UE_info->UE_sched_ctrl[UE_id].ta_update_f = 31.0;
UE_info->UE_sched_ctrl[UE_id].ta_update = 31;
UE_info->UE_sched_ctrl[UE_id].pusch_cqi_f[cc_idP] = (eNB->puSch10xSnr+640)/5;
......@@ -2708,7 +2709,6 @@ add_new_ue(module_id_t mod_idP,
UE_info->UE_sched_ctrl[UE_id].ul_periodic_timer_exp_flag = FALSE;
UE_info->UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt = 0;
pthread_mutex_init(&UE_info->UE_sched_ctrl[UE_id].rlc_out_of_resources_lock, NULL);
for (j = 0; j < 8; j++) {
UE_info->UE_template[cc_idP][UE_id].oldNDI[j][TB1] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
......
......@@ -1105,7 +1105,6 @@ typedef struct {
uint8_t swap_flag[NFAPI_CC_MAX][MAX_HARQ_PID];
uint8_t rsn[NFAPI_CC_MAX][MAX_HARQ_PID][MAX_NUM_TB];
uint32_t rlc_out_of_resources_cnt;
pthread_mutex_t rlc_out_of_resources_lock;
} UE_sched_ctrl_t;
/*! \brief eNB template for the Random access information */
......
......@@ -411,9 +411,7 @@ boolean_t pdcp_data_req(
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (RC.mac[ctxt_pP->module_id]->UE_info.active[UE_id] == TRUE) {
if (RC.mac[ctxt_pP->module_id]->UE_info.UE_template[RC.mac[ctxt_pP->module_id]->UE_info.pCC_id[UE_id]][UE_id].rnti == ctxt_pP->rnti) {
pthread_mutex_lock(&(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt++;
pthread_mutex_unlock(&(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
break;
}
}
......@@ -480,9 +478,7 @@ boolean_t pdcp_data_req(
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (RC.mac[ctxt_pP->module_id]->UE_info.active[UE_id] == TRUE) {
if (RC.mac[ctxt_pP->module_id]->UE_info.UE_template[RC.mac[ctxt_pP->module_id]->UE_info.pCC_id[UE_id]][UE_id].rnti == ctxt_pP->rnti) {
pthread_mutex_lock(&(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt++;
pthread_mutex_unlock(&(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
break;
}
}
......
......@@ -375,10 +375,17 @@ mac_rrc_data_ind(
rrc_eNB_decode_ccch(&ctxt, Srb_info, CC_id);
}*/
if (sdu_lenP > 0) {
if (rrc_eNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id) == -1) {
LOG_E(RRC, "rrc_eNB_decode_ccch failed\n");
return -2;
}
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_MAC_ENB, RRC_MAC_CCCH_DATA_IND);
RRC_MAC_CCCH_DATA_IND (message_p).frame = frameP;
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = sub_frameP;
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = module_idP;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rntiP;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = sdu_lenP;
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
memcpy (RRC_MAC_CCCH_DATA_IND (message_p).sdu, sduP, sdu_lenP);
itti_send_msg_to_task (TASK_RRC_ENB, ctxt.instance, message_p);
}
}
......
......@@ -750,7 +750,7 @@ rrc_eNB_ue_context_stmsi_exist(
{
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
LOG_I(RRC,"checking for UE S-TMSI %x, mme %x (%p): rnti %x",
LOG_D(RRC,"checking for UE S-TMSI %x, mme %x (%p): rnti %x",
m_tmsiP, mme_codeP, ue_context_p,
ue_context_p->ue_context.rnti);
......
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