Commit 4464ec39 authored by lfarizav's avatar lfarizav

Multiple RRUs almost done. But, PDCP data request failed!

parent 7f7e0e1b
......@@ -101,7 +101,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,ue->common_vars.eNb_id,1);//ue->common_vars.eNb_id);
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
......
......@@ -721,7 +721,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,ue->common_vars.eNb_id,1);//ue->common_vars.eNb_id);
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
......@@ -963,7 +963,7 @@ int initial_sync_freq(PHY_VARS_UE *ue, runmode_t mode)
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,ue->common_vars.eNb_id,1);//ue->common_vars.eNb_id);
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
......
......@@ -1822,7 +1822,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
CC_id,
frame_tx,
subframe_tx,
ue->common_vars.eNb_id,//changed
eNB_id,
ulsch_input_buffer,
input_buffer_length,
&access_mode);
......@@ -2052,7 +2052,7 @@ void get_pucch_param(PHY_VARS_UE *ue,
case pucch_format1a:
case pucch_format1b:
{
pucch_resource[0] = get_n1_pucch(ue,
pucch_resource[0] = get_n1_pucch(ue,/*not necessary to change*/
proc,
ue->dlsch[current_thread_id[proc->subframe_rx]][eNB_id][0]->harq_ack,
eNB_id,
......@@ -2069,12 +2069,12 @@ void get_pucch_param(PHY_VARS_UE *ue,
pucch_resource[0] = ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PUCCH_ResourceIndex;
if(cqi_report)
{
pucch_payload[0] = get_pucch2_cqi(ue,eNB_id,(int*)plength);
pucch_payload[0] = get_pucch2_cqi(ue,eNB_id,(int*)plength);/*not necessary to change*/
}
else
{
*plength = 1;
pucch_payload[0] = get_pucch2_ri(ue,eNB_id);
pucch_payload[0] = get_pucch2_ri(ue,eNB_id);/*not necessary to change*/
}
}
break;
......@@ -2473,7 +2473,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
// check if we need to use PUCCH 1a/1b
ue_pucch_procedures(ue,proc,eNB_id,abstraction_flag);
// check if we need to use SRS
ue_srs_procedures(ue,proc,eNB_id,abstraction_flag);
ue_srs_procedures(ue,proc,eNB_id,abstraction_flag);//not necessary to change
} // UE_mode==PUSCH
......@@ -2493,11 +2493,11 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
Mod_id,frame_tx,subframe_tx,
ue->ulsch[eNB_id]->num_cba_dci[subframe_tx]);
mac_xface->ue_get_sdu(Mod_id,// changed
mac_xface->ue_get_sdu(Mod_id,
CC_id,
frame_tx,
subframe_tx,
ue->common_vars.eNb_id,
eNB_id,
ulsch_input_buffer,
input_buffer_length,
&access_mode);
......@@ -2507,7 +2507,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
if (access_mode > UNKNOWN_ACCESS) {
if (abstraction_flag==0) {
if (ulsch_encoding(ulsch_input_buffer,
if (ulsch_encoding(ulsch_input_buffer,//not necessary to change
ue,
harq_pid,
eNB_id,
......@@ -2987,7 +2987,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
if (ue->mac_enabled==1) {
//printf("[UE%d] if mac_enabled? then dl_phy_sync_success. UE_mode %s\n",ue->Mod_id,ue->UE_mode[eNB_id]==NOT_SYNCHED?"NOT_SYNCHED":ue->UE_mode[eNB_id]==NOT_SYNCHED?"SYNCHED":"OTHER CHOICE");
mac_xface->dl_phy_sync_success(ue->Mod_id,frame_rx,ue->common_vars.eNb_id,
mac_xface->dl_phy_sync_success(ue->Mod_id,frame_rx,0,
ue->UE_mode[eNB_id]==NOT_SYNCHED ? 1 : 0);
}
......@@ -4188,7 +4188,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
mac_xface->ue_decode_si(ue->Mod_id,
CC_id,
frame_rx,
ue->common_vars.eNb_id,
eNB_id,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
......@@ -4440,7 +4440,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
l,
slot1,
0);
ue_measurement_procedures(l-1,ue,proc,ue->common_vars.eNb_id,1+(subframe_rx<<1),0,ue->mode);
ue_measurement_procedures(l-1,ue,proc,0,1+(subframe_rx<<1),0,ue->mode);
}
//printf("AbsSubframe %d.%d ChanEst slot %d, symbol %d\n", frame_rx,subframe_rx,next_subframe_slot0,pilot0);
front_end_chanEst(ue,
......@@ -5235,7 +5235,7 @@ else
#endif
}
ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode);
ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode);/*eNB_id=0*/
if (do_pdcch_flag) {
if ((l==pilot1) ||
......@@ -5243,7 +5243,7 @@ else
LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id);
//start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {/*eNB_id=0*/
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
return(-1);
}
......@@ -5770,7 +5770,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
frame_tx,
subframe_tx,
subframe_select(&ue->frame_parms,subframe_tx),
ue->common_vars.eNb_id,
eNB_id,
0/*FIXME CC_id*/);
if (ret == CONNECTION_LOST) {
......
......@@ -62,6 +62,7 @@
#endif //PHY_EMUL
#include "SCHED/defs.h"
#include "PHY/extern.h"
/* TODO: this abstraction_flag here is very hackish - find a proper solution */
extern uint8_t abstraction_flag;
void dl_phy_sync_success(module_id_t module_idP,
......@@ -69,7 +70,7 @@ void dl_phy_sync_success(module_id_t module_idP,
unsigned char eNB_index,
uint8_t first_sync) //init as MR
{
LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index);
LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, /*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
#if defined(ENABLE_USE_MME)
int mme_enabled=1;
#else
......@@ -78,10 +79,10 @@ void dl_phy_sync_success(module_id_t module_idP,
if (first_sync==1 && !(mme_enabled==1 && abstraction_flag==0)) {
layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP,eNB_index);
openair_rrc_ue_init(module_idP,PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
} else
{
rrc_in_sync_ind(module_idP,frameP,eNB_index);
rrc_in_sync_ind(module_idP,frameP,PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
}
}
......
......@@ -210,7 +210,7 @@ void get_prach_resources(module_id_t module_idP,
UE_mac_inst[module_idP].RA_prach_resources.ra_RACH_MaskIndex = 0;
UE_mac_inst[module_idP].RA_usedGroupA = 1;
} else if ((Msg3_size <messageSizeGroupA) ||
(mac_xface->get_PL(module_idP,0,eNB_index) > PLThreshold)) {
(mac_xface->get_PL(module_idP,0,eNB_index) > PLThreshold)) {//not necessary to change
// use Group A procedure
UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex = (taus())%sizeOfRA_PreamblesGroupA;
UE_mac_inst[module_idP].RA_prach_resources.ra_RACH_MaskIndex = 0;
......@@ -348,7 +348,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
printf("ue_get_rach:Size16 %d\n",Size16);
// LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",module_idP,frameP,Size);
LOG_D(RRC, "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n",
frameP, module_idP, eNB_indexP, module_idP);
frameP, module_idP, /*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id, module_idP);
LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",module_idP,frameP,Size);
if (Size>0) {
......
......@@ -363,7 +363,7 @@ ue_send_sdu(
#ifdef DEBUG_HEADER_PARSING
LOG_D(MAC,"[UE %d] ue_send_sdu : Frame %d eNB_index %d : num_ce %d num_sdu %d\n",module_idP,
frameP,eNB_index,num_ce,num_sdu);
frameP,/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,num_ce,num_sdu);
#endif
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
......@@ -397,7 +397,7 @@ ue_send_sdu(
for (i=0; i<6; i++)
if (tx_sdu[i] != payload_ptr[i]) {
LOG_E(MAC,"[UE %d][RAPROC] Contention detected, RA failed\n",module_idP);
mac_xface->ra_failed(module_idP,CC_id,eNB_index);
mac_xface->ra_failed(module_idP,CC_id,eNB_index);/*eNB_index=0*/
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_OUT);
return;
......@@ -405,7 +405,7 @@ ue_send_sdu(
LOG_I(MAC,"[UE %d][RAPROC] Frame %d : Clearing contention resolution timer\n", module_idP, frameP);
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
mac_xface->ra_succeeded(module_idP,CC_id,eNB_index);
mac_xface->ra_succeeded(module_idP,CC_id,eNB_index);/*eNB_index=0*/
}
payload_ptr+=6;
......@@ -439,7 +439,7 @@ ue_send_sdu(
module_idP,
UE_mac_inst[module_idP].crnti,
frameP,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
rx_lengths[i]);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
......@@ -529,7 +529,7 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i
(uint8_t *)pdu,
len,
ENB_FLAG_NO,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
0);
//printf("2\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
......@@ -569,7 +569,7 @@ void ue_decode_p(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_in
(uint8_t *)pdu,
len,
ENB_FLAG_NO,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
0);
//printf("3\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_OUT);
......@@ -1281,7 +1281,7 @@ unsigned char generate_ulsch_header(uint8_t *mac_header,
}
void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframe, uint8_t eNB_index,uint8_t *ulsch_buffer,uint16_t buflen, uint8_t *access_mode)
void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframe, uint8_t eNB_index,uint8_t *ulsch_buffer,uint16_t buflen, uint8_t *access_mode)/*eNB_index=0*/
{
uint8_t total_rlc_pdu_header_len=0, rlc_pdu_header_len_last=0 ;
......@@ -1333,7 +1333,7 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
module_idP, frameP, subframe);
//if (UE_mac_inst[module_idP].scheduling_info.LCID_status[DTCH] == LCID_EMPTY)
if (cba_access(module_idP,frameP,subframe,eNB_index,buflen)==0) {
if (cba_access(module_idP,frameP,subframe,eNB_index,buflen)==0) {/*eNB_index not used*/
*access_mode=POSTPONED_ACCESS;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_OUT);
return;
......@@ -1429,7 +1429,7 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
is_lcid_processed = FALSE;
lcid_buffer_occupancy_old = mac_rlc_get_buffer_occupancy_ind(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
frameP,
subframe,
ENB_FLAG_NO,
......@@ -1465,7 +1465,7 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
frameP,
ENB_FLAG_NO,
MBMS_FLAG_NO,
......@@ -1519,7 +1519,7 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
/* Get updated BO after multiplexing this PDU */
lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_index,
/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
frameP,
subframe,
ENB_FLAG_NO,
......@@ -1591,10 +1591,10 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
// build PHR and update the timers
if (phr_ce_len == sizeof(POWER_HEADROOM_CMD)) {
phr_p->PH = get_phr_mapping(module_idP,CC_id,eNB_index);
phr_p->PH = get_phr_mapping(module_idP,CC_id,eNB_index);/*eNB_index=0*/
phr_p->R = 0;
LOG_D(MAC,"[UE %d] Frame %d report PHR with mapping (%d->%d) for LCID %d\n",
module_idP,frameP, mac_xface->get_PHR(module_idP,CC_id,eNB_index), phr_p->PH,POWER_HEADROOM);
module_idP,frameP, mac_xface->get_PHR(module_idP,CC_id,eNB_index), phr_p->PH,POWER_HEADROOM);/*eNB_index=0*/
update_phr(module_idP,CC_id);
} else {
phr_p=NULL;
......@@ -1836,6 +1836,7 @@ ue_scheduler(
const int CC_id)
//------------------------------------------------------------------------------
{
printf("ue_scheduler: eNB_indexp %d, PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id %d \n",eNB_indexP,PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
int lcid; // lcid index
int TTI= 1;
int bucketsizeduration = -1;
......@@ -1856,7 +1857,7 @@ ue_scheduler(
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_IN);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_NO, UE_mac_inst[module_idP].crnti, txFrameP, txSubframeP,eNB_indexP);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_NO, UE_mac_inst[module_idP].crnti, txFrameP, txSubframeP,/*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
#if defined(ENABLE_ITTI)
do {
......@@ -1901,11 +1902,11 @@ ue_scheduler(
UE_mac_inst[module_idP].rxSubframe = rxSubframeP;
#ifdef CELLULAR
rrc_rx_tx(module_idP, txFrameP, 0, eNB_indexP);
rrc_rx_tx(module_idP, txFrameP, 0, /*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
#else
switch (rrc_rx_tx(&ctxt,
eNB_indexP,
/*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,
CC_id)) {
case RRC_OK:
break;
......@@ -1930,7 +1931,7 @@ ue_scheduler(
case RRC_Handover_failed:
LOG_N(MAC,"Handover failure for UE %d eNB_index %d\n",module_idP,eNB_indexP);
//Invalid...need to add another MAC UE state for re-connection procedure
mac_xface->phy_config_afterHO_ue(module_idP,0,eNB_indexP,(MobilityControlInfo_t *)NULL,1);
mac_xface->phy_config_afterHO_ue(module_idP,0,eNB_indexP,(MobilityControlInfo_t *)NULL,1);//eNB_indexP=0
//return(3);
break;
......@@ -1974,7 +1975,7 @@ ue_scheduler(
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
// Signal PHY to quit RA procedure
LOG_E(MAC,"Module id %u Contention resolution timer expired, RA failed\n", module_idP);
mac_xface->ra_failed(module_idP,0,eNB_indexP);
mac_xface->ra_failed(module_idP,0,eNB_indexP);//eNB_indexP=0
}
}
......@@ -2070,8 +2071,8 @@ ue_scheduler(
} else {
//LOG_D(MAC,"PHR normal operation %d active %d \n", UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF, UE_mac_inst[module_idP].PHR_reporting_active);
if ((UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF <= 0) &&
((mac_xface->get_PL(module_idP,0,eNB_indexP) < UE_mac_inst[module_idP].scheduling_info.PathlossChange_db) ||
(UE_mac_inst[module_idP].power_backoff_db[eNB_indexP] > UE_mac_inst[module_idP].scheduling_info.PathlossChange_db)))
((mac_xface->get_PL(module_idP,0,eNB_indexP) < UE_mac_inst[module_idP].scheduling_info.PathlossChange_db) ||/*eNB_indexP=0*/
(UE_mac_inst[module_idP].power_backoff_db[/*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id] > UE_mac_inst[module_idP].scheduling_info.PathlossChange_db)))
// trigger PHR and reset the timer later when the PHR report is sent
{
UE_mac_inst[module_idP].PHR_reporting_active = 1;
......@@ -2299,7 +2300,7 @@ boolean_t update_bsr(module_id_t module_idP, frame_t frameP, sub_frame_t subfra
lcgid_buffer_remain[lcgid] += UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[lcid];
}
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,/*eNB_index*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
lcid,
0xFFFF); //TBS is not used in RLC at this step, set a special value for debug
......@@ -2577,7 +2578,7 @@ void update_phr(module_id_t module_idP,int CC_id)
UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF = get_sf_prohibitPHR_Timer(UE_mac_inst[module_idP].scheduling_info.prohibitPHR_Timer);
// LOG_D(MAC,"phr %d %d\n ",UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF, UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF);
}
uint8_t get_phr_mapping (module_id_t module_idP, int CC_id, uint8_t eNB_index)
uint8_t get_phr_mapping (module_id_t module_idP, int CC_id, uint8_t eNB_index)/*eNB_index=0*/
{
if (CC_id>0) {
......
......@@ -927,6 +927,7 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).frame,
0,
RRC_DCCH_DATA_REQ (msg_p).eNB_index);
printf("pdcp_run:RRC_DCCH_DATA_REQ: eNB %d, rnti %d\n",RRC_DCCH_DATA_REQ (msg_p).eNB_index,RRC_DCCH_DATA_REQ (msg_p).rnti);
LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
PROTOCOL_CTXT_ARGS(&ctxt),
msg_name,
......
......@@ -2850,9 +2850,8 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
if (plmn_data[plmn_ind].mcc < 0) {
LOG_I( RRC, "Found Unknown operator (no entry in internal table)\n" );
}
LOG_I( RRC, "cellAccessRelatedInfo.cellIdentity : raw:%"PRIu32" decoded:%02x.%02x.%02x.%02x\n",
BIT_STRING_to_uint32( &sib1->cellAccessRelatedInfo.cellIdentity ),
BIT_STRING_to_uint32( &sib1->cellAccessRelatedInfo.cellIdentity)+eNB_index,
sib1->cellAccessRelatedInfo.cellIdentity.buf[0],
sib1->cellAccessRelatedInfo.cellIdentity.buf[1],
sib1->cellAccessRelatedInfo.cellIdentity.buf[2],
......@@ -2995,7 +2994,7 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity)+eNB_index;
NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
NAS_CELL_SELECTION_CNF (msg_p).rsrq = rsrq;
......@@ -4516,7 +4515,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit3);
//PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, 0, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
UE_rrc_inst[ue_mod_id].initialNasMsg = NAS_CONN_ESTABLI_REQ (msg_p).initialNasMsg;
......@@ -4555,7 +4554,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
length = do_ULInformationTransfer(&buffer, NAS_UPLINK_DATA_REQ (msg_p).nasMsg.length, NAS_UPLINK_DATA_REQ (msg_p).nasMsg.data);
/* Transfer data to PDCP */
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[0].rnti, 0, 0,0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[0].rnti, 0, 0,PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
// check if SRB2 is created, if yes request data_req on DCCH1 (SRB2)
if(UE_rrc_inst[ue_mod_id].SRB2_config[0] == NULL)
......@@ -4710,7 +4709,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
switch (rrc_get_state(ue_mod_id)) {
case RRC_STATE_IDLE: {
if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[0].rnti, 0, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[0].rnti, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
rrc_ue_generate_RRCConnectionRequest(&ctxt, 0);
LOG_D(RRC, "not sending connection request\n");
rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING);
......
......@@ -408,6 +408,7 @@ rrc_rx_tx(
//-----------------------------------------------------------------------------
{
//uint8_t UE_id;
printf("rrc_rx_tx: enb_indexP %d\n",enb_indexP);
int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts;
struct rrc_eNB_ue_context_s *ue_context_p = NULL,*ue_to_be_removed = NULL;
......
......@@ -848,7 +848,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
proc->frame_tx,
proc->subframe_tx,
subframe_select(&UE->frame_parms,proc->subframe_tx),
UE->common_vars.eNb_id,
0,
0/*FIXME CC_id*/);
if ( ret != CONNECTION_OK) {
char *txt;
......
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