Commit c0b027b4 authored by Matthieu Kanj's avatar Matthieu Kanj

renaming functions in file: openair2/LAYER2/MAC/proto_NB_IoT.h

parent 50207091
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
/* already defined in proto_NB_IoT.h /* 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)
{ {
} }
......
...@@ -69,11 +69,11 @@ ...@@ -69,11 +69,11 @@
#include "T.h" #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; 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; 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_ ...@@ -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; RA_template->RA_active=FALSE;
UE_id = find_UE_id(module_idP,RA_template->rnti); UE_id = find_UE_id(module_idP,RA_template->rnti);
DevAssert( UE_id != -1 ); 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_ ...@@ -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); // stop_meas(&eNB->schedule_ra);
} }
/*This function should loop all over the preamble index*/ /*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 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*/ 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)*/ /*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); 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);
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
//#define DEBUG_eNB_SCHEDULER 1 //#define DEBUG_eNB_SCHEDULER 1
uint8_t *NB_get_dlsch_sdu( uint8_t *get_dlsch_sdu_NB_IoT(
module_id_t module_idP, module_id_t module_idP,
int CC_id, int CC_id,
frame_t frameP, frame_t frameP,
...@@ -78,7 +78,7 @@ uint8_t *NB_get_dlsch_sdu( ...@@ -78,7 +78,7 @@ uint8_t *NB_get_dlsch_sdu(
{ {
int UE_id; 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*/ /*for SIBs*/
if (rntiP==SI_RNTI) { if (rntiP==SI_RNTI) {
......
...@@ -65,18 +65,18 @@ ...@@ -65,18 +65,18 @@
/*TODO NB_mac_phy_remove_ue*/ /*TODO NB_mac_phy_remove_ue*/
int NB_rrc_mac_remove_ue( int rrc_mac_remove_ue_NB_IoT(
module_id_t mod_idP, module_id_t mod_idP,
rnti_t rntiP) rnti_t rntiP)
{ {
int i; 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 UE_id = find_UE_id(mod_idP,rntiP); //may should be changed
int pCC_id; int pCC_id;
if (UE_id == -1) { if (UE_id == -1) {
printf("MAC: cannot remove UE rnti %x\n", rntiP); 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); //NB_mac_phy_remove_ue(mod_idP, rntiP);
return 0; return 0;
} }
...@@ -109,7 +109,7 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP); ...@@ -109,7 +109,7 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP);
// check if this has an RA process active // check if this has an RA process active
RA_TEMPLATE_NB_IoT *RA_template; RA_TEMPLATE_NB_IoT *RA_template;
for (i=0;i<NB_RA_PROC_MAX;i++) { 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){ if (RA_template->rnti == rntiP){
RA_template->RA_active=FALSE; RA_template->RA_active=FALSE;
RA_template->generate_rar=0; RA_template->generate_rar=0;
...@@ -126,11 +126,11 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP); ...@@ -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);
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define DEBUG_eNB_SCHEDULER 1 #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 int CC_idP,
const frame_t frameP, const frame_t frameP,
const sub_frame_t subframeP, const sub_frame_t subframeP,
...@@ -83,7 +83,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP, ...@@ -83,7 +83,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
unsigned short rx_lengths[NB_RB_MAX]; unsigned short rx_lengths[NB_RB_MAX];
int UE_id = find_UE_id(enb_mod_idP,rntiP); int UE_id = find_UE_id(enb_mod_idP,rntiP);
int ii,j; 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; UE_list_NB_IoT_t *UE_list= &eNB->UE_list;
int crnti_rx=0; int crnti_rx=0;
//int old_buffer_info; //int old_buffer_info;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
//NB-IoT //NB-IoT
extern IF_Module_t *if_inst; 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 #endif
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
...@@ -131,7 +131,7 @@ extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E; ...@@ -131,7 +131,7 @@ extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
//NB-IoT--------------------------------- //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; extern uint8_t Is_rrc_nb_iot_registered;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
//NB-IoT //NB-IoT
extern IF_Module_t *if_inst; 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 #endif
// extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; // extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
...@@ -131,7 +131,7 @@ extern EMULATION_VARS *Emul_vars; ...@@ -131,7 +131,7 @@ extern EMULATION_VARS *Emul_vars;
//NB-IoT--------------------------------- //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; extern uint8_t Is_rrc_nb_iot_registered;
......
...@@ -403,7 +403,7 @@ int mac_init_global_param(void) ...@@ -403,7 +403,7 @@ int mac_init_global_param(void)
LOG_I(MAC,"[MAIN] RLC interface setup and init\n"); LOG_I(MAC,"[MAIN] RLC interface setup and init\n");
rrc_init_global_param(); 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 #ifdef USER_MODE
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "RRC/LITE/proto_NB_IoT.h" #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 //XXX commented parts are called in the parallel path of OAI
...@@ -83,7 +83,7 @@ int mac_init_global_param_NB(void) ...@@ -83,7 +83,7 @@ int mac_init_global_param_NB(void)
return 0; return 0;
} }
int mac_top_init_NB() int mac_top_init_NB_IoT()
{ {
module_id_t Mod_id,i,j; module_id_t Mod_id,i,j;
...@@ -100,24 +100,24 @@ int mac_top_init_NB() ...@@ -100,24 +100,24 @@ int mac_top_init_NB()
LOG_I(MAC,"[MAIN] Init function start:Nb_eNB_INST=%d\n",NB_eNB_INST); LOG_I(MAC,"[MAIN] Init function start:Nb_eNB_INST=%d\n",NB_eNB_INST);
if (NB_eNB_INST>0) { 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_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"); LOG_I(MAC,"[MAC][MAIN] not enough memory for eNB \n");
exit(1); exit(1);
} else { } 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); 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,NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT)); bzero(eNB_mac_inst_NB_IoT,NB_eNB_INST*sizeof(eNB_MAC_INST_NB_IoT));
} }
} else { } else {
LOG_I (MAC, "No instance allocated for the MAC layer (NB-IoT)\n"); 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 // Initialize Linked-List for Active UEs
for(Mod_id=0; Mod_id<NB_eNB_INST; Mod_id++) { 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->num_UEs=0;
UE_list->head=-1; UE_list->head=-1;
...@@ -150,7 +150,7 @@ int mac_top_init_NB() ...@@ -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,"[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); 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++) { for (j=0; j<NB_RA_PROC_MAX; j++) {
size_bytes1 = sizeof(DCIN1_RAR_t); size_bytes1 = sizeof(DCIN1_RAR_t);
...@@ -170,13 +170,13 @@ int mac_top_init_NB() ...@@ -170,13 +170,13 @@ int mac_top_init_NB()
RA_template[j].RA_dci_fmt2 = DCIFormatN1; //for MSG4 RA_template[j].RA_dci_fmt2 = DCIFormatN1; //for MSG4
} }
memset (&eNB_mac_inst_NB[i].eNB_stats,0,sizeof(eNB_STATS_NB_IoT)); 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[i].UE_list.UE_template[CC_id][0]; 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++) { for (j=0; j<NUMBER_OF_UE_MAX; j++) {
UE_template[j].rnti=0; UE_template[j].rnti=0;
// initiallize the eNB to UE statistics // 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() ...@@ -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"); LOG_I(MAC,"[MAIN] Mapping L2 IF-Module functions\n");
...@@ -199,14 +199,14 @@ int l2_init_eNB_NB() ...@@ -199,14 +199,14 @@ int l2_init_eNB_NB()
LOG_I(MAC,"[MAIN] MAC_INIT_GLOBAL_PARAM NB-IoT IN...\n"); LOG_I(MAC,"[MAIN] MAC_INIT_GLOBAL_PARAM NB-IoT IN...\n");
Is_rrc_nb_iot_registered=0; Is_rrc_nb_iot_registered=0;
mac_init_global_param_NB(); mac_init_global_param_NB_IoT();
Is_rrc_nb_iot_registered=1; Is_rrc_nb_iot_registered=1;
LOG_D(MAC,"[MAIN][NB-IoT] ALL INIT OK\n"); 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_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); return(1);
} }
......
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
/* \brief Function to indicate a received SDU on ULSCH for NB-IoT. /* \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 /* \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. 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 /* \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 ...@@ -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. 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. /* \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. 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 l2_init_eNB_NB_IoT(void);
int mac_init_global_param_NB(void); int mac_init_global_param_NB_IoT(void);
int mac_top_init_NB(void); int mac_top_init_NB_IoT(void);
#endif #endif
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#ifdef NB_IOT #ifdef NB_IOT
//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; IF_Module_t *if_inst;
#endif #endif
...@@ -158,8 +158,8 @@ DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E; ...@@ -158,8 +158,8 @@ DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
//NB-IoT-------------------------------------- //NB-IoT--------------------------------------
eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB; eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT;
//should be utilized in: NB_schedule_RA,NB_rx_sdu, mac_top_init_NB, //should be utilized in: schedule_RA_NB_IoT,rx_sdu_NB_IoT, mac_top_init_NB_IoT,
uint8_t Is_rrc_nb_iot_registered; uint8_t Is_rrc_nb_iot_registered;
......
...@@ -10,7 +10,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -10,7 +10,7 @@ void UL_indication(UL_IND_t *UL_INFO)
{ {
for(i=0;i<UL_INFO->NRACH.number_of_initial_scs_detected;i++) for(i=0;i<UL_INFO->NRACH.number_of_initial_scs_detected;i++)
{ {
NB_initiate_ra_proc(UL_INFO->module_id, initiate_ra_proc_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id, UL_INFO->CC_id,
UL_INFO->frame, UL_INFO->frame,
(UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc, (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc,
...@@ -26,7 +26,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -26,7 +26,7 @@ void UL_indication(UL_IND_t *UL_INFO)
for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++) for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++)
{ {
/*For MSG3, Normal Uplink Data, NAK*/ /*For MSG3, Normal Uplink Data, NAK*/
NB_rx_sdu(UL_INFO->module_id, rx_sdu_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id, UL_INFO->CC_id,
UL_INFO->frame, UL_INFO->frame,
UL_INFO->subframe, UL_INFO->subframe,
...@@ -41,5 +41,5 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -41,5 +41,5 @@ void UL_indication(UL_IND_t *UL_INFO)
} }
//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
} }
...@@ -587,7 +587,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -587,7 +587,7 @@ int NB_rrc_mac_config_req_eNB(
int UE_id = -1; 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); 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); 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( ...@@ -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 //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_IoT[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_IoT[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_IoT[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_IoT[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_IoT[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_IoT[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_IoT[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].dl_CarrierFreq = dl_CarrierFreq;
LOG_I(MAC, LOG_I(MAC,
"Configuring MIB for instance %d, CCid %d : (band %d,Nid_cell %d,TX antenna port (p) %d,DL freq %u\n", "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( ...@@ -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); 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; eNB_mac_inst_NB_IoT[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; 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); config_sib2_NB_fapi(physCellId,radioResourceConfigCommon);
...@@ -1347,7 +1347,7 @@ void NB_mac_eNB_rrc_ul_failure( ...@@ -1347,7 +1347,7 @@ void NB_mac_eNB_rrc_ul_failure(
else { else {
LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP); 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) ...@@ -1371,18 +1371,18 @@ void dump_ue_list_NB(UE_list_NB_IoT_t *listP, int ul_flag)
//defined in eNB_scheduler_primitives.c //defined in eNB_scheduler_primitives.c
int NB_rrc_mac_remove_ue( int rrc_mac_remove_ue_NB_IoT(
module_id_t mod_idP, module_id_t mod_idP,
rnti_t rntiP) rnti_t rntiP)
{ {
int i; 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 UE_id = find_UE_id(mod_idP,rntiP); //may should be changed
int pCC_id; int pCC_id;
if (UE_id == -1) { if (UE_id == -1) {
printf("MAC: cannot remove UE rnti %x\n", rntiP); 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 mac_phy_remove_ue(mod_idP, rntiP); //PHY/defs.h
return 0; return 0;
} }
......
...@@ -183,7 +183,7 @@ void NB_mac_eNB_rrc_ul_failure( ...@@ -183,7 +183,7 @@ void NB_mac_eNB_rrc_ul_failure(
//------------------------------------------ //------------------------------------------
//defined in eNB_scheduler_primitives.c //defined in eNB_scheduler_primitives.c
int NB_rrc_mac_remove_ue( int rrc_mac_remove_ue_NB_IoT(
module_id_t mod_idP, module_id_t mod_idP,
rnti_t rntiP); rnti_t rntiP);
//------------------------------------------ //------------------------------------------
......
...@@ -2004,7 +2004,7 @@ rrc_eNB_decode_ccch_NB( ...@@ -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", 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); 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; ue_context_p = NULL;
return 0; return 0;
} else { } else {
...@@ -2019,7 +2019,7 @@ rrc_eNB_decode_ccch_NB( ...@@ -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))) { 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); 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; stmsi_received=1;
/* replace rnti in the context */ /* replace rnti in the context */
...@@ -2111,7 +2111,7 @@ rrc_eNB_decode_ccch_NB( ...@@ -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", 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), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
random_value); 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; return -1;
} }
} }
......
...@@ -20,14 +20,14 @@ Add: openair2/Layer2/MAC/eNB_scheduler_prmitives_NB_IoT.c ...@@ -20,14 +20,14 @@ Add: openair2/Layer2/MAC/eNB_scheduler_prmitives_NB_IoT.c
Add: openair2/Layer2/MAC/eNB_scheduler_dlsch_NB_IoT.c Add: openair2/Layer2/MAC/eNB_scheduler_dlsch_NB_IoT.c
comment: 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. Parameters: All parameters/structures used in MAC Layer.
5/15 5/15
Add: openair2/Layer2/MAC/eNB_scheduler_RA_NB_IoT.c Add: openair2/Layer2/MAC/eNB_scheduler_RA_NB_IoT.c
comment: comment:
Functions: NB_initiate_ra_proc() Functions: initiate_ra_proc_NB_IoT()
5/15 5/15
modified: openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.h modified: openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.h
...@@ -36,7 +36,7 @@ modified: openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c ...@@ -36,7 +36,7 @@ modified: openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
modified: openair2/LAYER2/MAC/proto_NB_IoT.h modified: openair2/LAYER2/MAC/proto_NB_IoT.h
comment: comment:
Functions: NB_schedule_RA() Functions: schedule_RA_NB_IoT()
Parameters: Add DCI unpacked format Parameters: Add DCI unpacked format
5/16 5/16
......
...@@ -1826,7 +1826,7 @@ int main( int argc, char **argv ) { ...@@ -1826,7 +1826,7 @@ int main( int argc, char **argv ) {
//initialize L2 for NB-IoT stuff (complementary to legacy OAI initialization) //initialize L2 for NB-IoT stuff (complementary to legacy OAI initialization)
#ifdef NB_IOT #ifdef NB_IOT
l2_init_eNB_NB(); l2_init_eNB_NB_IoT();
#endif #endif
......
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