ENABLE_ITTI macro removal, modified telnet server to support all executables, modified record player to finalize switch to run-time option and allow usage with any device

This commit is contained in:
frtabu
2020-02-12 19:05:44 +01:00
parent 2520a92211
commit 6014ca42ac
67 changed files with 1408 additions and 3614 deletions
-2
View File
@@ -45,10 +45,8 @@
#define GNB_CONF_STRING_OTG_APP_TYPE "app_type"
#define GNB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
extern int asn_debug;
extern int asn1_xer_print;
#endif
#ifdef LIBCONFIG_LONG
#define libconfig_int long
+1 -3
View File
@@ -57,9 +57,7 @@
/* for fair round robin SCHED */
#include "eNB_scheduler_fairRR.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "assertions.h"
+23 -22
View File
@@ -55,14 +55,12 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "T.h"
#include "executables/softmodem-common.h"
#include "common/ran_context.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
@@ -1353,28 +1351,31 @@ initiate_ra_proc(module_id_t module_idP,
/* TODO: find better procedure to allocate RNTI */
do {
#if defined(USRP_REC_PLAY) // deterministic rnti in usrp record/playback mode
static int drnti[MAX_MOBILES_PER_ENB] = { 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
int j = 0;
int nb_ue = 0;
if (IS_SOFTMODEM_IQPLAYER) { /* iq player mode, use deterministic rnti */
static int drnti[MAX_MOBILES_PER_ENB];
static int drnti_def[]={ 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
for (int j=0; j<MAX_MOBILES_PER_ENB && j< (sizeof(drnti_def)/sizeof(int));j++)
drnti[i]=drnti_def[i];
int nb_ue = 0;
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
if (UE_RNTI(module_idP, j) > 0) {
nb_ue++;
} else {
break;
for (int j = 0; j < MAX_MOBILES_PER_ENB; j++) {
if (UE_RNTI(module_idP, j) > 0) {
nb_ue++;
} else {
break;
}
}
}
if (nb_ue >= MAX_MOBILES_PER_ENB) {
printf("No more free RNTI available, increase MAX_MOBILES_PER_ENB\n");
abort();
}
if (nb_ue >= MAX_MOBILES_PER_ENB || nb_ue >= (sizeof(drnti_def)/sizeof(int))) {
printf("No more free RNTI available, increase MAX_MOBILES_PER_ENB\n");
abort();
}
ra[i].rnti = drnti[nb_ue];
#else
ra[i].rnti = taus();
#endif
ra[i].rnti = drnti[nb_ue];
} else {
ra[i].rnti = taus();
}
loop++;
} while (loop != 100 &&
/* TODO: this is not correct, the rnti may be in use without
+1 -3
View File
@@ -44,9 +44,7 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
+1 -3
View File
@@ -53,9 +53,7 @@
#include "assertions.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include <dlfcn.h>
-4
View File
@@ -48,10 +48,6 @@
#include "pdcp.h"
#include "assertions.h"
//#if defined(ENABLE_ITTI)
//#include "intertask_interface.h"
//#endif
//
#include "SIMULATION/TOOLS/sim.h" // for taus
#define ENABLE_MAC_PAYLOAD_DEBUG
@@ -48,10 +48,8 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "executables/softmodem-common.h"
#include "T.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
@@ -2184,9 +2182,8 @@ add_new_ue(module_id_t mod_idP,
UE_list->ordered_ULCCids[0][UE_id] = cc_idP;
UE_list->num_UEs++;
UE_list->active[UE_id] = TRUE;
#if defined(USRP_REC_PLAY) // not specific to record/playback ?
UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
#endif
if (IS_SOFTMODEM_IQPLAYER)// not specific to record/playback ?
UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type;
memset((void *) &UE_list->UE_sched_ctrl[UE_id],
0,
+1 -3
View File
@@ -48,9 +48,7 @@
#include "assertions.h"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "ENB_APP/flexran_agent_defs.h"
#include "flexran_agent_ran_api.h"
+1 -8
View File
@@ -56,9 +56,7 @@
#include "pdcp.h"
#include "targets/RT/USER/lte-softmodem.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "assertions.h"
@@ -2455,10 +2453,8 @@ ue_scheduler(const module_id_t module_idP,
struct LTE_RACH_ConfigCommon *rach_ConfigCommon =
(struct LTE_RACH_ConfigCommon *) NULL;
protocol_ctxt_t ctxt;
#if defined(ENABLE_ITTI)
MessageDef *msg_p;
int result;
#endif
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
@@ -2467,7 +2463,6 @@ ue_scheduler(const module_id_t module_idP,
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_NO,
UE_mac_inst[module_idP].crnti, txFrameP,
txSubframeP, eNB_indexP);
#if defined(ENABLE_ITTI)
if(module_idP == 0) {
do {
@@ -2497,8 +2492,6 @@ ue_scheduler(const module_id_t module_idP,
} while (msg_p != NULL);
}
#endif
//Mac_rlc_xface->frameP=frameP;
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
//if (subframe%5 == 0)
@@ -55,9 +55,7 @@
#include "flexran_agent_extern.h"
#include "flexran_agent_mac.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "assertions.h"
#include <openair1/PHY/LTE_TRANSPORT/transport_proto.h>
@@ -46,9 +46,7 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
@@ -50,9 +50,7 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "T.h"
+20 -20
View File
@@ -33,7 +33,7 @@
#include "UTIL/OSA/osa_defs.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "executables/softmodem-common.h"
#include "LAYER2/MAC/mac_extern.h"
#include "pdcp.h"
@@ -213,28 +213,28 @@ pdcp_validate_security(
stream_decrypt(pdcp_pP->cipheringAlgorithm,
&decrypt_params,
&buffer_decrypted);
#if !defined(USRP_REC_PLAY)
if (srb_flagP) {
if (!IS_SOFTMODEM_IQPLAYER) {
if (srb_flagP) {
/* Now check the integrity of the complete PDU */
decrypt_params.message = pdcp_pdu_buffer;
decrypt_params.blength = sdu_buffer_size << 3;
decrypt_params.key = pdcp_pP->kRRCint + 16;// 128;
decrypt_params.message = pdcp_pdu_buffer;
decrypt_params.blength = sdu_buffer_size << 3;
decrypt_params.key = pdcp_pP->kRRCint + 16;// 128;
if (stream_check_integrity(pdcp_pP->integrityProtAlgorithm,
&decrypt_params,
&pdcp_pdu_buffer[sdu_buffer_size]) != 0) {
MSC_LOG_EVENT(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
" Security: failed MAC-I Algo %X UE %"PRIx16" ",
pdcp_pP->integrityProtAlgorithm,
ctxt_pP->rnti);
LOG_E(PDCP, "[OSA][RB %ld] %s failed to validate MAC-I (key %llx) of incoming PDU\n",
rb_id, (pdcp_pP->is_ue != 0) ? "UE" : "eNB",((long long unsigned int*)decrypt_params.key)[0]);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT);
return -1;
if (stream_check_integrity(pdcp_pP->integrityProtAlgorithm,
&decrypt_params,
&pdcp_pdu_buffer[sdu_buffer_size]) != 0) {
MSC_LOG_EVENT(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
" Security: failed MAC-I Algo %X UE %"PRIx16" ",
pdcp_pP->integrityProtAlgorithm,
ctxt_pP->rnti);
LOG_E(PDCP, "[OSA][RB %ld] %s failed to validate MAC-I (key %llx) of incoming PDU\n",
rb_id, (pdcp_pP->is_ue != 0) ? "UE" : "eNB",((long long unsigned int*)decrypt_params.key)[0]);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT);
return -1;
}
}
}
#endif
} /* !IQPLAYER */
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT);
return 0;
@@ -26,9 +26,7 @@
//-----------------------------------------------------------------------------
#include "platform_types.h"
//-----------------------------------------------------------------------------
#if ENABLE_ITTI
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "assertions.h"
#include "list.h"
#include "rlc_am.h"
+1 -3
View File
@@ -37,9 +37,7 @@
#include "msc.h"
#include "common/ran_context.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "flexran_agent_extern.h"
#undef C_RNTI // C_RNTI is used in F1AP generated code, prevent preprocessor replace
+1 -11
View File
@@ -37,9 +37,7 @@
#include "msc.h"
#include "common/ran_context.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
//#define RRC_DATA_REQ_DEBUG
//#define DEBUG_RRC 1
@@ -135,7 +133,6 @@ rrc_data_ind(
ctxt_pP->rnti);
}
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
@@ -152,11 +149,4 @@ rrc_data_ind(
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p);
}
#else
rrc_eNB_decode_dcch(
ctxt_pP,
DCCH_index,
buffer_pP,
sdu_sizeP);
#endif
}
+1 -65
View File
@@ -37,9 +37,7 @@
#include "msc.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
//#define RRC_DATA_REQ_DEBUG
@@ -76,7 +74,6 @@ mac_rrc_data_req_ue(
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
if( (UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size > 0) ) {
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int ccch_size = UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size;
@@ -96,7 +93,6 @@ mac_rrc_data_req_ue(
itti_send_msg_to_task (TASK_MAC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
}
#endif
memcpy(&buffer_pP[0],&UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.Payload[0],UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
uint8_t Ret_size=UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size;
// UE_rrc_inst[Mod_id].Srb0[eNB_index].Tx_buffer.payload_size=0;
@@ -138,7 +134,6 @@ mac_rrc_data_ind_ue(
if(srb_idP == BCCH_SI_MBMS) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %ld from eNB %d\n",module_idP,srb_idP,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
@@ -161,14 +156,10 @@ mac_rrc_data_ind_ue(
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp = 45 /* TODO change phy to report rspp */;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t *)sduP,sdu_lenP, 0, 0);
#endif
}
if(srb_idP == BCCH) {
LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %ld from eNB %d\n",module_idP,srb_idP,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_BCCH_DATA_IND (message_p).sdu);
@@ -191,9 +182,6 @@ mac_rrc_data_ind_ue(
RRC_MAC_BCCH_DATA_IND (message_p).rsrp = 45 /* TODO change phy to report rspp */;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
decode_BCCH_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t *)sduP,sdu_lenP, 0, 0);
#endif
}
if(srb_idP == PCCH) {
@@ -204,7 +192,6 @@ mac_rrc_data_ind_ue(
if((srb_idP & RAB_OFFSET) == CCCH) {
if (sdu_lenP>0) {
LOG_T(RRC,"[UE %d] Received SDU for CCCH on SRB %ld from eNB %d\n",module_idP,srb_idP & RAB_OFFSET,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = CCCH_SDU_SIZE;
@@ -226,20 +213,12 @@ mac_rrc_data_ind_ue(
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rntiP;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
SRB_INFO *Srb_info;
Srb_info = &UE_rrc_inst[module_idP].Srb0[eNB_indexP];
memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
Srb_info->Rx_buffer.payload_size = sdu_lenP;
rrc_ue_decode_ccch(&ctxt, Srb_info, eNB_indexP);
#endif
}
}
if ((srb_idP & RAB_OFFSET) == MCCH) {
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %ld from eNB %d\n",
module_idP,frameP, mbsfn_sync_areaP, srb_idP & RAB_OFFSET,eNB_indexP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_MCCH_DATA_IND (message_p).sdu);
@@ -259,9 +238,6 @@ mac_rrc_data_ind_ue(
RRC_MAC_MCCH_DATA_IND (message_p).mbsfn_sync_area = mbsfn_sync_areaP;
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
decode_MCCH_Message(&ctxt, eNB_indexP, sduP, sdu_lenP, mbsfn_sync_areaP);
#endif
}
//TTN (for D2D)
@@ -297,7 +273,6 @@ rrc_data_req_ue(
ctxt_pP->rnti,
muiP,
sdu_sizeP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
@@ -325,18 +300,6 @@ rrc_data_req_ue(
message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
#else
return pdcp_data_req (
ctxt_pP,
SRB_FLAG_YES,
rb_idP,
muiP,
confirmP,
sdu_sizeP,
buffer_pP,
modeP,NULL, NULL
);
#endif
}
//------------------------------------------------------------------------------
@@ -352,7 +315,6 @@ rrc_data_ind_ue(
rb_id_t DCCH_index = Srb_id;
LOG_I(RRC, "[UE %x] Frame %d: received a DCCH %ld message on SRB %ld with Size %d from eNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
@@ -369,20 +331,11 @@ rrc_data_ind_ue(
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (TASK_RRC_UE, ctxt_pP->instance, message_p);
}
#else
//#warning "LG put 0 to arg4 that is eNB index"
rrc_ue_decode_dcch(
ctxt_pP,
DCCH_index,
buffer_pP,
0);
#endif
}
//-------------------------------------------------------------------------------------------//
void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) {
//-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
//LOG_I(RRC,"sending a message to task_mac_ue\n");
@@ -391,14 +344,6 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) {
RRC_MAC_IN_SYNC_IND (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
}
#else
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
}
#endif
}
//-------------------------------------------------------------------------------------------//
@@ -412,7 +357,6 @@ void rrc_out_of_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt,
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_OUT_OF_SYNC_IND);
@@ -420,9 +364,6 @@ void rrc_out_of_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index
RRC_MAC_OUT_OF_SYNC_IND (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
}
#else
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt++;
#endif
}
//------------------------------------------------------------------------------
@@ -442,16 +383,11 @@ mac_UE_get_rrc_status(
//-------------------------------------------------------------------------------------------//
int mac_ue_ccch_success_ind(module_id_t Mod_idP, uint8_t eNB_index) {
//-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_CCCH_DATA_CNF);
RRC_MAC_CCCH_DATA_CNF (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
}
#else
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size=0;
#endif
return 0;
}
+25 -373
View File
@@ -89,9 +89,9 @@
#include "LTE_MeasIdToAddModList.h"
#include "enb_config.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "common/ran_context.h"
#include "secu_defs.h"
@@ -381,17 +381,12 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
}
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
int Mod_id,int CC_id
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
int Mod_id,int CC_id,
RrcConfigurationReq *configuration
) {
// SystemInformation_t systemInformation;
#if defined(ENABLE_ITTI)
int num_plmn = configuration->num_plmn;
#else
int num_plmn = 1;
#endif
LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
LTE_MCC_MNC_Digit_t *dummy_mcc_0;
LTE_MCC_MNC_Digit_t *dummy_mcc_1;
@@ -438,16 +433,10 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
if (dummy_mcc_0 == NULL || dummy_mcc_1 == NULL || dummy_mcc_2 == NULL)
exit(1);
#if defined(ENABLE_ITTI)
*dummy_mcc_0 = (configuration->mcc[i] / 100) % 10;
*dummy_mcc_1 = (configuration->mcc[i] / 10) % 10;
*dummy_mcc_2 = (configuration->mcc[i] / 1) % 10;
#else
*dummy_mcc_0 = 0;
*dummy_mcc_1 = 0;
*dummy_mcc_2 = 1;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_0);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_1);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_2);
@@ -460,8 +449,6 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
if (dummy_mnc_0 == NULL || dummy_mnc_1 == NULL || dummy_mnc_2 == NULL)
exit(1);
#if defined(ENABLE_ITTI)
if (configuration->mnc[i] >= 100) {
*dummy_mnc_0 = (configuration->mnc[i] / 100) % 10;
*dummy_mnc_1 = (configuration->mnc[i] / 10) % 10;
@@ -478,11 +465,6 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
}
}
#else
*dummy_mnc[i][0] = 0;
*dummy_mnc[i][1] = 1;
*dummy_mnc[i][2] = 0xf;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list, dummy_mnc_0);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list, dummy_mnc_1);
@@ -499,36 +481,20 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
// 16 bits
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf = MALLOC(2);
#if defined(ENABLE_ITTI)
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = (configuration->tac >> 8) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = (configuration->tac >> 0) & 0xff;
#else
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = 0x01;
#endif
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.size=2;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.bits_unused=0;
// 28 bits
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf = MALLOC(8);
#if defined(ENABLE_ITTI)
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = (configuration->cell_identity >> 20) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = (configuration->cell_identity >> 12) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = (configuration->cell_identity >> 4) & 0xff;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = (configuration->cell_identity << 4) & 0xf0;
#else
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = 0x00;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = 0x10;
#endif
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.size=4;
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.bits_unused=4;
(*sib1_MBMS)->freqBandIndicator_r14 =
#if defined(ENABLE_ITTI)
configuration->eutra_band[CC_id];
#else
7;
#endif
(*sib1_MBMS)->freqBandIndicator_r14 = configuration->eutra_band[CC_id];
schedulingInfo->si_Periodicity_r14=LTE_SchedulingInfo__si_Periodicity_rf16;
*sib_type = LTE_SIB_Type_MBMS_r14_sibType13_v920;
ASN_SEQUENCE_ADD(&schedulingInfo->sib_MappingInfo_r14.list, sib_type);
@@ -827,17 +793,11 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id,
}
uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
int Mod_id,int CC_id, BOOLEAN_t brOption
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
int Mod_id,int CC_id, BOOLEAN_t brOption,
RrcConfigurationReq *configuration
) {
// SystemInformation_t systemInformation;
#if defined(ENABLE_ITTI)
int num_plmn = configuration->num_plmn;
#else
int num_plmn = 1;
#endif
LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
LTE_MCC_MNC_Digit_t *dummy_mcc_0;
LTE_MCC_MNC_Digit_t *dummy_mcc_1;
@@ -892,15 +852,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
if (dummy_mcc_0 == NULL || dummy_mcc_1 == NULL || dummy_mcc_2 == NULL)
exit(1);
#if defined(ENABLE_ITTI)
*dummy_mcc_0 = (configuration->mcc[i] / 100) % 10;
*dummy_mcc_1 = (configuration->mcc[i] / 10) % 10;
*dummy_mcc_2 = (configuration->mcc[i] / 1) % 10;
#else
*dummy_mcc_0 = 0;
*dummy_mcc_1 = 0;
*dummy_mcc_2 = 1;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_0);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_1);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_2);
@@ -913,7 +868,6 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
if (dummy_mnc_0 == NULL || dummy_mnc_1 == NULL || dummy_mnc_2 == NULL)
exit(1);
#if defined(ENABLE_ITTI)
if (configuration->mnc[i] >= 100) {
*dummy_mnc_0 = (configuration->mnc[i] / 100) % 10;
@@ -930,12 +884,6 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
*dummy_mnc_2 = (configuration->mnc[i] / 1) % 10;
}
}
#else
*dummy_mnc_0 = 0;
*dummy_mnc_1 = 1;
*dummy_mnc_2 = 0xf;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list, dummy_mnc_0);
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list, dummy_mnc_1);
@@ -952,28 +900,16 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
// 16 bits
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2);
#if defined(ENABLE_ITTI)
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = (configuration->tac >> 8) & 0xff;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = (configuration->tac >> 0) & 0xff;
#else
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = 0x00;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = 0x01;
#endif
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.size = 2;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.bits_unused = 0;
// 28 bits
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf = MALLOC(8);
#if defined(ENABLE_ITTI)
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = (configuration->cell_identity >> 20) & 0xff;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = (configuration->cell_identity >> 12) & 0xff;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = (configuration->cell_identity >> 4) & 0xff;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[3] = (configuration->cell_identity << 4) & 0xf0;
#else
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = 0x00;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = 0x00;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = 0x00;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[3] = 0x10;
#endif
(*sib1)->cellAccessRelatedInfo.cellIdentity.size=4;
(*sib1)->cellAccessRelatedInfo.cellIdentity.bits_unused=4;
// assign_enum(&(*sib1)->cellAccessRelatedInfo.cellBarred,SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred);
@@ -985,12 +921,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
(*sib1)->cellSelectionInfo.q_RxLevMinOffset=NULL;
//(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t));
// *((*sib1)->p_Max) = 23;
(*sib1)->freqBandIndicator =
#if defined(ENABLE_ITTI)
configuration->eutra_band[CC_id];
#else
7;
#endif
(*sib1)->freqBandIndicator = configuration->eutra_band[CC_id];
schedulingInfo.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8;
if(configuration->eMBMS_M2_configured){
schedulingInfo2.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8;
@@ -1005,24 +936,12 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo2);
}
// ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
#if defined(ENABLE_ITTI)
if (configuration->frame_type[CC_id] == TDD)
#endif
{
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct LTE_TDD_Config));
(*sib1)->tdd_Config->subframeAssignment =
#if defined(ENABLE_ITTI)
configuration->tdd_config[CC_id];
#else
3; // +kogo this was frame_parms->tdd_config
#endif
(*sib1)->tdd_Config->specialSubframePatterns =
#if defined(ENABLE_ITTI)
configuration->tdd_config_s[CC_id];
#else
0;
#endif
(*sib1)->tdd_Config->subframeAssignment = configuration->tdd_config[CC_id];
(*sib1)->tdd_Config->specialSubframePatterns = configuration->tdd_config_s[CC_id];
}
(*sib1)->si_WindowLength = LTE_SystemInformationBlockType1__si_WindowLength_ms20;
@@ -1050,8 +969,6 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1250->freqBandIndicatorPriority_r12 = 0; // long* // FIXME
sib1_1250->nonCriticalExtension = NULL;
////Rel1310
#if defined(ENABLE_ITTI)
if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
(brOption==TRUE)) {
sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
@@ -1245,89 +1162,6 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1320->nonCriticalExtension = NULL;
}
#else
sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type
memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t));
sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t));
memset(sib1_1310->hyperSFN_r13->buf, 0, 2*sizeof(uint8_t));
sib1_1310->hyperSFN_r13->size = 2;
sib1_1310->hyperSFN_r13->bits_unused = 6;
sib1_1310->eDRX_Allowed_r13 = NULL; // long*
sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t));
memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t));
sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = -70; // (Q_RxLevMin_t) long
sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; // (Q_RxLevMin_t) *long
sib1_1310->bandwidthReducedAccessRelatedInfo_r13
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms20; // 0
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_everyRF; // 0
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t));
SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t));
memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t));
schedulinginfo_br_13->si_Narrowband_r13 = 1;
schedulinginfo_br_13->si_TBS_r13 = LTE_SchedulingInfo_BR_r13__si_TBS_r13_b152;
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, 0, 2 * sizeof(uint8_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, 0,
2 * sizeof(uint8_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = 1;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_on;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long));
*sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_ValidityTime_r13_true;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t));
LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t));
*systemInfoValueTagSi_r13 = 0;
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13);
sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
/////Rel1320
LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension;
sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long));
*sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__mpdcch_pdsch_HoppingNB_r13_nb2;
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present =
LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 =
LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13__interval_FDD_r13_int1;
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present =
LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 =
LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13__interval_FDD_r13_int2;
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long));
*sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = 1;
sib1_1320->nonCriticalExtension = NULL;
#endif
(*sib1)->si_WindowLength=LTE_SystemInformationBlockType1__si_WindowLength_ms20;
(*sib1)->systemInfoValueTag=0;
// (*sib1).nonCriticalExtension = calloc(1,sizeof(*(*sib1).nonCriticalExtension));
@@ -1358,10 +1192,8 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
uint8_t do_SIB23(uint8_t Mod_id,
int CC_id, BOOLEAN_t brOption
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
int CC_id, BOOLEAN_t brOption,
RrcConfigurationReq *configuration
) {
struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part;
int eMTC_configured = configuration->eMTC_configured;
@@ -1455,7 +1287,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->ac_BarringInfo = NULL;
(*sib2)->ext1 = NULL;
(*sib2)->ext2 = NULL;
#if defined(ENABLE_ITTI)
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles = rrconfig->rach_numberOfRA_Preambles;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
@@ -1846,121 +1677,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
= rrconfig->ue_TimersAndConstants_t311;
(*sib2)->ue_TimersAndConstants.n311
= rrconfig->ue_TimersAndConstants_n311;
#else
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=LTE_RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=LTE_RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower=
RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_100;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=LTE_RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=
LTE_RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct LTE_RACH_ConfigCommon__ext1));
memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct LTE_RACH_ConfigCommon__ext1));
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t));
*(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = LTE_PreambleTransMax_n5; // to be re-initialized when we find the enum
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
LTE_RACH_CE_LevelInfo_r13_t *rach_ce_levelinfo_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfo_r13_t));
memset(rach_ce_levelinfo_r13, 0, sizeof(LTE_RACH_CE_LevelInfo_r13_t));
rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = 0;
rach_ce_levelinfo_r13->preambleMappingInfo_r13.lastPreamble_r13 = 63;
rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13 = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80;
rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200;
rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = LTE_RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off;
ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13);
// BCCH-Config
(*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=LTE_BCCH_Config__modificationPeriodCoeff_n2;
// PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf128;
(*sib2)->radioResourceConfigCommon.pcch_Config.nB=LTE_PCCH_Config__nB_oneT;
// PRACH-Config
(*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex = Mod_id;//0;//384;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 0;//3;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 1;//12;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 2;
// PDSCH-Config
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0; // corresponds to 24.7 dBm 5 MHz/ 27.7 10 MHz/ 30.7 20 MHz
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0;
// PUSCH-Config
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=1;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=0;
// PUCCH-Config
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=LTE_PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 1;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 32;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=LTE_SoundingRS_UL_ConfigCommon_PR_release;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0;
// uplinkPowerControlCommon
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -108;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -108;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha=LTE_UplinkPowerControlCommon__alpha_al1;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6;
(*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1;
(*sib2)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct LTE_RadioResourceConfigCommonSIB__ext4));
memset((*sib2)->radioResourceConfigCommon.ext4, 0, sizeof(struct LTE_RadioResourceConfigCommonSIB__ext4));
(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(LTE_BCCH_Config_v1310_t));
memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(LTE_BCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = LTE_BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64;
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PRACH_ConfigSIB_v1310_t));
memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t));
LTE_RSRP_Range_t rsrp_range = 60;
ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range);
(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13;
(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13__fdd_r13_v5;
(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL;
LTE_PRACH_ParametersCE_r13_t *prach_parametersce_r13 = calloc(1, sizeof(LTE_PRACH_ParametersCE_r13_t));
memset(prach_parametersce_r13, 0, sizeof(LTE_PRACH_ParametersCE_r13_t));
prach_parametersce_r13->prach_ConfigIndex_r13 = 3;
prach_parametersce_r13->prach_FreqOffset_r13 = 1;
prach_parametersce_r13->prach_StartingSubframe_r13 = NULL;
prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = calloc(1, sizeof(long));
*prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = LTE_PRACH_ParametersCE_r13__maxNumPreambleAttemptCE_r13_n3;
prach_parametersce_r13->numRepetitionPerPreambleAttempt_r13 = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n1;
long maxavailablenarrowband = 2;
ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, &maxavailablenarrowband);
prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
prach_parametersce_r13->prach_HoppingConfig_r13 = LTE_PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13);
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
memset((*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(LTE_N1PUCCH_AN_InfoList_r13_t));
long pucch_info_value1 = 0;
long pucch_info_value2 = 2;
ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value1);
ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value2);
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL;
(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL;
(*sib2)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000;
(*sib2)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000;
(*sib2)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000;
(*sib2)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20;
(*sib2)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000;
(*sib2)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1;
#endif
(*sib2)->freqInfo.additionalSpectrumEmission = 1;
(*sib2)->freqInfo.ul_CarrierFreq = NULL;
(*sib2)->freqInfo.ul_Bandwidth = NULL;
@@ -2724,21 +2441,12 @@ do_RRCConnectionSetup(
SRB1_config->rlc_Config = SRB1_rlc_config;
SRB1_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
SRB1_rlc_config->choice.explicitValue.present=LTE_RLC_Config_PR_am;
#if defined(ENABLE_ITTI)
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = rrc->srb1_timer_poll_retransmit;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = rrc->srb1_poll_pdu;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = rrc->srb1_poll_byte;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = rrc->srb1_max_retx_threshold;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = rrc->srb1_timer_reordering;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = rrc->srb1_timer_status_prohibit;
#else
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms20;;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p4;;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kBinfinity;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t8;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
#endif
SRB1_lchan_config = CALLOC(1,sizeof(*SRB1_lchan_config));
SRB1_config->logicalChannelConfig = SRB1_lchan_config;
SRB1_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
@@ -3099,21 +2807,12 @@ uint8_t do_RRCConnectionSetup_BR(
SRB1_config->rlc_Config = SRB1_rlc_config; // check this
SRB1_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
SRB1_rlc_config->choice.explicitValue.present = LTE_RLC_Config_PR_am;
#if defined(ENABLE_ITTI)
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = rrc->srb1_timer_poll_retransmit;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = rrc->srb1_poll_pdu;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = rrc->srb1_poll_byte;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = rrc->srb1_max_retx_threshold;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = rrc->srb1_timer_reordering;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = rrc->srb1_timer_status_prohibit;
#else
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms20; // FIXME should be 80
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p4; // FIXME should be infinity
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kBinfinity;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t8;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
#endif
SRB1_lchan_config = CALLOC(1, sizeof(*SRB1_lchan_config));
SRB1_config->logicalChannelConfig = SRB1_lchan_config;
SRB1_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
@@ -3403,9 +3102,9 @@ uint8_t do_RRCConnectionSetup_BR(
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2;
// rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL;
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void *)&dl_ccch_msg);
#endif
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_DL_CCCH_Message, (void *)&dl_ccch_msg);
}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message,
NULL,
(void *)&dl_ccch_msg,
@@ -3413,31 +3112,8 @@ uint8_t do_RRCConnectionSetup_BR(
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_CCCH_Message, (void *) &dl_ccch_msg)) > 0) {
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_dl_ccch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_ccch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetup_BR Encoded %d bits (%d bytes), ecause %d\n",
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
#endif
// FREEMEM(SRB_list);
// free(SRB1_config);
// free(SRB1_rlc_config);
// free(SRB1_lchan_config);
// free(SRB1_ul_SpecificParameters);
return((enc_rval.encoded+7)/8);
}
@@ -3661,25 +3337,10 @@ uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t *const
RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed %s, %lu!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void *)&dl_dcch_msg);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[30000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_DCCH_Message, (void *) &dl_dcch_msg)) > 0) {
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
}
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout,&asn_DEF_LTE_DL_DCCH_Message,(void *)&dl_dcch_msg);
}
# endif
#endif
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",(int)enc_rval.encoded,(int)(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
}
@@ -3933,21 +3594,12 @@ do_RRCConnectionReestablishment(
SRB1_config->rlc_Config = SRB1_rlc_config;
SRB1_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
SRB1_rlc_config->choice.explicitValue.present=LTE_RLC_Config_PR_am;
#if defined(ENABLE_ITTI)
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = rrc->srb1_timer_poll_retransmit;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = rrc->srb1_poll_pdu;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = rrc->srb1_poll_byte;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = rrc->srb1_max_retx_threshold;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = rrc->srb1_timer_reordering;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = rrc->srb1_timer_status_prohibit;
#else
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms20;;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p4;;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kBinfinity;
SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t8;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
#endif
SRB1_lchan_config = CALLOC(1, sizeof(*SRB1_lchan_config));
SRB1_config->logicalChannelConfig = SRB1_lchan_config;
SRB1_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
+4 -8
View File
@@ -91,10 +91,8 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id, RrcConfigurationReq *configuration, LT
@param br_flag Do for BL/CE UE configuration
@return size of encoded bit stream in bytes*/
uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, BOOLEAN_t brOption
#if defined(ENABLE_ITTI)
,RrcConfigurationReq *configuration
#endif
uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, BOOLEAN_t brOption,
RrcConfigurationReq *configuration
);
/**
@@ -120,10 +118,8 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcCo
@param MBMS_flag Indicates presence of MBMS system information (when 1)
@return size of encoded bit stream in bytes*/
uint8_t do_SIB23(uint8_t Mod_id,int CC_id, BOOLEAN_t brOption
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
uint8_t do_SIB23(uint8_t Mod_id,int CC_id, BOOLEAN_t brOption,
RrcConfigurationReq *configuration
);
/**
+8 -56
View File
@@ -68,10 +68,8 @@
//#include "PHY/defs.h"
#include "enb_config.h"
#include "intertask_interface.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
@@ -178,21 +176,15 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
asn_set_empty(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc->list);//.size=0;
//left as it is???
#if defined(ENABLE_ITTI)
dummy_mcc[0] = (configuration->mcc / 100) % 10;
dummy_mcc[1] = (configuration->mcc / 10) % 10;
dummy_mcc[2] = (configuration->mcc / 1) % 10;
#else
dummy_mcc[0] = 0;
dummy_mcc[1] = 0;
dummy_mcc[2] = 1;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc->list,&dummy_mcc[0]);
ASN_SEQUENCE_ADD(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc->list,&dummy_mcc[1]);
ASN_SEQUENCE_ADD(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc->list,&dummy_mcc[2]);
PLMN_identity_info_NB_IoT.plmn_Identity_r13.mnc.list.size=0;
PLMN_identity_info_NB_IoT.plmn_Identity_r13.mnc.list.count=0;
#if defined(ENABLE_ITTI)
if (configuration->mnc >= 100) {
dummy_mnc[0] = (configuration->mnc / 100) % 10;
@@ -210,11 +202,6 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
}
}
#else
dummy_mnc[0] = 0;
dummy_mnc[1] = 1;
dummy_mnc[2] = 0xf;
#endif
ASN_SEQUENCE_ADD(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mnc.list,&dummy_mnc[0]);
ASN_SEQUENCE_ADD(&PLMN_identity_info_NB_IoT.plmn_Identity_r13.mnc.list,&dummy_mnc[1]);
@@ -230,28 +217,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
// 16 bits = 2 byte
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf = MALLOC(2); //MALLOC works in byte
//lefts as it is?
#if defined(ENABLE_ITTI)
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = (configuration->tac >> 8) & 0xff;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = (configuration->tac >> 0) & 0xff;
#else
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = 0x00;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = 0x01;
#endif
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.size=2;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.trackingAreaCode_r13.bits_unused=0;
// 28 bits --> i have to use 32 bits = 4 byte
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf = MALLOC(8); // why allocate 8 byte?
#if defined(ENABLE_ITTI)
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = (configuration->cell_identity >> 20) & 0xff;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = (configuration->cell_identity >> 12) & 0xff;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = (configuration->cell_identity >> 4) & 0xff;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = (configuration->cell_identity << 4) & 0xf0;
#else
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = 0x00;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = 0x00;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = 0x00;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = 0x10;
#endif
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.size=4;
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
//Still set to "notBarred" as in the previous case
@@ -264,11 +239,8 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
*((*sib1_NB_IoT)->p_Max_r13) = 23;
//FIXME
(*sib1_NB_IoT)->freqBandIndicator_r13 =
#if defined(ENABLE_ITTI)
configuration->eutra_band;
#else
5; //if not configured we use band 5 (UL: 824 MHz - 849MHz / DL: 869 MHz - 894 MHz FDD mode)
#endif
//OPTIONAL new parameters, to be used?
/*
* freqBandInfo_r13
@@ -305,10 +277,8 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
ASN_SEQUENCE_ADD(&schedulingInfo_NB_IoT[0].sib_MappingInfo_r13.list,&sib_type_NB_IoT[0]);
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->schedulingInfoList_r13.list,&schedulingInfo_NB_IoT[0]);
//printf("[ASN Debug] SI P: %ld\n",(*sib1_NB_IoT)->schedulingInfoList_r13.list.array[0]->si_Periodicity_r13);
#if defined(ENABLE_ITTI)
if (configuration->frame_type == TDD)
#endif
{
//FIXME in NB-IoT mandatory to be FDD --> so must give an error
LOG_E(RRC,"[NB-IoT %d] Frame Type is TDD --> not supported by NB-IoT, exiting\n", Mod_id); //correct?
@@ -342,9 +312,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
enc_rval.failed_type->name, enc_rval.encoded);
}
#ifdef USER_MODE
LOG_D(RRC,"[NB-IoT] SystemInformationBlockType1-NB Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
return(-1);
@@ -563,10 +531,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
900);
// AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
// enc_rval.failed_type->name, enc_rval.encoded);
//#if defined(ENABLE_ITTI).....
#ifdef USER_MODE
LOG_D(RRC,"[NB-IoT] SystemInformation-NB Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI-NB encoding failed for SIB23_NB_IoT\n");
@@ -748,10 +715,8 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
enc_rval.failed_type->name, enc_rval.encoded);
}
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetup-NB Encoded %zd bits (%zd bytes), ecause %d\n",
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
#endif
LOG_D(RRC,"RRCConnectionSetup-NB Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
}
@@ -793,15 +758,11 @@ uint8_t do_SecurityModeCommand_NB_IoT(
enc_rval.failed_type->name, enc_rval.encoded);
}
//#if defined(ENABLE_ITTI)
//# if !defined(DISABLE_XER_SPRINT)....
#ifdef USER_MODE
LOG_D(RRC,"[NB-IoT %d] securityModeCommand-NB for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id,
ctxt_pP->rnti,
enc_rval.encoded,
(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
LOG_E(RRC,"[NB-IoT %d] ASN1 : securityModeCommand-NB encoding failed for UE %x\n",
@@ -850,15 +811,12 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
enc_rval.failed_type->name, enc_rval.encoded);
}
//#if defined(ENABLE_ITTI)
//# if !defined(DISABLE_XER_SPRINT)....
#ifdef USER_MODE
LOG_D(RRC,"[NB-IoT %d] UECapabilityEnquiry-NB for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id,
ctxt_pP->rnti,
enc_rval.encoded,
(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
LOG_E(RRC,"[NB-IoT %d] ASN1 : UECapabilityEnquiry-NB encoding failed for UE %x\n",
@@ -940,8 +898,6 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
xer_fprint(stdout,&asn_DEF_LTE_DL_DCCH_Message_NB,(void *)&dl_dcch_msg_NB_IoT);
}
//#if defined(ENABLE_ITTI)
//# if !defined(DISABLE_XER_SPRINT)...
LOG_I(RRC,"RRCConnectionReconfiguration-NB Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
}
@@ -977,10 +933,8 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
}
//Only change in "asn_DEF_DL_CCCH_Message_NB"
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
return((enc_rval.encoded+7)/8);
}
@@ -1025,10 +979,8 @@ uint8_t do_RRCConnectionReject_NB_IoT(
enc_rval.failed_type->name, enc_rval.encoded);
}
#ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReject-NB Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
return((enc_rval.encoded+7)/8);
}
+4 -19
View File
@@ -152,21 +152,15 @@ init_SI(
(int)configuration->N_RB_DL[CC_id]);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
#ifdef ENABLE_ITTI
configuration->N_RB_DL[CC_id],
0 //additionalNonMBSFN
#else
50,0
#endif
,0);
0, //additionalNonMBSFN
0);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
#if defined(ENABLE_ITTI)
, configuration
#endif
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id,
configuration
);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB1-MBMS\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
@@ -892,7 +886,6 @@ rrc_eNB_free_mem_UE_context(
//uint8_t Status;
//rnti_t rnti;
//uint64_t random_ue_identity;
#if defined(ENABLE_ITTI)
//UE_S_TMSI Initialue_identity_s_TMSI;
//EstablishmentCause_t establishment_cause;
//ReestablishmentCause_t reestablishment_cause;
@@ -905,7 +898,6 @@ rrc_eNB_free_mem_UE_context(
//transport_layer_addr_t enb_gtp_addrs[S1AP_MAX_E_RAB];
//rb_id_t enb_gtp_ebi[S1AP_MAX_E_RAB];
#endif
#endif
}
//-----------------------------------------------------------------------------
@@ -4758,7 +4750,6 @@ check_handovers(
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED
&& ue_context_p->ue_context.handover_info != NULL &&
ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
#if defined(ENABLE_ITTI)
MessageDef *msg_p;
int result;
protocol_ctxt_t ctxt;
@@ -4889,7 +4880,6 @@ check_handovers(
ue_context_p->ue_context.handover_info->endmark_state = ENDMARK_EMPTY;
ue_context_p->ue_context.handover_info->state = HO_FORWARDING_COMPLETE;
#endif
}
}
}
@@ -5805,7 +5795,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
securityConfigHO->handoverType.choice.intraLTE.securityAlgorithmConfig = NULL; /* TODO: to be checked */
securityConfigHO->handoverType.choice.intraLTE.keyChangeIndicator = 0;
securityConfigHO->handoverType.choice.intraLTE.nextHopChainingCount = 0;
#if defined(ENABLE_ITTI)
/* Initialize NAS list */
dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
@@ -5838,7 +5827,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
dedicatedInfoNASList = NULL;
}
#endif
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
memset(buffer, 0, RRC_BUF_SIZE);
@@ -5887,7 +5875,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
*_size = size = ho_size;
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
"[MSG] RRC Connection Reconfiguration handover\n");
#if defined(ENABLE_ITTI)
/* Free all NAS PDUs */
for (i = 0; i < ue_context_pP->ue_context.nb_of_e_rabs; i++) {
@@ -5897,8 +5884,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer = NULL;
}
}
#endif
LOG_I(RRC,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCConnectionReconfiguration handover (bytes %d, UE id %x)\n",
ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
+4 -8
View File
@@ -27,7 +27,6 @@
* \email: lionel.gauthier@eurecom.fr
*/
//#if defined(ENABLE_USE_MME)
# include "rrc_defs.h"
# include "rrc_extern.h"
# include "RRC/LTE/MESSAGES/asn1_msg.h"
@@ -35,10 +34,10 @@
# include "rrc_eNB_UE_context.h"
# include "msc.h"
//# if defined(ENABLE_ITTI)
# include "asn1_conversions.h"
# include "intertask_interface.h"
//#endif
#include "asn1_conversions.h"
#include "intertask_interface.h"
# include "common/ran_context.h"
@@ -113,7 +112,6 @@ gtpv_data_req(
return FALSE;
}
LOG_D(GTPU,"gtpv_data_req ue rnti %x sdu_sizeP %d rb id %ld", ctxt_pP->rnti, sdu_sizeP, rb_idP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
@@ -167,8 +165,6 @@ gtpv_data_req(
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
}
#endif
return TRUE;
}
+4 -3
View File
@@ -58,7 +58,7 @@
#include "TLVDecoder.h"
#include "S1AP_NAS-PDU.h"
#include "flexran_agent_common_internal.h"
#include "executables/softmodem-common.h"
extern RAN_CONTEXT_t RC;
extern int
@@ -540,9 +540,10 @@ rrc_pdcp_config_security(
derive_key_rrc_int(ue_context_pP->ue_context.integrity_algorithm,
ue_context_pP->ue_context.kenb,
&kRRCint);
#if !defined(USRP_REC_PLAY)
if (!IS_SOFTMODEM_IQPLAYER) {
SET_LOG_DUMP(DEBUG_SECURITY) ;
#endif
}
if ( LOG_DUMPFLAG( DEBUG_SECURITY ) ) {
if (print_keys ==1 ) {
+1 -3
View File
@@ -36,9 +36,7 @@
#include "msc.h"
#include "common/ran_context.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "NR_MIB.h"
#include "NR_BCCH-BCH-Message.h"
+7 -39
View File
@@ -99,9 +99,7 @@
#include "gnb_config.h"
#endif
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#include "common/ran_context.h"
@@ -289,23 +287,18 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
}
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier
#if defined(ENABLE_ITTI)
, gNB_RrcConfigurationReq *configuration
#endif
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
gNB_RrcConfigurationReq *configuration
) {
asn_enc_rval_t enc_rval;
NR_BCCH_DL_SCH_Message_t *sib1_message ;
struct NR_SIB1 *sib1 ;
int i;
struct NR_PLMN_IdentityInfo nr_plmn_info;
#if defined(ENABLE_ITTI)
// TODO : Add support for more than one PLMN
//int num_plmn = configuration->num_plmn;
int num_plmn = 1;
#else
int num_plmn = 1;
#endif
struct NR_PLMN_Identity nr_plmn[num_plmn];
NR_MCC_MNC_Digit_t nr_mcc_digit[num_plmn][3];
NR_MCC_MNC_Digit_t nr_mnc_digit[num_plmn][3];
@@ -329,30 +322,18 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier
memset(nr_plmn,0,num_plmn*sizeof(struct NR_PLMN_Identity));
for (i = 0; i < num_plmn; ++i) {
#ifdef ENABLE_ITTI
nr_mcc_digit[i][0] = (configuration->mcc[i]/100)%10;
nr_mcc_digit[i][1] = (configuration->mcc[i]/10)%10;
nr_mcc_digit[i][2] = (configuration->mcc[i])%10;
#else
nr_mcc_digit[i][0] = 0;
nr_mcc_digit[i][1] = 0;
nr_mcc_digit[i][2] = 1;
#endif
nr_plmn[i].mcc = CALLOC(1,sizeof(struct NR_MCC));
memset(nr_plmn[i].mcc,0,sizeof(struct NR_MCC));
asn_set_empty(&nr_plmn[i].mcc->list);
ASN_SEQUENCE_ADD(&nr_plmn[i].mcc->list, &nr_mcc_digit[i][0]);
ASN_SEQUENCE_ADD(&nr_plmn[i].mcc->list, &nr_mcc_digit[i][1]);
ASN_SEQUENCE_ADD(&nr_plmn[i].mcc->list, &nr_mcc_digit[i][2]);
#ifdef ENABLE_ITTI
nr_mnc_digit[i][0] = (configuration->mnc[i]/100)%10;
nr_mnc_digit[i][1] = (configuration->mnc[i]/10)%10;
nr_mnc_digit[i][2] = (configuration->mnc[i])%10;
#else
nr_mnc_digit[i][0] = 0;
nr_mnc_digit[i][1] = 0;
nr_mnc_digit[i][2] = 1;
#endif
memset(&nr_plmn[i].mnc,0,sizeof(NR_MNC_t));
nr_plmn[i].mnc.list.size=0;
nr_plmn[i].mnc.list.count=0;
@@ -364,17 +345,10 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier
nr_plmn_info.cellIdentity.buf = MALLOC(8);
memset(nr_plmn_info.cellIdentity.buf,0,8);
#ifdef ENABLE_ITTI
nr_plmn_info.cellIdentity.buf[0]= (configuration->cell_identity >> 20) & 0xff;
nr_plmn_info.cellIdentity.buf[1]= (configuration->cell_identity >> 12) & 0xff;
nr_plmn_info.cellIdentity.buf[2]= (configuration->cell_identity >> 4) & 0xff;
nr_plmn_info.cellIdentity.buf[3]= (configuration->cell_identity << 4) & 0xff;
#else
nr_plmn_info.cellIdentity.buf[0]= 0x00;
nr_plmn_info.cellIdentity.buf[1]= 0x00;
nr_plmn_info.cellIdentity.buf[2]= 0x00;
nr_plmn_info.cellIdentity.buf[3]= 0x10;
#endif
nr_plmn_info.cellIdentity.size= 4;
nr_plmn_info.cellIdentity.bits_unused= 4;
nr_plmn_info.cellReservedForOperatorUse = 0;
@@ -410,9 +384,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier
void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
int CC_id,
#if defined(ENABLE_ITTI)
gNB_RrcConfigurationReq *configuration,
#endif
gNB_RrcConfigurationReq *configuration,
int initial_flag
) {
NR_ServingCellConfigCommon_t **servingcellconfigcommon = &RC.nrrrc[Mod_id]->carrier[CC_id].servingcellconfigcommon;
@@ -1143,17 +1115,13 @@ void do_SpCellConfig(uint8_t Mod_id,
common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
//Fill servingcellconfigcommon config value
rrc_config_servingcellconfigcommon(Mod_id,
CC_id
#if defined(ENABLE_ITTI)
,common_configuration
#endif
CC_id,
common_configuration
);
//Fill common config to structure
do_SERVINGCELLCONFIGCOMMON(Mod_id,
CC_id,
#if defined(ENABLE_ITTI)
common_configuration,
#endif
0
);
spconfig->reconfigurationWithSync = CALLOC(1,sizeof(struct NR_ReconfigurationWithSync));
+2 -6
View File
@@ -76,17 +76,13 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
@param carrier pointer to Carrier information
@param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier
#if defined(ENABLE_ITTI)
, gNB_RrcConfigurationReq *configuration
#endif
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
gNB_RrcConfigurationReq *configuration
);
void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
int CC_id,
#if defined(ENABLE_ITTI)
gNB_RrcConfigurationReq *configuration,
#endif
int initial_flag);
void do_RLC_BEARER(uint8_t Mod_id,
+3 -5
View File
@@ -31,10 +31,8 @@
#include "nr_rrc_config.h"
void rrc_config_servingcellconfigcommon(uint8_t Mod_id,
int CC_id
#if defined(ENABLE_ITTI)
,gNB_RrcConfigurationReq *common_configuration
#endif
int CC_id,
gNB_RrcConfigurationReq *common_configuration
){
common_configuration->MIB_subCarrierSpacingCommon[CC_id] = 0;
@@ -259,4 +257,4 @@ void rrc_config_rachdedicated(uint8_t Mod_id,
physicalcellgroup_t *physicalcellgroup_config
){
}
}
+3 -5
View File
@@ -117,10 +117,8 @@ typedef struct rach_dedicated_s{
}rach_dedicated_t;
void rrc_config_servingcellconfigcommon(uint8_t Mod_id,
int CC_id
#if defined(ENABLE_ITTI)
,gNB_RrcConfigurationReq *common_configuration
#endif
int CC_id,
gNB_RrcConfigurationReq *common_configuration
);
void rrc_config_rlc_bearer(uint8_t Mod_id,
@@ -138,4 +136,4 @@ void rrc_config_physicalcellgroup(uint8_t Mod_id,
physicalcellgroup_t *physicalcellgroup_config
);
#endif
#endif
+1 -11
View File
@@ -72,21 +72,15 @@
#include "NR_EstablishmentCause.h"
//-------------------
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
/* TODO: be sure this include is correct.
* It solves a problem of compilation of the RRH GW,
* issue #186.
*/
#if !defined(ENABLE_ITTI)
#include "as_message.h"
#endif
#if defined(ENABLE_USE_MME)
#include "commonDef.h"
#endif
/*I will change the name of the structure for compile purposes--> hope not to undo this process*/
@@ -295,7 +289,6 @@ typedef struct gNB_RRC_UE_s {
rnti_t rnti;
uint64_t random_ue_identity;
#if defined(ENABLE_ITTI)
/* Information from UE RRC ConnectionRequest */
UE_S_TMSI Initialue_identity_s_TMSI;
NR_EstablishmentCause_t establishment_cause;
@@ -328,7 +321,6 @@ typedef struct gNB_RRC_UE_s {
uint32_t enb_gtp_teid[S1AP_MAX_E_RAB];
transport_layer_addr_t enb_gtp_addrs[S1AP_MAX_E_RAB];
rb_id_t enb_gtp_ebi[S1AP_MAX_E_RAB];
#endif
uint32_t ul_failure_timer;
uint32_t ue_release_timer;
uint32_t ue_release_timer_thres;
@@ -420,9 +412,7 @@ typedef struct gNB_RRC_INST_s {
hash_table_t *s1ap_id2_s1ap_ids ; // key is content is rrc_ue_s1ap_ids_t
//RRC configuration
#if defined(ENABLE_ITTI)
gNB_RrcConfigurationReq configuration;//rrc_messages_types.h
#endif
// other PLMN parameters
/// Mobile country code
-2
View File
@@ -58,9 +58,7 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
);
#if defined(ENABLE_ITTI)
/**\brief RRC eNB task.
\param void *args_p Pointer on arguments to start the task. */
void *rrc_gnb_task(void *args_p);
#endif
+16 -34
View File
@@ -67,21 +67,15 @@
#include "UTIL/OSA/osa_defs.h"
#endif
#if defined(ENABLE_USE_MME)
#include "rrc_eNB_S1AP.h"
#include "rrc_eNB_GTPV1U.h"
#if defined(ENABLE_ITTI)
#else
#include "../../S1AP/s1ap_eNB.h"
#endif
#endif
#include "rrc_eNB_S1AP.h"
#include "rrc_eNB_GTPV1U.h"
#include "pdcp.h"
#include "gtpv1u_eNB_task.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "intertask_interface.h"
#if ENABLE_RAL
#include "rrc_eNB_ral.h"
@@ -200,11 +194,9 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
///---------------------------------------------------------------------------------------------------------------///
static void init_NR_SI(const protocol_ctxt_t *const ctxt_pP,
const int CC_id
#if defined(ENABLE_ITTI)
,
gNB_RrcConfigurationReq *configuration
#endif
const int CC_id,
gNB_RrcConfigurationReq *configuration
) {
//int i;
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
@@ -219,20 +211,14 @@ static void init_NR_SI(const protocol_ctxt_t *const ctxt_pP,
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = 0;
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t *) malloc16(4);
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = do_MIB_NR(&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id],0,
#ifdef ENABLE_ITTI
configuration->MIB_ssb_SubcarrierOffset[CC_id],
configuration->pdcch_ConfigSIB1[CC_id],
configuration->MIB_subCarrierSpacingCommon[CC_id],
configuration->MIB_dmrs_TypeA_Position[CC_id]
#else
0,0,15,2
#endif
configuration->MIB_ssb_SubcarrierOffset[CC_id],
configuration->pdcch_ConfigSIB1[CC_id],
configuration->MIB_subCarrierSpacingCommon[CC_id],
configuration->MIB_dmrs_TypeA_Position[CC_id]
);
do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id,
CC_id,
#if defined(ENABLE_ITTI)
configuration,
#endif
1
);
LOG_I(NR_RRC,"Done init_NR_SI\n");
@@ -268,9 +254,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
#endif
AssertFatal(RC.nrrrc[gnb_mod_idP] != NULL, "RC.nrrrc not initialized!");
AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
#ifdef ENABLE_ITTI
AssertFatal(configuration!=NULL,"configuration input is null\n");
#endif
RC.nrrrc[ctxt.module_id]->Nb_ue = 0;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
@@ -287,10 +272,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
init_NR_SI(&ctxt,
CC_id
#if defined(ENABLE_ITTI)
,configuration
#endif
CC_id,
configuration
);
}//END for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
@@ -302,7 +285,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
#if defined(ENABLE_ITTI)
void *rrc_gnb_task(void *args_p) {
MessageDef *msg_p;
@@ -408,4 +391,3 @@ void *rrc_gnb_task(void *args_p) {
}
}
#endif //END #if defined(ENABLE_ITTI)
File diff suppressed because it is too large Load Diff