Commit 7efad13f authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6280 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent cccc99f5
...@@ -112,7 +112,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -112,7 +112,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
for (i=UE_list->head;i>0;i=UE_list->next[i]) { for (i=UE_list->head;i>0;i=UE_list->next[i]) {
LOG_I(MAC,"UE %d: rnti %x (%p)\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))); LOG_I(MAC,"UE %d: rnti %x (%p)\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i)));
if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL) if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL)
mac_remove_ue(module_idP,i); mac_remove_ue(module_idP,i,frameP);
} }
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
do { do {
...@@ -206,7 +206,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -206,7 +206,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
next_i = UE_list->next[i]; next_i = UE_list->next[i];
LOG_D(MAC,"UE %d : rnti %x, stats %p\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))); LOG_D(MAC,"UE %d : rnti %x, stats %p\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i)));
if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL) { if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL) {
mac_remove_ue(module_idP,i); mac_remove_ue(module_idP,i,frameP);
} }
i=next_i; i=next_i;
} }
......
...@@ -249,7 +249,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) { ...@@ -249,7 +249,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) {
return(-1); return(-1);
} }
int mac_remove_ue(module_id_t mod_idP, int ue_idP) { int mac_remove_ue(module_id_t mod_idP, int ue_idP, int frameP) {
int prev,i, ret=-1; int prev,i, ret=-1;
...@@ -273,7 +273,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) { ...@@ -273,7 +273,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP) {
eNB_dlsch_info[mod_idP][pCC_id][ue_idP].rnti = 0; eNB_dlsch_info[mod_idP][pCC_id][ue_idP].rnti = 0;
eNB_dlsch_info[mod_idP][pCC_id][ue_idP].status = S_DL_NONE; eNB_dlsch_info[mod_idP][pCC_id][ue_idP].status = S_DL_NONE;
rrc_eNB_free_UE_index(mod_idP,ue_idP); rrc_eNB_free_UE_index(mod_idP,ue_idP,frameP);
prev = UE_list->head; prev = UE_list->head;
for (i=UE_list->head;i>=0;i=UE_list->next[i]) { for (i=UE_list->head;i>=0;i=UE_list->next[i]) {
......
...@@ -472,7 +472,7 @@ uint8_t *parse_ulsch_header(uint8_t *mac_header, ...@@ -472,7 +472,7 @@ uint8_t *parse_ulsch_header(uint8_t *mac_header,
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active); int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active);
int mac_init(void); int mac_init(void);
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid); int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid);
int mac_remove_ue(module_id_t Mod_id, int UE_id); int mac_remove_ue(module_id_t Mod_id, int UE_id,int frameP);
int maxround(module_id_t Mod_id,uint16_t rnti,int frame,sub_frame_t subframe,uint8_t ul_flag); int maxround(module_id_t Mod_id,uint16_t rnti,int frame,sub_frame_t subframe,uint8_t ul_flag);
......
...@@ -263,7 +263,7 @@ uint8_t check_trigger_meas_event(uint8_t module_idP,frame_t frameP, uint8_t eNB_ ...@@ -263,7 +263,7 @@ uint8_t check_trigger_meas_event(uint8_t module_idP,frame_t frameP, uint8_t eNB_
//void rrc_ue_process_ueCapabilityEnquiry(uint8_t module_idP,uint32_t frame,UECapabilityEnquiry_t *UECapabilityEnquiry,uint8_t eNB_index); //void rrc_ue_process_ueCapabilityEnquiry(uint8_t module_idP,uint32_t frame,UECapabilityEnquiry_t *UECapabilityEnquiry,uint8_t eNB_index);
//void rrc_ue_process_securityModeCommand(uint8_t module_idP,uint32_t frame,SecurityModeCommand_t *securityModeCommand,uint8_t eNB_index); //void rrc_ue_process_securityModeCommand(uint8_t module_idP,uint32_t frame,SecurityModeCommand_t *securityModeCommand,uint8_t eNB_index);
void rrc_eNB_free_UE_index (module_id_t enb_mod_idP, module_id_t ue_mod_idP); void rrc_eNB_free_UE_index (module_id_t enb_mod_idP, module_id_t ue_mod_idP,int frameP);
long binary_search_int(int elements[], long numElem, int value); long binary_search_int(int elements[], long numElem, int value);
......
...@@ -527,17 +527,25 @@ static module_id_t rrc_eNB_get_next_free_UE_index( ...@@ -527,17 +527,25 @@ static module_id_t rrc_eNB_get_next_free_UE_index(
} }
void rrc_eNB_free_UE_index( void rrc_eNB_free_UE_index(
module_id_t enb_mod_idP, module_id_t enb_mod_idP,
module_id_t ue_mod_idP) { module_id_t ue_mod_idP,
AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB inst invalid (%d/%d) for UE %d!", enb_mod_idP, NB_eNB_INST, ue_mod_idP); int frameP) {
AssertFatal(ue_mod_idP < NUMBER_OF_UE_MAX, "UE inst invalid (%d/%d) for eNB %d!", ue_mod_idP, NUMBER_OF_UE_MAX,
enb_mod_idP);
LOG_W(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP, DRB_ToAddModList_t *DRB_configList = eNB_rrc_inst[enb_mod_idP].DRB_configList[ue_mod_idP];
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]); SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0; AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB inst invalid (%d/%d) for UE %d!", enb_mod_idP, NB_eNB_INST, ue_mod_idP);
free(eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP]); AssertFatal(ue_mod_idP < NUMBER_OF_UE_MAX, "UE inst invalid (%d/%d) for eNB %d!", ue_mod_idP, NUMBER_OF_UE_MAX,
enb_mod_idP);
LOG_W(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP,
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]);
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
rrc_rlc_remove_rlc(enb_mod_idP, ue_mod_idP, frameP, ENB_FLAG_YES, SRB_FLAG_YES, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,
1);
free(eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP]);
} }
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
......
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