From c0b027b4579f725eaca01f4ed9a65b7cd19418ea Mon Sep 17 00:00:00 2001 From: Matthieu Kanj <Matthieu.kanj@b-com.com> Date: Tue, 22 Aug 2017 23:32:23 +0200 Subject: [PATCH] renaming functions in file: openair2/LAYER2/MAC/proto_NB_IoT.h --- openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c | 10 +++--- .../LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c | 4 +-- .../MAC/eNB_scheduler_primitives_NB_IoT.c | 12 +++---- .../LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c | 4 +-- openair2/LAYER2/MAC/extern.h | 4 +-- openair2/LAYER2/MAC/extern_NB_IoT.h | 4 +-- openair2/LAYER2/MAC/main.c | 2 +- openair2/LAYER2/MAC/main_NB_IoT.c | 30 ++++++++-------- openair2/LAYER2/MAC/proto_NB_IoT.h | 20 +++++------ openair2/LAYER2/MAC/vars.h | 6 ++-- .../IF_Module_L2_primitives_NB_IoT.c | 36 +++++++++---------- openair2/RRC/LITE/L2_interface_NB_IoT.c | 30 ++++++++-------- openair2/RRC/LITE/proto_NB_IoT.h | 2 +- openair2/RRC/LITE/rrc_eNB_NB_IoT.c | 6 ++-- record.txt | 6 ++-- targets/RT/USER/lte-softmodem.c | 2 +- 17 files changed, 90 insertions(+), 90 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c b/openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c index d223bfc387..a8dc2fb5c6 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c @@ -68,7 +68,7 @@ /* already defined in proto_NB_IoT.h -void NB_eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, uint16_t hypersfn) +void eNB_dlsch_ulsch_scheduler_NB_IoT(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, uint16_t hypersfn) { } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c b/openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c index 87d93596ec..bf27c6f9c0 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c @@ -69,11 +69,11 @@ #include "T.h" -void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP) +void schedule_RA_NB_IoT(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP) { int CC_id; - eNB_MAC_INST_NB_IoT *eNB = &eNB_mac_inst_NB[module_idP]; + eNB_MAC_INST_NB_IoT *eNB = &eNB_mac_inst_NB_IoT[module_idP]; RA_TEMPLATE_NB_IoT *RA_template; @@ -222,7 +222,7 @@ printf("MAC: msg4 acknowledged for rnti %x fsf %d/%d, let's configure it\n", RA_ RA_template->RA_active=FALSE; UE_id = find_UE_id(module_idP,RA_template->rnti); DevAssert( UE_id != -1 ); - eNB_mac_inst_NB[module_idP].UE_list.UE_template[UE_PCCID(module_idP,UE_id)][UE_id].configured=TRUE; + eNB_mac_inst_NB_IoT[module_idP].UE_list.UE_template[UE_PCCID(module_idP,UE_id)][UE_id].configured=TRUE; } @@ -233,13 +233,13 @@ printf("MAC: msg4 acknowledged for rnti %x fsf %d/%d, let's configure it\n", RA_ // stop_meas(&eNB->schedule_ra); } /*This function should loop all over the preamble index*/ -void NB_initiate_ra_proc(module_id_t module_idP, int CC_id,frame_t frameP, uint16_t preamble_index,int16_t timing_offset,sub_frame_t subframeP) +void initiate_ra_proc_NB_IoT(module_id_t module_idP, int CC_id,frame_t frameP, uint16_t preamble_index,int16_t timing_offset,sub_frame_t subframeP) { uint8_t i; uint8_t carrier_id = 0;/*The index of the UL carrier associated with the NPRACH, the carrier_id of the anchor carrier is 0*/ - RA_TEMPLATE_NB_IoT *RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB[module_idP].common_channels[CC_id].RA_template[0]; + RA_TEMPLATE_NB_IoT *RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB_IoT[module_idP].common_channels[CC_id].RA_template[0]; /*preamble index will be a subcarrier index (0-47)*/ LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Initiating RA procedure for preamble index %d\n",module_idP,CC_id,frameP,preamble_index); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c index 838a1913ed..308a4ade65 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c @@ -67,7 +67,7 @@ //#define DEBUG_eNB_SCHEDULER 1 -uint8_t *NB_get_dlsch_sdu( +uint8_t *get_dlsch_sdu_NB_IoT( module_id_t module_idP, int CC_id, frame_t frameP, @@ -78,7 +78,7 @@ uint8_t *NB_get_dlsch_sdu( { int UE_id; - eNB_MAC_INST_NB_IoT *eNB=&eNB_mac_inst_NB[module_idP]; + eNB_MAC_INST_NB_IoT *eNB=&eNB_mac_inst_NB_IoT[module_idP]; /*for SIBs*/ if (rntiP==SI_RNTI) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c index c5c3327741..238d5a66b4 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c @@ -65,18 +65,18 @@ /*TODO NB_mac_phy_remove_ue*/ -int NB_rrc_mac_remove_ue( +int rrc_mac_remove_ue_NB_IoT( module_id_t mod_idP, rnti_t rntiP) { int i; - UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list; + UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB_IoT[mod_idP].UE_list; int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed int pCC_id; if (UE_id == -1) { printf("MAC: cannot remove UE rnti %x\n", rntiP); - LOG_W(MAC,"NB_rrc_mac_remove_ue: UE %x not found\n", rntiP); + LOG_W(MAC,"rrc_mac_remove_ue_NB_IoT: UE %x not found\n", rntiP); //NB_mac_phy_remove_ue(mod_idP, rntiP); return 0; } @@ -109,7 +109,7 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP); // check if this has an RA process active RA_TEMPLATE_NB_IoT *RA_template; for (i=0;i<NB_RA_PROC_MAX;i++) { - RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB[mod_idP].common_channels[pCC_id].RA_template[i]; + RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB_IoT[mod_idP].common_channels[pCC_id].RA_template[i]; if (RA_template->rnti == rntiP){ RA_template->RA_active=FALSE; RA_template->generate_rar=0; @@ -126,11 +126,11 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP); } //------------------------------------------------------------------------------ -DCI_PDU_NB_IoT *NB_get_dci_sdu(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframeP) +DCI_PDU_NB_IoT *get_dci_sdu_NB_IoT(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframeP) //------------------------------------------------------------------------------ { - return(&eNB_mac_inst_NB[module_idP].common_channels[CC_id].DCI_pdu); + return(&eNB_mac_inst_NB_IoT[module_idP].common_channels[CC_id].DCI_pdu); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c index 6012c1da8a..a5b02e2801 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c @@ -67,7 +67,7 @@ #define DEBUG_eNB_SCHEDULER 1 -void NB_rx_sdu(const module_id_t enb_mod_idP, +void rx_sdu_NB_IoT(const module_id_t enb_mod_idP, const int CC_idP, const frame_t frameP, const sub_frame_t subframeP, @@ -83,7 +83,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP, unsigned short rx_lengths[NB_RB_MAX]; int UE_id = find_UE_id(enb_mod_idP,rntiP); int ii,j; - eNB_MAC_INST_NB_IoT *eNB = &eNB_mac_inst_NB[enb_mod_idP]; + eNB_MAC_INST_NB_IoT *eNB = &eNB_mac_inst_NB_IoT[enb_mod_idP]; UE_list_NB_IoT_t *UE_list= &eNB->UE_list; int crnti_rx=0; //int old_buffer_info; diff --git a/openair2/LAYER2/MAC/extern.h b/openair2/LAYER2/MAC/extern.h index d80f9aebb2..2682236f5c 100644 --- a/openair2/LAYER2/MAC/extern.h +++ b/openair2/LAYER2/MAC/extern.h @@ -50,7 +50,7 @@ //NB-IoT extern IF_Module_t *if_inst; -extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; +extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; #endif extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; @@ -131,7 +131,7 @@ extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E; //NB-IoT--------------------------------- -extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; +extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; extern uint8_t Is_rrc_nb_iot_registered; diff --git a/openair2/LAYER2/MAC/extern_NB_IoT.h b/openair2/LAYER2/MAC/extern_NB_IoT.h index 49fc8f48fc..f2d0428f12 100644 --- a/openair2/LAYER2/MAC/extern_NB_IoT.h +++ b/openair2/LAYER2/MAC/extern_NB_IoT.h @@ -50,7 +50,7 @@ //NB-IoT extern IF_Module_t *if_inst; -extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; +extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; #endif // extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; @@ -131,7 +131,7 @@ extern EMULATION_VARS *Emul_vars; //NB-IoT--------------------------------- -extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; +extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; extern uint8_t Is_rrc_nb_iot_registered; diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index a400b3a16b..a004085420 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -403,7 +403,7 @@ int mac_init_global_param(void) LOG_I(MAC,"[MAIN] RLC interface setup and init\n"); rrc_init_global_param(); - //MP: otherwise we call the initialization of the RRC NB-IoT module (see mac_init_global_param_NB) + //MP: otherwise we call the initialization of the RRC NB-IoT module (see mac_init_global_param_NB_IoT) #ifdef USER_MODE diff --git a/openair2/LAYER2/MAC/main_NB_IoT.c b/openair2/LAYER2/MAC/main_NB_IoT.c index 7797c2a8f3..4e19804f04 100644 --- a/openair2/LAYER2/MAC/main_NB_IoT.c +++ b/openair2/LAYER2/MAC/main_NB_IoT.c @@ -37,7 +37,7 @@ #include "RRC/LITE/proto_NB_IoT.h" -int mac_init_global_param_NB(void) +int mac_init_global_param_NB_IoT(void) { //XXX commented parts are called in the parallel path of OAI @@ -83,7 +83,7 @@ int mac_init_global_param_NB(void) return 0; } -int mac_top_init_NB() +int mac_top_init_NB_IoT() { module_id_t Mod_id,i,j; @@ -100,24 +100,24 @@ int mac_top_init_NB() LOG_I(MAC,"[MAIN] Init function start:Nb_eNB_INST=%d\n",NB_eNB_INST); if (NB_eNB_INST>0) { - eNB_mac_inst_NB = (eNB_MAC_INST_NB_IoT*)malloc16(NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT)); + eNB_mac_inst_NB_IoT = (eNB_MAC_INST_NB_IoT*)malloc16(NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT)); - if (eNB_mac_inst_NB == NULL) { + if (eNB_mac_inst_NB_IoT == NULL) { LOG_D(MAC,"[MAIN] can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT*),NB_eNB_INST,sizeof(eNB_MAC_INST_NB_IoT)); LOG_I(MAC,"[MAC][MAIN] not enough memory for eNB \n"); exit(1); } else { - LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",sizeof(eNB_MAC_INST),NB_eNB_INST,eNB_mac_inst_NB); - bzero(eNB_mac_inst_NB,NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT)); + LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",sizeof(eNB_MAC_INST),NB_eNB_INST,eNB_mac_inst_NB_IoT); + bzero(eNB_mac_inst_NB_IoT,NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT)); } } else { LOG_I (MAC, "No instance allocated for the MAC layer (NB-IoT)\n"); - eNB_mac_inst_NB = NULL; + eNB_mac_inst_NB_IoT = NULL; } // Initialize Linked-List for Active UEs for(Mod_id=0; Mod_id<NB_eNB_INST; Mod_id++) { - UE_list = &eNB_mac_inst_NB[Mod_id].UE_list; + UE_list = &eNB_mac_inst_NB_IoT[Mod_id].UE_list; UE_list->num_UEs=0; UE_list->head=-1; @@ -150,7 +150,7 @@ int mac_top_init_NB() LOG_D(MAC,"[MAIN][eNB %d] CC_id %d initializing RA_template (NB-IoT)\n",i, CC_id); LOG_D(MAC, "[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]\n", i); - RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB[i].common_channels[CC_id].RA_template[0]; + RA_template = (RA_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB_IoT[i].common_channels[CC_id].RA_template[0]; for (j=0; j<NB_RA_PROC_MAX; j++) { size_bytes1 = sizeof(DCIN1_RAR_t); @@ -170,13 +170,13 @@ int mac_top_init_NB() RA_template[j].RA_dci_fmt2 = DCIFormatN1; //for MSG4 } - memset (&eNB_mac_inst_NB[i].eNB_stats,0,sizeof(eNB_STATS_NB_IoT)); - UE_template = (UE_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB[i].UE_list.UE_template[CC_id][0]; + memset (&eNB_mac_inst_NB_IoT[i].eNB_stats,0,sizeof(eNB_STATS_NB_IoT)); + UE_template = (UE_TEMPLATE_NB_IoT *)&eNB_mac_inst_NB_IoT[i].UE_list.UE_template[CC_id][0]; for (j=0; j<NUMBER_OF_UE_MAX; j++) { UE_template[j].rnti=0; // initiallize the eNB to UE statistics - memset (&eNB_mac_inst_NB[i].UE_list.eNB_UE_stats[CC_id][j],0,sizeof(eNB_UE_STATS_NB_IoT)); + memset (&eNB_mac_inst_NB_IoT[i].UE_list.eNB_UE_stats[CC_id][j],0,sizeof(eNB_UE_STATS_NB_IoT)); } } @@ -190,7 +190,7 @@ int mac_top_init_NB() } -int l2_init_eNB_NB() +int l2_init_eNB_NB_IoT() { LOG_I(MAC,"[MAIN] Mapping L2 IF-Module functions\n"); @@ -199,14 +199,14 @@ int l2_init_eNB_NB() LOG_I(MAC,"[MAIN] MAC_INIT_GLOBAL_PARAM NB-IoT IN...\n"); Is_rrc_nb_iot_registered=0; - mac_init_global_param_NB(); + mac_init_global_param_NB_IoT(); Is_rrc_nb_iot_registered=1; LOG_D(MAC,"[MAIN][NB-IoT] ALL INIT OK\n"); // mac_xface->macphy_init(eMBMS_active,uecap_xer,cba_group_active,HO_active); (old mac_top_init) - mac_top_init_NB(); + mac_top_init_NB_IoT(); return(1); } diff --git a/openair2/LAYER2/MAC/proto_NB_IoT.h b/openair2/LAYER2/MAC/proto_NB_IoT.h index 8d6b42322e..1eb64da6b5 100644 --- a/openair2/LAYER2/MAC/proto_NB_IoT.h +++ b/openair2/LAYER2/MAC/proto_NB_IoT.h @@ -39,12 +39,12 @@ /* \brief Function to indicate a received SDU on ULSCH for NB-IoT. */ -void NB_rx_sdu(const module_id_t module_idP, const int CC_id,const frame_t frameP, const sub_frame_t subframeP, const rnti_t rnti, uint8_t *sdu, const uint16_t sdu_len, const int harq_pid); +void rx_sdu_NB_IoT(const module_id_t module_idP, const int CC_id,const frame_t frameP, const sub_frame_t subframeP, const rnti_t rnti, uint8_t *sdu, const uint16_t sdu_len, const int harq_pid); /* \brief Function to retrieve result of scheduling (DCI) in current subframe. Can be called an arbitrary numeber of times after eNB_dlsch_ulsch_scheduler in a given subframe. */ -DCI_PDU_NB_IoT *NB_get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframe); +DCI_PDU_NB_IoT *get_dci_sdu_NB_IoT(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframe); /* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f @@ -52,22 +52,22 @@ DCI_PDU_NB_IoT *NB_get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,s ready after returning from this call. */ -void NB_eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP); +void eNB_dlsch_ulsch_scheduler_NB_IoT(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP); /* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure. In NB-IoT, it indicate preamble using the frequency to indicate the preamble. */ -void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP); +void schedule_RA_NB_IoT(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP); -void NB_initiate_ra_proc(module_id_t module_idP, int CC_id,frame_t frameP, uint16_t preamble_index,int16_t timing_offset,sub_frame_t subframeP); +void initiate_ra_proc_NB_IoT(module_id_t module_idP, int CC_id,frame_t frameP, uint16_t preamble_index,int16_t timing_offset,sub_frame_t subframeP); -uint8_t *NB_get_dlsch_sdu(module_id_t module_idP,int CC_id,frame_t frameP,rnti_t rnti,uint8_t TBindex); +uint8_t *get_dlsch_sdu_NB_IoT(module_id_t module_idP,int CC_id,frame_t frameP,rnti_t rnti,uint8_t TBindex); -int NB_rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP); +int rrc_mac_remove_ue_NB_IoT(module_id_t Mod_id, rnti_t rntiP); -int l2_init_eNB_NB(void); -int mac_init_global_param_NB(void); -int mac_top_init_NB(void); +int l2_init_eNB_NB_IoT(void); +int mac_init_global_param_NB_IoT(void); +int mac_top_init_NB_IoT(void); #endif diff --git a/openair2/LAYER2/MAC/vars.h b/openair2/LAYER2/MAC/vars.h index e0a2443cf7..1696bc7f50 100644 --- a/openair2/LAYER2/MAC/vars.h +++ b/openair2/LAYER2/MAC/vars.h @@ -43,7 +43,7 @@ #ifdef NB_IOT //NB-IoT -eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; +eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; IF_Module_t *if_inst; #endif @@ -158,8 +158,8 @@ DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E; //NB-IoT-------------------------------------- -eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; -//should be utilized in: NB_schedule_RA,NB_rx_sdu, mac_top_init_NB, +eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; +//should be utilized in: schedule_RA_NB_IoT,rx_sdu_NB_IoT, mac_top_init_NB_IoT, uint8_t Is_rrc_nb_iot_registered; diff --git a/openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c b/openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c index 4a400387ae..c6b45b0351 100644 --- a/openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c +++ b/openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c @@ -10,14 +10,14 @@ void UL_indication(UL_IND_t *UL_INFO) { for(i=0;i<UL_INFO->NRACH.number_of_initial_scs_detected;i++) { - NB_initiate_ra_proc(UL_INFO->module_id, - UL_INFO->CC_id, - UL_INFO->frame, - (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc, - //timing_offset = Timing_advance * 16 - (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance * 16, - UL_INFO->subframe - ); + initiate_ra_proc_NB_IoT(UL_INFO->module_id, + UL_INFO->CC_id, + UL_INFO->frame, + (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc, + //timing_offset = Timing_advance * 16 + (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance * 16, + UL_INFO->subframe + ); } } if(UL_INFO->RX_NPUSCH.number_of_pdus>0) @@ -26,20 +26,20 @@ void UL_indication(UL_IND_t *UL_INFO) for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++) { /*For MSG3, Normal Uplink Data, NAK*/ - NB_rx_sdu(UL_INFO->module_id, - UL_INFO->CC_id, - UL_INFO->frame, - UL_INFO->subframe, - (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.rnti, - (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->data, - (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_indication_rel8.length, - (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.harq_pid - ); + rx_sdu_NB_IoT(UL_INFO->module_id, + UL_INFO->CC_id, + UL_INFO->frame, + UL_INFO->subframe, + (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.rnti, + (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->data, + (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_indication_rel8.length, + (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.harq_pid + ); } } - //NB_eNB_dlsch_ulsch_scheduler(UL_INFO.module_id,0,UL_INFO.frame,UL_INFO.subframe); TODO: to be implemented + //eNB_dlsch_ulsch_scheduler_NB_IoT(UL_INFO.module_id,0,UL_INFO.frame,UL_INFO.subframe); TODO: to be implemented } diff --git a/openair2/RRC/LITE/L2_interface_NB_IoT.c b/openair2/RRC/LITE/L2_interface_NB_IoT.c index 5a31a7a570..5c8cfdc89a 100644 --- a/openair2/RRC/LITE/L2_interface_NB_IoT.c +++ b/openair2/RRC/LITE/L2_interface_NB_IoT.c @@ -587,7 +587,7 @@ int NB_rrc_mac_config_req_eNB( int UE_id = -1; - //UE_list_NB_IoT_t *UE_list= &eNB_mac_inst_NB->UE_list; + //UE_list_NB_IoT_t *UE_list= &eNB_mac_inst_NB_IoT->UE_list; UE_id = find_UE_id(Mod_idP, rntiP); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN); @@ -610,14 +610,14 @@ int NB_rrc_mac_config_req_eNB( //mac_top_init_eNB(); //TODO MP: to be included in the MAC/main.c - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].mib_NB = mib_NB; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].physCellId = physCellId; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].p_rx_eNB = p_rx_eNB; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].Ncp = Ncp; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].Ncp_UL = Ncp_UL; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].eutra_band = eutra_band; - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].dl_CarrierFreq = dl_CarrierFreq; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].mib_NB = mib_NB; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].physCellId = physCellId; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_rx_eNB = p_rx_eNB; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].Ncp = Ncp; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].Ncp_UL = Ncp_UL; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].eutra_band = eutra_band; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].dl_CarrierFreq = dl_CarrierFreq; LOG_I(MAC, "Configuring MIB for instance %d, CCid %d : (band %d,Nid_cell %d,TX antenna port (p) %d,DL freq %u\n", @@ -673,8 +673,8 @@ int NB_rrc_mac_config_req_eNB( LOG_I(MAC,"[CONFIG]npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13= %ld\n", radioResourceConfigCommon->npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13); - eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].radioResourceConfigCommon = radioResourceConfigCommon; - if (ul_CarrierFreq>0) eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].ul_CarrierFreq = ul_CarrierFreq; + eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].radioResourceConfigCommon = radioResourceConfigCommon; + if (ul_CarrierFreq>0) eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].ul_CarrierFreq = ul_CarrierFreq; config_sib2_NB_fapi(physCellId,radioResourceConfigCommon); @@ -1347,7 +1347,7 @@ void NB_mac_eNB_rrc_ul_failure( else { LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP); } - NB_rrc_mac_remove_ue(mod_idP,rntiP); + rrc_mac_remove_ue_NB_IoT(mod_idP,rntiP); } @@ -1371,18 +1371,18 @@ void dump_ue_list_NB(UE_list_NB_IoT_t *listP, int ul_flag) //defined in eNB_scheduler_primitives.c -int NB_rrc_mac_remove_ue( +int rrc_mac_remove_ue_NB_IoT( module_id_t mod_idP, rnti_t rntiP) { int i; - UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list; + UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB_IoT[mod_idP].UE_list; int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed int pCC_id; if (UE_id == -1) { printf("MAC: cannot remove UE rnti %x\n", rntiP); - LOG_W(MAC,"NB_rrc_mac_remove_ue: UE %x not found\n", rntiP); + LOG_W(MAC,"rrc_mac_remove_ue_NB_IoT: UE %x not found\n", rntiP); mac_phy_remove_ue(mod_idP, rntiP); //PHY/defs.h return 0; } diff --git a/openair2/RRC/LITE/proto_NB_IoT.h b/openair2/RRC/LITE/proto_NB_IoT.h index fb1cc1962e..0f93d95a41 100644 --- a/openair2/RRC/LITE/proto_NB_IoT.h +++ b/openair2/RRC/LITE/proto_NB_IoT.h @@ -183,7 +183,7 @@ void NB_mac_eNB_rrc_ul_failure( //------------------------------------------ //defined in eNB_scheduler_primitives.c -int NB_rrc_mac_remove_ue( +int rrc_mac_remove_ue_NB_IoT( module_id_t mod_idP, rnti_t rntiP); //------------------------------------------ diff --git a/openair2/RRC/LITE/rrc_eNB_NB_IoT.c b/openair2/RRC/LITE/rrc_eNB_NB_IoT.c index 3816fa51bf..491813fcad 100644 --- a/openair2/RRC/LITE/rrc_eNB_NB_IoT.c +++ b/openair2/RRC/LITE/rrc_eNB_NB_IoT.c @@ -2004,7 +2004,7 @@ rrc_eNB_decode_ccch_NB( LOG_W(RRC, "new UE rnti %x (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n", ctxt_pP->rnti, ue_context_p->ue_context.rnti, ctxt_pP->rnti); - NB_rrc_mac_remove_ue(ctxt_pP->module_id, ctxt_pP->rnti); + rrc_mac_remove_ue_NB_IoT(ctxt_pP->module_id, ctxt_pP->rnti); ue_context_p = NULL; return 0; } else { @@ -2019,7 +2019,7 @@ rrc_eNB_decode_ccch_NB( if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist_NB(ctxt_pP, mme_code, m_tmsi))) { LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti,ctxt_pP->rnti); - NB_rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti); + rrc_mac_remove_ue_NB_IoT(ctxt_pP->module_id, ue_context_p->ue_context.rnti); stmsi_received=1; /* replace rnti in the context */ @@ -2111,7 +2111,7 @@ rrc_eNB_decode_ccch_NB( LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Can't create new context for UE random UE identity (0x%" PRIx64 ")\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), random_value); - NB_rrc_mac_remove_ue(ctxt_pP->module_id,ctxt_pP->rnti); + rrc_mac_remove_ue_NB_IoT(ctxt_pP->module_id,ctxt_pP->rnti); return -1; } } diff --git a/record.txt b/record.txt index d30e48cf41..c982b053b0 100644 --- a/record.txt +++ b/record.txt @@ -20,14 +20,14 @@ Add: openair2/Layer2/MAC/eNB_scheduler_prmitives_NB_IoT.c Add: openair2/Layer2/MAC/eNB_scheduler_dlsch_NB_IoT.c comment: -Functions: NB_rx_sdu(), NB_get_dci_sdu(), NB_rrc_mac_remove_ue(), NB_get_dlsch_sdu(); +Functions: rx_sdu_NB_IoT(), get_dci_sdu_NB_IoT(), rrc_mac_remove_ue_NB_IoT(), get_dlsch_sdu_NB_IoT(); Parameters: All parameters/structures used in MAC Layer. 5/15 Add: openair2/Layer2/MAC/eNB_scheduler_RA_NB_IoT.c comment: -Functions: NB_initiate_ra_proc() +Functions: initiate_ra_proc_NB_IoT() 5/15 modified: openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.h @@ -36,7 +36,7 @@ modified: openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c modified: openair2/LAYER2/MAC/proto_NB_IoT.h comment: -Functions: NB_schedule_RA() +Functions: schedule_RA_NB_IoT() Parameters: Add DCI unpacked format 5/16 diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 50388bf6cc..55b40232be 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1826,7 +1826,7 @@ int main( int argc, char **argv ) { //initialize L2 for NB-IoT stuff (complementary to legacy OAI initialization) #ifdef NB_IOT - l2_init_eNB_NB(); + l2_init_eNB_NB_IoT(); #endif -- 2.26.2