Commit 6c3be68d authored by Nick Ho's avatar Nick Ho

fixed searching ue-spec problem at ue-info

parent 99e02e93
......@@ -210,11 +210,14 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
break;
case SHORT_BSR:
// update BSR here
LOG_I(MAC,"Update BSR, but still not implemented here\n");
LOG_I(MAC,"Update BSR, rnti : %d\n",rnti);
UE_info = get_ue_from_rnti(mac_inst, rnti);
BSR_index = payload_ptr[0] & 0x3f;
if(UE_info != NULL)
if(UE_info != NULL)
{
LOG_I(MAC,"Find UE in CE 2 list, update ul_total_buffer to %d bytes\n",BSR_table[BSR_index]);
UE_info->ul_total_buffer = BSR_table[BSR_index];
}
else
LOG_E(MAC,"UE info empty\n");
payload_ptr+=1;
......@@ -252,6 +255,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
break;
case DCCH0_NB_IoT:
case DCCH1_NB_IoT:
LOG_I(MAC,"DCCH PDU Here\n");
// UE specific here
//NB_IoT_mac_rlc_data_ind(payload_ptr,mac_inst,rnti);
......
......@@ -180,11 +180,11 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.harq_ack_resource = ((DCIFormatN1_t *)DCI_pdu)->HARQackRes;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.npdcch_order_indication = ((DCIFormatN1_t *)DCI_pdu)->orderIndicator;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.dci_subframe_repetition_number = ((DCIFormatN1_t *)DCI_pdu)->DCIRep;
LOG_I(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill DL DCI, res:%d\n",hypersfn,frame,subframe,dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.resource_assignment);
LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill DL DCI, res:%d\n",hypersfn,frame,subframe,dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.resource_assignment);
}else if(schedule_result_list_DL->direction == UL) // DCI for uplink
{
LOG_I(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL_DCI\n",hypersfn,frame,subframe);
LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL_DCI\n",hypersfn,frame,subframe);
hi_dci0_pdu = SCHED_info->HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list;
DCI_pdu = schedule_result_list_DL-> DCI_pdu;
SCHED_info-> HI_DCI0_req->hi_dci0_request_body.number_of_dci =1;
......@@ -275,7 +275,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
if(schedule_result_list_UL->channel == NPUSCH) // condition should be added to switch between HI_DCI0 and Msg3
{
//LOG_D(MAC,"first UL \n");
LOG_I(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL config\n",hypersfn,frame,subframe);
LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL config\n",hypersfn,frame,subframe);
//SCHED_info->UL_req = (nfapi_ul_config_request_t *)malloc(sizeof(nfapi_ul_config_request_t));
//SCHED_info->UL_req->ul_config_request_body.number_of_pdus = 0;
//SCHED_info->UL_req->ul_config_request_body.ul_config_pdu_list = (nfapi_ul_config_request_pdu_t *)malloc(5 * sizeof(nfapi_ul_config_request_pdu_t));
......
......@@ -1702,9 +1702,9 @@ uint16_t length, ce_len=0;
UE_TEMPLATE_NB_IoT *get_ue_from_rnti(eNB_MAC_INST_NB_IoT *inst, rnti_t rnti){
uint32_t i;
for(i=0; i<MAX_NUMBER_OF_UE_MAX_NB_IoT; ++i){
if(inst->UE_list_spec->UE_template_NB_IoT[i].active == 1){
if(inst->UE_list_spec->UE_template_NB_IoT[i].rnti == rnti){
return &inst->UE_list_spec->UE_template_NB_IoT[i];
if((inst->UE_list_spec+ (uint32_t)2)->UE_template_NB_IoT[i].active == 1){
if((inst->UE_list_spec+ (uint32_t)2)->UE_template_NB_IoT[i].rnti == rnti){
return &(inst->UE_list_spec+ (uint32_t)2)->UE_template_NB_IoT[i];
}
}
}
......
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