Commit 034b602c authored by Michele Paffetti's avatar Michele Paffetti

Cleaning some parts of RRC code no more useful. Code compile. 145 warnings

parent 3bbb960d
......@@ -65,13 +65,13 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
extra_phyConfigCommon_t* extra_phy_parms
extra_phyConfig_t* extra_phy_parms
);
void NB_phy_config_dedicated_eNB(module_id_t Mod_id,
int CC_id,
rnti_t rnti,
extra_phyConfigCommon_t* extra_phy_parms);
extra_phyConfig_t* extra_phy_parms);
......
......@@ -193,7 +193,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
extra_phyConfigCommon_t* extra_phy_parms
extra_phyConfig_t* extra_phy_parms
)
{
NB_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms;
......@@ -327,8 +327,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
//fp->npusch_config_common.srs_SubframeConfig /*OPTIONAL*/
//TODO:should change the part that implement the ul hopping in NB-IoT?? (
//init_ul_hopping(fp);
//No Frequency hopping in NULSCH for NB-IoT and not init_ncs_cell used for PUCCH
/*UL Power Control Config Common---------------------------------------------------------*/
......@@ -345,9 +344,6 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
fp->DL_gap_config.dl_GapThreshold = config->dl_gap_threshold.value;
}
//TODO
//init_ncs_cell(fp,PHY_vars_eNB_g[Mod_id][CC_id]->ncs_cell);
//init_ul_hopping(fp);
}
......@@ -356,7 +352,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
int CC_id,
uint16_t rnti,
extra_phyConfigCommon_t *extra_parms
extra_phyConfig_t *extra_parms
)
{
PHY_VARS_eNB *eNB = PHY_vars_eNB_g[Mod_id][CC_id];
......
......@@ -65,12 +65,12 @@ typedef struct{
* In OAI at least are needed when we manage the phy_procedures_eNB_TX in which we call the phy_config_dedicated_eNB_step2
* that use the physicalConfigDedicated info previously stored in the PHY_VARS_eNB structure through the phy_config_dedicated procedure
*/
PhysicalConfigDedicated_NB_r13_t *phy_config_dedicated;
//PhysicalConfigDedicated_NB_r13_t *phy_config_dedicated;
}extra_phyConfigCommon_t;
}extra_phyConfig_t;
typedef struct{
......@@ -104,7 +104,7 @@ typedef struct{
nfapi_config_request_t* cfg;
/*MP: MISSED COMMON CONFIG. of SIB2-NB in FAPI SPECS (may non needed)*/
extra_phyConfigCommon_t extra_phy_parms;
extra_phyConfig_t extra_phy_parms;
}PHY_Config_t;
......
......@@ -3276,11 +3276,11 @@ void rrc_rlc_register_rrc_NB (rrc_data_ind_cb_NB_t NB_rrc_data_indP, rrc_data_co
//map the function pointer to the function in input
//rlc_rrc_data_ind and rlc_rrc_data_conf are protected internal functions in the rlc.c file
rlc_rrc_data_ind_NB = NB_rrc_data_indP;
rlc_rrc_data_conf = rrc_data_confP;
//rlc_rrc_data_conf = rrc_data_confP; not used since only asn.1 function are considered
}
/*--------------------------------------------RLC-PDCP--------------------------------------------------*/
//XXX to be integrated in the flow
//XXX to be integrated in the data flow for NB-IoT
//called by rlc_am_send_sdu and rlc_tm_send_sdu
//defined in rlc.c
//--------------------------------------------
......
......@@ -250,34 +250,6 @@ typedef struct uid_linear_allocator_NB_s {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
//NB-IoT version (not used for the moment)
//typedef struct UE_RRC_INFO_s { //is used in UE_RRC_INST
// UE_STATE_NB_t State;
// uint8_t SIB1systemInfoValueTag;
// uint32_t SIStatus;
// uint32_t SIcnt;
//#if defined(Rel10) || defined(Rel14)
// uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
//#endif
// uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
// uint8_t handoverTarget;
// HO_STATE_t ho_state;
// uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
// unsigned short UE_index;
// uint32_t T300_active;
// uint32_t T300_cnt;
// uint32_t T304_active;
// uint32_t T304_cnt;
// uint32_t T310_active;
// uint32_t T310_cnt;
// uint32_t N310_cnt;
// uint32_t N311_cnt;
// rnti_t rnti;
//} __attribute__ ((__packed__)) UE_RRC_INFO;
//left as it is
typedef struct UE_S_TMSI_NB_s {
boolean_t presence;
mme_code_t mme_code;
......@@ -316,7 +288,7 @@ typedef struct {
typedef struct RB_INFO_NB_s {
uint16_t Rb_id; //=Lchan_id
LCHAN_DESC Lchan_desc[2]; //MP: Lchan_desc is an old structure no more used in general --> remove also where it is setup
//LCHAN_DESC Lchan_desc[2]; no more used
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
} RB_INFO_NB;
......@@ -324,7 +296,7 @@ typedef struct SRB_INFO_NB_s {
uint16_t Srb_id; //=Lchan_id---> useful for distinguish between SRB1 and SRB1bis?
RRC_BUFFER_NB Rx_buffer;
RRC_BUFFER_NB Tx_buffer;
LCHAN_DESC Lchan_desc[2]; //MP: Lchan_desc is an old structure no more used in general --> remove also where it is setup
//LCHAN_DESC Lchan_desc[2]; no more used
unsigned int Trans_id;
uint8_t Active;
} SRB_INFO_NB;
......@@ -347,7 +319,6 @@ typedef struct SRB_INFO_TABLE_ENTRY_NB_s {
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
//HANDOVER_INFO_UE not implemented in NB-IoT
//NB-IoT eNB_RRC_UE_NB_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_NB_s {
uint8_t primaryCC_id;
......@@ -467,10 +438,6 @@ typedef struct {
uint8_t *SIB23_NB;
uint8_t sizeof_SIB23_NB;
//uint8_t *SIB2_NB;
//uint8_t sizeof_SIB2_NB;
//uint8_t *SIB3_NB;
//uint8_t sizeof_SIB3_NB;
//not actually implemented in OAI
uint8_t *SIB4_NB;
......@@ -483,12 +450,12 @@ typedef struct {
uint8_t sizeof_SIB16_NB;
//TS 36.331 V14.2.1
uint8_t *SIB15_NB;
uint8_t sizeof_SIB15_NB;
uint8_t *SIB20_NB;
uint8_t sizeof_SIB20_NB;
uint8_t *SIB22_NB;
uint8_t sizeof_SIB22_NB;
// uint8_t *SIB15_NB;
// uint8_t sizeof_SIB15_NB;
// uint8_t *SIB20_NB;
// uint8_t sizeof_SIB20_NB;
// uint8_t *SIB22_NB;
// uint8_t sizeof_SIB22_NB;
//implicit parameters needed
int Ncp; //cyclic prefix for DL
......@@ -504,7 +471,6 @@ typedef struct {
BCCH_DL_SCH_Message_NB_t siblock1_NB; //SIB1-NB
BCCH_DL_SCH_Message_NB_t systemInformation_NB; //SI
//memory should be allocated--> in principle are only for commodity?
SystemInformationBlockType1_NB_t *sib1_NB;
SystemInformationBlockType2_NB_r13_t *sib2_NB;
SystemInformationBlockType3_NB_r13_t *sib3_NB;
......@@ -514,6 +480,10 @@ typedef struct {
SystemInformationBlockType14_NB_r13_t *sib14_NB;
SystemInformationBlockType16_NB_r13_t *sib16_NB;
SRB_INFO_NB SI;
SRB_INFO_NB Srb0;
/*future implementation TS 36.331 V14.2.1
SystemInformationBlockType15_NB_r14_t *sib15;
SystemInformationBlockType20_NB_r14_t *sib20;
......@@ -523,8 +493,7 @@ typedef struct {
uint8_t sizeof_SC_MCHH_MESS[];
SC_MCCH_Message_NB_t scptm;*/
SRB_INFO_NB SI;
SRB_INFO_NB Srb0;
} rrc_eNB_carrier_data_NB_t;
//---------------------------------------------------
......@@ -566,6 +535,7 @@ typedef struct eNB_RRC_INST_NB_s {
#define MAX_UE_CAPABILITY_SIZE 255
//not needed for the moment
//typedef struct OAI_UECapability_s {
// uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
......@@ -575,173 +545,6 @@ typedef struct eNB_RRC_INST_NB_s {
//} OAI_UECapability_t;
//Old implementation --> see NB_iot version
//typedef struct UE_RRC_INST_s {
// Rrc_State_t RrcState;
// Rrc_Sub_State_t RrcSubState;
//# if defined(ENABLE_USE_MME)
// plmn_t plmnID;
// Byte_t rat;
// as_nas_info_t initialNasMsg;
//# endif
// OAI_UECapability_t *UECap;
// uint8_t *UECapability;
// uint8_t UECapability_size;
// UE_RRC_INFO Info[NB_SIG_CNX_UE];
// SRB_INFO Srb0[NB_SIG_CNX_UE];
// SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
// SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
// HANDOVER_INFO_UE HandoverInfoUe;
// uint8_t *SIB1[NB_CNX_UE];
// uint8_t sizeof_SIB1[NB_CNX_UE];
// uint8_t *SI[NB_CNX_UE];
// uint8_t sizeof_SI[NB_CNX_UE];
// uint8_t SIB1Status[NB_CNX_UE];
// uint8_t SIStatus[NB_CNX_UE];
// SystemInformationBlockType1_t *sib1[NB_CNX_UE];
// SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
// SystemInformationBlockType2_t *sib2[NB_CNX_UE];
// SystemInformationBlockType3_t *sib3[NB_CNX_UE];
// SystemInformationBlockType4_t *sib4[NB_CNX_UE];
// SystemInformationBlockType5_t *sib5[NB_CNX_UE];
// SystemInformationBlockType6_t *sib6[NB_CNX_UE];
// SystemInformationBlockType7_t *sib7[NB_CNX_UE];
// SystemInformationBlockType8_t *sib8[NB_CNX_UE];
// SystemInformationBlockType9_t *sib9[NB_CNX_UE];
// SystemInformationBlockType10_t *sib10[NB_CNX_UE];
// SystemInformationBlockType11_t *sib11[NB_CNX_UE];
//
//#if defined(Rel10) || defined(Rel14)
// uint8_t MBMS_flag;
// uint8_t *MCCH_MESSAGE[NB_CNX_UE];
// uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
// uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
// MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
// SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
// SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
//#endif
//#ifdef CBA
// uint8_t num_active_cba_groups;
// uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
//#endif
// uint8_t num_srb;
// struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
// struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
// struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8];
// rb_id_t *defaultDRB; // remember the ID of the default DRB
// MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
// struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
// struct QuantityConfig *QuantityConfig[NB_CNX_UE];
// struct MeasIdToAddMod *MeasId[NB_CNX_UE][MAX_MEAS_ID];
// MEAS_REPORT_LIST *measReportList[NB_CNX_UE][MAX_MEAS_ID];
// uint32_t measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
// RSRP_Range_t s_measure;
// struct MeasConfig__speedStatePars *speedStatePars;
// struct PhysicalConfigDedicated *physicalConfigDedicated[NB_CNX_UE];
// struct SPS_Config *sps_Config[NB_CNX_UE];
// MAC_MainConfig_t *mac_MainConfig[NB_CNX_UE];
// MeasGapConfig_t *measGapConfig[NB_CNX_UE];
// double filter_coeff_rsrp; // [7] ???
// double filter_coeff_rsrq; // [7] ???
// float rsrp_db[7];
// float rsrq_db[7];
// float rsrp_db_filtered[7];
// float rsrq_db_filtered[7];
//#if ENABLE_RAL
// obj_hash_table_t *ral_meas_thresholds;
// ral_transaction_id_t scan_transaction_id;
//#endif
//#if defined(ENABLE_SECURITY)
// /* KeNB as computed from parameters within USIM card */
// uint8_t kenb[32];
//#endif
//
// /* Used integrity/ciphering algorithms */
// e_CipheringAlgorithm_r12 ciphering_algorithm;
// e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
//
//} UE_RRC_INST;
//NB-IoT version (for now not consider UE-side)--------------
//typedef struct UE_RRC_INST_s {
// Rrc_State_t RrcState; //are the same?
// Rrc_Sub_State_t RrcSubState;
//
//# if defined(ENABLE_USE_MME)
// plmn_t plmnID;
// Byte_t rat;
// as_nas_info_t initialNasMsg;
//# endif
//
// OAI_UECapability_t *UECap;
// uint8_t *UECapability;
// uint8_t UECapability_size;
// UE_RRC_INFO Info[NB_SIG_CNX_UE];
// SRB_INFO Srb0[NB_SIG_CNX_UE];
// SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
// SRB_INFO_TABLE_ENTRY Srb1bis[NB_CNX_UE]; //not exist srb2
//
// //needed for NB-IoT?
// HANDOVER_INFO_UE HandoverInfoUe;
//
// uint8_t *SIB1_NB[NB_CNX_UE];
// uint8_t sizeof_SIB1_NB[N_NBB_CNX_UE];
// uint8_t *SI_NB[NB_CNX_UE];
// uint8_t sizeof_SI_NB[NB_CNX_UE];
// uint8_t SIB1_NB_Status[NB_CNX_UE];
// uint8_t SI_NB_Status[NB_CNX_UE];
//
// //NB-IoT SIBs
// SystemInformationBlockType1_NB_t *sib1_NB[NB_CNX_UE];
// SystemInformation_NB_t *si_NB[NB_CNX_UE]; //!< Temporary storage for an SI-NB message. Decoding happens in decode_SI()-->UE side (to be changed).
//
// SystemInformationBlockType2_NB_r13_t *sib2_NB[NB_CNX_UE];
// SystemInformationBlockType3_NB_r13_t *sib3_NB[NB_CNX_UE];
// SystemInformationBlockType4_NB_r13_t *sib4_NB[NB_CNX_UE];
// SystemInformationBlockType5_NB_r13_t *sib5_NB[NB_CNX_UE];
// SystemInformationBlockType14_NB_r13_t *sib14_NB[NB_CNX_UE];
// SystemInformationBlockType16_NB_r13_t *sib16_NB[NB_CNX_UE];
//
// future implementation TS 36.331 V14.2.1--(preliminary)
// SystemInformationBlockType15_NB_r14_t *sib15_NB[NB_CNX_UE];
// SystemInformationBlockType20_NB_r14_t *sib20_NB[NB_CNX_UE];
// SystemInformationBlockType22_NB_r14_t *sib22_NB[NB_CNX_UE];
//
// uint8_t SCPTM_flag;
// uint8_t sizeof_SC_MCHH_MESS[];
// SC_MCCH_Message_NB_t scptm;
//
//
// uint8_t num_srb;
// struct SRB_ToAddMod_NB_r13_t *SRB1_config_NB[NB_CNX_UE];
// struct SRB_ToAddMod_NB_r13_t *SRB1bis_config_NB[NB_CNX_UE];
// struct DRB_ToAddMod_NB_r13_t *DRB_config_NB[NB_CNX_UE][8];
// rb_id_t *defaultDRB; // remember the ID of the default DRB
//
// //no measurement Reports in NB-IoT
//
// struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB[NB_CNX_UE];
// MAC_MainConfig_NB_r13_t *mac_MainConfig_NB[NB_CNX_UE];
//
// //no RAL
//
//#if defined(ENABLE_SECURITY)
// /* KeNB as computed from parameters within USIM card */
// uint8_t kenb[32];
//#endif
// /* KeNB as computed from parameters within USIM card */
// uint8_t kenb[32];
//#endif
//
// // Used integrity/ciphering algorithms
// e_CipheringAlgorithm_r12 ciphering_algorithm;
// e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
//
//} UE_RRC_INST;
#include "proto_nb_iot.h" //should be put here otherwise compilation error
#endif
......
......@@ -96,73 +96,20 @@ rrc_init_global_param(
//-----------------------------------------------------------------------------
{
//#ifdef USER_MODE
// Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
//#endif //USRE_MODE
// Rrc_xface->openair_rrc_top_init = openair_rrc_top_init;
// Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init;
// Rrc_xface->openair_rrc_UE_init = openair_rrc_ue_init;
// Rrc_xface->mac_rrc_data_ind = mac_rrc_data_ind;
//Rrc_xface->mac_rrc_data_req = mac_rrc_data_req;
// Rrc_xface->rrc_data_indP = (void *)rlcrrc_data_ind;
// Rrc_xface->rrc_rx_tx = rrc_rx_tx;
// Rrc_xface->mac_rrc_meas_ind = mac_rrc_meas_ind;
// Rrc_xface->get_rrc_status = get_rrc_status;
//Rrc_xface->rrc_get_status = ...
// Mac_rlc_xface->mac_out_of_sync_ind=mac_out_of_sync_ind;
#ifndef NO_RRM
// Rrc_xface->fn_rrc=fn_rrc;
#endif
// LOG_D(RRC, "[RRC]INIT_GLOBAL_PARAM: Mac_rlc_xface %p, rrc_rlc_register %p,rlcrrc_data_ind%p\n",Mac_rlc_xface,Mac_rlc_xface->rrc_rlc_register_rrc,rlcrrc_data_ind);
/*
if((Mac_rlc_xface==NULL) || (Mac_rlc_xface->rrc_rlc_register_rrc==NULL) ||
(rlcrrc_data_ind==NULL)) {
LOG_E(RRC,"Data structured is not initialized \n");
return -1;
}
*/
rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc
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;
Rlc_info_um.rlc_mode = RLC_MODE_UM;
Rlc_info_um.rlc.rlc_um_info.timer_reordering = 5;
Rlc_info_um.rlc.rlc_um_info.sn_field_length = 10;
Rlc_info_um.rlc.rlc_um_info.is_mXch = 0;
//Rlc_info_um.rlc.rlc_um_info.sdu_discard_mode=16;
Rlc_info_am_config.rlc_mode = RLC_MODE_AM;
Rlc_info_am_config.rlc.rlc_am_info.max_retx_threshold = 50;
Rlc_info_am_config.rlc.rlc_am_info.poll_pdu = 8;
Rlc_info_am_config.rlc.rlc_am_info.poll_byte = 1000;
Rlc_info_am_config.rlc.rlc_am_info.t_poll_retransmit = 15;
Rlc_info_am_config.rlc.rlc_am_info.t_reordering = 50;
Rlc_info_am_config.rlc.rlc_am_info.t_status_prohibit = 10;
#ifndef NO_RRM
//no more LCHAN_DESCH used
//no more static configuration of RLC params
//no more L3_xface_init called
if (L3_xface_init ()) {
return (-1);
}
#endif
return 0;
}
#ifndef NO_RRM
//-----------------------------------------------------------------------------
//NO more USED
int
L3_xface_init(
void
......@@ -325,18 +272,19 @@ openair_rrc_top_init(
eNB_rrc_inst = NULL;
}
#ifndef NO_RRM
#ifndef USER_MODE
Header_buf=(char*)malloc16(sizeof(msg_head_t));
Data=(char*)malloc16(2400);
Header_read_idx=0;
Data_read_idx=0;
Header_size=sizeof(msg_head_t);
#endif //NO_RRM
Data_to_read = 0;
#endif //USER_MODE
//#ifndef NO_RRM
//#ifndef USER_MODE
//
// //no more used since are exploited by RRC_xface
// Header_buf=(char*)malloc16(sizeof(msg_head_t));
// Data=(char*)malloc16(2400);
// Header_read_idx=0;
// Data_read_idx=0;
// Header_size=sizeof(msg_head_t);
//
//#endif //NO_RRM
// Data_to_read = 0;
//#endif //USER_MODE
}
//-----------------------------------------------------------------------------
......
......@@ -270,19 +270,6 @@ openair_rrc_top_init_eNB_NB(void)//MP: XXX Raymond put this directly the definit
}
//XXX this stuff below i think are no more used
#ifndef NO_RRM
#ifndef USER_MODE
Header_buf=(char*)malloc16(sizeof(msg_head_t));
Data=(char*)malloc16(2400);
Header_read_idx=0;
Data_read_idx=0;
Header_size=sizeof(msg_head_t);
#endif //NO_RRM
Data_to_read = 0;
#endif //USER_MODE
}
//-----------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment