remove un-necessary global variables
This commit is contained in:
@@ -55,7 +55,7 @@ void createE1inst(E1_t type, instance_t instance, uint64_t gnb_id, e1ap_net_conf
|
||||
e1ap_inst[instance]->gtpInstF1U = -1;
|
||||
}
|
||||
|
||||
E1AP_TransactionID_t transacID[E1AP_MAX_NUM_TRANSAC_IDS] = {0};
|
||||
static E1AP_TransactionID_t transacID[E1AP_MAX_NUM_TRANSAC_IDS] = {0};
|
||||
|
||||
void e1ap_common_init() {
|
||||
srand(time(NULL));
|
||||
|
||||
+60
-46
@@ -210,7 +210,7 @@ void *eNB_app_task(void *args_p) {
|
||||
itti_mark_task_ready (TASK_ENB_APP);
|
||||
|
||||
/* Try to register each eNB */
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
@@ -248,67 +248,81 @@ void *eNB_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
register_enb_pending--;
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_I(ENB_APP,
|
||||
"[eNB %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
register_enb_pending--;
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message(TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP,
|
||||
" %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb,
|
||||
ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup(ENB_REGISTER_RETRY_DELAY,
|
||||
0,
|
||||
TASK_ENB_APP,
|
||||
INSTANCE_DEFAULT,
|
||||
TIMER_ONE_SHOT,
|
||||
NULL,
|
||||
&enb_register_retry_timer_id)
|
||||
< 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
}
|
||||
} /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_W(ENB_APP,
|
||||
"[eNB %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME(msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
if (TIMER_HAS_EXPIRED(msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
if (TIMER_HAS_EXPIRED(msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2(enb_id_start, enb_id_end);
|
||||
}
|
||||
} /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
|
||||
// if(TIMER_HAS_EXPIRED (msg_p).timer_id == m2_enb_register_retry_timer_id) {
|
||||
//
|
||||
|
||||
@@ -295,7 +295,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
|
||||
|
||||
if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = i + (hash & 0xFFFF8);
|
||||
@@ -1892,7 +1892,7 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2072,7 +2072,7 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i) {
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2140,7 +2140,7 @@ int RCconfig_S1(
|
||||
for (int k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash = 0;
|
||||
hash = s1ap_generate_eNB_id();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2374,7 +2374,7 @@ int RCconfig_S1(
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2432,7 +2432,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2584,7 +2584,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2659,7 +2659,7 @@ void RCConfig(void) {
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
printf("Getting ENBSParams\n");
|
||||
config_get(config_get_if(), ENBSParams, sizeofArray(ENBSParams), NULL);
|
||||
//EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0);
|
||||
//(!IS_SOFTMODEM_NOS1) = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0);
|
||||
RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
|
||||
if (RC.nb_inst > 0) {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
|
||||
int asn1_encoder_xer_print = 0;
|
||||
static int asn1_encoder_xer_print = 0;
|
||||
|
||||
int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length) {
|
||||
ssize_t encoded;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "PHY_INTERFACE/phy_stub_UE.h"
|
||||
#include "common/ran_context.h"
|
||||
#include <openair2/RRC/LTE/rrc_proto.h>
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
|
||||
|
||||
@@ -51,7 +52,7 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
|
||||
LOG_D(MAC, "[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n",
|
||||
module_idP, frameP, eNB_index);
|
||||
|
||||
if (first_sync == 1 && !(EPC_MODE_ENABLED)) {
|
||||
if (first_sync == 1 && IS_SOFTMODEM_NOS1) {
|
||||
//layer2_init_UE(module_idP);
|
||||
openair_rrc_ue_init(module_idP, eNB_index);
|
||||
} else {
|
||||
|
||||
@@ -593,7 +593,7 @@ static bool allocate_dl_retransmission(module_id_t module_id,
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
static uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
typedef struct UEsched_s {
|
||||
float coef;
|
||||
NR_UE_info_t * UE;
|
||||
|
||||
@@ -102,8 +102,8 @@ static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac,
|
||||
#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any
|
||||
//#define L1_DIFF_RSRP_STEP_SIZE 2
|
||||
|
||||
int ssb_index_sorted[MAX_NUM_SSB] = {0};
|
||||
int ssb_rsrp_sorted[MAX_NUM_SSB] = {0};
|
||||
static int ssb_index_sorted[MAX_NUM_SSB] = {0};
|
||||
static int ssb_rsrp_sorted[MAX_NUM_SSB] = {0};
|
||||
|
||||
//Measured RSRP Values Table 10.1.16.1-1 from 36.133
|
||||
//Stored all the upper limits[Max RSRP Value of corresponding index]
|
||||
|
||||
@@ -1767,7 +1767,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
static uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
typedef struct UEsched_s {
|
||||
float coef;
|
||||
NR_UE_info_t * UE;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcpHead->rb_id = rb_id;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
/* for the UE compiled in S1 mode, we need 1 here
|
||||
* for the UE compiled in noS1 mode, we need 0
|
||||
* TODO: be sure of this
|
||||
@@ -1070,12 +1070,12 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
} // nfapi_mode
|
||||
} else {
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
} else if (ENB_NAS_USE_TUN) {
|
||||
pdcpHead->inst = 0;
|
||||
}
|
||||
}
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
} else if (ENB_NAS_USE_TUN) {
|
||||
pdcpHead->inst = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pdcpHead->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB);
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
@@ -1275,7 +1275,7 @@ pdcp_run (
|
||||
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
// if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
if (!get_softmodem_params()->emulate_l1 && (!EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO)) {
|
||||
if (!get_softmodem_params()->emulate_l1 && (IS_SOFTMODEM_NOS1 || ctxt_pP->enb_flag == ENB_FLAG_NO)) {
|
||||
pdcp_fifo_read_input_sdus(ctxt_pP);
|
||||
}
|
||||
|
||||
@@ -1311,125 +1311,9 @@ pdcp_mbms_run (
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// } else {
|
||||
// start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// }
|
||||
|
||||
// pdcp_enb[ctxt_pP->module_id].sfn++; // range: 0 to 18,446,744,073,709,551,615
|
||||
// pdcp_enb[ctxt_pP->module_id].frame=ctxt_pP->frame; // 1023
|
||||
// pdcp_enb[ctxt_pP->module_id].subframe= ctxt_pP->subframe;
|
||||
// pdcp_update_stats(ctxt_pP);
|
||||
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_IN);
|
||||
// MessageDef *msg_p;
|
||||
//int result;
|
||||
//protocol_ctxt_t ctxt;
|
||||
|
||||
// do {
|
||||
// // Checks if a message has been sent to PDCP sub-task
|
||||
// itti_poll_msg (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p);
|
||||
//
|
||||
// if (msg_p != NULL) {
|
||||
// switch (ITTI_MSG_ID(msg_p)) {
|
||||
// case RRC_DCCH_DATA_REQ:
|
||||
// PROTOCOL_CTXT_SET_BY_MODULE_ID(
|
||||
// &ctxt,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).module_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).enb_flag,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rnti,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).frame,
|
||||
// 0,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).eNB_index);
|
||||
// LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
|
||||
// PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
// ITTI_MSG_NAME (msg_p),
|
||||
// ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
// ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).mode);
|
||||
// LOG_D(PDCP, "Before calling pdcp_data_req from pdcp_run! RRC_DCCH_DATA_REQ (msg_p).rb_id: %d \n", RRC_DCCH_DATA_REQ (msg_p).rb_id);
|
||||
// result = pdcp_data_req (&ctxt,
|
||||
// SRB_FLAG_YES,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).sdu_size,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).sdu_p,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).mode,
|
||||
// NULL, NULL
|
||||
// );
|
||||
//
|
||||
// if (result != true)
|
||||
// LOG_E(PDCP, "PDCP data request failed!\n");
|
||||
//
|
||||
// // Message buffer has been processed, free it now.
|
||||
// result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_REQ (msg_p).sdu_p);
|
||||
// AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
// break;
|
||||
//
|
||||
// case RRC_PCCH_DATA_REQ: {
|
||||
// sdu_size_t sdu_buffer_sizeP;
|
||||
// sdu_buffer_sizeP = RRC_PCCH_DATA_REQ(msg_p).sdu_size;
|
||||
// uint8_t CC_id = RRC_PCCH_DATA_REQ(msg_p).CC_id;
|
||||
// uint8_t ue_index = RRC_PCCH_DATA_REQ(msg_p).ue_index;
|
||||
// RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_paging[ue_index] = sdu_buffer_sizeP;
|
||||
//
|
||||
// if (sdu_buffer_sizeP > 0) {
|
||||
// memcpy(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].paging[ue_index], RRC_PCCH_DATA_REQ(msg_p).sdu_p, sdu_buffer_sizeP);
|
||||
// }
|
||||
//
|
||||
// //paging pdcp log
|
||||
// LOG_D(PDCP, "PDCP Received RRC_PCCH_DATA_REQ CC_id %d length %d \n", CC_id, sdu_buffer_sizeP);
|
||||
// }
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// LOG_E(PDCP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
// AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
// }
|
||||
// } while(msg_p != NULL);
|
||||
//
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
// if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
//if (EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO ) {
|
||||
|
||||
pdcp_fifo_read_input_mbms_sdus_fromtun(ctxt_pP);
|
||||
//}
|
||||
|
||||
// PDCP -> NAS/IP traffic: RX
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// } else {
|
||||
// start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// }
|
||||
//
|
||||
|
||||
//pdcp_fifo_flush_mbms_sdus(ctxt_pP);
|
||||
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// } else {
|
||||
// stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// }
|
||||
//
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// } else {
|
||||
// stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// }
|
||||
//
|
||||
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_OUT);
|
||||
pdcp_fifo_read_input_mbms_sdus_fromtun(ctxt_pP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void pdcp_init_stats_UE(module_id_t mod, uint16_t uid) {
|
||||
Pdcp_stats_tx_window_ms[mod][uid] = 100;
|
||||
Pdcp_stats_rx_window_ms[mod][uid] = 100;
|
||||
|
||||
@@ -330,9 +330,9 @@ void *MCE_app_task(void *args_p) {
|
||||
itti_mark_task_ready (TASK_MCE_APP);
|
||||
|
||||
/* Try to register each MCE */
|
||||
if ( EPC_MODE_ENABLED && RC.rrc == NULL )
|
||||
LOG_E(RRC, "inconsistent global variables\n");
|
||||
if (EPC_MODE_ENABLED && RC.rrc ) {
|
||||
if (!IS_SOFTMODEM_NOS1 && RC.rrc == NULL)
|
||||
LOG_E(RRC, "inconsistent global variables\n");
|
||||
if (!IS_SOFTMODEM_NOS1 && RC.rrc) {
|
||||
register_mce_pending = MCE_app_register(mce_id_start, mce_id_end);
|
||||
}
|
||||
|
||||
@@ -478,10 +478,13 @@ void *MCE_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case M3AP_DEREGISTERED_MCE_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
LOG_W(MCE_APP,
|
||||
"[MCE %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -46,7 +46,6 @@ extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
|
||||
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
|
||||
extern PHY_Config_NB_IoT_t *config_INFO;
|
||||
|
||||
extern uint8_t DRB2LCHAN_NB_IoT[2];
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state) {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState ) {
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
|
||||
case RRC_STATE_INACTIVE:
|
||||
AssertFatal ((RRC_SUB_STATE_INACTIVE_FIRST <= subState) && (subState <= RRC_SUB_STATE_INACTIVE_LAST),
|
||||
@@ -546,7 +546,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete(const protocol_ctxt_t *co
|
||||
const char *nas_msg;
|
||||
int nas_msg_length;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
nas_msg = (char *)UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data;
|
||||
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
|
||||
} else {
|
||||
@@ -760,7 +760,7 @@ rrc_ue_establish_drb(
|
||||
LOG_I(RRC,"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n",
|
||||
ue_mod_idP, frameP, DRB_config->drb_Identity, (int)*DRB_config->logicalChannelIdentity);
|
||||
|
||||
if(!EPC_MODE_ENABLED) {
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
ip_addr_offset3 = 0;
|
||||
ip_addr_offset4 = 1;
|
||||
LOG_I(OIP,"[UE %d] trying to bring up the OAI interface %d, IP X.Y.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP,
|
||||
@@ -781,7 +781,7 @@ rrc_ue_establish_drb(
|
||||
AssertFatal(false, "not implemented\n");
|
||||
LOG_D(RRC,"[UE %d] State = Attached (eNB %d)\n",ue_mod_idP,eNB_index);
|
||||
}
|
||||
} // !EPC_MODE_ENABLED
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -2919,7 +2919,7 @@ int decode_BCCH_DLSCH_Message(
|
||||
}
|
||||
|
||||
if (rrc_get_sub_state(ctxt_pP->module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
|
||||
if ((UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data != NULL) || (!EPC_MODE_ENABLED)) {
|
||||
if ((UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data != NULL) || IS_SOFTMODEM_NOS1) {
|
||||
rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
|
||||
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
|
||||
}
|
||||
@@ -3092,65 +3092,6 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag_MBMS = sib1_MBMS->systemInfoValueTag_r14;
|
||||
|
||||
/*
|
||||
if (EPC_MODE_ENABLED)
|
||||
{
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
int plmn;
|
||||
int plmn_number;
|
||||
plmn_number = sib1->cellAccessRelatedInfo.plmn_IdentityList.list.count;
|
||||
|
||||
for (plmn = 0; plmn < plmn_number; plmn++) {
|
||||
LTE_PLMN_Identity_t *plmn_Identity;
|
||||
plmn_Identity = &sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[plmn]->plmn_Identity;
|
||||
|
||||
if (
|
||||
(
|
||||
(plmn_Identity->mcc == NULL)
|
||||
||
|
||||
(
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
|
||||
)
|
||||
)
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
|
||||
&&
|
||||
(
|
||||
((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
|
||||
||
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
|
||||
)
|
||||
) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CELL_SELECTION_CNF);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rsrq = rsrq;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rsrp = rsrp;
|
||||
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
||||
cell_valid = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cell_valid == 0) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_NEXT_CELL_REQ);
|
||||
itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
@@ -3300,7 +3241,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag = sib1->systemInfoValueTag;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
@@ -3962,7 +3903,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
|
||||
|
||||
// After SI is received, prepare RRCConnectionRequest
|
||||
if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
|
||||
}
|
||||
|
||||
|
||||
@@ -59,12 +59,6 @@ rrc_init_global_param(
|
||||
DCCH_LCHAN_DESC.transport_block_size = 4;
|
||||
DCCH_LCHAN_DESC.max_transport_blocks = 16;
|
||||
DCCH_LCHAN_DESC.Delay_class = 1;
|
||||
DTCH_DL_LCHAN_DESC.transport_block_size = 52;
|
||||
DTCH_DL_LCHAN_DESC.max_transport_blocks = 20;
|
||||
DTCH_DL_LCHAN_DESC.Delay_class = 1;
|
||||
DTCH_UL_LCHAN_DESC.transport_block_size = 52;
|
||||
DTCH_UL_LCHAN_DESC.max_transport_blocks = 20;
|
||||
DTCH_UL_LCHAN_DESC.Delay_class = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+17
-16
@@ -124,6 +124,7 @@ extern struct rrc_eNB_ue_context_s *get_first_ue_context(eNB_RRC_INST *rrc_insta
|
||||
pthread_mutex_t rrc_release_freelist;
|
||||
RRC_release_list_t rrc_release_info;
|
||||
pthread_mutex_t lock_ue_freelist;
|
||||
static uint8_t DRB2LCHAN[8];
|
||||
|
||||
void
|
||||
openair_rrc_on(
|
||||
@@ -846,7 +847,7 @@ rrc_eNB_free_UE(
|
||||
return;
|
||||
}
|
||||
|
||||
if(EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
if ((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
|
||||
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n", enb_mod_idP, rnti);
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK,
|
||||
@@ -1031,7 +1032,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
|
||||
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
|
||||
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
if ((!IS_SOFTMODEM_NOS1) == 1) {
|
||||
// Forward message to S1AP layer
|
||||
rrc_eNB_send_S1AP_NAS_FIRST_REQ(ctxt_pP, ue_context_pP, rrcConnectionSetupComplete);
|
||||
} else {
|
||||
@@ -1374,7 +1375,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
ue_context_pP->ue_context.Srb1.Active = 1;
|
||||
//ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
hashtable_rc_t h_rc;
|
||||
int j;
|
||||
rrc_ue_s1ap_ids_t *rrc_ue_s1ap_ids_p = NULL;
|
||||
@@ -1450,13 +1451,13 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
put_UE_in_freelist(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, 0);
|
||||
return;
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
/* Update RNTI in ue_context */
|
||||
ue_context_pP->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||
ue_context_pP->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
uint8_t send_security_mode_command = false;
|
||||
rrc_pdcp_config_security(
|
||||
ctxt_pP,
|
||||
@@ -5109,7 +5110,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
|
||||
|
||||
rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, (LTE_DRB_ToAddModList_t *)NULL, (LTE_DRB_ToReleaseList_t *)NULL, (LTE_PMCH_InfoList_r9_t *)NULL, 0, 0);
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_process_security (
|
||||
ctxt_pP,
|
||||
ue_context_p,
|
||||
@@ -5257,7 +5258,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
LOG_D(RRC, "[eNB %d] Frame %d: Establish RLC UM Bidirectional, DRB %d Active\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame, (int)DRB_configList->list.array[i]->drb_Identity);
|
||||
|
||||
if (!EPC_MODE_ENABLED && !ENB_NAS_USE_TUN) {
|
||||
if (IS_SOFTMODEM_NOS1 && !ENB_NAS_USE_TUN) {
|
||||
LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->module_id);
|
||||
@@ -5276,7 +5277,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
LOG_D(RRC, "[eNB %d] State = Attached (UE rnti %x module id %u)\n",
|
||||
ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ue_module_id);
|
||||
} /* oip_ifup */
|
||||
} /* !EPC_MODE_ENABLED && ENB_NAS_USE_TUN*/
|
||||
} /* !(!IS_SOFTMODEM_NOS1) && ENB_NAS_USE_TUN*/
|
||||
|
||||
LOG_D(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n",
|
||||
@@ -6365,7 +6366,7 @@ rrc_eNB_decode_dcch(
|
||||
/*NN: revise the condition */
|
||||
/*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
|
||||
|
||||
if (EPC_MODE_ENABLED || get_softmodem_params()->emulate_l1) {
|
||||
if (!IS_SOFTMODEM_NOS1 || get_softmodem_params()->emulate_l1) {
|
||||
if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
|
||||
dedicated_DRB = 1;
|
||||
LOG_I(RRC,
|
||||
@@ -6461,7 +6462,7 @@ rrc_eNB_decode_dcch(
|
||||
ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
}
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
if (dedicated_DRB == 1) {
|
||||
// rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(ctxt_pP,
|
||||
// ue_context_p,
|
||||
@@ -6538,7 +6539,7 @@ rrc_eNB_decode_dcch(
|
||||
LOG_I(RRC,"issue rrc_eNB_send_PATH_SWITCH_REQ \n");
|
||||
rrc_eNB_send_PATH_SWITCH_REQ(ctxt_pP,ue_context_p);
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
break;
|
||||
|
||||
@@ -6837,7 +6838,7 @@ rrc_eNB_decode_dcch(
|
||||
ue_context_p->ue_context.does_nr = 0;
|
||||
}
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
@@ -6875,7 +6876,7 @@ rrc_eNB_decode_dcch(
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC UL Information Transfer \n");
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_send_S1AP_UPLINK_NAS(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
@@ -7264,7 +7265,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
ue_context_p->ue_context.rnti,
|
||||
ue_context_p->ue_context.ue_release_timer_thres_s1);
|
||||
|
||||
if (EPC_MODE_ENABLED)
|
||||
if (!IS_SOFTMODEM_NOS1)
|
||||
rrc_eNB_generate_RRCConnectionRelease(ctxt_pP, ue_context_p);
|
||||
else
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
@@ -7318,7 +7319,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
ue_context_p->ue_context.ue_release_timer_rrc = 1;
|
||||
ue_context_p->ue_context.ue_release_timer_thres_rrc = 100;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 4) { // if timer_s1 == 0
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(ctxt_pP->module_id,
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id);
|
||||
@@ -7343,7 +7344,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
if (rrc_ue_s1ap_ids != NULL) {
|
||||
rrc_eNB_S1AP_remove_ue_ids(RC.rrc[ctxt_pP->module_id], rrc_ue_s1ap_ids);
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 0;
|
||||
rrc_release_info.num_UEs--;
|
||||
|
||||
@@ -38,22 +38,12 @@
|
||||
|
||||
extern UE_RRC_INST *UE_rrc_inst;
|
||||
|
||||
|
||||
extern uint8_t DRB2LCHAN[8];
|
||||
|
||||
extern LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue;
|
||||
extern LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue;
|
||||
|
||||
extern int NB_UE_INST;
|
||||
extern void* bigphys_malloc(int);
|
||||
|
||||
|
||||
//uint8_t RACH_TIME_ALLOC;
|
||||
extern uint16_t RACH_FREQ_ALLOC;
|
||||
//uint8_t NB_RACH;
|
||||
extern LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
extern MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
|
||||
extern MAC_AVG_T BCCH_MEAS_AVG,CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
|
||||
extern LCHAN_DESC CCCH_LCHAN_DESC, DCCH_LCHAN_DESC;
|
||||
|
||||
extern UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
|
||||
extern pthread_mutex_t ue_pf_po_mutex;
|
||||
|
||||
@@ -43,8 +43,6 @@ UE_RRC_INST *UE_rrc_inst = NULL;
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
extern uint16_t ue_id_g;
|
||||
|
||||
uint8_t DRB2LCHAN[8];
|
||||
|
||||
long logicalChannelGroup0 = 0;
|
||||
long logicalChannelSR_Mask_r9=0;
|
||||
|
||||
@@ -75,11 +73,7 @@ const LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {.ul_S
|
||||
.ext1 = &logicalChannelSR_Mask_r9_ext1};
|
||||
|
||||
//CONSTANTS
|
||||
uint16_t RACH_FREQ_ALLOC;
|
||||
//uint8_t NB_RACH;
|
||||
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
|
||||
MAC_AVG_T BCCH_MEAS_AVG, CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
|
||||
LCHAN_DESC CCCH_LCHAN_DESC, DCCH_LCHAN_DESC;
|
||||
|
||||
// only used for RRC connection re-establishment procedure TS36.331 5.3.7
|
||||
// [0]: current C-RNTI, [1]: prior C-RNTI
|
||||
|
||||
@@ -93,7 +93,7 @@ int opt_enabled=0;
|
||||
//static unsigned char g_PDUBuffer[1600];
|
||||
//static unsigned int g_PDUOffset;
|
||||
|
||||
FILE *file_fd = NULL;
|
||||
static FILE *file_fd = NULL;
|
||||
const pcap_hdr_t file_header = {
|
||||
0xa1b2c3d4, /* magic number */
|
||||
2,
|
||||
@@ -120,7 +120,7 @@ typedef struct {
|
||||
struct sockaddr_in address;
|
||||
} opt_listener_t;
|
||||
|
||||
opt_listener_t opt_listener;
|
||||
static opt_listener_t opt_listener;
|
||||
|
||||
unsigned short checksum(unsigned short *ptr, int length) {
|
||||
int sum = 0;
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
|
||||
static int indent = 0;
|
||||
|
||||
|
||||
x2ap_eNB_internal_data_t x2ap_eNB_internal_data;
|
||||
static x2ap_eNB_internal_data_t x2ap_eNB_internal_data;
|
||||
|
||||
RB_GENERATE(x2ap_enb_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user