Commit 946ae925 authored by wujing's avatar wujing

fix phy basic ue bug

parent 1503b92f
......@@ -82,7 +82,7 @@ nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10]; // [frame][subframe][max_n
uint8_t tx_pdus[32][8][4096];
nfapi_release_rnti_request_body_t release_rntis;
extern nfapi_release_rnti_request_body_t release_rntis;
uint16_t phy_antenna_capability_values[] = { 1, 2, 4, 8, 16 };
......@@ -1692,43 +1692,3 @@ 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,6 +51,8 @@
extern uint8_t nfapi_mode;
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)
{
......@@ -2097,3 +2099,37 @@ 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,6 +219,10 @@ 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
......@@ -222,6 +222,8 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
return temp;
}
nfapi_release_rnti_request_body_t release_rntis;
void print_difftimes(void) {
#ifdef DEBUG
printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
......
......@@ -231,6 +231,8 @@ int oaisim_flag=0;
*/
uint8_t abstraction_flag=0;
nfapi_release_rnti_request_body_t release_rntis;
/* forward declarations */
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
......
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