Commit 1aa6306c authored by chenhsunyang0922's avatar chenhsunyang0922

fix compile error in lte-eNB.c

parent ec10bea0
......@@ -146,7 +146,8 @@ typedef enum {
NFAPI_LBT_DL_INDICATION,
NFAPI_NB_HARQ_INDICATION,
NFAPI_NRACH_INDICATION,
NFAPI_UE_RELEASE_REQUEST,
NFAPI_UE_RELEASE_RESPONSE,
NFAPI_PNF_PARAM_REQUEST = 0x0100,
NFAPI_PNF_PARAM_RESPONSE,
NFAPI_PNF_CONFIG_REQUEST,
......@@ -2392,6 +2393,18 @@ typedef struct {
} nfapi_tx_request_body_t;
#define NFAPI_TX_REQUEST_BODY_TAG 0x2022
#define NFAPI_RELEASE_MAX_RNTI 256
typedef struct {
uint32_t handle;
uint16_t rnti;
} nfapi_ue_release_request_TLVs_t;
typedef struct {
nfapi_tl_t tl;
uint16_t number_of_TLVs;
nfapi_ue_release_request_TLVs_t ue_release_request_TLVs_list[NFAPI_RELEASE_MAX_RNTI];
} nfapi_ue_release_request_body_t;
#define NFAPI_UE_RELEASE_BODY_TAG 0x2068
// P7 Message Structures
typedef struct {
nfapi_p7_message_header_t header;
......@@ -3418,6 +3431,19 @@ typedef struct {
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_error_indication_t;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t sfn_sf;
nfapi_ue_release_request_body_t ue_release_request_body;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_ue_release_request_t;
typedef struct {
nfapi_p7_message_header_t header;
uint32_t error_code;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_ue_release_response_t;
//
// P4 Messages
//
......
......@@ -47,9 +47,9 @@
#include "assertions.h"
#include "msc.h"
#include <time.h>
#include "targets/COMMON/openairinterface5g_limits.h"
#include "intertask_interface.h"
nfapi_ue_release_request_body_t release_rntis;
......@@ -2002,5 +2002,45 @@ 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_TLVs;i++){
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[mod_id][CC_id];
rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
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);
}
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);
}
}
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_UCI_VARS_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));
}
}
}
}
memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
}
......@@ -12,13 +12,16 @@
// This problem will be fixed in the future.
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_UCI_VARS_MAX 56
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
#else
......@@ -32,13 +35,16 @@ and the other are using MAX_MOBILES_PER_ENB in for-loop.
*/
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_UCI_VARS_MAX 56
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# if defined(STANDALONE) && STANDALONE==1
......
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