Commit 1503b92f authored by wujing's avatar wujing

fix sim phy basic compile bug

parent f3e7834f
......@@ -1692,3 +1692,43 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) {
return retval;
}
#if BASIC_SIMULATOR
void release_rnti_of_phy(module_id_t mod_id){
}
#else
void release_rnti_of_phy(module_id_t mod_id){
int i,j;
int CC_id;
rnti_t rnti;
PHY_VARS_eNB *eNB_PHY = NULL;
LTE_eNB_ULSCH_t *ulsch = NULL;
LTE_eNB_DLSCH_t *dlsch = NULL;
for(i = 0; i< release_rntis.number_of_rnti;i++){
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[mod_id][CC_id];
rnti = release_rntis.UE_free_rnti[i];
for (j=0; j<=NUMBER_OF_UE_MAX; j++) {
ulsch = eNB_PHY->ulsch[j];
if((ulsch != NULL) && (ulsch->rnti == rnti)){
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
clean_eNb_ulsch(ulsch);
}
}
for(j=0; j<NUMBER_OF_UE_MAX; j++) {
if(eNB_PHY->uci_vars[j].rnti == rnti){
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
}
dlsch = eNB_PHY->dlsch[j][0];
if((dlsch != NULL) && (dlsch->rnti == rnti)){
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
clean_eNb_dlsch(dlsch);
}
}
}
}
memset(&release_rntis, 0, sizeof(nfapi_release_rnti_request_body_t));
}
#endif
......@@ -51,8 +51,6 @@
extern uint8_t nfapi_mode;
extern nfapi_release_rnti_request_body_t release_rntis;
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor)
{
......@@ -2099,37 +2097,3 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 );
}
void release_rnti_of_phy(module_id_t mod_id){
int i,j;
int CC_id;
rnti_t rnti;
PHY_VARS_eNB *eNB_PHY = NULL;
LTE_eNB_ULSCH_t *ulsch = NULL;
LTE_eNB_DLSCH_t *dlsch = NULL;
for(i = 0; i< release_rntis.number_of_rnti;i++){
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[mod_id][CC_id];
rnti = release_rntis.UE_free_rnti[i];
for (j=0; j<=NUMBER_OF_UE_MAX; j++) {
ulsch = eNB_PHY->ulsch[j];
if((ulsch != NULL) && (ulsch->rnti == rnti)){
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
clean_eNb_ulsch(ulsch);
}
}
for(j=0; j<NUMBER_OF_UE_MAX; j++) {
if(eNB_PHY->uci_vars[j].rnti == rnti){
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
}
dlsch = eNB_PHY->dlsch[j][0];
if((dlsch != NULL) && (dlsch->rnti == rnti)){
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
clean_eNb_dlsch(dlsch);
}
}
}
}
memset(&release_rntis, 0, sizeof(nfapi_release_rnti_request_body_t));
}
......@@ -219,10 +219,6 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
void release_rnti_of_phy(module_id_t mod_id);
/*@}*/
#endif
......@@ -89,4 +89,6 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
int oai_nfapi_release_rnti_req(nfapi_release_rnti_request_t *release_req){ return(0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
......@@ -633,8 +633,8 @@ int main(int argc, char **argv) {
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
eNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = eNB->sr_pdu_list;
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
printf("lte_param_init done\n");
// for a call to phy_reset_ue later we need PHY_vars_UE_g allocated and pointing to UE
PHY_vars_UE_g = (PHY_VARS_UE ***)malloc(sizeof(PHY_VARS_UE **));
......
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