develop-nr merge
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#endif
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
@@ -34,12 +34,9 @@
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
//#include "rrm_config_structs.h"
|
||||
//#include "platform_types.h"
|
||||
|
||||
/** @defgroup _mac_rrc_primitives_ MAC Layer Primitives for Communications with RRC
|
||||
* @ingroup _openair_mac_layer_specs_
|
||||
* @{
|
||||
@@ -324,9 +321,9 @@ typedef struct { //RRC_INTERFACE_FUNCTIONS
|
||||
RRC_status_t (*rrc_rx_tx)(uint8_t,uint32_t,uint8_t,uint8_t);
|
||||
uint8_t (*mac_rrc_data_ind)(uint8_t,uint32_t,uint16_t,uint8_t *,uint16_t,eNB_flag_t eNB_flag, uint8_t eNB_index);
|
||||
uint8_t (*mac_rrc_data_req)(uint8_t,uint32_t,uint16_t,uint8_t,uint8_t *,eNB_flag_t eNB_flag, uint8_t eNB_index);
|
||||
void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY*);
|
||||
void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY *);
|
||||
void (*def_meas_ind)(uint8_t, uint8_t);
|
||||
void (*rrc_data_indP) (module_id_t , rb_id_t , sdu_size_t , char*);
|
||||
void (*rrc_data_indP) (module_id_t, rb_id_t, sdu_size_t, char *);
|
||||
void (*fn_rrc) (void);
|
||||
uint8_t (*get_rrc_status)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t eNB_index);
|
||||
double (*rrc_get_estimated_ue_distance) (module_id_t Mod_id, uint8_t UE_id, uint8_t CC_id, uint8_t loc_type);
|
||||
@@ -339,12 +336,12 @@ typedef struct {
|
||||
unsigned short Node_id[NB_MODULES_MAX];
|
||||
char Is_cluster_head[NB_MODULES_MAX];
|
||||
void (*macphy_exit)(const char *); /* Pointer function that stops the low-level scheduler due an exit condition */
|
||||
unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ*);
|
||||
MAC_MEAS_REQ_ENTRY* (*mac_meas_req)(uint8_t , MAC_MEAS_REQ*);
|
||||
unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ *);
|
||||
MAC_MEAS_REQ_ENTRY *(*mac_meas_req)(uint8_t, MAC_MEAS_REQ *);
|
||||
void (*mac_out_of_sync_ind)(uint8_t,uint32_t,unsigned short);
|
||||
//RLC_INTERFACE_FUNCTIONS
|
||||
void (*pdcp_run)(void);
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char *);
|
||||
signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
|
||||
int (*rrc_mac_config_req)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t UE_id,uint8_t eNB_index,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
@@ -355,32 +352,25 @@ typedef struct {
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t *SIwindowsize,
|
||||
uint16_t *SIperiod
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
uint16_t *SIperiod,
|
||||
MBMS_flag_t MBMS_Flag,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
struct LTE_PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
#endif
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char *
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char *, tb_size_t, num_tb_t, crc_t * );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t sourceL2Id
|
||||
,uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
);
|
||||
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
|
||||
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t, rb_id_t, sdu_size_t, char * ),
|
||||
void (*rrc_data_confP) (module_id_t, rb_id_t, mui_t ) ) ;
|
||||
void (*mrbch_phy_sync_failure) (uint8_t Mod_id, frame_t frame, uint8_t Free_ch_index);
|
||||
void (*dl_phy_sync_success) (uint8_t Mod_id, frame_t frame, uint8_t eNB_index);
|
||||
} MAC_RLC_XFACE;
|
||||
|
||||
@@ -34,66 +34,66 @@
|
||||
# define __PLATFORM_CONSTANTS_H__
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
|
||||
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
|
||||
#else
|
||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||
#endif
|
||||
|
||||
#ifdef LARGE_SCALE
|
||||
# define NB_MODULES_MAX 128
|
||||
# define NB_NODE_MAX 128
|
||||
#define NB_MODULES_MAX 128
|
||||
#define NB_NODE_MAX 128
|
||||
#else
|
||||
# define NB_MODULES_MAX 32
|
||||
# define NB_NODE_MAX 32
|
||||
#define NB_MODULES_MAX 32
|
||||
#define NB_NODE_MAX 32
|
||||
#endif
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
# define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||
#define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||
#else
|
||||
# if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
|
||||
/* SR: When using ethernet network driver the packet size is 1512 :
|
||||
* 1500 bytes IP packet + 14 bytes ethernet header
|
||||
*/
|
||||
# define MAX_IP_PACKET_SIZE 1514
|
||||
# else
|
||||
# define MAX_IP_PACKET_SIZE 1500 // 3000
|
||||
# endif
|
||||
#if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
|
||||
/* SR: When using ethernet network driver the packet size is 1512 :
|
||||
* 1500 bytes IP packet + 14 bytes ethernet header
|
||||
*/
|
||||
#define MAX_IP_PACKET_SIZE 1514
|
||||
#else
|
||||
#define MAX_IP_PACKET_SIZE 1500 // 3000
|
||||
#endif
|
||||
#endif
|
||||
// overwrite the previous deinitions
|
||||
|
||||
# define MAX_MODULES NB_MODULES_MAX
|
||||
|
||||
#ifndef UE_EXPANSION
|
||||
// TODO:L2 FAPI simulator.
|
||||
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
|
||||
// in eNB and UE.
|
||||
// now , if we use --mu option in UE, compiling error will occur.
|
||||
// This problem will be fixed in the future.
|
||||
# ifdef UESIM_EXPANSION
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_eNB 2
|
||||
# else
|
||||
# ifdef LARGE_SCALE
|
||||
# define MAX_MOBILES_PER_ENB 128
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
# define MAX_MOBILES_PER_GNB 128
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
# else
|
||||
# define MAX_MOBILES_PER_ENB 16
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
# define MAX_MOBILES_PER_GNB 16
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
# endif
|
||||
#endif
|
||||
// TODO:L2 FAPI simulator.
|
||||
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
|
||||
// in eNB and UE.
|
||||
// now , if we use --mu option in UE, compiling error will occur.
|
||||
// This problem will be fixed in the future.
|
||||
#ifdef UESIM_EXPANSION
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
#define MAX_eNB 2
|
||||
#else
|
||||
#ifdef LARGE_SCALE
|
||||
#define MAX_MOBILES_PER_ENB 128
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
#define MAX_MOBILES_PER_GNB 128
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#else
|
||||
#define MAX_MOBILES_PER_ENB 16
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
#define MAX_MOBILES_PER_GNB 16
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_MOBILES_PER_GNB 256
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
#define MAX_MOBILES_PER_GNB 256
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
|
||||
#define NUMBER_OF_NR_DLSCH_MAX 16
|
||||
@@ -109,12 +109,9 @@
|
||||
#define DEFAULT_RAB_ID 1
|
||||
|
||||
#define NB_RB_MAX (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH*LTE_maxServiceCount)
|
||||
#else
|
||||
// Do not allocate unused memory
|
||||
#define NB_RB_MBMS_MAX 1
|
||||
#endif
|
||||
|
||||
#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */
|
||||
#define RAB_SHIFT1 9
|
||||
#define RAB_SHIFT2 3
|
||||
@@ -143,14 +140,14 @@
|
||||
// CBA constant
|
||||
#define NUM_MAX_CBA_GROUP 4
|
||||
|
||||
# ifndef __cplusplus
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
# ifndef null
|
||||
# define null 0
|
||||
# endif
|
||||
# endif
|
||||
#ifndef __cplusplus
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#ifndef null
|
||||
#define null 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNUSED_PARAM_MBMS_SESSION_ID 0
|
||||
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
|
||||
|
||||
@@ -160,15 +160,13 @@ typedef struct RadioResourceConfig_s {
|
||||
long ue_TimersAndConstants_n311;
|
||||
long ue_TransmissionMode;
|
||||
long ue_multiple_max;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//SIB2 BR Options
|
||||
long* preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
BOOLEAN_t* mpdcch_startSF_CSS_RA_r13;
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long* prach_HoppingOffset_r13;
|
||||
#endif
|
||||
BOOLEAN_t mbms_dedicated_serving_cell;
|
||||
long *preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
BOOLEAN_t *mpdcch_startSF_CSS_RA_r13;
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long *prach_HoppingOffset_r13;
|
||||
BOOLEAN_t mbms_dedicated_serving_cell;
|
||||
} RadioResourceConfig;
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
@@ -202,43 +200,43 @@ typedef struct RrcConfigurationReq_s {
|
||||
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
|
||||
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
//MIB
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
//SIB1 BR options
|
||||
uint16_t* hyperSFN_r13 [MAX_NUM_CCs];
|
||||
long* eDRX_Allowed_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t cellSelectionInfoCE_r13 [MAX_NUM_CCs];
|
||||
long q_RxLevMinCE_r13 [MAX_NUM_CCs];
|
||||
long* q_QualMinRSRQ_CE_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13 [MAX_NUM_CCs];
|
||||
uint16_t *hyperSFN_r13 [MAX_NUM_CCs];
|
||||
long *eDRX_Allowed_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t cellSelectionInfoCE_r13 [MAX_NUM_CCs];
|
||||
long q_RxLevMinCE_r13 [MAX_NUM_CCs];
|
||||
long *q_QualMinRSRQ_CE_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13 [MAX_NUM_CCs];
|
||||
long si_Narrowband_r13 [MAX_NUM_CCs][32];
|
||||
long si_TBS_r13 [MAX_NUM_CCs][32];
|
||||
int scheduling_info_br_size [MAX_NUM_CCs];
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t * fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
|
||||
uint16_t *fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
long startSymbolBR_r13 [MAX_NUM_CCs];
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long* si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t *fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
|
||||
uint16_t *fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
long startSymbolBR_r13 [MAX_NUM_CCs];
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long *si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
long systemInfoValueTagSi_r13 [MAX_NUM_CCs][10];
|
||||
int system_info_value_tag_SI_size [MAX_NUM_CCs];
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long *mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
long firstPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long lastPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long ra_ResponseWindowSize_r13 [MAX_NUM_CCs][4];
|
||||
long mac_ContentionResolutionTimer_r13 [MAX_NUM_CCs][4];
|
||||
long rar_HoppingConfig_r13 [MAX_NUM_CCs][4];
|
||||
int rach_CE_LevelInfoList_r13_size [MAX_NUM_CCs];
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
long rsrp_range [MAX_NUM_CCs][3];
|
||||
int rsrp_range_list_size [MAX_NUM_CCs];
|
||||
long prach_config_index [MAX_NUM_CCs][4];
|
||||
@@ -278,7 +276,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
long *pusch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_repetitionLevelCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pusch_HoppingOffset_v1310 [MAX_NUM_CCs];
|
||||
#endif
|
||||
|
||||
//SIB18
|
||||
e_LTE_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
|
||||
e_LTE_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
|
||||
@@ -416,13 +414,13 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
|
||||
///NR
|
||||
//MIB
|
||||
long MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
|
||||
uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
|
||||
uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long MIB_dmrs_TypeA_Position[MAX_NUM_CCs];
|
||||
uint32_t pdcch_ConfigSIB1[MAX_NUM_CCs];
|
||||
|
||||
//SIB1
|
||||
long SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
|
||||
long SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
|
||||
long SIB1_ssb_PeriodicityServingCell[MAX_NUM_CCs];
|
||||
long SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs];
|
||||
//NR FrequencyInfoDL
|
||||
@@ -436,9 +434,9 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
//NR BWP-DownlinkCommon
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
long DL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs];
|
||||
lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs];
|
||||
|
||||
//NR FrequencyInfoUL
|
||||
long UL_FreqBandIndicatorNR[MAX_NUM_CCs];
|
||||
@@ -553,7 +551,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long PDCCH_cce_REG_MappingType[MAX_NUM_CCs];
|
||||
long PDCCH_reg_BundleSize[MAX_NUM_CCs];
|
||||
long PDCCH_interleaverSize[MAX_NUM_CCs];
|
||||
long PDCCH_shiftIndex[MAX_NUM_CCs];
|
||||
long PDCCH_shiftIndex[MAX_NUM_CCs];
|
||||
long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
|
||||
long PDCCH_TCI_StateId[MAX_NUM_CCs];
|
||||
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
|
||||
@@ -575,7 +573,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs];
|
||||
long ue_Specific__dci_Formats[MAX_NUM_CCs];
|
||||
|
||||
+361
-474
@@ -122,7 +122,6 @@ void RCconfig_L1(void) {
|
||||
for (j = 0; j < RC.nb_L1_inst; j++) {
|
||||
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
|
||||
|
||||
|
||||
if (RC.eNB[j] == NULL) {
|
||||
RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
|
||||
LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
|
||||
@@ -444,7 +443,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
|
||||
//printf("Component carrier %d\n",component_carrier);
|
||||
nb_cc++;
|
||||
|
||||
// Cell params, MIB/SIB1 in DU
|
||||
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = ccparams_lte.tdd_config;
|
||||
AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
|
||||
@@ -469,8 +467,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.prefix_type);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (!ccparams_lte.pbch_repetition)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
@@ -485,7 +481,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.pbch_repetition);
|
||||
}
|
||||
|
||||
#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = ccparams_lte.eutra_band;
|
||||
RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) ccparams_lte.downlink_frequency;
|
||||
RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) ccparams_lte.uplink_frequency_offset;
|
||||
@@ -604,7 +599,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_nCS_AN);
|
||||
|
||||
//#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_n1_AN = ccparams_lte.pucch_n1_AN;
|
||||
|
||||
if ((ccparams_lte.pucch_n1_AN <0) ||
|
||||
@@ -613,7 +607,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_n1_AN);
|
||||
|
||||
//#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_referenceSignalPower = ccparams_lte.pdsch_referenceSignalPower;
|
||||
|
||||
if ((ccparams_lte.pdsch_referenceSignalPower <-60) ||
|
||||
@@ -792,29 +785,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_p0_Nominal);
|
||||
|
||||
#if (LTE_RRC_VERSION <= MAKE_VERSION(12, 0, 0))
|
||||
|
||||
if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al0;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al04;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL05")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al05;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL06")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al06;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL07")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al07;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL08")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al08;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL09")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al09;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 0, 0))
|
||||
|
||||
if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al0;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
|
||||
@@ -831,10 +801,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al09;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al1;
|
||||
}
|
||||
|
||||
#endif
|
||||
else
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_alpha);
|
||||
@@ -1002,53 +969,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.rach_powerRampingStep);
|
||||
|
||||
switch (ccparams_lte.rach_preambleTransMax) {
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100;
|
||||
break;
|
||||
|
||||
case 200:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200;
|
||||
break;
|
||||
#else
|
||||
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n3;
|
||||
break;
|
||||
@@ -1092,7 +1012,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
case 200:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n200;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
@@ -1151,387 +1070,374 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
|
||||
}
|
||||
else {
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
ccparams_lte.pcch_nB);
|
||||
}
|
||||
if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
|
||||
} else {
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
ccparams_lte.pcch_nB);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_Config_present);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_Config_present);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
switch (ccparams_lte.N_RB_DL) {
|
||||
case 25:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
|
||||
} else {
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
switch (ccparams_lte.N_RB_DL) {
|
||||
case 25:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
|
||||
offsetMaxLimit = 10;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
|
||||
offsetMaxLimit = 20;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
|
||||
offsetMaxLimit = 32;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
|
||||
offsetMaxLimit = 40;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
|
||||
offsetMaxLimit = 64;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
|
||||
offsetMaxLimit = 80;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
|
||||
offsetMaxLimit = 128;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
|
||||
offsetMaxLimit = 160;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
|
||||
offsetMaxLimit = 256;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
|
||||
offsetMaxLimit = 320;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
|
||||
offsetMaxLimit = 512;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
|
||||
offsetMaxLimit = 640;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
|
||||
offsetMaxLimit = 1024;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
|
||||
offsetMaxLimit = 1280;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
|
||||
offsetMaxLimit = 2048;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
|
||||
offsetMaxLimit = 2560;
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
|
||||
if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
|
||||
offsetMaxLimit = 10;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
|
||||
offsetMaxLimit = 20;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
|
||||
offsetMaxLimit = 32;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
|
||||
offsetMaxLimit = 40;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
|
||||
offsetMaxLimit = 64;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
|
||||
offsetMaxLimit = 80;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
|
||||
offsetMaxLimit = 128;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
|
||||
offsetMaxLimit = 160;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
|
||||
offsetMaxLimit = 256;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
|
||||
offsetMaxLimit = 320;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
|
||||
offsetMaxLimit = 512;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
|
||||
offsetMaxLimit = 640;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
|
||||
offsetMaxLimit = 1024;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
|
||||
offsetMaxLimit = 1280;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
|
||||
offsetMaxLimit = 2048;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
|
||||
offsetMaxLimit = 2560;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
|
||||
}
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
|
||||
}
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
|
||||
}
|
||||
}
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
|
||||
cycleNb = 2;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
|
||||
cycleNb = 5;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
|
||||
cycleNb = 8;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
|
||||
cycleNb = 10;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
|
||||
cycleNb = 16;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
|
||||
cycleNb = 20;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
|
||||
cycleNb = 32;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
|
||||
cycleNb = 40;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
|
||||
cycleNb = 64;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
|
||||
cycleNb = 80;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
|
||||
cycleNb = 128;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
|
||||
cycleNb = 160;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
|
||||
cycleNb = 256;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
|
||||
cycleNb = 320;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
|
||||
cycleNb = 512;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
|
||||
cycleNb = 640;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
|
||||
}
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
|
||||
cycleNb = 2;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
|
||||
cycleNb = 5;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
|
||||
cycleNb = 8;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
|
||||
cycleNb = 10;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
|
||||
cycleNb = 16;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
|
||||
cycleNb = 20;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
|
||||
cycleNb = 32;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
|
||||
cycleNb = 40;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
|
||||
cycleNb = 64;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
|
||||
cycleNb = 80;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
|
||||
cycleNb = 128;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
|
||||
cycleNb = 160;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
|
||||
cycleNb = 256;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
|
||||
cycleNb = 320;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
|
||||
cycleNb = 512;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
|
||||
cycleNb = 640;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
|
||||
if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
RC.config_file_name, i, cycleNb, offsetMaxLimit);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
|
||||
}
|
||||
}
|
||||
|
||||
if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
RC.config_file_name, i, cycleNb, offsetMaxLimit);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
|
||||
}
|
||||
}
|
||||
|
||||
switch (ccparams_lte.bcch_modificationPeriodCoeff) {
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
|
||||
break;
|
||||
switch (ccparams_lte.bcch_modificationPeriodCoeff) {
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n4;
|
||||
@@ -2291,7 +2197,7 @@ int RCconfig_S1(
|
||||
|
||||
default: {
|
||||
LOG_E(S1AP, "Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
|
||||
Default DRX set to 32 in MME configuration\n",
|
||||
Default DRX set to 32 in MME configuration\n",
|
||||
ccparams_lte.pcch_defaultPagingCycle);
|
||||
S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0;
|
||||
}
|
||||
@@ -2784,7 +2690,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
//carrier->sib11 = &typeandinfo->choice.sib11;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB11 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
|
||||
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
|
||||
//carrier->sib12 = &typeandinfo->choice.sib12;
|
||||
@@ -2795,8 +2700,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
carrier->sib13 = &typeandinfo->choice.sib13_v920;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB13 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
//SIB18
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
|
||||
@@ -2815,7 +2718,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
carrier->sib21 = &typeandinfo->choice.sib21_v1430;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB21 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Shouldn't have received this SI %d\n",typeandinfo->present);
|
||||
@@ -2843,20 +2745,14 @@ void configure_du_mac(int inst) {
|
||||
carrier->Ncp,
|
||||
carrier->sib1->freqBandIndicator,
|
||||
carrier->dl_CarrierFreq,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
carrier->pbch_repetition,
|
||||
#endif
|
||||
0, // rnti
|
||||
(LTE_BCCH_BCH_Message_t *) &carrier->mib,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2_BR->radioResourceConfigCommon,
|
||||
#endif
|
||||
(struct LTE_PhysicalConfigDedicated *)NULL,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
(LTE_MAC_MainConfig_t *) NULL, 0,
|
||||
(struct LTE_LogicalChannelConfig *)NULL,
|
||||
@@ -2867,26 +2763,17 @@ void configure_du_mac(int inst) {
|
||||
carrier->ul_CarrierFreq,
|
||||
carrier->sib2->freqInfo.ul_Bandwidth,
|
||||
&carrier->sib2->freqInfo.additionalSpectrumEmission,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
|
||||
carrier->MBMS_flag,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
NULL,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+340
-344
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file openair2/ENB_APP/enb_paramdef.h
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -46,9 +46,9 @@
|
||||
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
|
||||
|
||||
#ifdef LIBCONFIG_LONG
|
||||
#define libconfig_int long
|
||||
#define libconfig_int long
|
||||
#else
|
||||
#define libconfig_int int
|
||||
#define libconfig_int int
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -126,31 +126,31 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define RUPARAMS_DESC { \
|
||||
{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
}
|
||||
{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -158,7 +158,7 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
|
||||
|
||||
|
||||
|
||||
/* global parameters, not under a specific section */
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
@@ -169,10 +169,10 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define ENBSPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
|
||||
{ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
|
||||
{ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
#define ENB_ASN1_VERBOSITY_IDX 0
|
||||
#define ENB_ACTIVE_ENBS_IDX 1
|
||||
#define ENB_NOS1_IDX 2
|
||||
@@ -206,25 +206,25 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define ENBPARAMS_DESC {\
|
||||
{ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
#define ENB_ENB_ID_IDX 0
|
||||
#define ENB_CELL_TYPE_IDX 1
|
||||
#define ENB_ENB_NAME_IDX 2
|
||||
@@ -245,27 +245,27 @@ typedef enum {
|
||||
#define ENB_ENABLE_X2 17
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* PLMN ID configuration */
|
||||
|
||||
@@ -280,20 +280,20 @@ typedef enum {
|
||||
#define ENB_MNC_DIGIT_LENGTH 2
|
||||
|
||||
#define PLMNPARAMS_DESC { \
|
||||
/* optname helpstr paramflags XXXptr def val type numelt */ \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
/* optname helpstr paramflags XXXptr def val type numelt */ \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
#define MCC_MNC_OKRANGES {0,999}
|
||||
#define MNC_DIGIT_LENGTH_OKVALUES {2,3}
|
||||
|
||||
#define PLMNPARAMS_CHECK { \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
|
||||
}
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
|
||||
}
|
||||
|
||||
|
||||
/* component carries configuration parameters name */
|
||||
@@ -311,9 +311,8 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
|
||||
//#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
|
||||
//#endif
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
|
||||
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
|
||||
@@ -385,8 +384,8 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
|
||||
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
|
||||
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
|
||||
//SIB1-MBMS
|
||||
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
|
||||
//SIB1-MBMS
|
||||
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
|
||||
|
||||
|
||||
|
||||
@@ -538,212 +537,211 @@ typedef struct ccparams_lte_s {
|
||||
int32_t srb1_max_retx_threshold;
|
||||
} ccparams_lte_t;
|
||||
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} \
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} ,\
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } \
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CCPARAMS_DESC(ccparams) { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
#define ENB_CONFIG_TDD_CONFIG_IDX 1
|
||||
#define ENB_CONFIG_TDD_CONFIG_S_IDX 2
|
||||
@@ -847,14 +845,14 @@ typedef struct srb1_params_s {
|
||||
int32_t srb1_max_retx_threshold;
|
||||
} srb1_params_t;
|
||||
|
||||
#define SRB1PARAMS_DESC(srb1_params) { \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_params.srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_params.srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_params.srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_params.srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_params.srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_params.srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \
|
||||
}
|
||||
#define SRB1PARAMS_DESC(srb1_params) { \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_params.srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_params.srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_params.srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_params.srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_params.srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_params.srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \
|
||||
}
|
||||
|
||||
/* MME configuration parameters section name */
|
||||
#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address"
|
||||
@@ -872,11 +870,11 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define S1PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6} \
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6} \
|
||||
}
|
||||
|
||||
#define ENB_MME_IPV4_ADDRESS_IDX 0
|
||||
@@ -898,13 +896,13 @@ typedef struct srb1_params_s {
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* X2 configuration parameters */
|
||||
/* X2 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define X2PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define ENB_X2_IPV4_ADDRESS_IDX 0
|
||||
@@ -925,9 +923,9 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define SCTPPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \
|
||||
}
|
||||
|
||||
#define ENB_SCTP_INSTREAMS_IDX 0
|
||||
#define ENB_SCTP_OUTSTREAMS_IDX 1
|
||||
@@ -944,6 +942,7 @@ typedef struct srb1_params_s {
|
||||
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
|
||||
#define ENB_PORT_FOR_X2C_IDX 6
|
||||
|
||||
|
||||
/* S1 interface configuration parameters names */
|
||||
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
|
||||
#define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME"
|
||||
@@ -960,26 +959,24 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define NETPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* GTPU configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define GTPUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \
|
||||
}
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1009,53 +1006,52 @@ typedef struct srb1_params_s {
|
||||
#define FLEXRAN_AWAIT_RECONF_IDX 5
|
||||
|
||||
#define FLEXRANPARAMS_DESC { \
|
||||
{CONFIG_STRING_FLEXRAN_ENABLED, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_INTERFACE_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_PORT, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_CACHE, NULL, 0, strptr:NULL, defstrval:"/mnt/oai_agent_cache", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||
}
|
||||
{CONFIG_STRING_FLEXRAN_ENABLED, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_INTERFACE_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_PORT, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_CACHE, NULL, 0, strptr:NULL, defstrval:"/mnt/oai_agent_cache", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* CU/DU configuration section names*/
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
|
||||
#define CUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define DUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_BAL_DESC { \
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_INTERFACE_F1U 0
|
||||
@@ -1134,9 +1130,9 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define THREAD_CONF_DESC { \
|
||||
{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \
|
||||
{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \
|
||||
{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
#define CONFIG_HLP_WORKER "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2032,17 +2032,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPattern_mode , "dynamic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_dynamic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_dynamic;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_semiStatic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_semiStatic;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n",
|
||||
RC.config_file_name, i, RateMatchPattern_mode);
|
||||
@@ -2500,86 +2492,41 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
switch(Common_dci_Format2_3_monitoringPeriodicity){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2;
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4;
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5;
|
||||
#endif
|
||||
break;
|
||||
case 8:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8;
|
||||
#endif
|
||||
break;
|
||||
case 10:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10;
|
||||
#endif
|
||||
break;
|
||||
case 16:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16;
|
||||
#endif
|
||||
break;
|
||||
case 20:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#else
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
switch(Common_dci_Format2_3_nrofPDCCH_Candidates){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n",
|
||||
@@ -2703,17 +2650,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n",
|
||||
RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice);
|
||||
|
||||
+149
-138
@@ -33,9 +33,7 @@
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
@@ -142,7 +140,6 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) {
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min,
|
||||
"Band %d, bw %u : DL carrier frequency %u Hz < %u\n",
|
||||
eutra_bandP, bw, dl_CarrierFreq,
|
||||
@@ -207,20 +204,17 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min +
|
||||
(dl_earfcn - (eutra_bandtable[i].N_OFFs_DL / 10))) * 100000;
|
||||
}
|
||||
|
||||
|
||||
int32_t get_uldl_offset(int eutra_bandP)
|
||||
{
|
||||
int32_t get_uldl_offset(int eutra_bandP) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min - eutra_bandtable[i].ul_min);
|
||||
}
|
||||
|
||||
@@ -235,11 +229,8 @@ void config_mib(int Mod_idP,
|
||||
int NcpP,
|
||||
int p_eNBP,
|
||||
uint32_t dl_CarrierFreqP,
|
||||
uint32_t ul_CarrierFreqP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint32_t pbch_repetitionP
|
||||
#endif
|
||||
uint32_t ul_CarrierFreqP,
|
||||
uint32_t pbch_repetitionP
|
||||
) {
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->num_tlv=0;
|
||||
@@ -290,16 +281,12 @@ void config_mib(int Mod_idP,
|
||||
cfg->sch_config.physical_cell_id.value = Nid_cellP;
|
||||
cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
|
||||
cfg->num_tlv++;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP;
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
|
||||
cfg->num_tlv++;
|
||||
#endif
|
||||
LOG_I(MAC,
|
||||
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
" PBCH repetition %d"
|
||||
#endif
|
||||
"\n"
|
||||
,__FUNCTION__
|
||||
,cfg->num_tlv
|
||||
@@ -314,9 +301,7 @@ void config_mib(int Mod_idP,
|
||||
,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.physical_cell_id.value
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,cfg->emtc_config.pbch_repetitions_enable_r13.value
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -347,9 +332,7 @@ void
|
||||
config_sib2(int Mod_idP,
|
||||
int CC_idP,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommonP,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
|
||||
long *ul_BandwidthP,
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmissionP,
|
||||
@@ -440,8 +423,6 @@ config_sib2(int Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
|
||||
AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
|
||||
AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
|
||||
@@ -627,8 +608,6 @@ config_sib2(int Mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -650,23 +629,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
int physCellId,
|
||||
int p_eNB,
|
||||
int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
int pbch_repetition,
|
||||
rnti_t rntiP,
|
||||
LTE_BCCH_BCH_Message_t *mib,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR,
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
//struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_MeasObjectToAddMod_t **measObj,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
@@ -680,28 +651,18 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_v13ext
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
) {
|
||||
|
||||
*mbsfn_SubframeConfigList,
|
||||
uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t *mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
) {
|
||||
int i;
|
||||
int UE_id = -1;
|
||||
eNB_MAC_INST *eNB = RC.mac[Mod_idP];
|
||||
@@ -739,10 +700,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
Ncp,
|
||||
p_eNB,
|
||||
dl_CarrierFreq,
|
||||
ul_CarrierFreq
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, pbch_repetition
|
||||
#endif
|
||||
ul_CarrierFreq,
|
||||
pbch_repetition
|
||||
);
|
||||
mac_init_cell_params(Mod_idP,CC_idP);
|
||||
|
||||
@@ -752,20 +711,16 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
config_sib1(Mod_idP,CC_idP,tdd_Config);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
|
||||
//TODO MBMS this must be passed through function
|
||||
/*if (schedulingInfoList_MBMS!=NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
|
||||
config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
|
||||
}*/
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (sib1_v13ext != NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
|
||||
}
|
||||
|
||||
#endif
|
||||
AssertFatal(radioResourceConfigCommon != NULL, "radioResourceConfigCommon is null\n");
|
||||
LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
|
||||
LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
|
||||
@@ -796,20 +751,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
else RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth = RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.dl_Bandwidth;
|
||||
|
||||
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
NULL, ul_Bandwidth, additionalSpectrumEmission,
|
||||
mbsfn_SubframeConfigList);
|
||||
} // mib != NULL
|
||||
|
||||
if (mobilityControlInfo !=NULL) {
|
||||
if ((UE_id = add_new_ue(Mod_idP, CC_idP,
|
||||
rntiP, -1
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
rntiP, -1,
|
||||
0
|
||||
#endif
|
||||
)) == -1) {
|
||||
LOG_E(MAC, "%s:%d: fatal\n", __FILE__, __LINE__);
|
||||
abort();
|
||||
@@ -843,8 +793,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LOG_I(MAC,"Added physicalConfigDedicated %p for %d.%d\n",physicalConfigDedicated,CC_idP,UE_id);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
if (UE_id<0) {
|
||||
LOG_E(MAC,"Configuration received for unknown UE (%x), shouldn't happen\n",rntiP);
|
||||
@@ -855,8 +803,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
config_dedicated_scell(Mod_idP, rntiP, sCellToAddMod_r10);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (mbsfn_SubframeConfigList != NULL) {
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][CONFIG] Received %d subframe allocation pattern for MBSFN\n",
|
||||
@@ -873,45 +819,32 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (nonMBSFN_SubframeConfig != NULL){
|
||||
LOG_D(MAC,
|
||||
if (nonMBSFN_SubframeConfig != NULL) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n",
|
||||
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
|
||||
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
|
||||
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
|
||||
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],
|
||||
nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
|
||||
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
|
||||
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
|
||||
@@ -955,7 +888,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
LOG_D(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
|
||||
|
||||
// if in nFAPI mode
|
||||
@@ -1000,17 +932,15 @@ void eNB_Config_Local_DRX(
|
||||
UE_list_t *UE_list_mac = NULL;
|
||||
int UE_id = -1;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
UE_list_mac = &(RC.mac[Mod_id]->UE_list);
|
||||
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
/* Check UE_id */
|
||||
if (UE_id == -1) {
|
||||
LOG_E(MAC, "%s:%d:%s: ERROR, UE_id == -1\n",
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
__FUNCTION__);
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1020,7 +950,6 @@ void eNB_Config_Local_DRX(
|
||||
/* Check drx_Configuration */
|
||||
if (drx_Configuration == NULL) {
|
||||
LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
|
||||
|
||||
UE_scheduling_control->cdrx_configured = FALSE;
|
||||
return;
|
||||
}
|
||||
@@ -1028,7 +957,6 @@ void eNB_Config_Local_DRX(
|
||||
/* Check if drx config present */
|
||||
if (drx_Configuration->present != LTE_DRX_Config_PR_setup) {
|
||||
LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n");
|
||||
|
||||
UE_scheduling_control->cdrx_configured = FALSE;
|
||||
return;
|
||||
}
|
||||
@@ -1038,133 +966,173 @@ void eNB_Config_Local_DRX(
|
||||
UE_scheduling_control->cdrx_waiting_ack = TRUE; // set to true first, waiting for the UE to configure CDRX on its side
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.onDurationTimer) {
|
||||
case 0:
|
||||
UE_scheduling_control->on_duration_timer_thres = 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->on_duration_timer_thres = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->on_duration_timer_thres = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->on_duration_timer_thres = 4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->on_duration_timer_thres = 5;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->on_duration_timer_thres = 6;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->on_duration_timer_thres = 8;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->on_duration_timer_thres = 10;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->on_duration_timer_thres = 20;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->on_duration_timer_thres = 30;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->on_duration_timer_thres = 40;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->on_duration_timer_thres = 50;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->on_duration_timer_thres = 60;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->on_duration_timer_thres = 80;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->on_duration_timer_thres = 100;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->on_duration_timer_thres = 200;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the on duration timer value specified is unknown\n");
|
||||
break;
|
||||
}
|
||||
|
||||
UE_scheduling_control->drx_inactivity_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.drx_InactivityTimer) {
|
||||
case 0:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 5;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 6;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 8;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 10;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 20;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 30;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 40;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 50;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 60;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 80;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 100;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 200;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 300;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 500;
|
||||
break;
|
||||
|
||||
case 18:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 750;
|
||||
break;
|
||||
|
||||
case 19:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1280;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1920;
|
||||
break;
|
||||
|
||||
case 21:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 2560;
|
||||
break;
|
||||
|
||||
case 22:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the drx inactivity timer value specified is unknown\n");
|
||||
break;
|
||||
@@ -1179,55 +1147,72 @@ void eNB_Config_Local_DRX(
|
||||
} else {
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) drx_Configuration->choice.setup.shortDRX->drxShortCycleTimer;
|
||||
|
||||
switch (drx_Configuration->choice.setup.shortDRX->shortDRX_Cycle) {
|
||||
case 0:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 2;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 5;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 8;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 10;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 16;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 20;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 32;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 40;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 64;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 80;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 128;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 160;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 256;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 320;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 512;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 640;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the short drx timer value specified is unknown\n");
|
||||
break;
|
||||
@@ -1239,102 +1224,128 @@ void eNB_Config_Local_DRX(
|
||||
|
||||
UE_scheduling_control->in_long_drx_cycle = FALSE;
|
||||
UE_scheduling_control->drx_longCycle_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.longDRX_CycleStartOffset.present) {
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 10;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf10;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 20;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf20;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 32;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf32;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 40;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf40;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 64;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf64;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 80;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf80;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 128;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf128;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 160;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf160;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 256;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf256;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 320;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf320;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 512;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf512;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 640;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf640;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 1024;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1024;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 1280;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1280;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 2048;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2048;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 2560;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2560;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Invalid long_DRX value in DRX local configuration\n");
|
||||
break;
|
||||
}
|
||||
|
||||
memset(UE_scheduling_control->drx_retransmission_timer, 0, sizeof(UE_scheduling_control->drx_retransmission_timer));
|
||||
|
||||
switch (drx_Configuration->choice.setup.drx_RetransmissionTimer) {
|
||||
case 0:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 1, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 2, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 4, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 6, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 8, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 5:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 16, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 6:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 24, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 7:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 33, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
|
||||
break;
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
@@ -53,12 +51,11 @@
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
|
||||
|
||||
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
|
||||
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
||||
@@ -96,14 +93,9 @@ int
|
||||
rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
uint8_t eNB_index,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_MeasObjectToAddMod_t **measObj,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
@@ -115,32 +107,18 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
uint16_t *SIperiod,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList,
|
||||
config_action_t config_action,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
) {
|
||||
int i;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
@@ -212,14 +190,8 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) *
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
(uint16_t)
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#else
|
||||
(uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
#endif
|
||||
;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
;
|
||||
}
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx) {
|
||||
@@ -239,19 +211,10 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) mac_MainConfig->ul_SCH_Config->
|
||||
retxBSR_Timer;
|
||||
} else {
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t)
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
#else
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
|
||||
#endif
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mac_MainConfig->ext1
|
||||
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer =
|
||||
@@ -291,7 +254,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_SF =
|
||||
MAC_UE_BSR_TIMER_NOT_RUNNING;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_SF =
|
||||
@@ -356,16 +318,12 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
phy_config_dedicated_scell_ue(Mod_idP, eNB_index,
|
||||
sCellToAddMod_r10, 1);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; // using SCell index 0
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (measObj != NULL) {
|
||||
if (measObj[0] != NULL &&
|
||||
measObj[0]->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA &&
|
||||
@@ -528,8 +486,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
|
||||
Mod_idP, mbsfn_AreaInfoList->list.count);
|
||||
@@ -567,35 +523,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
UE_mac_inst[Mod_idP].mcch_status = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(nonMBSFN_SubframeConfig!=NULL) {
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
if (cba_rnti) {
|
||||
UE_mac_inst[Mod_idP].cba_rnti[num_active_cba_groups - 1] =
|
||||
cba_rnti;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] configure CBA group %d RNTI %x for eNB %d (total active cba group %d)\n",
|
||||
Mod_idP, Mod_idP % num_active_cba_groups, cba_rnti,
|
||||
eNB_index, num_active_cba_groups);
|
||||
phy_config_cba_rnti(Mod_idP, CC_idP, eNB_flagP, eNB_index,
|
||||
cba_rnti, num_active_cba_groups - 1,
|
||||
num_active_cba_groups);
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
}
|
||||
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
//for D2D
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
switch (config_action) {
|
||||
case CONFIG_ACTION_ADD:
|
||||
@@ -630,6 +566,5 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
+18
-42
@@ -40,9 +40,9 @@
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
//#include "COMMON/openair_defs.h"
|
||||
@@ -61,15 +61,12 @@
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
@@ -87,7 +84,6 @@
|
||||
#define SCH_PAYLOAD_SIZE_MAX 4096
|
||||
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
// Mask for identifying subframe for MBMS
|
||||
#define MBSFN_TDD_SF3 0x80// for TDD
|
||||
@@ -106,11 +102,10 @@
|
||||
#define MAX_PMCH_perMBSFN 15
|
||||
/*!\brief MAX MCCH payload size */
|
||||
#define MCCH_PAYLOAD_SIZE_MAX 128
|
||||
//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#define printk printf
|
||||
#define printk printf
|
||||
#endif //USER_MODE
|
||||
|
||||
/*!\brief Maximum number of logical channl group IDs */
|
||||
@@ -283,7 +278,6 @@ typedef struct {
|
||||
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
|
||||
} __attribute__((__packed__))PCCH_PDU;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief MCCH payload */
|
||||
typedef struct {
|
||||
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;
|
||||
@@ -305,7 +299,6 @@ typedef struct {
|
||||
uint8_t lcid:5; // octet 2 MSB
|
||||
uint8_t stop_sf_LSB:8;
|
||||
} __attribute__((__packed__))MSI_ELEMENT;
|
||||
#endif
|
||||
/*! \brief Values of CCCH LCID for DLSCH */
|
||||
#define CCCH_LCHANID 0
|
||||
/*!\brief Values of BCCH logical channel (fake)*/
|
||||
@@ -340,7 +333,6 @@ typedef struct {
|
||||
/*!\brief LCID of padding LCID for DLSCH */
|
||||
#define SHORT_PADDING 31
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
|
||||
/*!\brief LCID of MCCH for DL */
|
||||
#define MCCH_LCHANID 0
|
||||
@@ -348,7 +340,6 @@ typedef struct {
|
||||
#define MCH_SCHDL_INFO 3
|
||||
/*!\brief LCID of Carrier component activation/deactivation */
|
||||
#define CC_ACT_DEACT 27
|
||||
#endif
|
||||
|
||||
// ULSCH LCHAN IDs
|
||||
/*!\brief LCID of extended power headroom for ULSCH */
|
||||
@@ -364,10 +355,10 @@ typedef struct {
|
||||
/*!\brief LCID of long BSR for ULSCH */
|
||||
#define LONG_BSR 30
|
||||
/*!\bitmaps for BSR Triggers */
|
||||
#define BSR_TRIGGER_NONE (0) /* No BSR Trigger */
|
||||
#define BSR_TRIGGER_REGULAR (1) /* For Regular and ReTxBSR Expiry Triggers */
|
||||
#define BSR_TRIGGER_PERIODIC (2) /* For BSR Periodic Timer Expiry Trigger */
|
||||
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
||||
#define BSR_TRIGGER_NONE (0) /* No BSR Trigger */
|
||||
#define BSR_TRIGGER_REGULAR (1) /* For Regular and ReTxBSR Expiry Triggers */
|
||||
#define BSR_TRIGGER_PERIODIC (2) /* For BSR Periodic Timer Expiry Trigger */
|
||||
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
||||
|
||||
|
||||
/*! \brief Downlink SCH PDU Structure */
|
||||
@@ -459,7 +450,7 @@ typedef struct {
|
||||
/// BCCH MCS
|
||||
uint32_t ccch_mcs;
|
||||
|
||||
/// num active users
|
||||
/// num active users
|
||||
uint16_t num_dlactive_UEs;
|
||||
/// available number of PRBs for a give SF
|
||||
uint16_t available_prbs;
|
||||
@@ -537,7 +528,7 @@ typedef struct {
|
||||
// total rb used for retransmission
|
||||
uint32_t total_rbs_used_retx;
|
||||
|
||||
/// TX
|
||||
/// TX
|
||||
/// Num pkt
|
||||
uint32_t num_pdu_tx[NB_RB_MAX];
|
||||
/// num bytes
|
||||
@@ -596,13 +587,13 @@ typedef struct {
|
||||
uint32_t num_retransmission_rx;
|
||||
/// total rb used for a new uplink transmission
|
||||
uint32_t rbs_used_rx;
|
||||
/// total rb used for a new uplink retransmission
|
||||
/// total rb used for a new uplink retransmission
|
||||
uint32_t rbs_used_retx_rx;
|
||||
/// total rb used for a new uplink transmission
|
||||
uint32_t total_rbs_used_rx;
|
||||
/// snr
|
||||
int32_t snr;
|
||||
/// target snr
|
||||
/// target snr
|
||||
int32_t target_snr;
|
||||
|
||||
/// num rx pdu
|
||||
@@ -619,7 +610,7 @@ typedef struct {
|
||||
uint64_t total_overhead_bytes_rx;
|
||||
/// headers+ CE + padding bytes for a MAC PDU
|
||||
uint64_t avg_overhead_bytes_rx;
|
||||
//
|
||||
//
|
||||
uint32_t ulsch_bitrate;
|
||||
//total
|
||||
uint32_t total_ulsch_bitrate;
|
||||
@@ -762,14 +753,14 @@ typedef struct {
|
||||
eNB_UE_estimated_distances distance;
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
uint8_t rach_resource_type;
|
||||
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
frame_t Msg2_frame;
|
||||
sub_frame_t Msg2_subframe;
|
||||
#endif
|
||||
|
||||
} UE_TEMPLATE;
|
||||
|
||||
/*! \brief scheduling control information set through an API (not used)*/
|
||||
@@ -925,8 +916,6 @@ typedef struct {
|
||||
/// size off piggybacked RRC SDU
|
||||
uint8_t msg4_rrc_sdu_length;
|
||||
uint32_t msg4_delay;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint8_t msg2_mpdcch_repetition_cnt;
|
||||
uint8_t msg2_mpdcch_done;
|
||||
@@ -934,7 +923,6 @@ typedef struct {
|
||||
uint8_t msg4_mpdcch_done;
|
||||
uint8_t msg2_narrowband;
|
||||
uint32_t msg34_narrowband;
|
||||
#endif
|
||||
} RA_TEMPLATE;
|
||||
|
||||
|
||||
@@ -988,9 +976,7 @@ typedef struct {
|
||||
uint32_t dl_CarrierFreq;
|
||||
BCCH_BCH_Message_t *mib;
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
#endif
|
||||
TDD_Config_t *tdd_Config;
|
||||
SchedulingInfoList_t *schedulingInfoList;
|
||||
ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
@@ -1015,7 +1001,6 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// MBMS Flag
|
||||
uint8_t MBMS_flag;
|
||||
/// Outgoing MCCH pdu for PHY
|
||||
@@ -1036,15 +1021,12 @@ typedef struct {
|
||||
struct MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
|
||||
/// Outgoing MCH pdu for PHY
|
||||
MCH_PDU MCH_pdu;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Rel13 parameters from SIB1
|
||||
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
||||
/// Counter for SIB1-BR scheduling
|
||||
int SIB1_BR_cnt;
|
||||
/// Outgoing BCCH-BR pdu for PHY
|
||||
BCCH_PDU BCCH_BR_pdu[20];
|
||||
#endif
|
||||
} COMMON_channels_t;
|
||||
/*! \brief top level eNB MAC structure */
|
||||
typedef struct eNB_MAC_INST_s {
|
||||
@@ -1225,10 +1207,8 @@ typedef struct {
|
||||
struct RACH_ConfigDedicated *rach_ConfigDedicated;
|
||||
/// pointer to RRC PHY configuration
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// pointer to RRC PHY configuration SCEll
|
||||
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
||||
#endif
|
||||
/// pointer to TDD Configuration (NULL for FDD)
|
||||
TDD_Config_t *tdd_Config;
|
||||
/// Number of adjacent cells to measure
|
||||
@@ -1301,7 +1281,6 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// number of active MBSFN area
|
||||
uint8_t num_active_mbsfn_area;
|
||||
/// MBSFN Area Info
|
||||
@@ -1312,13 +1291,10 @@ typedef struct {
|
||||
uint8_t mcch_status;
|
||||
/// MSI status
|
||||
uint8_t msi_status;// could be an array if there are >1 MCH in one MBSFN area
|
||||
#endif
|
||||
//#ifdef CBA
|
||||
/// CBA RNTI for each group
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
/// last SFN for CBA channel access
|
||||
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
||||
//#endif
|
||||
/// total UE scheduler processing time
|
||||
time_stats_t ue_scheduler; // total
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
|
||||
@@ -128,11 +128,11 @@ void schedule_SRS(module_id_t module_idP,
|
||||
continue;
|
||||
}
|
||||
|
||||
if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
|
||||
LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
printf("physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
return;
|
||||
}
|
||||
if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
|
||||
LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
printf("physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
return;
|
||||
}
|
||||
|
||||
/* CDRX condition on Active Time and SRS type-0 report (36.321 5.7) */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
@@ -170,7 +170,6 @@ void schedule_SRS(module_id_t module_idP,
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.transmission_comb = soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs = soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.sounding_reference_cyclic_shift = soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
|
||||
eNB->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
|
||||
eNB->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req->number_of_pdus++;
|
||||
@@ -259,32 +258,26 @@ void schedule_CSI(module_id_t module_idP,
|
||||
|
||||
if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) { // CQI periodic opportunity
|
||||
UE_scheduling_control->feedback_cnt[CC_id] = (((frameP * 10) + subframeP) / Npd) % H;
|
||||
|
||||
// Program CQI
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
|
||||
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
|
||||
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id), cqi_ReportPeriodic);
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id),
|
||||
cqi_ReportPeriodic);
|
||||
ul_req->number_of_pdus++;
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// PUT rel10-13 UCI options here
|
||||
#endif
|
||||
} else if (cqi_ReportPeriodic->choice.setup.ri_ConfigIndex != NULL) {
|
||||
if ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) ==
|
||||
N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161)) { // RI opportunity
|
||||
|
||||
// Program RI
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
|
||||
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
|
||||
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
@@ -388,22 +381,16 @@ schedule_SR (module_id_t module_idP,
|
||||
is_harq);
|
||||
|
||||
/* Check Rel10 or Rel8 SR */
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2) &&
|
||||
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020) &&
|
||||
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
|
||||
sr.sr_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG;
|
||||
sr.sr_information_rel10.number_of_pucch_resources = 1;
|
||||
sr.sr_information_rel10.pucch_index_p1 = *UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
|
||||
|
||||
LOG_D(MAC, "REL10 PUCCH INDEX P1:%d \n", sr.sr_information_rel10.pucch_index_p1);
|
||||
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
sr.sr_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG;
|
||||
sr.sr_information_rel8.pucch_index = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
|
||||
LOG_D(MAC, "REL8 PUCCH INDEX:%d\n", sr.sr_information_rel8.pucch_index);
|
||||
}
|
||||
|
||||
@@ -424,7 +411,6 @@ schedule_SR (module_id_t module_idP,
|
||||
} // if (is_harq)
|
||||
|
||||
ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
} // for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++)
|
||||
} // for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
||||
}
|
||||
@@ -511,12 +497,13 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
|
||||
}
|
||||
} // ul_failure_timer>0
|
||||
|
||||
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
|
||||
if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))){
|
||||
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
|
||||
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
|
||||
if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))) {
|
||||
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
|
||||
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}// time > 60s
|
||||
}
|
||||
|
||||
@@ -573,8 +560,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
void
|
||||
eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP)
|
||||
{
|
||||
sub_frame_t subframeP) {
|
||||
int mbsfn_status[MAX_NUM_CCs];
|
||||
protocol_ctxt_t ctxt;
|
||||
rnti_t rnti = 0;
|
||||
@@ -584,24 +570,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_list_t *UE_list = &(eNB->UE_list);
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
start_meas(&(eNB->eNB_scheduler));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_IN);
|
||||
|
||||
eNB->frame = frameP;
|
||||
eNB->subframe = subframeP;
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
mbsfn_status[CC_id] = 0;
|
||||
|
||||
/* Clear vrb_maps */
|
||||
memset(cc[CC_id].vrb_map, 0, 100);
|
||||
memset(cc[CC_id].vrb_map_UL, 0, 100);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
cc[CC_id].mcch_active = 0;
|
||||
#endif
|
||||
clear_nfapi_information(RC.mac[module_idP], CC_id, frameP, subframeP);
|
||||
}
|
||||
|
||||
@@ -610,7 +589,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_list->active[UE_id]) {
|
||||
rnti = UE_RNTI(module_idP, UE_id);
|
||||
CC_id = UE_PCCID(module_idP, UE_id);
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if (((frameP & 127) == 0) && (subframeP == 0)) {
|
||||
@@ -633,7 +611,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
boolean_t harq_active_time_condition = FALSE;
|
||||
UE_TEMPLATE *UE_template = NULL;
|
||||
|
||||
unsigned long active_time_condition = 0; // variable used only for tracing purpose
|
||||
|
||||
/* (UL and DL) HARQ RTT timers and DRX retransmission timers */
|
||||
@@ -662,7 +639,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id]++;
|
||||
|
||||
if (UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id] > 4) {
|
||||
/*
|
||||
/*
|
||||
* TODO: implement the handling of UL asynchronous HARQ
|
||||
* drx_ULRetransmissionTimer should be (re)started here
|
||||
*/
|
||||
@@ -746,13 +723,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
|
||||
(UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
}
|
||||
} else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
|
||||
(UE_scheduling_control->drx_start_offset)) {
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
}
|
||||
}
|
||||
@@ -763,6 +738,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
* ONLY here. The variable can then be used for testing the actual state of the UE for scheduling purpose.
|
||||
*/
|
||||
UE_template = &(UE_list->UE_template[CC_id][UE_id]);
|
||||
|
||||
/* (a)synchronous HARQ processes handling for Active Time */
|
||||
for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
|
||||
if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
|
||||
@@ -777,9 +753,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->drx_inactivity_timer > 1 ||
|
||||
harq_active_time_condition ||
|
||||
UE_template->ul_SR > 0) {
|
||||
|
||||
UE_scheduling_control->in_active_time = TRUE;
|
||||
|
||||
} else {
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
}
|
||||
@@ -804,17 +778,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME_CONDITION, (unsigned long) active_time_condition);
|
||||
}
|
||||
|
||||
/* END VCD */
|
||||
|
||||
/* DCI0 ongoing timer */
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 0) {
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 7) {
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
} else {
|
||||
UE_scheduling_control->dci0_ongoing_timer++;
|
||||
}
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 7) {
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
} else {
|
||||
UE_scheduling_control->dci0_ongoing_timer++;
|
||||
}
|
||||
}
|
||||
|
||||
} else { // else: CDRX not configured
|
||||
/* Note: (UL) HARQ RTT timers processing is done here and can be used by other features than CDRX */
|
||||
/* HARQ RTT timers */
|
||||
@@ -840,13 +814,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
/* Increment these timers, they are cleared when we receive an sdu */
|
||||
UE_scheduling_control->ul_inactivity_timer++;
|
||||
UE_scheduling_control->cqi_req_timer++;
|
||||
|
||||
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n",
|
||||
UE_id,
|
||||
rnti,
|
||||
UE_scheduling_control->ul_inactivity_timer,
|
||||
UE_scheduling_control->cqi_req_timer);
|
||||
|
||||
check_ul_failure(module_idP, CC_id, UE_id, frameP, subframeP);
|
||||
|
||||
if (UE_scheduling_control->ue_reestablishment_reject_timer > 0) {
|
||||
@@ -877,9 +849,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
|
||||
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
|
||||
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
}
|
||||
@@ -889,9 +859,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)) {
|
||||
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
|
||||
|
||||
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
|
||||
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
@@ -913,7 +881,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (pdu_index < pdu_number -1) {
|
||||
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index],
|
||||
&ul_req_tmp->ul_config_pdu_list[pdu_index+1],
|
||||
(pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
|
||||
(pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
|
||||
}
|
||||
|
||||
ul_req_tmp->number_of_pdus--;
|
||||
@@ -923,20 +891,16 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
} // end for j
|
||||
|
||||
rrc_mac_remove_ue(module_idP,rnti);
|
||||
|
||||
} // end if (UE_scheduling_control->ue_reestablishment_reject_timer >= UE_scheduling_control->ue_reestablishment_reject_timer_thres)
|
||||
} // end if (UE_scheduling_control->ue_reestablishment_reject_timer > 0)
|
||||
} // end if UE active
|
||||
} // end for loop on UE_id
|
||||
|
||||
#if (!defined(PRE_SCD_THREAD))
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP, module_idP);
|
||||
pdcp_run(&ctxt);
|
||||
rrc_rx_tx(&ctxt, CC_id);
|
||||
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if (cc[CC_id].MBMS_flag > 0) {
|
||||
@@ -946,8 +910,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int debug_flag = 0;
|
||||
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe) = NULL;
|
||||
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag) = NULL;
|
||||
@@ -961,13 +923,13 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_ue_spec_p = schedule_ue_spec_fairRR;
|
||||
}
|
||||
|
||||
if(debug_flag == 0){
|
||||
if(debug_flag == 0) {
|
||||
LOG_E(MAC,"SCHED_MODE = %d\n", eNB->scheduler_mode);
|
||||
debug_flag = 1;
|
||||
}
|
||||
|
||||
/* This schedules MIB */
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
@@ -995,10 +957,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_SR(module_idP, frameP, subframeP);
|
||||
/* This schedules UCI_CSI in subframeP */
|
||||
schedule_CSI(module_idP, frameP, subframeP);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/* This schedules DLSCH in subframeP for BR UE*/
|
||||
schedule_ue_spec_br(module_idP, frameP, subframeP);
|
||||
#endif
|
||||
|
||||
/* This schedules DLSCH in subframeP */
|
||||
if (schedule_ue_spec_p != NULL) {
|
||||
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
|
||||
@@ -1007,7 +968,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
}
|
||||
|
||||
} else {
|
||||
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
|
||||
schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
|
||||
@@ -1025,6 +985,5 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
stop_meas(&(eNB->eNB_scheduler));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
ul_req_body = &ul_req->ul_config_request_body;
|
||||
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
|
||||
ra->rnti);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
LOG_D (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
|
||||
@@ -154,9 +153,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
|
||||
ul_req_body->number_of_pdus++;
|
||||
} // if (ra->rach_resource_type>0) {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n",
|
||||
module_idP, frameP, subframeP, CC_id, ra->Msg3_frame,
|
||||
@@ -259,7 +256,6 @@ void generate_Msg2(module_id_t module_idP,
|
||||
dl_req_body = &mac->DL_req[CC_idP].dl_config_request_body;
|
||||
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t PUSCH_Rep_Level;
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
@@ -347,9 +343,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1; // imposed (9.1.5 in 213) for Type 2 Common search space
|
||||
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
|
||||
|
||||
LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
|
||||
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
|
||||
@@ -482,9 +476,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
mac->TX_req[CC_idP].tx_request_body.number_of_pdus++;
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, state %d\n",
|
||||
@@ -614,7 +606,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
nfapi_dl_config_request_t *dl_req = NULL;
|
||||
nfapi_dl_config_request_body_t *dl_req_body = NULL;
|
||||
nfapi_ul_config_request_body_t *ul_req_body = NULL;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -668,7 +659,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
vrb_map = cc[CC_idP].vrb_map;
|
||||
dl_req = &mac->DL_req[CC_idP];
|
||||
dl_req_body = &dl_req->dl_config_request_body;
|
||||
@@ -699,7 +689,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
ra->harq_pid = 0;
|
||||
@@ -920,9 +909,7 @@ generate_Msg4(module_id_t module_idP,
|
||||
}
|
||||
} // Msg4 frame/subframe
|
||||
} // rach_resource_type > 0
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
// This is normal LTE case
|
||||
LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
|
||||
|
||||
@@ -979,12 +966,10 @@ generate_Msg4(module_id_t module_idP,
|
||||
1, // tpc, none
|
||||
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
|
||||
ra->msg4_mcs, // mcs
|
||||
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
0, // rv
|
||||
0); // vrb_flag
|
||||
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
|
||||
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
|
||||
LOG_D(MAC,
|
||||
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
|
||||
frameP, subframeP, dl_req_body->number_pdu,
|
||||
@@ -1074,7 +1059,7 @@ generate_Msg4(module_id_t module_idP,
|
||||
mac->TX_req[CC_idP].sfn_sf =
|
||||
fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
|
||||
(frameP * 10) + subframeP,
|
||||
rrc_sdu_length+offset,
|
||||
rrc_sdu_length+offset,
|
||||
mac->pdu_index[CC_idP],
|
||||
mac->UE_list.
|
||||
DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
|
||||
@@ -1146,39 +1131,6 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
nfapi_dl_config_request_t *dl_req;
|
||||
nfapi_dl_config_request_body_t *dl_req_body;
|
||||
int round;
|
||||
/*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
|
||||
first_rb = 0;
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
PRACH_ParametersCE_r13_t *p[4];
|
||||
|
||||
if (cc[CC_idP].radioResourceConfigCommon_BR) {
|
||||
|
||||
ext4_prach = cc[CC_idP].radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
|
||||
switch (prach_ParametersListCE_r13->list.count) {
|
||||
case 4:
|
||||
p[3]=prach_ParametersListCE_r13->list.array[3];
|
||||
case 3:
|
||||
p[2]=prach_ParametersListCE_r13->list.array[2];
|
||||
case 2:
|
||||
p[1]=prach_ParametersListCE_r13->list.array[1];
|
||||
case 1:
|
||||
p[0]=prach_ParametersListCE_r13->list.array[0];
|
||||
default:
|
||||
AssertFatal(1==0,"Illegal count for prach_ParametersListCE_r13 %d\n",prach_ParametersListCE_r13->list.count);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
// check HARQ status and retransmit if necessary
|
||||
UE_id = find_UE_id(module_idP, ra->rnti);
|
||||
AssertFatal(UE_id >= 0, "Can't find UE for t-crnti\n");
|
||||
@@ -1193,15 +1145,11 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
|
||||
|
||||
if (round != 8) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0 && round > 0) {
|
||||
AssertFatal(1 == 0,
|
||||
"Msg4 Retransmissions not handled yet for BL/CE UEs, Frame %d, subframeP %d harq_pid %d round %d, UE_id: %d \n",
|
||||
frameP, subframeP, ra->harq_pid, round, UE_id);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((ra->Msg4_frame == frameP)
|
||||
&& (ra->Msg4_subframe == subframeP)) {
|
||||
//ra->wait_ack_Msg4++;
|
||||
@@ -1219,7 +1167,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
1, // tpc, none
|
||||
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
|
||||
ra->msg4_mcs, // mcs
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
round & 3, // rv
|
||||
0); // vrb_flag
|
||||
|
||||
@@ -1334,15 +1282,12 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
sub_frame_t subframeP,
|
||||
uint16_t preamble_index,
|
||||
int16_t timing_offset,
|
||||
uint16_t ra_rnti
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint8_t rach_resource_type
|
||||
#endif
|
||||
uint16_t ra_rnti,
|
||||
uint8_t rach_resource_type
|
||||
) {
|
||||
uint8_t i;
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
RA_t *ra = &cc->ra[0];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
|
||||
|
||||
@@ -1354,20 +1299,16 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
}
|
||||
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, preamble_index);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, rach_resource_type);
|
||||
#endif
|
||||
uint16_t msg2_frame = frameP;
|
||||
uint16_t msg2_subframe = subframeP;
|
||||
int offset;
|
||||
static uint8_t failure_cnt = 0 ;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (prach_ParametersListCE_r13 &&
|
||||
prach_ParametersListCE_r13->list.count < rach_resource_type) {
|
||||
@@ -1378,7 +1319,6 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
|
||||
|
||||
@@ -1391,11 +1331,9 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
ra[i].Msg4_delay_cnt=0;
|
||||
ra[i].timing_offset = timing_offset;
|
||||
ra[i].preamble_subframe = subframeP;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ra[i].rach_resource_type = rach_resource_type;
|
||||
ra[i].msg2_mpdcch_repetition_cnt = 0;
|
||||
ra[i].msg4_mpdcch_repetition_cnt = 0;
|
||||
#endif
|
||||
|
||||
//TODO Fill in other TDD config. What about nfapi_mode?
|
||||
if(cc->tdd_Config!=NULL) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -566,7 +566,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
dl_Bandwidth = cc[CC_id].mib->message.dl_Bandwidth;
|
||||
N_RB_DL[CC_id] = to_prb(dl_Bandwidth);
|
||||
min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id);
|
||||
|
||||
// get number of PRBs less those used by common channels
|
||||
total_nb_available_rb[CC_id] = N_RB_DL[CC_id];
|
||||
|
||||
@@ -623,7 +622,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
|
||||
CC_id,
|
||||
UE_id);
|
||||
|
||||
continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
|
||||
rnti = UE_RNTI(module_idP, UE_id);
|
||||
ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
@@ -777,7 +775,8 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
|
||||
if (ue_sched_ctrl->cdrx_configured) {
|
||||
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
|
||||
/*
|
||||
|
||||
/*
|
||||
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
|
||||
*/
|
||||
if (harq_pid == 0) {
|
||||
@@ -981,11 +980,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
sdu_lengths[0] = 0;
|
||||
|
||||
@@ -1004,17 +999,14 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *)&dlsch_buffer[0], 0, 0
|
||||
);
|
||||
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)){
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0];
|
||||
@@ -1061,10 +1053,10 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
if(release_total >= rrc_release_info.num_UEs)
|
||||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
|
||||
for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) {
|
||||
if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) {
|
||||
for (uint16_t mui_num = 0; mui_num < rlc_am_mui.rrc_mui_num; mui_num++) {
|
||||
@@ -1125,11 +1117,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH + 1,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
// DCCH SDU
|
||||
sdu_lengths[num_sdus] = 0;
|
||||
@@ -1145,11 +1133,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS, //not used
|
||||
(char *) &dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -1204,11 +1188,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
@@ -1226,11 +1206,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS, //not used
|
||||
(char *) &dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -1255,7 +1231,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
header_length_total += header_length_last;
|
||||
num_sdus++;
|
||||
ue_sched_ctrl->uplane_inactivity_timer = 0;
|
||||
|
||||
// reset RRC inactivity timer after uplane activity
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
|
||||
|
||||
@@ -1579,17 +1554,17 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP;
|
||||
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
/* CDRX */
|
||||
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
|
||||
|
||||
if (ue_sched_ctrl->cdrx_configured) {
|
||||
ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
|
||||
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
|
||||
/*
|
||||
/*
|
||||
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
|
||||
*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
|
||||
|
||||
if (harq_pid == 0) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
|
||||
}
|
||||
@@ -1876,8 +1851,6 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Default DLSCH scheduler for LTE-M
|
||||
@@ -2579,7 +2552,6 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
} // end else if ((subframeP == 7) && (round_DL < 8))
|
||||
} // end loop on UE_id
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
@@ -3090,8 +3062,8 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4);
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
|
||||
#endif
|
||||
@@ -3142,7 +3114,6 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB==1 ) ? 0 : 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||
@@ -3151,17 +3122,10 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB==1 ) ? 1 : 2;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||
// Rel10 fields
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
#endif
|
||||
// Rel13 fields
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
|
||||
#endif
|
||||
dl_req->number_pdu++;
|
||||
eNB->TX_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
|
||||
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
|
||||
@@ -134,10 +134,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
|
||||
for (lc_id = DCCH; lc_id <= DTCH; lc_id++) {
|
||||
rlc_status =
|
||||
mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0,0, 0
|
||||
);
|
||||
UE_template.dl_buffer_total += rlc_status.bytes_in_buffer; //storing the total dlsch buffer
|
||||
}
|
||||
@@ -644,16 +641,18 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
|
||||
// Get total available RBS count and total UE count
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
temp_total_rbs_count = 0;
|
||||
for(uint8_t rbg_i = 0;rbg_i < N_RBG[CC_id];rbg_i++ ){
|
||||
if(rballoc_sub[CC_id][rbg_i] == 0){
|
||||
|
||||
for(uint8_t rbg_i = 0; rbg_i < N_RBG[CC_id]; rbg_i++ ) {
|
||||
if(rballoc_sub[CC_id][rbg_i] == 0) {
|
||||
if((rbg_i == N_RBG[CC_id] -1) &&
|
||||
((N_RB_DL == 25) || (N_RB_DL == 50))){
|
||||
((N_RB_DL == 25) || (N_RB_DL == 50))) {
|
||||
temp_total_rbs_count += (min_rb_unit[CC_id] -1);
|
||||
}else{
|
||||
} else {
|
||||
temp_total_rbs_count += min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
temp_total_ue_count = dlsch_ue_select[CC_id].ue_num;
|
||||
|
||||
for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) {
|
||||
@@ -1284,11 +1283,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
header_len_dcch = 2; // 2 bytes DCCH SDU subheader
|
||||
|
||||
if (TBS - ta_len - header_len_dcch > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
); // transport block set size
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch),0, 0); // transport block set size
|
||||
sdu_lengths[0] = 0;
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) { // There is DCCH to transmit
|
||||
@@ -1297,18 +1292,14 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
module_idP, frameP, subframeP, CC_id,
|
||||
TBS - header_len_dcch);
|
||||
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, TBS, //not used
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[0],0, 0
|
||||
);
|
||||
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for(uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
|
||||
@@ -1345,6 +1336,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
if(release_total >= rrc_release_info.num_UEs)
|
||||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
@@ -1396,10 +1388,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
|
||||
// check for DCCH1 and update header information (assume 2 byte sub-header)
|
||||
if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total),0, 0
|
||||
); // transport block set size less allocations for timing advance and
|
||||
// DCCH SDU
|
||||
sdu_lengths[num_sdus] = 0;
|
||||
@@ -1410,12 +1399,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
module_idP, frameP, CC_id,
|
||||
TBS - header_len_dcch - sdu_length_total);
|
||||
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, TBS, //not used
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total],0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
|
||||
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
|
||||
@@ -1470,10 +1454,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0, 0
|
||||
#endif
|
||||
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch, 0, 0
|
||||
);
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
@@ -1491,10 +1472,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0, 0
|
||||
#endif
|
||||
(char *)&dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -2052,6 +2030,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||
format_flag = 2;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2130,7 +2109,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||
format_flag = 2;
|
||||
rnti = UE_RNTI(module_idP,first_ue_id[CC_id][temp]);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
break;
|
||||
@@ -2203,6 +2183,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||
format_flag = 2;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2256,6 +2237,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
format_flag = 2;
|
||||
rnti = UE_RNTI(module_idP,ul_inactivity_id[CC_id][temp]);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[ul_inactivity_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2454,20 +2436,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
|
||||
}
|
||||
} else {
|
||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED){
|
||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) {
|
||||
// assigne RBS( 6 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 6;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 6;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
}else{
|
||||
} else {
|
||||
// assigne RBS( 3 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 3;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 3;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE ) {
|
||||
// assigne RBS( 3 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 3;
|
||||
@@ -2766,7 +2748,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP);
|
||||
rnti = UE_RNTI(CC_id,UE_id);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n",
|
||||
module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL);
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
@@ -2959,7 +2941,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
get_TBS_UL(UE_template->mcs_UL[harq_pid],
|
||||
rb_table[rb_table_index])
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
|
||||
@@ -2969,8 +2950,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
@@ -3047,7 +3026,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n",
|
||||
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid);
|
||||
|
||||
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
|
||||
@@ -3111,7 +3089,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
|
||||
@@ -3121,8 +3098,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ schedule_ue_spec_phy_test(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int* mbsfn_flag
|
||||
int *mbsfn_flag
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -66,7 +66,6 @@ schedule_ue_spec_phy_test(
|
||||
uint16_t N_RB_DL;
|
||||
uint16_t TBS;
|
||||
uint16_t nb_rb;
|
||||
|
||||
unsigned char harq_pid = (frameP*10+subframeP)%8;
|
||||
uint16_t rnti = 0x1235;
|
||||
uint32_t rb_alloc = 0x1FFFFF;
|
||||
@@ -75,17 +74,14 @@ schedule_ue_spec_phy_test(
|
||||
int32_t cqi = 15;
|
||||
int32_t ndi = (frameP*10+subframeP)/8;
|
||||
int32_t dai = 0;
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
nfapi_dl_config_request_body_t *dl_req;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id);
|
||||
|
||||
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
|
||||
|
||||
if (mbsfn_flag[CC_id]>0)
|
||||
@@ -93,23 +89,20 @@ schedule_ue_spec_phy_test(
|
||||
|
||||
nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
|
||||
TBS = get_TBS_DL(mcs,nb_rb);
|
||||
|
||||
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc,
|
||||
N_RB_DL, dl_req->number_pdu);
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),cqi,format1);
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = rb_alloc;
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi;
|
||||
@@ -118,80 +111,73 @@ schedule_ue_spec_phy_test(
|
||||
//deactivate second codeword
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
|
||||
|
||||
|
||||
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = dai;
|
||||
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
|
||||
module_idP,CC_id,harq_pid,dai,mcs);
|
||||
module_idP,CC_id,harq_pid,dai,mcs);
|
||||
} else {
|
||||
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
|
||||
module_idP,CC_id,harq_pid,mcs);
|
||||
|
||||
module_idP,CC_id,harq_pid,mcs);
|
||||
}
|
||||
|
||||
LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu);
|
||||
|
||||
if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) {
|
||||
|
||||
|
||||
//ue_sched_ctl->round[CC_id][harq_pid] = 0;
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
|
||||
//eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
// Toggle NDI for next time
|
||||
/*
|
||||
LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
|
||||
CC_id, frameP,subframeP,UE_id,
|
||||
rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
||||
|
||||
CC_id, frameP,subframeP,UE_id,
|
||||
rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
||||
|
||||
UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
|
||||
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
|
||||
UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
|
||||
*/
|
||||
|
||||
|
||||
fill_nfapi_dlsch_config(eNB,
|
||||
dl_req,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
rnti,
|
||||
0, // type 0 allocation from 7.1.6 in 36.213
|
||||
0, // virtual_resource_block_assignment_flag
|
||||
rb_alloc, // resource_block_coding
|
||||
getQm(mcs),
|
||||
0, // redundancy version
|
||||
1, // transport blocks
|
||||
0, // transport block to codeword swap flag
|
||||
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
|
||||
1, // number of layers
|
||||
1, // number of subbands
|
||||
// uint8_t codebook_index,
|
||||
4, // UE category capacity
|
||||
LTE_PDSCH_ConfigDedicated__p_a_dB0,
|
||||
0, // delta_power_offset for TM5
|
||||
0, // ngap
|
||||
0, // nprb
|
||||
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
|
||||
0, //number of PRBs treated as one subband, not used here
|
||||
0 // number of beamforming vectors, not used here
|
||||
);
|
||||
|
||||
dl_req,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
rnti,
|
||||
0, // type 0 allocation from 7.1.6 in 36.213
|
||||
0, // virtual_resource_block_assignment_flag
|
||||
rb_alloc, // resource_block_coding
|
||||
getQm(mcs),
|
||||
0, // redundancy version
|
||||
1, // transport blocks
|
||||
0, // transport block to codeword swap flag
|
||||
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
|
||||
1, // number of layers
|
||||
1, // number of subbands
|
||||
// uint8_t codebook_index,
|
||||
4, // UE category capacity
|
||||
LTE_PDSCH_ConfigDedicated__p_a_dB0,
|
||||
0, // delta_power_offset for TM5
|
||||
0, // ngap
|
||||
0, // nprb
|
||||
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
|
||||
0, //number of PRBs treated as one subband, not used here
|
||||
0 // number of beamforming vectors, not used here
|
||||
);
|
||||
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
|
||||
(frameP*10)+subframeP,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
|
||||
}
|
||||
else {
|
||||
(frameP*10)+subframeP,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
|
||||
} else {
|
||||
LOG_W(MAC,"[eNB_scheduler_phytest] DCI allocation infeasible!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
{
|
||||
void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
|
||||
uint16_t first_rb[MAX_NUM_CCs];
|
||||
int UE_id = 0;
|
||||
uint8_t aggregation = 2;
|
||||
@@ -218,158 +204,132 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
|
||||
//nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];;
|
||||
nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body;
|
||||
|
||||
N_RB_UL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
switch(N_RB_UL){
|
||||
case 100:
|
||||
nb_rb = 96;
|
||||
break;
|
||||
case 50:
|
||||
nb_rb = 48;
|
||||
break;
|
||||
case 25:
|
||||
nb_rb = 24;
|
||||
break;
|
||||
|
||||
switch(N_RB_UL) {
|
||||
case 100:
|
||||
nb_rb = 96;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
nb_rb = 48;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
nb_rb = 24;
|
||||
break;
|
||||
}
|
||||
|
||||
mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
|
||||
hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
//rnti = UE_RNTI(module_idP,UE_id);
|
||||
//leave out first RB for PUCCH
|
||||
first_rb[CC_id] = 1;
|
||||
// loop over all active UEs
|
||||
// loop over all active UEs
|
||||
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
|
||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
// this is the snr and this should be constant (regardless of mcs)
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
// new transmission
|
||||
ndi = 1-UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid]=ndi;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
|
||||
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
||||
// buffer_occupancy = UE_template->ul_total_buffer;
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
|
||||
// buffer_occupancy -= TBS;
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = nb_rb;
|
||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
||||
//UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
|
||||
// Cyclic shift for DM RS
|
||||
cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
||||
// save it for a potential retransmission
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void *)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = nb_rb;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = mcs;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
ul_req_index = 0;
|
||||
|
||||
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
|
||||
for(ul_req_index = 0; ul_req_index < ul_req->number_of_pdus; ul_req_index++) {
|
||||
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) {
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
|
||||
cqi_req,
|
||||
cc,
|
||||
0,//UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
mac->ul_handle,//eNB->ul_handle,
|
||||
rnti,
|
||||
first_rb[CC_id], // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
mcs,
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
ndi, // new_data_indication
|
||||
0, // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(mcs,nb_rb)
|
||||
);
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
|
||||
|
||||
|
||||
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
|
||||
// this is the snr and this should be constant (regardless of mcs)
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
|
||||
// new transmission
|
||||
|
||||
ndi = 1-UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid]=ndi;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
|
||||
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
||||
// buffer_occupancy = UE_template->ul_total_buffer;
|
||||
|
||||
|
||||
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
|
||||
// buffer_occupancy -= TBS;
|
||||
|
||||
|
||||
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = nb_rb;
|
||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
|
||||
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
||||
//UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
|
||||
// Cyclic shift for DM RS
|
||||
cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
||||
// save it for a potential retransmission
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = nb_rb;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = mcs;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
|
||||
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
|
||||
ul_req_index = 0;
|
||||
for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
|
||||
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
|
||||
cqi_req,
|
||||
cc,
|
||||
0,//UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
mac->ul_handle,//eNB->ul_handle,
|
||||
rnti,
|
||||
first_rb[CC_id], // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
mcs,
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
ndi, // new_data_indication
|
||||
0, // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(mcs,nb_rb)
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
#endif
|
||||
ul_req->number_of_pdus = 1;
|
||||
mac->ul_handle++;
|
||||
|
||||
|
||||
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+= nb_rb;
|
||||
|
||||
|
||||
ul_req->number_of_pdus = 1;
|
||||
mac->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+= nb_rb;
|
||||
} // loop of CC_id
|
||||
}
|
||||
|
||||
@@ -351,7 +351,6 @@ subframe2harqpid(COMMON_channels_t *cc,
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
AssertFatal(cc != NULL, "cc is null\n");
|
||||
|
||||
uint8_t ret = 255;
|
||||
|
||||
if (cc->tdd_Config == NULL) { // FDD
|
||||
@@ -892,22 +891,19 @@ get_csi_params(COMMON_channels_t *cc,
|
||||
*Npd = 160;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 157;
|
||||
} else if (cqi_PMI_ConfigIndex > 317) {
|
||||
|
||||
if (cqi_PMI_ConfigIndex <= 349) { // 32 ms CQI_PMI period
|
||||
*Npd = 32;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
|
||||
} else if (cqi_PMI_ConfigIndex <= 413) { // 64 ms CQI_PMI period
|
||||
*Npd = 64;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
|
||||
} else if (cqi_PMI_ConfigIndex <= 541) { // 128 ms CQI_PMI period
|
||||
*Npd = 128;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
|
||||
if (cqi_PMI_ConfigIndex <= 349) { // 32 ms CQI_PMI period
|
||||
*Npd = 32;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
|
||||
} else if (cqi_PMI_ConfigIndex <= 413) { // 64 ms CQI_PMI period
|
||||
*Npd = 64;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
|
||||
} else if (cqi_PMI_ConfigIndex <= 541) { // 128 ms CQI_PMI period
|
||||
*Npd = 128;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else { // TDD
|
||||
if (cqi_PMI_ConfigIndex == 0) { // all UL subframes
|
||||
if (cqi_PMI_ConfigIndex == 0) { // all UL subframes
|
||||
*Npd = 1;
|
||||
*N_OFFSET_CQI = 0;
|
||||
} else if (cqi_PMI_ConfigIndex <= 6) { // 5 ms CQI_PMI period
|
||||
@@ -1029,7 +1025,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
|
||||
return (4 + (N << 1) + 4 + (N << 1) + 4);
|
||||
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10, "Illegal TM (%d) for CQI_ReportModeAperiodic_rm32\n",
|
||||
@@ -1064,7 +1059,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
|
||||
return (4 + 4 + 4);
|
||||
|
||||
break;
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
|
||||
}
|
||||
|
||||
AssertFatal(1 == 0, "Shouldn't get here\n");
|
||||
@@ -1147,7 +1141,6 @@ fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
|
||||
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||
@@ -1185,7 +1178,6 @@ program_dlsch_acknak(module_id_t module_idP,
|
||||
int use_simultaneous_pucch_pusch = 0;
|
||||
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information = NULL;
|
||||
nfapi_ul_config_harq_information *harq_information = NULL;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
struct LTE_PhysicalConfigDedicated__ext2 *ext2 = UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2;
|
||||
|
||||
if (ext2 &&
|
||||
@@ -1194,7 +1186,6 @@ program_dlsch_acknak(module_id_t module_idP,
|
||||
*ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == LTE_PUCCH_ConfigDedicated_v1020__simultaneousPUCCH_PUSCH_r10_true)
|
||||
use_simultaneous_pucch_pusch = 1;
|
||||
|
||||
#endif
|
||||
// pucch1 and pusch feedback is similar, namely in n+k subframes from now
|
||||
// This is used in the following "if/else" condition to check if there isn't or is already an UL grant in n+k
|
||||
int16_t ul_absSF = get_pucch1_absSF(&cc[CC_idP],
|
||||
@@ -1385,17 +1376,6 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
struct LTE_PUSCH_ConfigDedicated *puschConfigDedicated = physicalConfigDedicated->pusch_ConfigDedicated;
|
||||
AssertFatal(puschConfigDedicated != NULL, "physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n",
|
||||
rntiP);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
/* if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(11, 3, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
harq_information_rel10->delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index;
|
||||
harq_information_rel10->tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_HARQ_INFORMATION_REL10_TAG;
|
||||
struct LTE_PUCCH_ConfigDedicated *pucch_ConfigDedicated = physicalConfigDedicated->pucch_ConfigDedicated;
|
||||
@@ -1424,6 +1404,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
else
|
||||
harq_information_rel10->harq_size = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default: // for any other TM we need 2 bits harq
|
||||
@@ -1438,6 +1419,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
else
|
||||
harq_information_rel10->harq_size = 2;
|
||||
}
|
||||
|
||||
break;
|
||||
} // get Tmode
|
||||
|
||||
@@ -1582,7 +1564,7 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_ul_config_uci_harq_pdu));
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti = rntiP;
|
||||
fill_nfapi_harq_information(module_idP,
|
||||
CC_idP,
|
||||
@@ -1601,7 +1583,6 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
|
||||
ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req->sfn_sf = (ackNAK_absSF/10) << 4 | ackNAK_absSF%10;
|
||||
|
||||
return (((ackNAK_absSF / 10) << 4) + (ackNAK_absSF % 10));
|
||||
}
|
||||
|
||||
@@ -1774,7 +1755,6 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd
|
||||
return;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
@@ -1933,7 +1913,6 @@ narrowband_to_first_rb(COMMON_channels_t *cc,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
@@ -2141,10 +2120,8 @@ int
|
||||
add_new_ue(module_id_t mod_idP,
|
||||
int cc_idP,
|
||||
rnti_t rntiP,
|
||||
int harq_pidP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
int harq_pidP,
|
||||
uint8_t rach_resource_type
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -2177,9 +2154,7 @@ add_new_ue(module_id_t mod_idP,
|
||||
#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 (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type;
|
||||
#endif
|
||||
memset((void *) &UE_list->UE_sched_ctrl[UE_id],
|
||||
0,
|
||||
sizeof(UE_sched_ctrl_t));
|
||||
@@ -2239,14 +2214,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
pCC_id = UE_PCCID(mod_idP, UE_id);
|
||||
|
||||
LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",
|
||||
UE_id,
|
||||
pCC_id,
|
||||
rntiP);
|
||||
|
||||
dump_ue_list(UE_list, 0); // DL list displayed in LOG_T(MAC)
|
||||
|
||||
UE_list->active[UE_id] = FALSE;
|
||||
UE_list->num_UEs--;
|
||||
|
||||
@@ -2274,8 +2246,8 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
|
||||
/* Clear all remaining pending transmissions */
|
||||
memset(&UE_list->UE_template[pCC_id][UE_id],
|
||||
0,
|
||||
sizeof(UE_TEMPLATE));
|
||||
0,
|
||||
sizeof(UE_TEMPLATE));
|
||||
ue_stats = &UE_list->eNB_UE_stats[pCC_id][UE_id];
|
||||
ue_stats->total_rbs_used = 0;
|
||||
ue_stats->total_rbs_used_retx = 0;
|
||||
@@ -2300,11 +2272,9 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
ue_stats->total_pdu_bytes_rx = 0;
|
||||
ue_stats->total_num_pdus_rx = 0;
|
||||
ue_stats->total_num_errors_rx = 0;
|
||||
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].status = S_UL_NONE;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].status = S_DL_NONE;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
@@ -2319,10 +2289,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
rntiP);
|
||||
}
|
||||
|
||||
if(rrc_release_info.num_UEs > 0){
|
||||
if(rrc_release_info.num_UEs > 0) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
|
||||
@@ -2342,6 +2313,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
@@ -2529,7 +2501,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
return 0;
|
||||
|
||||
rnti_t ue_rnti = UE_RNTI(module_idP, UE_id);
|
||||
|
||||
LOG_D(MAC, "[eNB %d][PUSCH] Checking UL requirements UE %d/%x\n",
|
||||
module_idP,
|
||||
UE_id,
|
||||
@@ -2548,7 +2519,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
ue_rnti,
|
||||
UE_template->ul_buffer_info[LCGID0],
|
||||
UE_template->ul_SR);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3945,7 +3915,6 @@ extract_harq(module_id_t mod_idP,
|
||||
sub_frame_t subframe_tx;
|
||||
int frame_tx;
|
||||
uint8_t harq_pid;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
LTE_PhysicalConfigDedicated_t *physicalConfigDedicated = UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated;
|
||||
|
||||
if (physicalConfigDedicated != NULL && physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
|
||||
@@ -3955,8 +3924,6 @@ extract_harq(module_id_t mod_idP,
|
||||
spatial_bundling = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
for (i = 0; i < numCC; i++) {
|
||||
tmode[i] = get_tmode(mod_idP,
|
||||
i,
|
||||
@@ -4058,6 +4025,7 @@ extract_harq(module_id_t mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1: // Channel Selection
|
||||
@@ -4154,17 +4122,14 @@ extract_harq(module_id_t mod_idP,
|
||||
if (pdu[0] == 1) { // ACK
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
|
||||
} else if (pdu[0] == 2 || pdu[0] == 4) { // NAK (treat DTX as NAK)
|
||||
sched_ctl->round[CC_idP][harq_pid]++; // increment round
|
||||
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4191,7 +4156,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (num_ack_nak == 2 && sched_ctl->round[CC_idP][harq_pid] < 8 && sched_ctl->tbcnt[CC_idP][harq_pid] == 1 && pdu[0] == 1 && pdu[1] == 1) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8;
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4205,7 +4169,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4223,7 +4186,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0; /* TODO: do we have to set it to 0? */
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4236,7 +4198,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4933,7 +4894,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10,
|
||||
@@ -4941,8 +4901,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n");
|
||||
break;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm10_v1310:
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7, "Illegal transmission mode %d for CQI_ReportModeAperiodic_rm10\n",
|
||||
@@ -4956,7 +4914,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n");
|
||||
break;
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -5054,7 +5011,7 @@ SR_indication(module_id_t mod_idP,
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_ctrl = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer > 0) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
|
||||
LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d. \
|
||||
@@ -5075,6 +5032,7 @@ SR_indication(module_id_t mod_idP,
|
||||
UE_id,
|
||||
cc_idP);
|
||||
}
|
||||
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_SR = 1;
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_active = TRUE;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
|
||||
@@ -5089,7 +5047,7 @@ SR_indication(module_id_t mod_idP,
|
||||
UE_id,
|
||||
cc_idP);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
rrc_eNB_ue_context_t *ue_contextP = NULL;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
UE_TEMPLATE *UE_template_ptr = NULL;
|
||||
|
||||
/* Init */
|
||||
current_rnti = rntiP;
|
||||
UE_id = find_UE_id(enb_mod_idP, current_rnti);
|
||||
@@ -156,7 +155,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
|
||||
LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
||||
enb_mod_idP,
|
||||
harq_pid,
|
||||
@@ -167,7 +165,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
current_rnti,
|
||||
UE_id,
|
||||
ul_cqi);
|
||||
|
||||
AssertFatal(UE_scheduling_control->round_UL[CC_idP][harq_pid] < 8, "round >= 8\n");
|
||||
|
||||
if (sduP != NULL) {
|
||||
@@ -182,7 +179,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
|
||||
UE_scheduling_control->ul_consecutive_errors = 0;
|
||||
|
||||
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
|
||||
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
@@ -239,7 +235,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
/*
|
||||
* The NACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
|
||||
* Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
|
||||
* Note: in case of asynchronous UL HARQ process restart here relevant RTT timer.
|
||||
@@ -248,13 +244,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
}
|
||||
|
||||
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
|
||||
|
||||
/* Program NACK for PHICH */
|
||||
LOG_D(MAC, "Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)\n",
|
||||
current_rnti,
|
||||
harq_pid,
|
||||
first_rb);
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = NULL;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP + sf_ahead_dl) % 10];
|
||||
@@ -278,13 +272,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
// if UE_id == -1
|
||||
} else if ((RA_id = find_RA_id(enb_mod_idP, CC_idP, current_rnti)) != -1) { // Check if this is an RA process for the rnti
|
||||
RA_t *ra = (RA_t *) &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
harq_pid = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1,
|
||||
"maxHARQ %d should be greater than 1\n",
|
||||
(int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
|
||||
@@ -400,7 +392,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->phr_info);
|
||||
|
||||
UE_template_ptr->phr_info_configured = 1;
|
||||
UE_scheduling_control->phr_received = 1;
|
||||
}
|
||||
@@ -432,13 +423,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
@@ -451,6 +440,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
subframeP,
|
||||
old_rnti);
|
||||
}
|
||||
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
UE_list->UE_template[UE_PCCID(enb_mod_idP, UE_id)][UE_id].configured = 1;
|
||||
@@ -475,51 +465,49 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (RA_id != -1) {
|
||||
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
UE_id,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ra->rach_resource_type > 0
|
||||
#endif
|
||||
);
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
UE_id,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0,ra->rach_resource_type > 0
|
||||
);
|
||||
|
||||
/* Received a new rnti */
|
||||
if (ret == 0) {
|
||||
ra->state = MSGCRNTI;
|
||||
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
ra->rnti = old_rnti;
|
||||
ra->crnti_rrc_mui = rrc_eNB_mui-1;
|
||||
ra->crnti_harq_pid = -1;
|
||||
ra->state = MSGCRNTI;
|
||||
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
ra->rnti = old_rnti;
|
||||
ra->crnti_rrc_mui = rrc_eNB_mui-1;
|
||||
ra->crnti_harq_pid = -1;
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
UE_scheduling_control->ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
|
||||
}
|
||||
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
UE_scheduling_control->ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
|
||||
}
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
} else {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
}
|
||||
|
||||
// break;
|
||||
}
|
||||
}
|
||||
@@ -553,7 +541,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID3];
|
||||
|
||||
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
|
||||
|
||||
if (UE_id == UE_list->head) {
|
||||
@@ -594,21 +581,19 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] = BSR_TABLE[bsr1];
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] = BSR_TABLE[bsr2];
|
||||
UE_template_ptr->ul_buffer_info[LCGID3] = BSR_TABLE[bsr3];
|
||||
|
||||
UE_template_ptr->estimated_ul_buffer =
|
||||
UE_template_ptr->ul_buffer_info[LCGID0] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID3];
|
||||
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = %u LCGID2 = %u LCGID3 = %u\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->ul_buffer_info[LCGID0],
|
||||
UE_template_ptr->ul_buffer_info[LCGID1],
|
||||
UE_template_ptr->ul_buffer_info[LCGID2],
|
||||
UE_template_ptr->ul_buffer_info[LCGID3]);
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->ul_buffer_info[LCGID0],
|
||||
UE_template_ptr->ul_buffer_info[LCGID1],
|
||||
UE_template_ptr->ul_buffer_info[LCGID2],
|
||||
UE_template_ptr->ul_buffer_info[LCGID3]);
|
||||
|
||||
if (crnti_rx == 1) {
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received CRNTI.\n",
|
||||
@@ -703,11 +688,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
rx_lengths[i],
|
||||
payload_ptr - sduP);
|
||||
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, ra->rach_resource_type
|
||||
#endif
|
||||
)) == -1) {
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid, ra->rach_resource_type )) == -1) {
|
||||
LOG_E(MAC,"[MAC][eNB] Max user count reached\n");
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // send Connection Reject ???
|
||||
break;
|
||||
@@ -719,7 +700,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
frameP,
|
||||
ra->rnti,
|
||||
UE_id);
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
}
|
||||
@@ -742,10 +722,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ra->rach_resource_type > 0
|
||||
#endif
|
||||
0,ra->rach_resource_type > 0
|
||||
);
|
||||
|
||||
if (num_ce > 0) { // handle msg3 which is not RRCConnectionRequest
|
||||
@@ -815,7 +792,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||
|
||||
|
||||
if (mac_eNB_get_rrc_status(enb_mod_idP, current_rnti) < RRC_RECONFIGURED) {
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}
|
||||
@@ -878,7 +855,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||
/* Clear uplane_inactivity_timer */
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
|
||||
/* Reset RRC inactivity timer after uplane activity */
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], current_rnti);
|
||||
|
||||
@@ -920,7 +896,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
/*
|
||||
* The ACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
|
||||
* Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
|
||||
* Note: in case of asynchronous UL HARQ process restart here relevant RTT timer
|
||||
@@ -934,11 +910,9 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
current_rnti,
|
||||
harq_pid,
|
||||
first_rb);
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10];
|
||||
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci +
|
||||
hi_dci0_req_body->number_of_hi];
|
||||
@@ -1143,13 +1117,11 @@ schedule_ulsch(module_id_t module_idP,
|
||||
COMMON_channels_t *cc = NULL;
|
||||
int sched_subframe;
|
||||
int sched_frame;
|
||||
|
||||
/* Init */
|
||||
mac = RC.mac[module_idP];
|
||||
sli = &(mac->slice_info);
|
||||
memset(first_rb, 0, NFAPI_CC_MAX * sizeof(uint16_t));
|
||||
start_meas(&(mac->schedule_ulsch));
|
||||
|
||||
sched_subframe = (subframeP + 4) % 10;
|
||||
sched_frame = frameP;
|
||||
cc = mac->common_channels;
|
||||
@@ -1249,25 +1221,13 @@ schedule_ulsch(module_id_t module_idP,
|
||||
sched_frame %= 1024;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int emtc_active[5];
|
||||
memset(emtc_active, 0, 5 * sizeof(int));
|
||||
schedule_ulsch_rnti_emtc(module_idP, frameP, subframeP, sched_subframe, emtc_active);
|
||||
#endif
|
||||
|
||||
/* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
|
||||
for (int CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++, cc++) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
first_rb[CC_id] = (emtc_active[CC_id] == 1) ? 7 : 1;
|
||||
#else
|
||||
/* Note: the size of PUCCH is arbitrary, to be done properly. */
|
||||
switch (RC.eNB[module_idP][CC_id]->frame_parms.N_RB_DL) {
|
||||
case 25: first_rb[CC_id] = 1; break; // leave out first RB for PUCCH
|
||||
case 50: first_rb[CC_id] = 2; break; // leave out first RB for PUCCH
|
||||
case 100: first_rb[CC_id] = 3; break; // leave out first RB for PUCCH
|
||||
default: LOG_E(MAC, "nb RBs not handled, todo.\n"); exit(1);
|
||||
}
|
||||
#endif
|
||||
RA_t *ra_ptr = cc->ra;
|
||||
|
||||
/* From Louis-Adrien to François:
|
||||
@@ -1392,6 +1352,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
|
||||
n_rb_ul_tab[CC_id] = to_prb(cc[CC_id].ul_Bandwidth); // return total number of PRB
|
||||
|
||||
/* HACK: let's remove the PUCCH from available RBs
|
||||
* we suppose PUCCH size is:
|
||||
* - for 25 RBs: 1 RB (top and bottom of ressource grid)
|
||||
@@ -1402,15 +1363,27 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
* so we only remove the top part of the resource grid.
|
||||
*/
|
||||
switch (n_rb_ul_tab[CC_id]) {
|
||||
case 25: n_rb_ul_tab[CC_id] -= 1; break;
|
||||
case 50: n_rb_ul_tab[CC_id] -= 2; break;
|
||||
case 100: n_rb_ul_tab[CC_id] -= 3; break;
|
||||
default: LOG_E(MAC, "RBs setting not handled. Todo.\n"); exit(1);
|
||||
case 25:
|
||||
n_rb_ul_tab[CC_id] -= 1;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
n_rb_ul_tab[CC_id] -= 2;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
n_rb_ul_tab[CC_id] -= 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "RBs setting not handled. Todo.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
UE_list->first_rb_offset[CC_id][slice_idx] = cmin(n_rb_ul_tab[CC_id], sli->ul[slice_idx].first_rb);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* ULSCH preprocessor: set UE_template->
|
||||
* pre_allocated_nb_rb_ul[slice_idx]
|
||||
* pre_assigned_mcs_ul
|
||||
@@ -1427,7 +1400,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (UE_list->UE_template[UE_PCCID(module_idP, UE_id)][UE_id].rach_resource_type > 0) continue;
|
||||
|
||||
// don't schedule if Msg5 is not received yet
|
||||
@@ -1455,7 +1428,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
for (int n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
/* This is the actual CC_id in the list */
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_id][UE_id]);
|
||||
UE_sched_ctrl_ptr = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
harq_pid = subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
|
||||
@@ -1497,7 +1469,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
UE_sched_ctrl_ptr->ul_inactivity_timer,
|
||||
UE_sched_ctrl_ptr->ul_failure_timer,
|
||||
UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
/* Reset the scheduling request */
|
||||
UE_template_ptr->ul_SR = 0;
|
||||
status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
@@ -1507,13 +1478,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* Be sure that there are some free RBs */
|
||||
if (first_rb_slice[CC_id] >= n_rb_ul_tab[CC_id]) {
|
||||
LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1521,27 +1491,27 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* This test seems to be way too long, can we provide an optimization? */
|
||||
if (CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, aggregation, rnti)) {
|
||||
LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: not enough CCE\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/* Handle the aperiodic CQI report */
|
||||
cqi_req = 0;
|
||||
LOG_D(MAC,"RRC Conenction status %d, cqi_timer %d\n",status,UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
if (status >= RRC_CONNECTED && UE_sched_ctrl_ptr->cqi_req_timer > 30) {
|
||||
if (UE_sched_ctrl_ptr->cqi_received == 0) {
|
||||
if (NFAPI_MODE != NFAPI_MONOLITHIC) {
|
||||
cqi_req = 0;
|
||||
} else {
|
||||
cqi_req = 1;
|
||||
|
||||
LOG_D(MAC,"Setting CQI_REQ (timer %d)\n",UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
/* TDD: to be safe, do not ask CQI in special Subframes:36.213/7.2.3 CQI definition */
|
||||
if (cc[CC_id].tdd_Config) {
|
||||
switch (cc[CC_id].tdd_Config->subframeAssignment) {
|
||||
@@ -1549,12 +1519,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if(subframeP == 1 || subframeP == 6) {
|
||||
cqi_req=0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if(subframeP == 1) {
|
||||
cqi_req=0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1583,7 +1555,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
*/
|
||||
snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10;
|
||||
target_snr = mac->puSch10xSnr / 10;
|
||||
|
||||
/*
|
||||
* This assumes accumulated tpc
|
||||
* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
@@ -1592,7 +1563,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { //frame wrap-around
|
||||
|
||||
UE_template_ptr->pusch_tpc_tx_frame = frameP;
|
||||
UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
|
||||
|
||||
@@ -1611,14 +1581,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
if (tpc != 1) {
|
||||
LOG_D(MAC, "[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
tpc_accumulated,
|
||||
snr,
|
||||
target_snr);
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
tpc_accumulated,
|
||||
snr,
|
||||
target_snr);
|
||||
}
|
||||
|
||||
ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
|
||||
@@ -1632,8 +1602,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if (UE_sched_ctrl_ptr->cdrx_configured) {
|
||||
UE_sched_ctrl_ptr->drx_inactivity_timer = 1; // reset drx inactivity timer when new transmission
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) UE_sched_ctrl_ptr->drx_inactivity_timer);
|
||||
UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1,
|
||||
// see definition for more information
|
||||
UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1,
|
||||
// see definition for more information
|
||||
}
|
||||
|
||||
if (UE_template_ptr->pre_allocated_rb_table_index_ul >= 0) {
|
||||
@@ -1761,7 +1731,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(UE_template_ptr->mcs_UL[harq_pid], rb_table[rb_table_index]));
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/* This is a BL/CE UE allocation */
|
||||
if (UE_template_ptr->rach_resource_type > 0) {
|
||||
@@ -1771,7 +1740,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dlsch_flag == 1) {
|
||||
if (cqi_req == 1) {
|
||||
@@ -1876,7 +1844,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template_ptr->TBS_UL[harq_pid]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/* This is a BL/CE UE allocation */
|
||||
if (UE_template_ptr->rach_resource_type > 0) {
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index],
|
||||
@@ -1885,7 +1853,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
@@ -1916,14 +1883,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
ul_req_tmp->sfn_sf = sched_frame<<4|sched_subframeP;
|
||||
ul_req_tmp->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
LOG_D(MAC, "[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d cqi_req %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
cqi_req);
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
cqi_req);
|
||||
|
||||
/* HACK: RBs used by retransmission have to be reserved.
|
||||
* The current mechanism uses the notion of 'first_rb', so
|
||||
@@ -1937,13 +1904,13 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
*/
|
||||
if (first_rb_slice[CC_id] < UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid])
|
||||
first_rb_slice[CC_id] = UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid];
|
||||
} // end of round > 0
|
||||
} // end of round > 0
|
||||
} // UE_is_to_be_scheduled
|
||||
} // loop over all active CC_ids
|
||||
} // loop over UE_ids
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* default ULSCH scheduler for LTE-M
|
||||
@@ -2409,4 +2376,3 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
} //repetition_number < total_number_of_repetitions
|
||||
} // For loop on PDUs
|
||||
}
|
||||
#endif
|
||||
|
||||
+903
-946
File diff suppressed because it is too large
Load Diff
+394
-448
File diff suppressed because it is too large
Load Diff
@@ -36,29 +36,29 @@
|
||||
#include "mac.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
{ 0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
|
||||
967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
|
||||
8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
|
||||
79846, 93479, 109439, 128125, 150000, 300000
|
||||
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
|
||||
967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
|
||||
8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
|
||||
79846, 93479, 109439, 128125, 150000, 300000
|
||||
};
|
||||
|
||||
// extended bsr table--currently not used
|
||||
const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
{ 0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
|
||||
181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
|
||||
1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
|
||||
11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
|
||||
59039, 72598, 89272, 109774, 134986, 165989, 204111,
|
||||
250990, 308634, 379519, 466683, 573866, 705666, 867737,
|
||||
1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
|
||||
6000000
|
||||
// extended bsr table--currently not used
|
||||
const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
|
||||
181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
|
||||
1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
|
||||
11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
|
||||
59039, 72598, 89272, 109774, 134986, 165989, 204111,
|
||||
250990, 308634, 379519, 466683, 573866, 705666, 867737,
|
||||
1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
|
||||
6000000
|
||||
};
|
||||
|
||||
//#define MAX_SIZE_OF_AGG3 576
|
||||
//#define MAX_SIZE_OF_AGG3 576
|
||||
//#define MAX_SIZE_OF_AGG2 288
|
||||
//#define MAX_SIZE_OF_AGG1 144
|
||||
//#define MAX_SIZE_OF_AGG0 72
|
||||
@@ -69,25 +69,25 @@ const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
*/
|
||||
// the follwoing three tables are calibrated for TXMODE 1 and 2
|
||||
const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
};
|
||||
|
||||
//uint32_t EBSR_Level[63]={0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181};
|
||||
@@ -95,7 +95,7 @@ const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
|
||||
uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
UE_MAC_INST *UE_mac_inst = NULL; //[NB_MODULE_MAX];
|
||||
UE_MAC_INST *UE_mac_inst = NULL; //[NB_MODULE_MAX];
|
||||
MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
|
||||
/// Primary component carrier index of eNB
|
||||
@@ -103,16 +103,16 @@ int pCC_id[NUMBER_OF_eNB_MAX];
|
||||
|
||||
|
||||
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
|
||||
|
||||
#ifdef OPENAIR2
|
||||
unsigned char NB_eNB_INST = 0;
|
||||
uint16_t NB_UE_INST = 0;
|
||||
uint16_t NB_THREAD_INST = 0;
|
||||
unsigned char NB_RN_INST = 0;
|
||||
unsigned char NB_INST = 0;
|
||||
unsigned char NB_eNB_INST = 0;
|
||||
uint16_t NB_UE_INST = 0;
|
||||
uint16_t NB_THREAD_INST = 0;
|
||||
unsigned char NB_RN_INST = 0;
|
||||
unsigned char NB_INST = 0;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,10 +124,8 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
#endif
|
||||
|
||||
|
||||
DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
|
||||
@@ -127,10 +127,7 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
|
||||
for (lcid = 0; lcid < MAX_NUM_LCID; ++lcid) { // loop over all the logical channels
|
||||
rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0,0, 0
|
||||
);
|
||||
UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
|
||||
UE_template->dl_pdus_in_buffer[lcid] = rlc_status.pdus_in_buffer;
|
||||
@@ -141,8 +138,8 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
UE_template->dl_buffer_head_sdu_is_segmented[lcid] = rlc_status.head_sdu_is_segmented;
|
||||
UE_template->dl_buffer_total += UE_template->dl_buffer_info[lcid]; //storing the total dlsch buffer
|
||||
UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[lcid];
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
/* note for dl_buffer_head_sdu_remaining_size_to_send[lcid] :
|
||||
* 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent
|
||||
*/
|
||||
@@ -155,8 +152,8 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
UE_template->dl_buffer_head_sdu_creation_time[lcid],
|
||||
UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid],
|
||||
UE_template->dl_buffer_head_sdu_is_segmented[lcid]);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (UE_template->dl_buffer_total > 0)
|
||||
@@ -280,8 +277,10 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
continue;
|
||||
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame,subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid];
|
||||
|
||||
@@ -295,7 +294,7 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
|
||||
int
|
||||
maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
|
||||
sub_frame_t sched_subframe) {
|
||||
sub_frame_t sched_subframe) {
|
||||
uint8_t round, round_max = 0, UE_id;
|
||||
int CC_id, harq_pid;
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
@@ -304,8 +303,10 @@ maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
|
||||
harq_pid = subframe2harqpid(cc, sched_frame, sched_subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid];
|
||||
|
||||
@@ -508,7 +509,6 @@ void sort_UEs(module_id_t Mod_idP,
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
|
||||
|
||||
/* Check CDRX configuration and if UE is in active time for this subframe */
|
||||
@@ -763,11 +763,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
|
||||
int UE_id, CC_id;
|
||||
int i;
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
uint8_t transmission_mode;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
|
||||
int N_RBG[NFAPI_CC_MAX];
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
@@ -789,10 +787,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) {
|
||||
CC_id = UE_list->ordered_CCids[i][UE_id];
|
||||
nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id];
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (nb_rbs_required[CC_id][UE_id] > 0)
|
||||
LOG_D(MAC,
|
||||
@@ -817,8 +814,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
rballoc_sub,
|
||||
slice_allocation_mask,
|
||||
MIMO_mode_indicator);
|
||||
#ifdef TM5
|
||||
|
||||
#ifdef TM5
|
||||
// data chanel TM5: to be revisited
|
||||
if ((round == 0) &&
|
||||
(transmission_mode == 5) &&
|
||||
@@ -962,6 +959,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
ue_sched_ctl2->pre_nb_available_rbs
|
||||
[CC_id] + 4;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -970,8 +968,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -986,11 +984,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
|
||||
int UE_id, CC_id;
|
||||
int i;
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
uint8_t transmission_mode;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
int N_RBG[NFAPI_CC_MAX];
|
||||
slice_info_t *sli = &RC.mac[Mod_id]->slice_info;
|
||||
@@ -1018,9 +1014,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
if (nb_rbs_remaining[CC_id][UE_id] < 0)
|
||||
abort();
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (nb_rbs_required[CC_id][UE_id] > 0)
|
||||
LOG_D(MAC,
|
||||
@@ -1045,8 +1041,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
rballoc_sub,
|
||||
slice_allocation_mask,
|
||||
MIMO_mode_indicator);
|
||||
#ifdef TM5
|
||||
|
||||
#ifdef TM5
|
||||
// data chanel TM5: to be revisited
|
||||
if ((round == 0) &&
|
||||
(transmission_mode == 5) &&
|
||||
@@ -1199,8 +1195,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1217,14 +1213,12 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
uint8_t CC_id;
|
||||
uint16_t i, j;
|
||||
int min_rb_unit[NFAPI_CC_MAX];
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[Mod_id];
|
||||
slice_info_t *sli = &eNB->slice_info;
|
||||
uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_required;
|
||||
uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_accounted;
|
||||
uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_remaining;
|
||||
uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].MIMO_mode_indicator;
|
||||
|
||||
UE_list_t *UE_list = &eNB->UE_list;
|
||||
UE_sched_ctrl_t *ue_sched_ctl;
|
||||
// int rrc_status = RRC_IDLE;
|
||||
@@ -1256,7 +1250,6 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP);
|
||||
|
||||
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
|
||||
assign_rbs_required(Mod_id,
|
||||
slice_idx,
|
||||
@@ -1264,44 +1257,42 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
subframeP,
|
||||
nb_rbs_required,
|
||||
min_rb_unit);
|
||||
|
||||
// Sorts the user on the basis of dlsch logical channel buffer and CQI
|
||||
sort_UEs(Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP);
|
||||
|
||||
// ACCOUNTING
|
||||
// This procedure decides the number of RBs to allocate
|
||||
dlsch_scheduler_pre_processor_accounting(Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted);
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted);
|
||||
// POSITIONING
|
||||
// This procedure does the main allocation of the RBs
|
||||
dlsch_scheduler_pre_processor_positioning(Mod_id,
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
|
||||
// SHARING
|
||||
// If there are available RBs left in the slice, allocate them to the highest priority UEs
|
||||
if (eNB->slice_info.intraslice_share_active) {
|
||||
dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id,
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
}
|
||||
|
||||
#ifdef TM5
|
||||
@@ -1333,8 +1324,8 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
} else if (i3 == N_RBG && i1 == 0 && i2 == 0) {
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + 1;
|
||||
}
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
|
||||
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1689,10 +1680,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
int N_RB_UL = 0;
|
||||
uint16_t available_rbs, first_rb_offset;
|
||||
rnti_t rntiTable[MAX_MOBILES_PER_ENB];
|
||||
|
||||
// sort ues
|
||||
LOG_D(MAC, "In ulsch_preprocessor: sort ue \n");
|
||||
sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
|
||||
sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
|
||||
// maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB
|
||||
LOG_D(MAC, "In ulsch_preprocessor: assign max mcs min rb\n");
|
||||
assign_max_mcs_min_rb(module_idP, slice_idx, frameP, subframeP, first_rb);
|
||||
@@ -1722,6 +1712,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
|
||||
// step 2: calculate the average rb per UE
|
||||
LOG_D(MAC, "In ulsch_preprocessor: step2 \n");
|
||||
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
if (UE_list->UE_template[CC_id][UE_id].rach_resource_type > 0) continue;
|
||||
|
||||
@@ -1781,7 +1772,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
// step 3: assigne RBS
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
// if (continueTable[UE_id]) continue;
|
||||
|
||||
for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
// This is the actual CC_id in the list
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
@@ -1811,7 +1801,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
// step 4: assigne the remaining RBs and set the pre_allocated rbs accordingly
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
// if (continueTable[UE_id]) continue;
|
||||
|
||||
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
|
||||
for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
@@ -1897,9 +1886,10 @@ assign_max_mcs_min_rb(module_id_t module_idP,
|
||||
Ncp = eNB->common_channels[CC_id].Ncp;
|
||||
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
|
||||
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
|
||||
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
|
||||
int bits_to_schedule = bytes_to_schedule * 8;
|
||||
|
||||
// if this UE has UL traffic
|
||||
@@ -2045,7 +2035,6 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
|
||||
|
||||
/* Check CDRX configuration and if UE is in active time for this subframe */
|
||||
@@ -2056,6 +2045,7 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
}
|
||||
|
||||
rntiTable[i] = UE_RNTI(module_idP, i);
|
||||
|
||||
// Valid element and is not the actual CC_id in the list
|
||||
if (UE_list->active[i] == TRUE &&
|
||||
rntiTable[i] != NOT_A_RNTI &&
|
||||
@@ -2068,14 +2058,12 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
qsort_r(list, list_size, sizeof(int), ue_ul_compare, ¶ms);
|
||||
|
||||
if (list_size) { // At mimimum one list element
|
||||
|
||||
for (int i = 0; i < list_size - 1; i++) {
|
||||
UE_list->next_ul[list[i]] = list[i + 1];
|
||||
}
|
||||
|
||||
UE_list->next_ul[list[list_size - 1]] = -1;
|
||||
UE_list->head_ul = list[0];
|
||||
|
||||
} else { // No element
|
||||
UE_list->head_ul = -1;
|
||||
}
|
||||
|
||||
@@ -404,10 +404,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
eNB_indexP, frameP, subframeP,
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6,0, 0
|
||||
);
|
||||
|
||||
if (UE_mac_inst[module_idP].crnti_before_ho)
|
||||
@@ -424,11 +421,8 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
dcch_header_len);
|
||||
|
||||
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
|
||||
(char *) &ulsch_buff[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
(char *) &ulsch_buff[0],0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
|
||||
if(sdu_lengths > 0)
|
||||
|
||||
@@ -49,66 +49,65 @@ extern RAN_CONTEXT_t RC;
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned short
|
||||
fill_rar(const module_id_t module_idP,
|
||||
const int CC_id,
|
||||
RA_t * ra,
|
||||
const frame_t frameP,
|
||||
uint8_t * const dlsch_buffer,
|
||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
||||
const int CC_id,
|
||||
RA_t *ra,
|
||||
const frame_t frameP,
|
||||
uint8_t *const dlsch_buffer,
|
||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
// subheader fixed
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
|
||||
rar[4] = (uint8_t) (ra->rnti >> 8);
|
||||
rar[5] = (uint8_t) (ra->rnti & 0xff);
|
||||
//ra->timing_offset = 0;
|
||||
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
|
||||
|
||||
// subheader fixed
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
|
||||
rar[4] = (uint8_t) (ra->rnti >> 8);
|
||||
rar[5] = (uint8_t) (ra->rnti & 0xff);
|
||||
//ra->timing_offset = 0;
|
||||
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
if(N_RB_UL == 25){
|
||||
ra->msg3_first_rb = 1;
|
||||
}else{
|
||||
if (cc->tdd_Config && N_RB_UL == 100) {
|
||||
ra->msg3_first_rb = 3;
|
||||
} else {
|
||||
ra->msg3_first_rb = 2;
|
||||
}
|
||||
if(N_RB_UL == 25) {
|
||||
ra->msg3_first_rb = 1;
|
||||
} else {
|
||||
if (cc->tdd_Config && N_RB_UL == 100) {
|
||||
ra->msg3_first_rb = 3;
|
||||
} else {
|
||||
ra->msg3_first_rb = 2;
|
||||
}
|
||||
ra->msg3_nb_rb = 1;
|
||||
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
|
||||
ra->msg3_mcs = 10;
|
||||
ra->msg3_TPC = 3;
|
||||
ra->msg3_ULdelay = 0;
|
||||
ra->msg3_cqireq = 0;
|
||||
ra->msg3_round = 0;
|
||||
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||
}
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI , 1,
|
||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
||||
0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
ra->msg3_nb_rb = 1;
|
||||
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
|
||||
ra->msg3_mcs = 10;
|
||||
ra->msg3_TPC = 3;
|
||||
ra->msg3_ULdelay = 0;
|
||||
ra->msg3_cqireq = 0;
|
||||
ra->msg3_round = 0;
|
||||
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||
|
||||
return (ra->rnti);
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
||||
0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
|
||||
return (ra->rnti);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Fill the RAR buffer (header + PDU) for LTE-M devices
|
||||
@@ -118,14 +117,13 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
RA_t *ra,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
uint8_t* const dlsch_buffer,
|
||||
uint8_t *const dlsch_buffer,
|
||||
const uint8_t ce_level)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
COMMON_channels_t *cc = &eNB->common_channels[CC_id];
|
||||
uint8_t *rar = (uint8_t *)(dlsch_buffer + 1);
|
||||
|
||||
uint32_t rballoc = 0;
|
||||
uint32_t ULdelay = 0;
|
||||
uint32_t cqireq = 0;
|
||||
@@ -133,30 +131,24 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
uint32_t TPC = 0;
|
||||
int input_buffer_length = 0;
|
||||
int N_NB_index = 0;
|
||||
|
||||
AssertFatal(ra != NULL, "RA is null \n");
|
||||
|
||||
/* Subheader fixed */
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble
|
||||
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble
|
||||
/* RAR PDU */
|
||||
/* TA Command */
|
||||
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
|
||||
rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
|
||||
|
||||
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
|
||||
rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
|
||||
/* Copy the Msg2 narrowband */
|
||||
ra->msg34_narrowband = ra->msg2_narrowband;
|
||||
ra->msg3_first_rb = 0;
|
||||
ra->msg3_nb_rb = 2;
|
||||
|
||||
if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
|
||||
if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
|
||||
input_buffer_length = 6;
|
||||
|
||||
N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
/* UL Grant */
|
||||
ra->msg3_mcs = 7;
|
||||
TPC = 3; // no power increase
|
||||
@@ -164,7 +156,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
cqireq = 0;
|
||||
mpdcch_nb_index = 0;
|
||||
rballoc = mac_computeRIV(6, ra->msg3_first_rb, ra->msg3_nb_rb);
|
||||
|
||||
uint32_t buffer = 0;
|
||||
buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
|
||||
buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
|
||||
@@ -174,21 +165,15 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
|
||||
buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index)));
|
||||
buffer |= (mpdcch_nb_index << (4 - N_NB_index));
|
||||
|
||||
rar[1] |= (uint8_t) (buffer >> 16) & 0x0F;
|
||||
rar[2] = (uint8_t) (buffer >> 8) & 0xFF;
|
||||
rar[3] = (uint8_t) buffer & 0xFF;
|
||||
|
||||
/* RA CRNTI */
|
||||
rar[4] = (uint8_t)(ra->rnti >> 8);
|
||||
rar[5] = (uint8_t)(ra->rnti & 0xff);
|
||||
|
||||
} else { // CE level 2, 3 (CEModeB)
|
||||
|
||||
AssertFatal(1 == 0, "Shouldn't get here ...\n");
|
||||
|
||||
input_buffer_length = 5;
|
||||
|
||||
rar[3] = (uint8_t)(ra->rnti >> 8);
|
||||
rar[4] = (uint8_t)(ra->rnti & 0xff);
|
||||
}
|
||||
@@ -196,7 +181,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
LOG_I(MAC, "[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x, preamble %d/%d, TIMING OFFSET %d\n",
|
||||
frameP,
|
||||
subframeP,
|
||||
*(uint8_t*) rarh,
|
||||
*(uint8_t *) rarh,
|
||||
rar[0],
|
||||
rar[1],
|
||||
rar[2],
|
||||
@@ -210,25 +195,23 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
ra->timing_offset);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
|
||||
LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
frameP,
|
||||
ra->rnti,
|
||||
rarh->RAPID,
|
||||
frameP,
|
||||
ra->rnti,
|
||||
rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
|
||||
return (ra->rnti);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,15 +163,6 @@ void ue_init_mac(module_id_t module_idP) {
|
||||
tx_request_pdu_list = NULL;
|
||||
tx_req_num_elems = 0;
|
||||
}
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
for (i = 0; i < NUM_MAX_CBA_GROUP; i++) {
|
||||
UE_mac_inst[module_idP].cba_last_access[i] =
|
||||
round(uniform_rngen(1, 30));
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -595,44 +586,40 @@ ue_send_sdu(module_id_t module_idP,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void
|
||||
ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len)
|
||||
{
|
||||
void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len) {
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
start_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
|
||||
module_idP, frameP, BCCH, len);
|
||||
|
||||
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
|
||||
SI_RNTI,
|
||||
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
|
||||
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
|
||||
module_idP, frameP, BCCH, len);
|
||||
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
|
||||
SI_RNTI,
|
||||
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, len);
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
@@ -705,7 +692,6 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
unsigned char *num_sdu,
|
||||
unsigned char *rx_lcids,
|
||||
@@ -1571,8 +1557,6 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
unsigned char
|
||||
generate_ulsch_header(uint8_t *mac_header,
|
||||
uint8_t num_sdus,
|
||||
@@ -1894,27 +1878,6 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_IN);
|
||||
#ifdef CBA
|
||||
|
||||
if (*access_mode == CBA_ACCESS) {
|
||||
LOG_D(MAC, "[UE %d] frameP %d subframe %d try CBA transmission\n",
|
||||
module_idP, frameP, subframe);
|
||||
|
||||
//if (UE_mac_inst[module_idP].scheduling_info.LCID_status[DTCH] == LCID_EMPTY)
|
||||
if (cba_access(module_idP, frameP, subframe, eNB_index, buflen) ==
|
||||
0) {
|
||||
*access_mode = POSTPONED_ACCESS;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_OUT);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_I(MAC,
|
||||
"[UE %d] frameP %d subframe %d CBA transmission oppurtunity, tbs %d\n",
|
||||
module_idP, frameP, subframe, buflen);
|
||||
}
|
||||
|
||||
#endif
|
||||
bsr_header_len = 0;
|
||||
phr_header_len = 1; //sizeof(SCH_SUBHEADER_FIXED);
|
||||
|
||||
@@ -2067,11 +2030,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
buflen_remain,
|
||||
(char *)&ulsch_buff[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
(char *)&ulsch_buff[sdu_length_total],0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
AssertFatal(buflen_remain >= sdu_lengths[num_sdus],
|
||||
"LCID=%d RLC has segmented %d bytes but MAC has max=%d\n",
|
||||
@@ -2820,160 +2780,6 @@ ue_scheduler(const module_id_t module_idP,
|
||||
}
|
||||
|
||||
// to be improved
|
||||
#ifdef CBA
|
||||
extern int cba_backoff;
|
||||
double uniform_rngen(int min, int max) {
|
||||
double random = (double) taus() / ((double) 0xffffffff);
|
||||
return (max - min) * random + min;
|
||||
}
|
||||
|
||||
int
|
||||
cba_access(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframe, uint8_t eNB_index, uint16_t buflen) {
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
int header_offset = 4;
|
||||
int rv = 0;
|
||||
|
||||
/*
|
||||
if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) { // backoff
|
||||
// LOG_D(MAC,"[UE %d] Frame %d Subframe %d: the current CBA backoff is %d \n", module_idP, frameP, subframe,
|
||||
// UE_mac_inst[module_idP].cba_last_access[0] );
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,40));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
rv=1;
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: CBA backoff is decreased by one to %d UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] == 0 )) &&
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] == 0 )) &&
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] == 0 )) )
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
} */
|
||||
|
||||
if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] > 0)
|
||||
&& (UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] < 64)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] <= 0) &&
|
||||
(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] <= 0) &&
|
||||
(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] <= 0)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cba_backoff == 0) { // apply probablisitc method
|
||||
UE_mac_inst[module_idP].cba_last_access[0] = uniform_rngen(0, 1);
|
||||
|
||||
if (uniform_rngen(0, 1) > 0.6) {
|
||||
LOG_I(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: CBA probability-based backoff (%d), UL active state %d \n",
|
||||
module_idP, frameP, subframe, cba_backoff,
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
rv = 1;
|
||||
}
|
||||
} else {
|
||||
if (UE_mac_inst[module_idP].cba_last_access[0] <= 0) {
|
||||
UE_mac_inst[module_idP].cba_last_access[0] =
|
||||
round(uniform_rngen(1, cba_backoff));
|
||||
LOG_I(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d/%d UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
rv = 1;
|
||||
/*
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
|
||||
DTCH,
|
||||
0);
|
||||
|
||||
if ((
|
||||
// (rlc_status.pdus_in_buffer > 0 ) &&
|
||||
// (UE_mac_inst[module_idP].ul_active == 0) && // check if the ul is acrtive
|
||||
(rlc_status.head_sdu_is_segmented == 0 ) &&
|
||||
((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
|
||||
)){
|
||||
rv = 1;
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
*/
|
||||
} else {
|
||||
UE_mac_inst[module_idP].cba_last_access[0] -= 1;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0],
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
/*
|
||||
if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) {
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,cba_backoff));
|
||||
|
||||
LOG_I(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d/%d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
rv = 1;
|
||||
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
|
||||
DTCH,
|
||||
0);
|
||||
|
||||
if ((
|
||||
// (rlc_status.pdus_in_buffer > 0 ) &&
|
||||
// (UE_mac_inst[module_idP].ul_active == 0) && // check if the ul is acrtive
|
||||
(rlc_status.head_sdu_is_segmented == 0 ) &&
|
||||
((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
|
||||
)){
|
||||
rv = 1;
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
} else
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,5));
|
||||
|
||||
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) )
|
||||
{
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
boolean_t
|
||||
@@ -3019,10 +2825,8 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0xFFFF //TBS is not used in RLC at this step, set a special value for debug
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
0xFFFF, //TBS is not used in RLC at this step, set a special value for debug
|
||||
0, 0
|
||||
);
|
||||
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
|
||||
|
||||
@@ -3421,11 +3225,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
|
||||
MBMS_FLAG_NO,
|
||||
ue->slsch_lcid,
|
||||
req,
|
||||
(char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ue->sourceL2Id,
|
||||
(char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG)),
|
||||
ue->sourceL2Id,
|
||||
ue->destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
// Notes: 1. hard-coded to 24-bit destination format for now
|
||||
|
||||
@@ -268,13 +268,8 @@ int8_t nr_ue_decode_mib(
|
||||
|
||||
uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13
|
||||
frequency_range_t frequency_range = FR1;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero);
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1 >> 4) & 0xf;
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1 & 0xf);
|
||||
#endif
|
||||
int32_t num_rbs = -1;
|
||||
int32_t num_symbols = -1;
|
||||
int32_t rb_offset = -1;
|
||||
@@ -590,11 +585,7 @@ int8_t nr_ue_decode_mib(
|
||||
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
||||
mac->phy_config.config_req.pbch_config.ssb_subcarrier_offset = ssb_subcarrier_offset; // after calculation
|
||||
mac->phy_config.config_req.pbch_config.dmrs_type_a_position = mac->mib->dmrs_TypeA_Position;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero) * 16 + (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = mac->mib->pdcch_ConfigSIB1;
|
||||
#endif
|
||||
mac->phy_config.config_req.pbch_config.cell_barred = mac->mib->cellBarred;
|
||||
mac->phy_config.config_req.pbch_config.intra_frequency_reselection = mac->mib->intraFreqReselection;
|
||||
mac->phy_config.config_req.pbch_config.half_frame_bit = half_frame_bit;
|
||||
|
||||
@@ -174,11 +174,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
mib->message.choice.mib->subCarrierSpacingCommon,
|
||||
mib->message.choice.mib->ssb_SubcarrierOffset,
|
||||
mib->message.choice.mib->dmrs_TypeA_Position,
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero,
|
||||
#else
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1,
|
||||
#endif
|
||||
mib->message.choice.mib->cellBarred,
|
||||
mib->message.choice.mib->intraFreqReselection
|
||||
);
|
||||
|
||||
@@ -46,10 +46,9 @@
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
#include "LTE_SRB-ToAddModList.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBMS-SessionInfoList-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#include "LTE_MBMS-SessionInfoList-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
|
||||
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t, const MBMS_flag_t,
|
||||
@@ -220,12 +219,11 @@ typedef struct pdcp_s {
|
||||
|
||||
} pdcp_t;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
typedef struct pdcp_mbms_s {
|
||||
boolean_t instanciated_instance;
|
||||
rb_id_t rb_id;
|
||||
} pdcp_mbms_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Following symbolic constant alters the behaviour of PDCP
|
||||
* and makes it linked to PDCP test code under targets/TEST/PDCP/
|
||||
@@ -256,11 +254,9 @@ boolean_t pdcp_data_req(
|
||||
const confirm_t confirmP, \
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char *const sdu_buffer,
|
||||
const pdcp_transmission_mode_t mode
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
const pdcp_transmission_mode_t mode,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
|
||||
@@ -323,11 +319,9 @@ boolean_t rrc_pdcp_config_asn1_req (
|
||||
const uint8_t security_modeP,
|
||||
uint8_t *const kRRCenc,
|
||||
uint8_t *const kRRCint,
|
||||
uint8_t *const kUPenc
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
uint8_t *const kUPenc,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
|
||||
rb_id_t *const defaultDRB
|
||||
);
|
||||
|
||||
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
|
||||
@@ -427,10 +421,8 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -438,10 +430,8 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
struct pdcp_netlink_element_s {
|
||||
@@ -452,7 +442,6 @@ struct pdcp_netlink_element_s {
|
||||
};
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
|
||||
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
|
||||
int pdcp_pc5_sockfd;
|
||||
@@ -485,8 +474,6 @@ typedef struct {
|
||||
} __attribute__((__packed__)) sidelink_pc5s_element;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PDCP limit values
|
||||
*/
|
||||
@@ -511,10 +498,10 @@ pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
|
||||
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
|
||||
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
|
||||
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
#endif
|
||||
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
|
||||
sdu_size_t pdcp_output_sdu_bytes_to_write;
|
||||
sdu_size_t pdcp_output_header_bytes_to_write;
|
||||
list_t pdcp_sdu_list;
|
||||
|
||||
@@ -35,34 +35,30 @@
|
||||
# include "mem_block.h"
|
||||
|
||||
#ifdef ROHC
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block *sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_high(struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block * sduP, uint16_t data_sizeP, uint16_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block *sduP, uint16_t data_sizeP, uint16_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
|
||||
extern void *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern int reception_from_rohc_mt(void);
|
||||
extern int reception_from_rohc_bs(void);
|
||||
#else
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
|
||||
uint8_t is_data_pdu
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
);
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char *sdu_buffer,
|
||||
uint8_t is_data_pdu,const uint32_t *const sourceL2Id,const uint32_t *const destinationL2Id
|
||||
);
|
||||
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
|
||||
|
||||
@@ -12,28 +12,25 @@
|
||||
int recv_client = 0;
|
||||
FILE *output;
|
||||
|
||||
void usage(char *prg_name)
|
||||
{
|
||||
void usage(char *prg_name) {
|
||||
fprintf(stderr, "usage: %s <file or ->\n", prg_name);
|
||||
fprintf(stderr, " - is stdin\n");
|
||||
fprintf(stderr, " received packets are written to stdout\n");
|
||||
}
|
||||
|
||||
long uelapsed(struct timeval *s, struct timeval *e)
|
||||
{
|
||||
long uelapsed(struct timeval *s, struct timeval *e) {
|
||||
return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
pdcp_data_ind(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
mem_block_t* const sdu_buffer_pP
|
||||
)
|
||||
{
|
||||
mem_block_t *const sdu_buffer_pP
|
||||
) {
|
||||
fwrite(sdu_buffer_pP->data, sdu_buffer_sizeP, 1, stdout);
|
||||
fflush(stdout);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
@@ -43,20 +40,17 @@ pdcp_data_ind(
|
||||
return 0;
|
||||
}
|
||||
|
||||
void close_proto_agent(void)
|
||||
{
|
||||
void close_proto_agent(void) {
|
||||
proto_agent_stop(0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
const cudu_params_t params = {
|
||||
.local_ipv4_address = "192.168.12.45",
|
||||
.local_port = 6464,
|
||||
.remote_ipv4_address = "192.168.12.45",
|
||||
.remote_port = 6465
|
||||
};
|
||||
|
||||
protocol_ctxt_t p;
|
||||
memset(&p, 0, sizeof p);
|
||||
mem_block_t mem;
|
||||
@@ -75,31 +69,36 @@ int main(int argc, char *argv[])
|
||||
} else {
|
||||
f = fopen(argv[1], "r");
|
||||
}
|
||||
|
||||
if (!f) {
|
||||
fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
|
||||
return 2;
|
||||
}
|
||||
|
||||
pool_buffer_init();
|
||||
|
||||
if (proto_agent_start(0, ¶ms) != 0) {
|
||||
fprintf(stderr, "error on proto_agent_start()\n");
|
||||
fclose(f);
|
||||
return 3;
|
||||
}
|
||||
|
||||
atexit(close_proto_agent);
|
||||
|
||||
/* wait for first packet of client */
|
||||
while (!recv_client) sleep(1);
|
||||
fprintf(stderr, "reading file\n");
|
||||
|
||||
fprintf(stderr, "reading file\n");
|
||||
/* now send back at the same time */
|
||||
gettimeofday(&t_start, NULL);
|
||||
|
||||
while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
|
||||
usleep(10);
|
||||
totsize += size;
|
||||
mem.data = &s[0];
|
||||
proto_agent_send_rlc_data_req(&p, 0, 0, 0, 0, 0, size, &mem);
|
||||
}
|
||||
|
||||
gettimeofday(&t_end, NULL);
|
||||
fclose(f);
|
||||
long us = uelapsed(&t_start, &t_end);
|
||||
@@ -107,7 +106,6 @@ int main(int argc, char *argv[])
|
||||
totsize, us / 1000, ((float) totsize ) / us,
|
||||
((float) totsize) / us * 8);
|
||||
fprintf(stderr, "check files using 'diff afile bfile'\n");
|
||||
|
||||
/* give some time in case the other direction is slower */
|
||||
sleep(5);
|
||||
return 0;
|
||||
@@ -119,20 +117,17 @@ int main(int argc, char *argv[])
|
||||
*********************************************************
|
||||
*/
|
||||
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
mem_block_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
) {
|
||||
fprintf(stderr, "This should never be called on the CU\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -141,18 +136,21 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
|
||||
pthread_t t;
|
||||
pthread_attr_t att;
|
||||
|
||||
if (pthread_attr_init(&att)){
|
||||
if (pthread_attr_init(&att)) {
|
||||
fprintf(stderr, "pthread_attr_init err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
|
||||
fprintf(stderr, "pthread_attr_setdetachstate err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_create(&t, &att, f, b)) {
|
||||
fprintf(stderr, "pthread_create err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_attr_destroy(&att)) {
|
||||
fprintf(stderr, "pthread_attr_destroy err\n");
|
||||
exit(1);
|
||||
@@ -161,17 +159,14 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
|
||||
return t;
|
||||
}
|
||||
|
||||
int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format)
|
||||
{
|
||||
int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
||||
{
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10,33 +10,28 @@
|
||||
|
||||
#define BUF_MAX 1400
|
||||
|
||||
void usage(char *prg_name)
|
||||
{
|
||||
void usage(char *prg_name) {
|
||||
fprintf(stderr, "usage: %s <file or ->\n", prg_name);
|
||||
fprintf(stderr, " - is stdin\n");
|
||||
fprintf(stderr, " received packets are written to stdout\n");
|
||||
}
|
||||
|
||||
long uelapsed(struct timeval *s, struct timeval *e)
|
||||
{
|
||||
long uelapsed(struct timeval *s, struct timeval *e) {
|
||||
return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
|
||||
}
|
||||
|
||||
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
mem_block_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
) {
|
||||
fwrite(sdu_pP->data, sdu_sizeP, 1, stdout);
|
||||
fflush(stdout);
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
@@ -44,20 +39,17 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void close_proto_agent(void)
|
||||
{
|
||||
void close_proto_agent(void) {
|
||||
proto_agent_stop(0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
const cudu_params_t params = {
|
||||
.local_ipv4_address = "192.168.12.45",
|
||||
.local_port = 6465,
|
||||
.remote_ipv4_address = "192.168.12.45",
|
||||
.remote_port = 6464
|
||||
};
|
||||
|
||||
protocol_ctxt_t p;
|
||||
memset(&p, 0, sizeof p);
|
||||
mem_block_t mem;
|
||||
@@ -76,26 +68,30 @@ int main(int argc, char *argv[])
|
||||
} else {
|
||||
f = fopen(argv[1], "r");
|
||||
}
|
||||
|
||||
if (!f) {
|
||||
fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
|
||||
return 2;
|
||||
}
|
||||
|
||||
pool_buffer_init();
|
||||
|
||||
if (proto_agent_start(0, ¶ms) != 0) {
|
||||
fprintf(stderr, "error on proto_agent_start()\n");
|
||||
fclose(f);
|
||||
return 3;
|
||||
}
|
||||
atexit(close_proto_agent);
|
||||
|
||||
atexit(close_proto_agent);
|
||||
gettimeofday(&t_start, NULL);
|
||||
|
||||
while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
|
||||
usleep(10);
|
||||
totsize += size;
|
||||
mem.data = &s[0];
|
||||
proto_agent_send_pdcp_data_ind(&p, 0, 0, 0, size, &mem);
|
||||
}
|
||||
|
||||
gettimeofday(&t_end, NULL);
|
||||
fclose(f);
|
||||
long us = uelapsed(&t_start, &t_end);
|
||||
@@ -103,7 +99,6 @@ int main(int argc, char *argv[])
|
||||
totsize, us / 1000, ((float) totsize ) / us,
|
||||
((float) totsize) / us * 8);
|
||||
fprintf(stderr, "check files using 'diff afile bfile'\n");
|
||||
|
||||
/* wait, we are possibly receiving data */
|
||||
sleep(5);
|
||||
return 0;
|
||||
@@ -117,14 +112,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
boolean_t
|
||||
pdcp_data_ind(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
mem_block_t* const sdu_buffer_pP
|
||||
)
|
||||
{
|
||||
mem_block_t *const sdu_buffer_pP
|
||||
) {
|
||||
fprintf(stderr, "This should never be called on the DU\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -133,18 +127,21 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
|
||||
pthread_t t;
|
||||
pthread_attr_t att;
|
||||
|
||||
if (pthread_attr_init(&att)){
|
||||
if (pthread_attr_init(&att)) {
|
||||
fprintf(stderr, "pthread_attr_init err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
|
||||
fprintf(stderr, "pthread_attr_setdetachstate err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_create(&t, &att, f, b)) {
|
||||
fprintf(stderr, "pthread_create err\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pthread_attr_destroy(&att)) {
|
||||
fprintf(stderr, "pthread_attr_destroy err\n");
|
||||
exit(1);
|
||||
@@ -153,17 +150,14 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
|
||||
return t;
|
||||
}
|
||||
|
||||
int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format)
|
||||
{
|
||||
int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
||||
{
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
*/
|
||||
|
||||
// Function to fill in the dl_data header (32bits) with the appropriate fields (doing bitwise operations)
|
||||
void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header)
|
||||
{
|
||||
void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header) {
|
||||
uint32_t type = pdu_type;
|
||||
uint32_t spare_ = spare;
|
||||
uint32_t seq = seq_no;
|
||||
@@ -65,8 +64,7 @@ void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header)
|
||||
|
||||
|
||||
// Function to retrieve data from the dl_data header (32bits) (doing bitwise operations)
|
||||
void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header)
|
||||
{
|
||||
void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header) {
|
||||
*pdu_type = header;
|
||||
*spare = header;
|
||||
*seqno = header;
|
||||
@@ -78,137 +76,117 @@ void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header)
|
||||
return;
|
||||
}
|
||||
|
||||
int f1u_serialize_message(Protocol__F1uMessage *msg, void **buf,int *size)
|
||||
{
|
||||
int f1u_serialize_message(Protocol__F1uMessage *msg, void **buf,int *size) {
|
||||
*size = protocol__f1u_message__get_packed_size(msg);
|
||||
|
||||
*buf = malloc(*size);
|
||||
|
||||
if (!(*buf))
|
||||
goto error;
|
||||
|
||||
protocol__f1u_message__pack(msg, *buf);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(F1U, "an error occured\n");
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
int f1u_deserialize_message(void *data, int size, Protocol__F1uMessage **msg)
|
||||
{
|
||||
int f1u_deserialize_message(void *data, int size, Protocol__F1uMessage **msg) {
|
||||
*msg = protocol__f1u_message__unpack(NULL, size, data);
|
||||
|
||||
if (*msg == NULL)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1u_dl_data_create_header(uint32_t pdu_type, uint32_t f1u_sn, Protocol__DlDataHeader **header)
|
||||
{
|
||||
int f1u_dl_data_create_header(uint32_t pdu_type, uint32_t f1u_sn, Protocol__DlDataHeader **header) {
|
||||
*header = malloc(sizeof(Protocol__DlDataHeader));
|
||||
|
||||
if(*header == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__dl_data_header__init(*header);
|
||||
LOG_D(F1U, "Initialized the DL Data User header\n");
|
||||
|
||||
fill_dl_data_header(pdu_type, 0, f1u_sn, &(*header)->fields);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int f1u_dl_data(const void *params, Protocol__F1uMessage **msg)
|
||||
{
|
||||
int f1u_dl_data(const void *params, Protocol__F1uMessage **msg) {
|
||||
// Initialize the PDCP params
|
||||
dl_data_args *args = (dl_data_args *)params;
|
||||
|
||||
Protocol__DlDataHeader *header;
|
||||
|
||||
if (f1u_dl_data_create_header(args->pdu_type, args->sn, &header) != 0)
|
||||
goto error;
|
||||
|
||||
goto error;
|
||||
|
||||
Protocol__DlUserData *dl_data = NULL;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__DlUserData));
|
||||
|
||||
if(*msg == NULL)
|
||||
goto error;
|
||||
|
||||
|
||||
// FIXME: Is the following used? It seems to be overwritten by the function
|
||||
// protocol__dl_user_data__init() anyway
|
||||
//dl_data = *msg;
|
||||
|
||||
protocol__dl_user_data__init(dl_data);
|
||||
|
||||
|
||||
// Copy data to the bytes structure
|
||||
dl_data->pdu.data = malloc(args->sdu_size);
|
||||
dl_data->pdu.len = args->sdu_size;
|
||||
memcpy(dl_data->pdu.data, args->sdu_p, args->sdu_size);
|
||||
|
||||
dl_data->frame = args->frame;
|
||||
dl_data->subframe = args->subframe;
|
||||
dl_data->rnti = args->rnti;
|
||||
|
||||
dl_data->header = header;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size)
|
||||
{
|
||||
int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size) {
|
||||
*size = protocol__flexsplit_message__get_packed_size(msg);
|
||||
|
||||
*buf = malloc(*size);
|
||||
|
||||
if (!(*buf))
|
||||
goto error;
|
||||
|
||||
protocol__flexsplit_message__pack(msg, *buf);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "an error occured\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* We assume that the buffer size is equal to the message size.
|
||||
Should be chekced durint Tx/Rx */
|
||||
int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg) {
|
||||
*msg = protocol__flexsplit_message__unpack(NULL, size, data);
|
||||
|
||||
if (*msg == NULL)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int fsp_create_header(xid_t xid, Protocol__FspType type, Protocol__FspHeader **header)
|
||||
{
|
||||
int fsp_create_header(xid_t xid, Protocol__FspType type, Protocol__FspHeader **header) {
|
||||
*header = malloc(sizeof(Protocol__FspHeader));
|
||||
|
||||
if(*header == NULL)
|
||||
goto error;
|
||||
|
||||
@@ -216,65 +194,54 @@ int fsp_create_header(xid_t xid, Protocol__FspType type, Protocol__FspHeader **
|
||||
LOG_D(PROTO_AGENT, "Initialized the PROTOBUF message header\n");
|
||||
(*header)->version = FLEXSPLIT_VERSION;
|
||||
LOG_D(PROTO_AGENT, "Set the vversion to FLEXSPLIT_VERSION\n");
|
||||
|
||||
(*header)->has_version = 1;
|
||||
(*header)->type = type;
|
||||
(*header)->has_type = 1;
|
||||
(*header)->xid = xid;
|
||||
(*header)->has_xid = 1;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
return 1;
|
||||
int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
Protocol__FspCtxt *ctxt = NULL;
|
||||
Protocol__FspRlcPdu *pdu = NULL;
|
||||
Protocol__FspRlcData *rlc_data = NULL;
|
||||
Protocol__FspRlcDataReq *data_req = NULL;
|
||||
|
||||
// Initialize the PDCP params
|
||||
data_req_args *args = (data_req_args *)params;
|
||||
|
||||
// Create the protobuf header
|
||||
Protocol__FspHeader *header;
|
||||
xid_t xid = mod_id;
|
||||
LOG_D(PROTO_AGENT, "creating the data_req message\n");
|
||||
|
||||
if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_RLC_DATA_REQ, &header) != 0)
|
||||
goto error;
|
||||
goto error;
|
||||
|
||||
/* Begin constructing the messages. They are defined as follows:
|
||||
* 1) fspRlcPdu is storing the bytes of the packet
|
||||
* 2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
|
||||
* 3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
|
||||
*/
|
||||
|
||||
ctxt = malloc(sizeof(Protocol__FspCtxt));
|
||||
pdu = malloc(sizeof(Protocol__FspRlcPdu));
|
||||
rlc_data = malloc(sizeof(Protocol__FspRlcData));
|
||||
data_req = malloc(sizeof(Protocol__FspRlcDataReq));
|
||||
|
||||
protocol__fsp_ctxt__init(ctxt);
|
||||
protocol__fsp_rlc_pdu__init(pdu);
|
||||
protocol__fsp_rlc_data__init(rlc_data);
|
||||
protocol__fsp_rlc_data_req__init(data_req);
|
||||
|
||||
// Copy data to the RlcPdu structure
|
||||
pdu->fsp_pdu_data.data = malloc(args->sdu_size);
|
||||
pdu->fsp_pdu_data.len = args->sdu_size;
|
||||
|
||||
memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
|
||||
pdu->has_fsp_pdu_data = 1;
|
||||
|
||||
// Copy data to the ctxt structure
|
||||
ctxt->fsp_mod_id = args->ctxt->module_id;
|
||||
ctxt->fsp_enb_flag = args->ctxt->enb_flag;
|
||||
@@ -283,7 +250,6 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
ctxt->fsp_frame = args->ctxt->frame;
|
||||
ctxt->fsp_subframe = args->ctxt->subframe;
|
||||
ctxt->fsp_enb_index = args->ctxt->eNB_index;
|
||||
|
||||
ctxt->has_fsp_mod_id = 1;
|
||||
ctxt->has_fsp_enb_flag = 1;
|
||||
ctxt->has_fsp_instance = 1;
|
||||
@@ -291,7 +257,6 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
ctxt->has_fsp_frame = 1;
|
||||
ctxt->has_fsp_subframe = 1;
|
||||
ctxt->has_fsp_enb_index = 1;
|
||||
|
||||
rlc_data->fsp_ctxt = ctxt;
|
||||
rlc_data->fsp_srb_flag = args->srb_flag;
|
||||
rlc_data->fsp_mbms_flag = args->MBMS_flag;
|
||||
@@ -300,49 +265,48 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
rlc_data->fsp_confirm = args->confirm;
|
||||
rlc_data->fsp_sdu_buffer_size = args->sdu_size;
|
||||
rlc_data->fsp_pdu = pdu;
|
||||
|
||||
rlc_data->has_fsp_srb_flag = 1;
|
||||
rlc_data->has_fsp_mbms_flag = 1;
|
||||
rlc_data->has_fsp_rb_id = 1;
|
||||
rlc_data->has_fsp_muip = 1;
|
||||
rlc_data->has_fsp_confirm = 1;
|
||||
rlc_data->has_fsp_sdu_buffer_size = 1;
|
||||
|
||||
// Up to here, everything is a signle message that is packed inside another. The final data_req
|
||||
// will be created later, after the setting of all variables
|
||||
|
||||
data_req->header = header;
|
||||
data_req->enb_id = mod_id;
|
||||
data_req->has_enb_id = 1;
|
||||
data_req->pdcp_data = rlc_data;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexsplitMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__flexsplit_message__init(*msg);
|
||||
|
||||
(*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
|
||||
(*msg)->has_msg_dir = 1;
|
||||
(*msg)->data_req_msg = data_req;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
if(pdu!=NULL)
|
||||
free(pdu);
|
||||
if(rlc_data!=NULL)
|
||||
free(rlc_data);
|
||||
if(data_req!= NULL)
|
||||
free(data_req);
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(pdu!=NULL)
|
||||
free(pdu);
|
||||
|
||||
if(rlc_data!=NULL)
|
||||
free(rlc_data);
|
||||
|
||||
if(data_req!= NULL)
|
||||
free(data_req);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
|
||||
@@ -357,14 +321,12 @@ int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
|
||||
free(msg->data_req_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
rlc_op_status_t result = 0;
|
||||
//printf("PROTO_AGENT: handling the data_req_ack message\n");
|
||||
Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
|
||||
@@ -373,23 +335,17 @@ int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__Fl
|
||||
//printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
|
||||
ack_result = result;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
rlc_op_status_t result = 0;
|
||||
|
||||
Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
|
||||
Protocol__FspRlcDataReq *data_req = input->data_req_msg;
|
||||
|
||||
Protocol__FspCtxt *ctxt = NULL;
|
||||
Protocol__FspRlcData *rlc_data = NULL;
|
||||
|
||||
rlc_data = data_req->pdcp_data;
|
||||
ctxt = rlc_data->fsp_ctxt;
|
||||
|
||||
protocol_ctxt_t ctxt_pP;
|
||||
srb_flag_t srb_flagP = 0;
|
||||
rb_id_t rb_idP = 0;
|
||||
@@ -398,7 +354,6 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
|
||||
MBMS_flag_t flag_MBMS = 0;
|
||||
sdu_size_t pdcp_pdu_size = 0;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
|
||||
// Create a new protocol context for handling the packet
|
||||
ctxt_pP.module_id = ctxt->fsp_mod_id;
|
||||
ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
|
||||
@@ -407,7 +362,6 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
|
||||
ctxt_pP.frame = ctxt->fsp_frame;
|
||||
ctxt_pP.subframe = ctxt->fsp_subframe;
|
||||
ctxt_pP.eNB_index = ctxt->fsp_enb_index;
|
||||
|
||||
srb_flagP = rlc_data->fsp_srb_flag;
|
||||
flag_MBMS = rlc_data->fsp_mbms_flag;
|
||||
rb_idP = rlc_data->fsp_rb_id;
|
||||
@@ -415,9 +369,10 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
|
||||
confirmP = rlc_data->fsp_confirm;
|
||||
pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
|
||||
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
|
||||
if (!pdcp_pdu_p) goto error;
|
||||
memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
|
||||
|
||||
if (!pdcp_pdu_p) goto error;
|
||||
|
||||
memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
|
||||
result = rlc_data_req(&ctxt_pP
|
||||
,srb_flagP
|
||||
,flag_MBMS
|
||||
@@ -426,24 +381,20 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
|
||||
,confirmP
|
||||
,pdcp_pdu_size
|
||||
,pdcp_pdu_p
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL
|
||||
,NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
);
|
||||
return result;
|
||||
error:
|
||||
|
||||
error:
|
||||
if (pdcp_pdu_p)
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
if (pdcp_pdu_p)
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
|
||||
LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg)
|
||||
{
|
||||
int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
|
||||
if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG)
|
||||
goto error;
|
||||
|
||||
@@ -455,53 +406,44 @@ int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg)
|
||||
free(msg->data_ind_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
Protocol__FspCtxt *ctxt = NULL;
|
||||
Protocol__FspRlcPdu *pdu = NULL;
|
||||
Protocol__FspRlcData *rlc_data = NULL;
|
||||
Protocol__FspPdcpDataInd *data_ind = NULL;
|
||||
|
||||
// Initialize the PDCP params
|
||||
data_req_args *args = (data_req_args *)params;
|
||||
|
||||
// Create the protobuf header
|
||||
Protocol__FspHeader *header;
|
||||
xid_t xid = mod_id;
|
||||
LOG_D(PROTO_AGENT, "creating the data_ind message\n");
|
||||
|
||||
if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_PDCP_DATA_IND, &header) != 0)
|
||||
goto error;
|
||||
goto error;
|
||||
|
||||
/* Begin constructing the messages. They are defined as follows:
|
||||
* 1) fspRlcPdu is storing the bytes of the packet
|
||||
* 2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
|
||||
* 3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
|
||||
*/
|
||||
|
||||
ctxt = malloc(sizeof(Protocol__FspCtxt));
|
||||
pdu = malloc(sizeof(Protocol__FspRlcPdu));
|
||||
rlc_data = malloc(sizeof(Protocol__FspRlcData));
|
||||
data_ind = malloc(sizeof(Protocol__FspPdcpDataInd));
|
||||
|
||||
protocol__fsp_ctxt__init(ctxt);
|
||||
protocol__fsp_rlc_pdu__init(pdu);
|
||||
protocol__fsp_rlc_data__init(rlc_data);
|
||||
protocol__fsp_pdcp_data_ind__init(data_ind);
|
||||
|
||||
// Copy data to the RlcPdu structure
|
||||
pdu->fsp_pdu_data.data = malloc(args->sdu_size);
|
||||
pdu->fsp_pdu_data.len = args->sdu_size;
|
||||
|
||||
memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
|
||||
pdu->has_fsp_pdu_data = 1;
|
||||
|
||||
// Copy data to the ctxt structure
|
||||
ctxt->fsp_mod_id = args->ctxt->module_id;
|
||||
ctxt->fsp_enb_flag = args->ctxt->enb_flag;
|
||||
@@ -510,7 +452,6 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
ctxt->fsp_frame = args->ctxt->frame;
|
||||
ctxt->fsp_subframe = args->ctxt->subframe;
|
||||
ctxt->fsp_enb_index = args->ctxt->eNB_index;
|
||||
|
||||
ctxt->has_fsp_mod_id = 1;
|
||||
ctxt->has_fsp_enb_flag = 1;
|
||||
ctxt->has_fsp_instance = 1;
|
||||
@@ -518,28 +459,22 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
ctxt->has_fsp_frame = 1;
|
||||
ctxt->has_fsp_subframe = 1;
|
||||
ctxt->has_fsp_enb_index = 1;
|
||||
|
||||
rlc_data->fsp_ctxt = ctxt;
|
||||
rlc_data->fsp_srb_flag = args->srb_flag;
|
||||
rlc_data->fsp_mbms_flag = args->MBMS_flag;
|
||||
rlc_data->fsp_rb_id = args->rb_id;
|
||||
|
||||
rlc_data->fsp_sdu_buffer_size = args->sdu_size;
|
||||
rlc_data->fsp_pdu = pdu;
|
||||
rlc_data->has_fsp_srb_flag = 1;
|
||||
rlc_data->has_fsp_mbms_flag = 1;
|
||||
rlc_data->has_fsp_rb_id = 1;
|
||||
rlc_data->has_fsp_sdu_buffer_size = 1;
|
||||
|
||||
// Up to here, everything is a signle message that is packed inside another. The final data_req
|
||||
// will be created later, after the setting of all variables
|
||||
|
||||
data_ind->header = header;
|
||||
data_ind->enb_id = mod_id;
|
||||
data_ind->has_enb_id = 1;
|
||||
data_ind->rlc_data = rlc_data;
|
||||
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexsplitMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
@@ -547,49 +482,47 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
|
||||
|
||||
protocol__flexsplit_message__init(*msg);
|
||||
LOG_D(PROTO_AGENT,"setting the message case to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG);
|
||||
|
||||
(*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
|
||||
(*msg)->has_msg_dir = 1;
|
||||
(*msg)->data_ind_msg = data_ind; //data_req;
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
if(pdu!=NULL)
|
||||
free(pdu);
|
||||
if(rlc_data!=NULL)
|
||||
free(rlc_data);
|
||||
if(data_ind!= NULL)
|
||||
free(data_ind);
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(pdu!=NULL)
|
||||
free(pdu);
|
||||
|
||||
if(rlc_data!=NULL)
|
||||
free(rlc_data);
|
||||
|
||||
if(data_ind!= NULL)
|
||||
free(data_ind);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
boolean_t result = 0;
|
||||
|
||||
Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
|
||||
Protocol__FspPdcpDataInd *data_ind = input->data_ind_msg;
|
||||
Protocol__FspCtxt *ctxt = NULL;
|
||||
Protocol__FspRlcData *rlc_data = NULL;
|
||||
|
||||
rlc_data = data_ind->rlc_data;
|
||||
ctxt = rlc_data->fsp_ctxt;
|
||||
|
||||
protocol_ctxt_t ctxt_pP;
|
||||
srb_flag_t srb_flagP = 0;
|
||||
rb_id_t rb_idP = 0;
|
||||
sdu_size_t pdcp_pdu_size = 0;
|
||||
MBMS_flag_t flag_MBMS = 0;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
|
||||
// Create a new protocol context for handling the packet
|
||||
ctxt_pP.module_id = ctxt->fsp_mod_id;
|
||||
ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
|
||||
@@ -598,19 +531,18 @@ int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Proto
|
||||
ctxt_pP.frame = ctxt->fsp_frame;
|
||||
ctxt_pP.subframe = ctxt->fsp_subframe;
|
||||
ctxt_pP.eNB_index = ctxt->fsp_enb_index;
|
||||
|
||||
srb_flagP = rlc_data->fsp_srb_flag;
|
||||
flag_MBMS = rlc_data->fsp_mbms_flag;
|
||||
rb_idP = rlc_data->fsp_rb_id;
|
||||
pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
|
||||
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
|
||||
|
||||
if (!pdcp_pdu_p) goto error;
|
||||
|
||||
memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
|
||||
|
||||
// if (xid == 1)
|
||||
// pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
|
||||
// else if (xid == 0) // FIXME: USE a preprocessed definition
|
||||
// if (xid == 1)
|
||||
// pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
|
||||
// else if (xid == 0) // FIXME: USE a preprocessed definition
|
||||
LOG_D(PROTO_AGENT, "[inst %d] Received PDCP PDU with size %d for UE RNTI %x RB %d, Calling pdcp_data_ind\n", ctxt_pP.instance, pdcp_pdu_size,ctxt_pP.rnti,rb_idP);
|
||||
result = pdcp_data_ind(&ctxt_pP,
|
||||
srb_flagP,
|
||||
@@ -618,34 +550,35 @@ int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Proto
|
||||
rb_idP,
|
||||
pdcp_pdu_size,
|
||||
pdcp_pdu_p);
|
||||
|
||||
return result;
|
||||
error:
|
||||
|
||||
error:
|
||||
if (pdcp_pdu_p)
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
if (pdcp_pdu_p)
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
Protocol__FspHeader *header;
|
||||
Protocol__FspHello *hello_msg = NULL;
|
||||
|
||||
/*TODO: Need to set random xid or xid from received hello message*/
|
||||
xid_t xid = mod_id;
|
||||
|
||||
if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_HELLO, &header) != 0)
|
||||
goto error;
|
||||
|
||||
LOG_D(PROTO_AGENT, "creating the HELLO message\n");
|
||||
hello_msg = malloc(sizeof(Protocol__FspHello));
|
||||
|
||||
if(hello_msg == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__fsp_hello__init(hello_msg);
|
||||
hello_msg->header = header;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexsplitMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
goto error;
|
||||
|
||||
@@ -655,21 +588,23 @@ int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMe
|
||||
(*msg)->has_msg_dir = 1;
|
||||
(*msg)->hello_msg = hello_msg;
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(hello_msg!=NULL)
|
||||
free(hello_msg);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg)
|
||||
{
|
||||
int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg) {
|
||||
if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_HELLO_MSG)
|
||||
goto error;
|
||||
|
||||
@@ -677,53 +612,54 @@ int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg)
|
||||
free(msg->hello_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_echo_request(mod_id_t mod_id, const void* params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_echo_request(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
Protocol__FspHeader *header;
|
||||
Protocol__FspEchoRequest *echo_request_msg = NULL;
|
||||
|
||||
xid_t xid = mod_id;
|
||||
|
||||
if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REQUEST, &header) != 0)
|
||||
goto error;
|
||||
LOG_D(PROTO_AGENT, "creating the echo request message\n");
|
||||
|
||||
LOG_D(PROTO_AGENT, "creating the echo request message\n");
|
||||
echo_request_msg = malloc(sizeof(Protocol__FspEchoRequest));
|
||||
|
||||
if(echo_request_msg == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__fsp_echo_request__init(echo_request_msg);
|
||||
echo_request_msg->header = header;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexsplitMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
goto error;
|
||||
protocol__flexsplit_message__init(*msg);
|
||||
|
||||
protocol__flexsplit_message__init(*msg);
|
||||
LOG_D(PROTO_AGENT,"setting the message direction to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE;
|
||||
(*msg)->has_msg_dir = 1;
|
||||
(*msg)->echo_request_msg = echo_request_msg;
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(echo_request_msg != NULL)
|
||||
free(echo_request_msg);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg)
|
||||
{
|
||||
int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg) {
|
||||
if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG)
|
||||
goto error;
|
||||
|
||||
@@ -731,48 +667,52 @@ int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg)
|
||||
free(msg->echo_request_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
|
||||
{
|
||||
int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
|
||||
xid_t xid;
|
||||
Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
|
||||
Protocol__FspEchoRequest *echo_req = input->echo_request_msg;
|
||||
Protocol__FspEchoReply *echo_reply_msg = NULL;
|
||||
xid = (echo_req->header)->xid;
|
||||
|
||||
LOG_D(PROTO_AGENT, "creating the echo reply message\n");
|
||||
Protocol__FspHeader *header;
|
||||
|
||||
if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REPLY, &header) != 0)
|
||||
goto error;
|
||||
|
||||
echo_reply_msg = malloc(sizeof(Protocol__FspEchoReply));
|
||||
|
||||
if(echo_reply_msg == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__fsp_echo_reply__init(echo_reply_msg);
|
||||
echo_reply_msg->header = header;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexsplitMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
goto error;
|
||||
|
||||
protocol__flexsplit_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REPLY_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__SUCCESSFUL_OUTCOME;
|
||||
(*msg)->has_msg_dir = 1;
|
||||
(*msg)->echo_reply_msg = echo_reply_msg;
|
||||
return 0;
|
||||
error:
|
||||
|
||||
error:
|
||||
if(header != NULL)
|
||||
free(header);
|
||||
|
||||
if(echo_reply_msg != NULL)
|
||||
free(echo_reply_msg);
|
||||
|
||||
if(*msg != NULL)
|
||||
free(*msg);
|
||||
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
@@ -785,8 +725,7 @@ int proto_agent_destroy_echo_reply(Protocol__FlexsplitMessage *msg) {
|
||||
free(msg->echo_reply_msg);
|
||||
free(msg);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -211,15 +211,10 @@ config_req_rlc_am (
|
||||
uint16_t pollPDU_tab[LTE_PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
|
||||
uint32_t maxRetxThreshold_tab[LTE_UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
|
||||
uint32_t pollByte_tab[LTE_PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
|
||||
uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
|
||||
uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
|
||||
#else
|
||||
uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare9]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
uint32_t am_t_Reordering_tab[LTE_T_Reordering_spare1]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare8]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void config_req_rlc_am_asn1 (
|
||||
@@ -240,15 +235,9 @@ void config_req_rlc_am_asn1 (
|
||||
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= LTE_UL_AM_RLC__maxRetxThreshold_t32) &&
|
||||
(config_am_pP->ul_AM_RLC.pollPDU<=LTE_PollPDU_pInfinity) &&
|
||||
(config_am_pP->ul_AM_RLC.pollByte<LTE_PollByte_spare1) &&
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmit<LTE_T_PollRetransmit_spare5) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<32) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare2) ) {
|
||||
#else
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmitLTE_T_PollRetransmit_spare9) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<LTE_T_Reordering_spare1) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare8) ) {
|
||||
#endif
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
@@ -277,8 +266,7 @@ void config_req_rlc_am_asn1 (
|
||||
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
|
||||
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
|
||||
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
@@ -811,8 +799,8 @@ rlc_am_mac_data_request (
|
||||
tb_p = tb_p->next;
|
||||
} /* while */
|
||||
} /* MESSAGE_CHART_GENERATOR && data_req.data.nb_elements > 0 */
|
||||
data_req.buffer_occupancy_in_pdus = 0;
|
||||
|
||||
data_req.buffer_occupancy_in_pdus = 0;
|
||||
return data_req;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,18 +37,16 @@
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void config_req_rlc_um (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rlc_um_info_t * const config_um_pP,
|
||||
const rlc_um_info_t *const config_um_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP)
|
||||
{
|
||||
const logical_chan_id_t chan_idP) {
|
||||
rlc_union_t *rlc_union_p = NULL;
|
||||
rlc_um_entity_t *rlc_p = NULL;
|
||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
hashtable_rc_t h_rc;
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
@@ -58,7 +56,6 @@ void config_req_rlc_um (
|
||||
config_um_pP->sn_field_length,
|
||||
config_um_pP->is_mXch,
|
||||
rb_idP);
|
||||
|
||||
rlc_um_init(ctxt_pP, rlc_p);
|
||||
|
||||
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
||||
@@ -78,28 +75,22 @@ void config_req_rlc_um (
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
|
||||
#else
|
||||
const uint32_t t_Reordering_tab[LTE_T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
#endif
|
||||
|
||||
|
||||
void config_req_rlc_um_asn1 (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t mbms_flagP,
|
||||
const mbms_session_id_t mbms_session_idP,
|
||||
const mbms_service_id_t mbms_service_idP,
|
||||
const LTE_UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const LTE_UL_UM_RLC_t *const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t *const dl_rlc_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
const logical_chan_id_t chan_idP,
|
||||
const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
) {
|
||||
uint32_t ul_sn_FieldLength = 0;
|
||||
uint32_t dl_sn_FieldLength = 0;
|
||||
uint32_t t_Reordering = 0;
|
||||
@@ -108,22 +99,22 @@ void config_req_rlc_um_asn1 (
|
||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
hashtable_rc_t h_rc;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbms_flagP) {
|
||||
//AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
||||
if(dl_rlc_pP == NULL) {
|
||||
LOG_E(RLC, "No RLC UM DL config\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
|
||||
if(ul_rlc_pP != NULL) {
|
||||
LOG_E(RLC, "RLC UM UL config present\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
//AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u rnti %i enb flag %u service id %u, session id %u",
|
||||
// ctxt_pP->module_id,
|
||||
// ctxt_pP->rnti,
|
||||
@@ -132,121 +123,113 @@ void config_req_rlc_um_asn1 (
|
||||
// mbms_session_idP);
|
||||
if(h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(RLC, "RLC NOT FOUND enb id %u rnti %i enb flag %u service id %u, session id %u\n",
|
||||
ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
|
||||
ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
|
||||
return;
|
||||
}
|
||||
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
}else
|
||||
if ((sourceL2Id >0 ) && (destinationL2Id >0)){
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
}
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
//AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
|
||||
// ctxt_pP->module_id,
|
||||
// ctxt_pP->rnti,
|
||||
// ctxt_pP->enb_flag,
|
||||
// rb_idP,
|
||||
// srb_flagP);
|
||||
if(h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(RLC, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u\n",
|
||||
ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
return;
|
||||
}
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
} else if ((sourceL2Id >0 ) && (destinationL2Id >0)) {
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
|
||||
} else {
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
}
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
//AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
|
||||
// ctxt_pP->module_id,
|
||||
// ctxt_pP->rnti,
|
||||
// ctxt_pP->enb_flag,
|
||||
// rb_idP,
|
||||
// srb_flagP);
|
||||
if(h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(RLC, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u\n",
|
||||
ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
return;
|
||||
}
|
||||
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
//-----------------------------------------------------------------------------
|
||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" CONFIG_REQ timer_reordering=%dms sn_field_length= RB %u \n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
(dl_rlc_pP && dl_rlc_pP->t_Reordering<31)?t_Reordering_tab[dl_rlc_pP->t_Reordering]:-1,
|
||||
rb_idP);
|
||||
|
||||
rlc_um_init(ctxt_pP, rlc_p);
|
||||
|
||||
|
||||
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
||||
rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP, chan_idP);
|
||||
|
||||
if (ul_rlc_pP != NULL) {
|
||||
switch (ul_rlc_pP->sn_FieldLength) {
|
||||
case LTE_SN_FieldLength_size5:
|
||||
ul_sn_FieldLength = 5;
|
||||
break;
|
||||
case LTE_SN_FieldLength_size5:
|
||||
ul_sn_FieldLength = 5;
|
||||
break;
|
||||
|
||||
case LTE_SN_FieldLength_size10:
|
||||
ul_sn_FieldLength = 10;
|
||||
break;
|
||||
case LTE_SN_FieldLength_size10:
|
||||
ul_sn_FieldLength = 10;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID UL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
rlc_p->rb_id,
|
||||
ul_rlc_pP->sn_FieldLength);
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
ul_rlc_pP->sn_FieldLength);
|
||||
return;
|
||||
default:
|
||||
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID UL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
rlc_p->rb_id,
|
||||
ul_rlc_pP->sn_FieldLength);
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
ul_rlc_pP->sn_FieldLength);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (dl_rlc_pP != NULL) {
|
||||
switch (dl_rlc_pP->sn_FieldLength) {
|
||||
case LTE_SN_FieldLength_size5:
|
||||
dl_sn_FieldLength = 5;
|
||||
break;
|
||||
case LTE_SN_FieldLength_size5:
|
||||
dl_sn_FieldLength = 5;
|
||||
break;
|
||||
|
||||
case LTE_SN_FieldLength_size10:
|
||||
dl_sn_FieldLength = 10;
|
||||
break;
|
||||
case LTE_SN_FieldLength_size10:
|
||||
dl_sn_FieldLength = 10;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID DL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
rlc_p->rb_id,
|
||||
dl_rlc_pP->sn_FieldLength);
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
dl_rlc_pP->sn_FieldLength);
|
||||
return;
|
||||
default:
|
||||
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID DL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
rlc_p->rb_id,
|
||||
dl_rlc_pP->sn_FieldLength);
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
dl_rlc_pP->sn_FieldLength);
|
||||
return;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (dl_rlc_pP->t_Reordering<32) {
|
||||
#else
|
||||
if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
|
||||
#endif
|
||||
t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
|
||||
} else {
|
||||
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID T_Reordering %ld, RLC NOT CONFIGURED\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
rlc_p->rb_id,
|
||||
dl_rlc_pP->t_Reordering);
|
||||
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
dl_rlc_pP->t_Reordering);
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
dl_rlc_pP->t_Reordering);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -258,45 +241,42 @@ void config_req_rlc_um_asn1 (
|
||||
dl_sn_FieldLength,
|
||||
mbms_flagP);
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
t_Reordering,
|
||||
ul_sn_FieldLength,
|
||||
dl_sn_FieldLength);
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
t_Reordering,
|
||||
ul_sn_FieldLength,
|
||||
dl_sn_FieldLength);
|
||||
} else {
|
||||
|
||||
rlc_um_configure(ctxt_pP,rlc_p,
|
||||
t_Reordering,
|
||||
dl_sn_FieldLength,
|
||||
ul_sn_FieldLength,
|
||||
mbms_flagP);
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
t_Reordering,
|
||||
dl_sn_FieldLength,
|
||||
ul_sn_FieldLength);
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
|
||||
t_Reordering,
|
||||
dl_sn_FieldLength,
|
||||
ul_sn_FieldLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_um_init (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP
|
||||
)
|
||||
{
|
||||
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP
|
||||
) {
|
||||
//AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
|
||||
if(rlc_pP == NULL) {
|
||||
LOG_E(RLC, "Bad RLC UM pointer (NULL)\n");
|
||||
@@ -314,11 +294,8 @@ rlc_um_init (
|
||||
list_init (&rlc_pP->pdus_to_mac_layer, NULL);
|
||||
pthread_mutex_init(&rlc_pP->lock_input_sdus, NULL);
|
||||
list_init (&rlc_pP->input_sdus, NULL);
|
||||
|
||||
rlc_pP->protocol_state = RLC_NULL_STATE;
|
||||
|
||||
//rlc_pP->vt_us = 0;
|
||||
|
||||
// RX SIDE
|
||||
list_init (&rlc_pP->pdus_from_mac_layer, NULL);
|
||||
//rlc_pP->vr_ur = 0;
|
||||
@@ -326,12 +303,10 @@ rlc_um_init (
|
||||
//rlc_pP->vr_uh = 0;
|
||||
//rlc_pP->output_sdu_size_to_write = 0;
|
||||
//rlc_pP->output_sdu_in_construction = NULL;
|
||||
|
||||
rlc_pP->rx_sn_length = 10;
|
||||
rlc_pP->rx_header_min_length_in_bytes = 2;
|
||||
rlc_pP->tx_sn_length = 10;
|
||||
rlc_pP->tx_header_min_length_in_bytes = 2;
|
||||
|
||||
pthread_mutex_init(&rlc_pP->lock_dar_buffer, NULL);
|
||||
|
||||
if (rlc_pP->dar_buffer == NULL) {
|
||||
@@ -345,13 +320,10 @@ rlc_um_init (
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_um_reset_state_variables (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP
|
||||
)
|
||||
{
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP
|
||||
) {
|
||||
rlc_pP->buffer_occupancy = 0;
|
||||
|
||||
|
||||
// TX SIDE
|
||||
rlc_pP->vt_us = 0;
|
||||
// RX SIDE
|
||||
@@ -362,14 +334,12 @@ rlc_um_reset_state_variables (
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_um_cleanup (
|
||||
rlc_um_entity_t * const rlc_pP)
|
||||
{
|
||||
rlc_um_entity_t *const rlc_pP) {
|
||||
int index;
|
||||
// TX SIDE
|
||||
list_free (&rlc_pP->pdus_to_mac_layer);
|
||||
pthread_mutex_destroy(&rlc_pP->lock_input_sdus);
|
||||
list_free (&rlc_pP->input_sdus);
|
||||
|
||||
// RX SIDE
|
||||
list_free (&rlc_pP->pdus_from_mac_layer);
|
||||
|
||||
@@ -395,13 +365,12 @@ rlc_um_cleanup (
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_um_configure(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP,
|
||||
const uint32_t timer_reorderingP,
|
||||
const uint32_t rx_sn_field_lengthP,
|
||||
const uint32_t tx_sn_field_lengthP,
|
||||
const uint32_t is_mXchP)
|
||||
{
|
||||
const uint32_t is_mXchP) {
|
||||
if (rx_sn_field_lengthP == 10) {
|
||||
rlc_pP->rx_sn_length = 10;
|
||||
rlc_pP->rx_sn_modulo = RLC_UM_SN_10_BITS_MODULO;
|
||||
@@ -444,25 +413,21 @@ void rlc_um_configure(
|
||||
}
|
||||
|
||||
rlc_pP->is_mxch = is_mXchP;
|
||||
|
||||
rlc_pP->last_reassemblied_sn = rlc_pP->rx_sn_modulo - 1;
|
||||
rlc_pP->last_reassemblied_missing_sn = rlc_pP->rx_sn_modulo - 1;
|
||||
rlc_pP->reassembly_missing_sn_detected = 0;
|
||||
// timers
|
||||
rlc_um_init_timer_reordering(ctxt_pP,rlc_pP, timer_reorderingP);
|
||||
|
||||
rlc_pP->first_pdu = 1;
|
||||
|
||||
rlc_um_reset_state_variables (ctxt_pP,rlc_pP);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_um_set_debug_infos(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP)
|
||||
{
|
||||
const logical_chan_id_t chan_idP) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rb_idP,
|
||||
|
||||
@@ -65,11 +65,11 @@ typedef volatile struct {
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
void config_req_rlc_um (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rlc_um_info_t * const config_umP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rlc_um_info_t *const config_umP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);
|
||||
|
||||
/*! \fn void config_req_rlc_um_asn1 (
|
||||
* const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -92,20 +92,18 @@ void config_req_rlc_um (
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
void config_req_rlc_um_asn1 (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t mbms_flagP,
|
||||
const mbms_session_id_t mbms_session_idP,
|
||||
const mbms_service_id_t mbms_service_idP,
|
||||
const LTE_UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t mbms_flagP,
|
||||
const mbms_session_id_t mbms_session_idP,
|
||||
const mbms_service_id_t mbms_service_idP,
|
||||
const LTE_UL_UM_RLC_t *const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t *const dl_rlc_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP,
|
||||
const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
|
||||
@@ -113,8 +111,8 @@ void config_req_rlc_um_asn1 (
|
||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||
*/
|
||||
void rlc_um_init (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP);
|
||||
|
||||
/*! \fn void rlc_um_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||
* \brief Reset protocol variables and state variables to initial values.
|
||||
@@ -122,15 +120,15 @@ void rlc_um_init (
|
||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||
*/
|
||||
void rlc_um_reset_state_variables (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP);
|
||||
|
||||
/*! \fn void rlc_um_cleanup(rlc_um_entity_t * const rlc_pP)
|
||||
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
|
||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||
*/
|
||||
void rlc_um_cleanup(
|
||||
rlc_um_entity_t * const rlc_pP);
|
||||
rlc_um_entity_t *const rlc_pP);
|
||||
|
||||
/*! \fn void rlc_um_configure(
|
||||
* const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -148,12 +146,12 @@ void rlc_um_cleanup(
|
||||
* \param[in] is_mXchP Is the radio bearer for MCCH, MTCH.
|
||||
*/
|
||||
void rlc_um_configure(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP,
|
||||
const uint32_t timer_reorderingP,
|
||||
const uint32_t rx_sn_field_lengthP,
|
||||
const uint32_t tx_sn_field_lengthP,
|
||||
const uint32_t is_mXchP);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP,
|
||||
const uint32_t timer_reorderingP,
|
||||
const uint32_t rx_sn_field_lengthP,
|
||||
const uint32_t tx_sn_field_lengthP,
|
||||
const uint32_t is_mXchP);
|
||||
|
||||
/*! \fn void rlc_um_set_debug_infos(
|
||||
* const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -168,10 +166,10 @@ void rlc_um_configure(
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
void rlc_um_set_debug_infos(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_um_entity_t * const rlc_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_um_entity_t *const rlc_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -319,11 +319,9 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
mem_block_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
) {
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t *new_sdu_p = NULL;
|
||||
@@ -331,10 +329,8 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
rlc_union_t *rlc_union_p = NULL;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||
logical_chan_id_t log_ch_id = 0;
|
||||
#endif
|
||||
#ifdef DEBUG_RLC_DATA_REQ
|
||||
LOG_D(RLC,PROTOCOL_CTXT_FMT"rlc_data_req: rb_id %u (MAX %d), muip %d, confirmP %d, sdu_sizeP %d, sdu_pP %p\n",
|
||||
PROTOCOL_CTXT_ARGS(ctxt_pP),
|
||||
@@ -345,10 +341,6 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
sdu_sizeP,
|
||||
sdu_pP);
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#else
|
||||
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
|
||||
#endif
|
||||
#if T_TRACER
|
||||
|
||||
if (ctxt_pP->enb_flag)
|
||||
@@ -382,11 +374,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (MBMS_flagP == TRUE) {
|
||||
if (ctxt_pP->enb_flag) {
|
||||
@@ -398,18 +386,14 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||
}else
|
||||
|
||||
if (sourceL2Id && destinationL2Id) {
|
||||
} else if (sourceL2Id && destinationL2Id) {
|
||||
LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
|
||||
srb_flagP);
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
//Thinh's line originally uncommented
|
||||
//key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
|
||||
//key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
|
||||
srb_flagP);
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
@@ -531,8 +515,6 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
} else { /* MBMS_flag != 0 */
|
||||
// LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
|
||||
if (sdu_pP != NULL) {
|
||||
@@ -565,17 +547,6 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
} else { /* MBMS_flag != 0 */
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
LOG_E(RLC, "MBMS_flag != 0 while Rel10/Rel14 is not defined...\n");
|
||||
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+143
-177
@@ -28,7 +28,7 @@
|
||||
* \bug
|
||||
* \warning
|
||||
*/
|
||||
/** @defgroup _rlc_impl_ RLC
|
||||
/** @defgroup _rlc_impl_ RLC
|
||||
* @ingroup _oai2
|
||||
* @{
|
||||
*/
|
||||
@@ -55,9 +55,7 @@
|
||||
# include "LTE_SRB-ToAddModList.h"
|
||||
# include "LTE_DRB-ToReleaseList.h"
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
typedef uint64_t hash_key_t;
|
||||
#define HASHTABLE_NOT_A_KEY_VALUE ((uint64_t)-1)
|
||||
@@ -136,25 +134,25 @@ typedef struct {
|
||||
#define RLC_MAX_LC ((max_val_LTE_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
|
||||
|
||||
void (*rlc_rrc_data_ind)(
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_sizeP,
|
||||
const uint8_t * const sduP);
|
||||
|
||||
void (*rlc_rrc_data_conf)(
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
const rlc_tx_status_t statusP);
|
||||
|
||||
typedef void (rrc_data_ind_cb_t)(
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_sizeP,
|
||||
const uint8_t * const sduP);
|
||||
const uint8_t *const sduP);
|
||||
|
||||
void (*rlc_rrc_data_conf)(
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
const rlc_tx_status_t statusP);
|
||||
|
||||
typedef void (rrc_data_ind_cb_t)(
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_sizeP,
|
||||
const uint8_t *const sduP);
|
||||
|
||||
typedef void (rrc_data_conf_cb_t)(
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
const rlc_tx_status_t statusP);
|
||||
@@ -183,16 +181,7 @@ typedef struct rlc_mbms_id_s {
|
||||
mbms_session_id_t session_id;
|
||||
} rlc_mbms_id_t;
|
||||
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
# if !defined(maxServiceCount)
|
||||
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
|
||||
# define maxServiceCount 1
|
||||
# endif
|
||||
# if !defined(maxSessionPerPMCH)
|
||||
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
|
||||
# define maxSessionPerPMCH 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
//rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
@@ -202,64 +191,64 @@ rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_
|
||||
;
|
||||
|
||||
#define rlc_mbms_enb_set_lcid_by_rb_id(Enb_mOD,rB_iD,lOG_cH_iD) do { \
|
||||
rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD] = lOG_cH_iD; \
|
||||
} while (0);
|
||||
rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD] = lOG_cH_iD; \
|
||||
} while (0);
|
||||
|
||||
#define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD]
|
||||
|
||||
#define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \
|
||||
AssertFatal(rB_iD<NB_RB_MBMS_MAX, "INVALID RB ID %u", rB_iD); \
|
||||
rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
|
||||
} while (0);
|
||||
AssertFatal(rB_iD<NB_RB_MBMS_MAX, "INVALID RB ID %u", rB_iD); \
|
||||
rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
|
||||
} while (0);
|
||||
|
||||
logical_chan_id_t rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
|
||||
logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
|
||||
|
||||
|
||||
#define RLC_COLL_KEY_VALUE(eNB_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(rB_iD)) << 25) | \
|
||||
(((hash_key_t)(iS_sRB)) << 33) | \
|
||||
(((hash_key_t)(0x05)) << 34))
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(rB_iD)) << 25) | \
|
||||
(((hash_key_t)(iS_sRB)) << 33) | \
|
||||
(((hash_key_t)(0x05)) << 34))
|
||||
|
||||
// index to the same RLC entity as RLC_COLL_KEY_VALUE(), but using LC_id instead
|
||||
// the hidden last key indicates if this is a hash-key with RB_id (0x05) or LC_id (0x0a)
|
||||
#define RLC_COLL_KEY_LCID_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, iS_sRB) \
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(iS_sRB)) << 33) | \
|
||||
(((hash_key_t)(0x0a)) << 34))
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(iS_sRB)) << 33) | \
|
||||
(((hash_key_t)(0x0a)) << 34))
|
||||
|
||||
#define RLC_COLL_KEY_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(dEST_iD)) << 33) | \
|
||||
(((hash_key_t)(0x05)) << 57))
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(dEST_iD)) << 33) | \
|
||||
(((hash_key_t)(0x05)) << 57))
|
||||
|
||||
#define RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(dEST_iD)) << 33) | \
|
||||
(((hash_key_t)(0x0a)) << 57))
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(lC_iD)) << 25) | \
|
||||
(((hash_key_t)(dEST_iD)) << 33) | \
|
||||
(((hash_key_t)(0x0a)) << 57))
|
||||
|
||||
|
||||
// service id max val is maxServiceCount = 16 (asn1_constants.h)
|
||||
|
||||
#define RLC_COLL_KEY_MBMS_VALUE(eNB_iD, rNTI, iS_eNB, sERVICE_ID, sESSION_ID) \
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(sERVICE_ID)) << 32) | \
|
||||
(((hash_key_t)(sESSION_ID)) << 37) | \
|
||||
(((hash_key_t)(0x0000000000000001)) << 63))
|
||||
((hash_key_t)eNB_iD | \
|
||||
(((hash_key_t)(rNTI)) << 8) | \
|
||||
(((hash_key_t)(iS_eNB)) << 24) | \
|
||||
(((hash_key_t)(sERVICE_ID)) << 32) | \
|
||||
(((hash_key_t)(sESSION_ID)) << 37) | \
|
||||
(((hash_key_t)(0x0000000000000001)) << 63))
|
||||
|
||||
hash_table_t *rlc_coll_p;
|
||||
|
||||
@@ -269,7 +258,7 @@ hash_table_t *rlc_coll_p;
|
||||
* \param[in] transport_blocksP List of transport blocks.
|
||||
* \return The amount of bytes that have been written due to serialization.
|
||||
*/
|
||||
tbs_size_t mac_rlc_serialize_tb (char*, list_t);
|
||||
tbs_size_t mac_rlc_serialize_tb (char *, list_t);
|
||||
|
||||
/*! \fn struct mac_data_ind mac_rlc_deserialize_tb (char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcsP)
|
||||
* \brief Serialize a list of transport blocks coming from RLC in order to be processed by MAC.
|
||||
@@ -279,13 +268,13 @@ tbs_size_t mac_rlc_serialize_tb (char*, list_t);
|
||||
* \param[in] crcsP Array of CRC for each transport block.
|
||||
* \return A mac_data_ind structure containing a list of transport blocks.
|
||||
*/
|
||||
struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t *);
|
||||
struct mac_data_ind mac_rlc_deserialize_tb (char *, tb_size_t, num_tb_t, crc_t *);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PUBLIC INTERFACE WITH RRC
|
||||
//-----------------------------------------------------------------------------
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] ctxtP Running context.
|
||||
@@ -296,28 +285,13 @@ struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const LTE_SRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToReleaseList_t* const ,
|
||||
const LTE_PMCH_InfoList_r9_t * const pmch_info_listP ,
|
||||
const uint32_t ,
|
||||
const uint32_t );
|
||||
#else
|
||||
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] srb2add_listP SRB configuration list to be created.
|
||||
* \param[in] drb2add_listP DRB configuration list to be created.
|
||||
* \param[in] drb2release_listP DRB configuration list to be released.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const LTE_SRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToReleaseList_t* const );
|
||||
#endif
|
||||
const protocol_ctxt_t *const,
|
||||
const LTE_SRB_ToAddModList_t *const,
|
||||
const LTE_DRB_ToAddModList_t *const,
|
||||
const LTE_DRB_ToReleaseList_t *const,
|
||||
const LTE_PMCH_InfoList_r9_t *const pmch_info_listP,
|
||||
const uint32_t,
|
||||
const uint32_t );
|
||||
|
||||
|
||||
/*! \fn void rb_free_rlc_union (void *rlcu_pP)
|
||||
@@ -326,7 +300,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
* \param[in] rlcu_pP Pointer on the rlc_union_t struct.
|
||||
*/
|
||||
void
|
||||
rb_free_rlc_union (void *rlcu_pP);
|
||||
rb_free_rlc_union (void *rlcu_pP);
|
||||
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const ctxtP)
|
||||
@@ -334,7 +308,7 @@ void
|
||||
* \param[in] ctxtP Running context.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const);
|
||||
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t *const);
|
||||
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP)
|
||||
@@ -345,7 +319,7 @@ rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const);
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t, const rb_id_t );
|
||||
rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t *const, const srb_flag_t, const MBMS_flag_t, const rb_id_t );
|
||||
|
||||
/*! \fn rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, logical_chan_id_t chan_idP, rlc_mode_t rlc_modeP)
|
||||
* \brief Add a RLC protocol instance to a radio bearer.
|
||||
@@ -357,12 +331,10 @@ rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const, const srb_fl
|
||||
* \param[in] rlc_modeP Mode of RLC (AM, UM, TM).
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
rlc_union_t *rrc_rlc_add_rlc (const protocol_ctxt_t *const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t
|
||||
,const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_config_req (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
@@ -381,12 +353,12 @@ rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_config_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
config_action_t,
|
||||
const rb_id_t,
|
||||
rlc_info_t );
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
config_action_t,
|
||||
const rb_id_t,
|
||||
rlc_info_t );
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t* const ctxtP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, char* sduP)
|
||||
* \brief Function for RRC to send a SDU through a Signalling Radio Bearer.
|
||||
@@ -399,7 +371,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
||||
* \param[in] sduP SDU.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t* const , const MBMS_flag_t, const rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t *const, const MBMS_flag_t, const rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
|
||||
/*! \fn void rrc_rlc_register_rrc ( void (*rrc_data_indP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, char* sduP), void (*rrc_data_confP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP)
|
||||
* \brief This function is called by RRC to register its DATA-INDICATE and DATA-CONFIRM handlers to RLC layer.
|
||||
@@ -423,12 +395,10 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
|
||||
* \param [in,out] bufferP Memory area to fill with the bytes requested by MAC.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char *
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs)
|
||||
* \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier.
|
||||
@@ -443,8 +413,8 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con
|
||||
* \param[in] num_tbP Number of transport blocks.
|
||||
* \param[in] crcs Array of CRC decoding.
|
||||
*/
|
||||
void mac_rlc_data_ind (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, char*, tb_size_t, num_tb_t,
|
||||
crc_t* );
|
||||
void mac_rlc_data_ind (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, char *, tb_size_t, num_tb_t,
|
||||
crc_t * );
|
||||
|
||||
/*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, tb_size_t tb_sizeP)
|
||||
* \brief Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
|
||||
@@ -459,11 +429,9 @@ void mac_rlc_data_ind (const module_id_t, const rnti_t, con
|
||||
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
|
||||
*/
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, const frame_t frameP, const sub_frame_t subframeP,const eNB_flag_t enb_flagP, const logical_chan_id_t channel_idP)
|
||||
* \brief Interface with MAC layer, UE only: request and get the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
|
||||
@@ -487,9 +455,9 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t, const
|
||||
* @param sizeP Number of octets in data buffer
|
||||
*/
|
||||
void rlc_util_print_hex_octets(
|
||||
const comp_name_t componentP,
|
||||
unsigned char* const dataP,
|
||||
const signed long sizeP);
|
||||
const comp_name_t componentP,
|
||||
unsigned char *const dataP,
|
||||
const signed long sizeP);
|
||||
|
||||
|
||||
|
||||
@@ -506,19 +474,17 @@ void rlc_util_print_hex_octets(
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rlc_data_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t ,
|
||||
const rb_id_t ,
|
||||
const mui_t ,
|
||||
const confirm_t ,
|
||||
const sdu_size_t ,
|
||||
mem_block_t * const
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const
|
||||
,const uint32_t * const
|
||||
#endif
|
||||
);
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const confirm_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const
|
||||
);
|
||||
|
||||
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
|
||||
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
|
||||
@@ -530,12 +496,12 @@ rlc_op_status_t rlc_data_req (
|
||||
* \param[in] sduP SDU.
|
||||
*/
|
||||
void rlc_data_ind(
|
||||
const protocol_ctxt_t* const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t ,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t* const);
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const);
|
||||
|
||||
|
||||
/*! \fn void rlc_data_conf (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
|
||||
@@ -547,11 +513,11 @@ void rlc_data_ind(
|
||||
* \param[in] statusP Status of the transmission (RLC_SDU_CONFIRM_YES, RLC_SDU_CONFIRM_NO).
|
||||
*/
|
||||
void rlc_data_conf(
|
||||
const protocol_ctxt_t* const,
|
||||
const srb_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const rlc_tx_status_t );
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const rlc_tx_status_t );
|
||||
|
||||
|
||||
/*! \fn rlc_op_status_t rlc_stat_req (
|
||||
@@ -559,7 +525,7 @@ void rlc_data_conf(
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
unsigned int* stat_rlc_mode,
|
||||
unsigned int* stat_tx_pdcp_sdu,
|
||||
unsigned int* stat_tx_pdcp_sdu,
|
||||
unsigned int* stat_tx_pdcp_bytes,
|
||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||
unsigned int* stat_tx_pdcp_bytes_discarded,
|
||||
@@ -591,7 +557,7 @@ void rlc_data_conf(
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||
* \param[in] rb_idP .
|
||||
* \param[out] stat_rlc_mode RLC mode
|
||||
* \param[out] stat_rlc_mode RLC mode
|
||||
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
||||
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
|
||||
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
|
||||
@@ -622,37 +588,37 @@ void rlc_data_conf(
|
||||
*/
|
||||
|
||||
rlc_op_status_t rlc_stat_req (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
unsigned int* const stat_rlc_mode,
|
||||
unsigned int* const stat_tx_pdcp_sdu,
|
||||
unsigned int* const stat_tx_pdcp_bytes,
|
||||
unsigned int* const stat_tx_pdcp_sdu_discarded,
|
||||
unsigned int* const stat_tx_pdcp_bytes_discarded,
|
||||
unsigned int* const stat_tx_data_pdu,
|
||||
unsigned int* const stat_tx_data_bytes,
|
||||
unsigned int* const stat_tx_retransmit_pdu_by_status,
|
||||
unsigned int* const stat_tx_retransmit_bytes_by_status,
|
||||
unsigned int* const stat_tx_retransmit_pdu,
|
||||
unsigned int* const stat_tx_retransmit_bytes,
|
||||
unsigned int* const stat_tx_control_pdu,
|
||||
unsigned int* const stat_tx_control_bytes,
|
||||
unsigned int* const stat_rx_pdcp_sdu,
|
||||
unsigned int* const stat_rx_pdcp_bytes,
|
||||
unsigned int* const stat_rx_data_pdus_duplicate,
|
||||
unsigned int* const stat_rx_data_bytes_duplicate,
|
||||
unsigned int* const stat_rx_data_pdu,
|
||||
unsigned int* const stat_rx_data_bytes,
|
||||
unsigned int* const stat_rx_data_pdu_dropped,
|
||||
unsigned int* const stat_rx_data_bytes_dropped,
|
||||
unsigned int* const stat_rx_data_pdu_out_of_window,
|
||||
unsigned int* const stat_rx_data_bytes_out_of_window,
|
||||
unsigned int* const stat_rx_control_pdu,
|
||||
unsigned int* const stat_rx_control_bytes,
|
||||
unsigned int* const stat_timer_reordering_timed_out,
|
||||
unsigned int* const stat_timer_poll_retransmit_timed_out,
|
||||
unsigned int* const stat_timer_status_prohibit_timed_out);
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
unsigned int *const stat_rlc_mode,
|
||||
unsigned int *const stat_tx_pdcp_sdu,
|
||||
unsigned int *const stat_tx_pdcp_bytes,
|
||||
unsigned int *const stat_tx_pdcp_sdu_discarded,
|
||||
unsigned int *const stat_tx_pdcp_bytes_discarded,
|
||||
unsigned int *const stat_tx_data_pdu,
|
||||
unsigned int *const stat_tx_data_bytes,
|
||||
unsigned int *const stat_tx_retransmit_pdu_by_status,
|
||||
unsigned int *const stat_tx_retransmit_bytes_by_status,
|
||||
unsigned int *const stat_tx_retransmit_pdu,
|
||||
unsigned int *const stat_tx_retransmit_bytes,
|
||||
unsigned int *const stat_tx_control_pdu,
|
||||
unsigned int *const stat_tx_control_bytes,
|
||||
unsigned int *const stat_rx_pdcp_sdu,
|
||||
unsigned int *const stat_rx_pdcp_bytes,
|
||||
unsigned int *const stat_rx_data_pdus_duplicate,
|
||||
unsigned int *const stat_rx_data_bytes_duplicate,
|
||||
unsigned int *const stat_rx_data_pdu,
|
||||
unsigned int *const stat_rx_data_bytes,
|
||||
unsigned int *const stat_rx_data_pdu_dropped,
|
||||
unsigned int *const stat_rx_data_bytes_dropped,
|
||||
unsigned int *const stat_rx_data_pdu_out_of_window,
|
||||
unsigned int *const stat_rx_data_bytes_out_of_window,
|
||||
unsigned int *const stat_rx_control_pdu,
|
||||
unsigned int *const stat_rx_control_bytes,
|
||||
unsigned int *const stat_timer_reordering_timed_out,
|
||||
unsigned int *const stat_timer_poll_retransmit_timed_out,
|
||||
unsigned int *const stat_timer_status_prohibit_timed_out);
|
||||
|
||||
/*! \fn int rlc_module_init(void)
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (mem_block_t structures mainly used in RLC module).
|
||||
|
||||
+117
-145
@@ -45,14 +45,12 @@ struct mac_data_ind mac_rlc_deserialize_tb (
|
||||
char *buffer_pP,
|
||||
const tb_size_t tb_sizeP,
|
||||
num_tb_t num_tbP,
|
||||
crc_t *crcs_pP)
|
||||
{
|
||||
crc_t *crcs_pP) {
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mac_data_ind data_ind;
|
||||
mem_block_t* tb_p;
|
||||
mem_block_t *tb_p;
|
||||
num_tb_t nb_tb_read;
|
||||
tbs_size_t tbs_size;
|
||||
|
||||
nb_tb_read = 0;
|
||||
tbs_size = 0;
|
||||
list_init(&data_ind.data, NULL);
|
||||
@@ -62,7 +60,7 @@ struct mac_data_ind mac_rlc_deserialize_tb (
|
||||
|
||||
if (tb_p != NULL) {
|
||||
((struct mac_tb_ind *) (tb_p->data))->first_bit = 0;
|
||||
((struct mac_tb_ind *) (tb_p->data))->data_ptr = (uint8_t*)&tb_p->data[sizeof (mac_rlc_max_rx_header_size_t)];
|
||||
((struct mac_tb_ind *) (tb_p->data))->data_ptr = (uint8_t *)&tb_p->data[sizeof (mac_rlc_max_rx_header_size_t)];
|
||||
((struct mac_tb_ind *) (tb_p->data))->size = tb_sizeP;
|
||||
|
||||
if (crcs_pP) {
|
||||
@@ -72,7 +70,6 @@ struct mac_data_ind mac_rlc_deserialize_tb (
|
||||
}
|
||||
|
||||
memcpy(((struct mac_tb_ind *) (tb_p->data))->data_ptr, &buffer_pP[tbs_size], tb_sizeP);
|
||||
|
||||
#ifdef DEBUG_MAC_INTERFACE
|
||||
LOG_T(RLC, "[MAC-RLC] DUMP RX PDU(%d bytes):\n", tb_sizeP);
|
||||
rlc_util_print_hex_octets(RLC, ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_sizeP);
|
||||
@@ -87,17 +84,14 @@ struct mac_data_ind mac_rlc_deserialize_tb (
|
||||
|
||||
data_ind.no_tb = nb_tb_read;
|
||||
data_ind.tb_size = tb_sizeP << 3;
|
||||
|
||||
return data_ind;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP)
|
||||
{
|
||||
tbs_size_t mac_rlc_serialize_tb (char *buffer_pP, list_t transport_blocksP) {
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t *tb_p;
|
||||
tbs_size_t tbs_size;
|
||||
tbs_size_t tb_size;
|
||||
|
||||
tbs_size = 0;
|
||||
|
||||
while (transport_blocksP.nb_elements > 0) {
|
||||
@@ -127,13 +121,10 @@ tbs_size_t mac_rlc_data_req(
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const logical_chan_id_t channel_idP,
|
||||
const tb_size_t tb_sizeP,
|
||||
char *buffer_pP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
char *buffer_pP,
|
||||
const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
) {
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mac_data_req data_request;
|
||||
rlc_mode_t rlc_mode = RLC_MODE_NONE;
|
||||
@@ -144,9 +135,7 @@ tbs_size_t mac_rlc_data_req(
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
tbs_size_t ret_tb_size = 0;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0,eNB_index);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||
#ifdef DEBUG_MAC_INTERFACE
|
||||
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d\n",
|
||||
@@ -154,21 +143,20 @@ tbs_size_t mac_rlc_data_req(
|
||||
channel_idP,
|
||||
RLC_MAX_LC,
|
||||
NB_RB_MAX);
|
||||
|
||||
#endif // DEBUG_MAC_INTERFACE
|
||||
|
||||
if (MBMS_flagP) {
|
||||
//AssertFatal (channel_idP < RLC_MAX_MBMS_LC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
|
||||
if(channel_idP >= RLC_MAX_MBMS_LC){
|
||||
LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
|
||||
return 0;
|
||||
}
|
||||
if(channel_idP >= RLC_MAX_MBMS_LC) {
|
||||
LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
//AssertFatal (channel_idP < NB_RB_MAX, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
|
||||
if(channel_idP >= NB_RB_MAX){
|
||||
LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
|
||||
return 0;
|
||||
}
|
||||
if(channel_idP >= NB_RB_MAX) {
|
||||
LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (MBMS_flagP) {
|
||||
@@ -180,54 +168,57 @@ tbs_size_t mac_rlc_data_req(
|
||||
}
|
||||
} else {
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if ((sourceL2Id > 0) && (destinationL2Id > 0))
|
||||
key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
#endif
|
||||
key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
}
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rlc_mode = rlc_union_p->mode;
|
||||
} else {
|
||||
rlc_mode = RLC_MODE_NONE;
|
||||
//AssertFatal (0 , "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
|
||||
LOG_E(RLC, "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
|
||||
LOG_E(RLC, "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
|
||||
}
|
||||
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_NONE:
|
||||
ret_tb_size =0;
|
||||
break;
|
||||
case RLC_MODE_NONE:
|
||||
ret_tb_size =0;
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
rlc_am_mui.rrc_mui_num = 0;
|
||||
if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
|
||||
data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
|
||||
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
case RLC_MODE_AM:
|
||||
rlc_am_mui.rrc_mui_num = 0;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
|
||||
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
|
||||
|
||||
case RLC_MODE_TM:
|
||||
data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
|
||||
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
case RLC_MODE_UM:
|
||||
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
|
||||
|
||||
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (enb_flagP)
|
||||
T(T_ENB_RLC_MAC_DL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(ret_tb_size));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return ret_tb_size;
|
||||
}
|
||||
@@ -243,8 +234,7 @@ void mac_rlc_data_ind (
|
||||
char *buffer_pP,
|
||||
const tb_size_t tb_sizeP,
|
||||
num_tb_t num_tbP,
|
||||
crc_t *crcs_pP)
|
||||
{
|
||||
crc_t *crcs_pP) {
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_mode_t rlc_mode = RLC_MODE_NONE;
|
||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||
@@ -253,10 +243,7 @@ void mac_rlc_data_ind (
|
||||
hashtable_rc_t h_rc;
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0, eNB_index);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
|
||||
#ifdef DEBUG_MAC_INTERFACE
|
||||
|
||||
@@ -270,10 +257,11 @@ void mac_rlc_data_ind (
|
||||
}
|
||||
|
||||
#endif // DEBUG_MAC_INTERFACE
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (enb_flagP)
|
||||
T(T_ENB_RLC_MAC_UL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(tb_sizeP));
|
||||
|
||||
#endif
|
||||
|
||||
if (MBMS_flagP) {
|
||||
@@ -287,7 +275,7 @@ void mac_rlc_data_ind (
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
}
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rlc_mode = rlc_union_p->mode;
|
||||
@@ -299,26 +287,25 @@ void mac_rlc_data_ind (
|
||||
struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP);
|
||||
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_NONE:
|
||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||
list_free (&data_ind.data);
|
||||
break;
|
||||
case RLC_MODE_NONE:
|
||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||
list_free (&data_ind.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
rlc_am_mac_data_indication(&ctxt, &rlc_union_p->rlc.am, data_ind);
|
||||
break;
|
||||
case RLC_MODE_AM:
|
||||
rlc_am_mac_data_indication(&ctxt, &rlc_union_p->rlc.am, data_ind);
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
|
||||
break;
|
||||
case RLC_MODE_UM:
|
||||
rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
rlc_tm_mac_data_indication(&ctxt, &rlc_union_p->rlc.tm, data_ind);
|
||||
break;
|
||||
case RLC_MODE_TM:
|
||||
rlc_tm_mac_data_indication(&ctxt, &rlc_union_p->rlc.tm, data_ind);
|
||||
break;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
@@ -326,17 +313,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
const rnti_t rntiP,
|
||||
const eNB_index_t eNB_index,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const sub_frame_t subframeP,
|
||||
const eNB_flag_t enb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const logical_chan_id_t channel_idP,
|
||||
const tb_size_t tb_sizeP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
const tb_size_t tb_sizeP,
|
||||
const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
) {
|
||||
//-----------------------------------------------------------------------------
|
||||
mac_rlc_status_resp_t mac_rlc_status_resp;
|
||||
struct mac_status_ind tx_status;
|
||||
@@ -348,12 +332,10 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
hashtable_rc_t h_rc;
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, subframeP, eNB_index);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
|
||||
memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t));
|
||||
memset (&tx_status , 0, sizeof(struct mac_status_ind));
|
||||
memset (&tx_status, 0, sizeof(struct mac_status_ind));
|
||||
|
||||
if (MBMS_flagP) {
|
||||
if (enb_flagP) {
|
||||
@@ -364,17 +346,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||
} else {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if ((sourceL2Id > 0) && (destinationL2Id > 0)) {
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
} else {
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rlc_mode = rlc_union_p->mode;
|
||||
@@ -385,39 +364,39 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
}
|
||||
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_NONE:
|
||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0;
|
||||
break;
|
||||
case RLC_MODE_NONE:
|
||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0;
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
//return mac_rlc_status_resp;
|
||||
break;
|
||||
case RLC_MODE_AM:
|
||||
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
//return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
case RLC_MODE_UM:
|
||||
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
case RLC_MODE_TM:
|
||||
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
default:
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0 ;
|
||||
default:
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0 ;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_OUT);
|
||||
@@ -430,10 +409,9 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
|
||||
const rnti_t rntiP,
|
||||
const eNB_index_t eNB_index,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const sub_frame_t subframeP,
|
||||
const eNB_flag_t enb_flagP,
|
||||
const logical_chan_id_t channel_idP)
|
||||
{
|
||||
const logical_chan_id_t channel_idP) {
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_buffer_occupancy_t mac_rlc_buffer_occupancy_resp = 0;
|
||||
rlc_mode_t rlc_mode = RLC_MODE_NONE;
|
||||
@@ -442,26 +420,21 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
|
||||
hashtable_rc_t h_rc;
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0, eNB_index);
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_GET_BUFFER_OCCUPANCY_IND,VCD_FUNCTION_IN);
|
||||
|
||||
|
||||
/* Assumptions : for UE only */
|
||||
/* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */
|
||||
/* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */
|
||||
//AssertFatal(enb_flagP == FALSE,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
|
||||
if(enb_flagP != FALSE){
|
||||
LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(enb_flagP != FALSE) {
|
||||
LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
|
||||
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||
h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rlc_mode = rlc_union_p->mode;
|
||||
@@ -472,20 +445,19 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
|
||||
}
|
||||
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_AM:
|
||||
mac_rlc_buffer_occupancy_resp = rlc_am_get_buffer_occupancy_in_bytes(&ctxt, &rlc_union_p->rlc.am);
|
||||
break;
|
||||
case RLC_MODE_AM:
|
||||
mac_rlc_buffer_occupancy_resp = rlc_am_get_buffer_occupancy_in_bytes(&ctxt, &rlc_union_p->rlc.am);
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
mac_rlc_buffer_occupancy_resp = rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um);
|
||||
break;
|
||||
case RLC_MODE_UM:
|
||||
mac_rlc_buffer_occupancy_resp = rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um);
|
||||
break;
|
||||
|
||||
default:
|
||||
mac_rlc_buffer_occupancy_resp = 0 ;
|
||||
default:
|
||||
mac_rlc_buffer_occupancy_resp = 0 ;
|
||||
}
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_GET_BUFFER_OCCUPANCY_IND,VCD_FUNCTION_OUT);
|
||||
|
||||
return mac_rlc_buffer_occupancy_resp;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,17 +33,12 @@
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_op_status_t mpls_rlc_data_req (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const protocol_ctxt_t *const ctxtP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_sizeP,
|
||||
mem_block_t* const sduP)
|
||||
{
|
||||
mem_block_t *const sduP) {
|
||||
//-----------------------------------------------------------------------------
|
||||
// third arg should be set to 1 or 0
|
||||
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP,NULL, NULL );
|
||||
}
|
||||
|
||||
|
||||
+326
-443
File diff suppressed because it is too large
Load Diff
@@ -164,10 +164,8 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -175,22 +173,19 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
extern struct net_device *nasdev[NB_INSTANCES_MAX];
|
||||
//extern int bytes_wrote;
|
||||
//extern int bytes_read;
|
||||
|
||||
|
||||
extern uint8_t NAS_NULL_IMEI[14];
|
||||
|
||||
//global variables shared with RRC
|
||||
#ifndef PDCP_USE_NETLINK
|
||||
extern int pdcp_2_nas_irq;
|
||||
extern int pdcp_2_nas_irq;
|
||||
#endif
|
||||
//extern uint8_t nas_IMEI[14];
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "local.h"
|
||||
#include "proto_extern.h"
|
||||
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
||||
#include "rtai_fifos.h"
|
||||
#include "rtai_fifos.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,20 +41,20 @@
|
||||
#include <net/udp.h>
|
||||
|
||||
#define NIPADDR(addr) \
|
||||
(uint8_t)(addr & 0x000000FF), \
|
||||
(uint8_t)((addr & 0x0000FF00) >> 8), \
|
||||
(uint8_t)((addr & 0x00FF0000) >> 16), \
|
||||
(uint8_t)((addr & 0xFF000000) >> 24)
|
||||
(uint8_t)(addr & 0x000000FF), \
|
||||
(uint8_t)((addr & 0x0000FF00) >> 8), \
|
||||
(uint8_t)((addr & 0x00FF0000) >> 16), \
|
||||
(uint8_t)((addr & 0xFF000000) >> 24)
|
||||
|
||||
#define NIP6ADDR(addr) \
|
||||
ntohs((addr)->s6_addr16[0]), \
|
||||
ntohs((addr)->s6_addr16[1]), \
|
||||
ntohs((addr)->s6_addr16[2]), \
|
||||
ntohs((addr)->s6_addr16[3]), \
|
||||
ntohs((addr)->s6_addr16[4]), \
|
||||
ntohs((addr)->s6_addr16[5]), \
|
||||
ntohs((addr)->s6_addr16[6]), \
|
||||
ntohs((addr)->s6_addr16[7])
|
||||
ntohs((addr)->s6_addr16[0]), \
|
||||
ntohs((addr)->s6_addr16[1]), \
|
||||
ntohs((addr)->s6_addr16[2]), \
|
||||
ntohs((addr)->s6_addr16[3]), \
|
||||
ntohs((addr)->s6_addr16[4]), \
|
||||
ntohs((addr)->s6_addr16[5]), \
|
||||
ntohs((addr)->s6_addr16[6]), \
|
||||
ntohs((addr)->s6_addr16[7])
|
||||
|
||||
|
||||
//#define OAI_DRV_DEBUG_SEND
|
||||
@@ -65,9 +65,7 @@ ue_ip_common_class_wireless2ip(
|
||||
sdu_size_t data_lenP,
|
||||
void *pdcp_sdu_pP,
|
||||
int instP,
|
||||
rb_id_t rb_idP)
|
||||
{
|
||||
|
||||
rb_id_t rb_idP) {
|
||||
//---------------------------------------------------------------------------
|
||||
struct sk_buff *skb_p = NULL;
|
||||
ipversion_t *ipv_p = NULL;
|
||||
@@ -79,11 +77,9 @@ ue_ip_common_class_wireless2ip(
|
||||
#endif
|
||||
unsigned char protocol;
|
||||
struct iphdr *network_header_p = NULL;
|
||||
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__, rb_idP,instP,data_lenP);
|
||||
#endif
|
||||
|
||||
skb_p = dev_alloc_skb( data_lenP + 2 );
|
||||
|
||||
if(!skb_p) {
|
||||
@@ -94,17 +90,13 @@ ue_ip_common_class_wireless2ip(
|
||||
|
||||
skb_reserve(skb_p,2);
|
||||
memcpy(skb_put(skb_p, data_lenP), pdcp_sdu_pP,data_lenP);
|
||||
|
||||
skb_p->dev = ue_ip_dev[instP];
|
||||
hard_header_len = ue_ip_dev[instP]->hard_header_len;
|
||||
|
||||
skb_set_mac_header(skb_p, 0);
|
||||
skb_set_network_header(skb_p, hard_header_len);
|
||||
skb_p->mark = rb_idP;
|
||||
skb_p->mark = rb_idP;
|
||||
//printk("[NAC_COMMIN_RECEIVE]: Packet Type %d (%d,%d)",skb_p->pkt_type,PACKET_HOST,PACKET_BROADCAST);
|
||||
skb_p->pkt_type = PACKET_HOST;
|
||||
|
||||
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
printk("[UE_IP_DRV][%s] Receiving packet of size %d from PDCP \n",__FUNCTION__, skb_p->len);
|
||||
|
||||
@@ -118,97 +110,91 @@ skb_p->mark = rb_idP;
|
||||
printk("[UE_IP_DRV][%s] skb_p->data @ %p\n",__FUNCTION__, skb_p->data);
|
||||
printk("[UE_IP_DRV][%s] skb_p->mac_header @ %p\n",__FUNCTION__, skb_p->mac_header);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// LG TEST skb_p->ip_summed = CHECKSUM_NONE;
|
||||
skb_p->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
ipv_p = (ipversion_t *)((void *)&(skb_p->data[hard_header_len]));
|
||||
|
||||
switch (ipv_p->version) {
|
||||
|
||||
case 6:
|
||||
case 6:
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
|
||||
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
|
||||
#endif
|
||||
skb_set_network_header(skb_p, hard_header_len);
|
||||
//skb_p->network_header_p = &skb_p->data[hard_header_len];
|
||||
skb_set_network_header(skb_p, hard_header_len);
|
||||
|
||||
if (hard_header_len == 0) {
|
||||
skb_p->protocol = htons(ETH_P_IPV6);
|
||||
} else {
|
||||
//skb_p->network_header_p = &skb_p->data[hard_header_len];
|
||||
|
||||
if (hard_header_len == 0) {
|
||||
skb_p->protocol = htons(ETH_P_IPV6);
|
||||
} else {
|
||||
#ifdef OAI_NW_DRIVER_TYPE_ETHERNET
|
||||
skb_p->protocol = eth_type_trans(skb_p, ue_ip_dev[instP]);
|
||||
skb_p->protocol = eth_type_trans(skb_p, ue_ip_dev[instP]);
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
//printk("Writing packet with protocol %x\n",ntohs(skb_p->protocol));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
//printk("Writing packet with protocol %x\n",ntohs(skb_p->protocol));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
//printk("NAS_TOOL_RECEIVE: receive IPv4 message\n");
|
||||
addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->saddr;
|
||||
//printk("NAS_TOOL_RECEIVE: receive IPv4 message\n");
|
||||
addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->saddr;
|
||||
|
||||
if (addr_p) {
|
||||
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
|
||||
}
|
||||
if (addr_p) {
|
||||
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
|
||||
}
|
||||
|
||||
addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->daddr;
|
||||
addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->daddr;
|
||||
|
||||
if (addr_p) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
|
||||
}
|
||||
if (addr_p) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
|
||||
}
|
||||
|
||||
printk("[UE_IP_DRV][%s] protocol %d\n",__FUNCTION__, ((struct iphdr *)&skb_p->data[hard_header_len])->protocol);
|
||||
#endif
|
||||
skb_set_network_header(skb_p, hard_header_len);
|
||||
//network_header_p = (struct iphdr *)skb_network_header(skb_p);
|
||||
network_header_p = (struct iphdr *)skb_network_header(skb_p);
|
||||
protocol = network_header_p->protocol;
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
|
||||
switch (protocol) {
|
||||
case IPPROTO_IP:
|
||||
printk("[UE_IP_DRV][%s] Received Raw IPv4 packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_IPV6:
|
||||
printk("[UE_IP_DRV][%s] Received Raw IPv6 packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_ICMP:
|
||||
printk("[UE_IP_DRV][%s] Received Raw ICMP packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_TCP:
|
||||
printk("[UE_IP_DRV][%s] Received TCP packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_UDP:
|
||||
printk("[UE_IP_DRV][%s] Received UDP packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
printk("[UE_IP_DRV][%s] protocol %d\n",__FUNCTION__, ((struct iphdr *)&skb_p->data[hard_header_len])->protocol);
|
||||
#endif
|
||||
|
||||
skb_set_network_header(skb_p, hard_header_len);
|
||||
//network_header_p = (struct iphdr *)skb_network_header(skb_p);
|
||||
network_header_p = (struct iphdr *)skb_network_header(skb_p);
|
||||
protocol = network_header_p->protocol;
|
||||
if (hard_header_len == 0) {
|
||||
skb_p->protocol = htons(ETH_P_IP);
|
||||
}
|
||||
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
|
||||
switch (protocol) {
|
||||
case IPPROTO_IP:
|
||||
printk("[UE_IP_DRV][%s] Received Raw IPv4 packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_IPV6:
|
||||
printk("[UE_IP_DRV][%s] Received Raw IPv6 packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_ICMP:
|
||||
printk("[UE_IP_DRV][%s] Received Raw ICMP packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_TCP:
|
||||
printk("[UE_IP_DRV][%s] Received TCP packet\n",__FUNCTION__);
|
||||
break;
|
||||
|
||||
case IPPROTO_UDP:
|
||||
printk("[UE_IP_DRV][%s] Received UDP packet\n",__FUNCTION__);
|
||||
//printk("[UE_IP_DRV][COMMON] Writing packet with protocol %x\n",ntohs(skb_p->protocol));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (hard_header_len == 0) {
|
||||
skb_p->protocol = htons(ETH_P_IP);
|
||||
}
|
||||
|
||||
//printk("[UE_IP_DRV][COMMON] Writing packet with protocol %x\n",ntohs(skb_p->protocol));
|
||||
break;
|
||||
|
||||
default:
|
||||
printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
|
||||
printk("[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)\n",__FUNCTION__,instP,ipv_p->version);
|
||||
printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
|
||||
printk("[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)\n",__FUNCTION__,instP,ipv_p->version);
|
||||
}
|
||||
|
||||
++gpriv_p->stats.rx_packets;
|
||||
@@ -230,8 +216,7 @@ skb_p->mark = rb_idP;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Delete the data
|
||||
void ue_ip_common_ip2wireless_drop(struct sk_buff *skb_pP, int instP)
|
||||
{
|
||||
void ue_ip_common_ip2wireless_drop(struct sk_buff *skb_pP, int instP) {
|
||||
//---------------------------------------------------------------------------
|
||||
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
++priv_p->stats.tx_dropped;
|
||||
@@ -243,18 +228,14 @@ void
|
||||
ue_ip_common_ip2wireless(
|
||||
struct sk_buff *skb_pP,
|
||||
int instP
|
||||
)
|
||||
{
|
||||
) {
|
||||
//---------------------------------------------------------------------------
|
||||
struct pdcp_data_req_header_s pdcph;
|
||||
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ipversion_t *ipv_p = NULL;
|
||||
unsigned int hard_header_len = 0;
|
||||
unsigned char *src_addr = 0;
|
||||
unsigned char *dst_addr = 0;
|
||||
#endif
|
||||
|
||||
#ifdef LOOPBACK_TEST
|
||||
int i;
|
||||
#endif
|
||||
@@ -274,7 +255,6 @@ ue_ip_common_ip2wireless(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pdcph.data_size = skb_pP->len;
|
||||
|
||||
if (skb_pP->mark) {
|
||||
@@ -284,48 +264,52 @@ ue_ip_common_ip2wireless(
|
||||
}
|
||||
|
||||
pdcph.inst = instP;
|
||||
|
||||
//pass source/destination IP addresses to PDCP header
|
||||
hard_header_len = ue_ip_dev[instP]->hard_header_len;
|
||||
ipv_p = (ipversion_t *)((void *)&(skb_pP->data[hard_header_len]));
|
||||
|
||||
switch (ipv_p->version) {
|
||||
case 6:
|
||||
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
|
||||
//TODO
|
||||
break;
|
||||
case 6:
|
||||
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
|
||||
//TODO
|
||||
break;
|
||||
|
||||
case 4:
|
||||
src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
|
||||
if (src_addr) {
|
||||
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
|
||||
}
|
||||
dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
|
||||
if (dst_addr) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
|
||||
}
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
|
||||
case 4:
|
||||
src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
|
||||
|
||||
if (src_addr) {
|
||||
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
|
||||
}
|
||||
|
||||
dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
|
||||
|
||||
if (dst_addr) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
|
||||
}
|
||||
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
|
||||
#ifdef UESIM_EXPANSION
|
||||
if ((src_addr[3] - 2)> instP) {
|
||||
|
||||
if ((src_addr[3] - 2)> instP) {
|
||||
pdcph.inst = src_addr[3] - 2;
|
||||
printk("[UE_IP_DRV] change INST from %d to %d\n",instP, pdcph.inst);
|
||||
instP = src_addr[3] - 2;
|
||||
priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
|
||||
//get Ipv4 address and pass to PCDP header
|
||||
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
|
||||
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
|
||||
pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
|
||||
pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
|
||||
break;
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
|
||||
//get Ipv4 address and pass to PCDP header
|
||||
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
|
||||
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
|
||||
pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
|
||||
pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
bytes_wrote = ue_ip_netlink_send((char *)&pdcph,UE_IP_PDCPH_SIZE);
|
||||
#ifdef OAI_DRV_DEBUG_SEND
|
||||
printk("[UE_IP_DRV][%s] Wrote %d bytes (header for %d byte skb) to PDCP via netlink\n",__FUNCTION__,
|
||||
@@ -334,14 +318,13 @@ ue_ip_common_ip2wireless(
|
||||
|
||||
if (bytes_wrote != UE_IP_PDCPH_SIZE) {
|
||||
printk("[UE_IP_DRV][%s] problem while writing PDCP's header (bytes wrote = %d)\n",__FUNCTION__,bytes_wrote);
|
||||
printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id , bytes_wrote, UE_IP_PDCPH_SIZE);
|
||||
printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id, bytes_wrote, UE_IP_PDCPH_SIZE);
|
||||
priv_p->stats.tx_dropped ++;
|
||||
return;
|
||||
}
|
||||
|
||||
bytes_wrote += ue_ip_netlink_send((char *)skb_pP->data,skb_pP->len);
|
||||
|
||||
|
||||
if (bytes_wrote != skb_pP->len+UE_IP_PDCPH_SIZE) {
|
||||
printk("[UE_IP_DRV][%s] Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d\n",
|
||||
__FUNCTION__,
|
||||
@@ -350,7 +333,6 @@ ue_ip_common_ip2wireless(
|
||||
bytes_wrote,
|
||||
skb_pP->len,
|
||||
UE_IP_PDCPH_SIZE); // congestion
|
||||
|
||||
priv_p->stats.tx_dropped ++;
|
||||
return;
|
||||
}
|
||||
@@ -364,7 +346,6 @@ ue_ip_common_ip2wireless(
|
||||
|
||||
printk("\n");
|
||||
#endif
|
||||
|
||||
priv_p->stats.tx_bytes += skb_pP->len;
|
||||
priv_p->stats.tx_packets ++;
|
||||
#ifdef OAI_DRV_DEBUG_SEND
|
||||
@@ -373,25 +354,18 @@ ue_ip_common_ip2wireless(
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void ue_ip_common_wireless2ip(struct nlmsghdr *nlh_pP)
|
||||
{
|
||||
void ue_ip_common_wireless2ip(struct nlmsghdr *nlh_pP) {
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
struct pdcp_data_ind_header_s *pdcph_p = (struct pdcp_data_ind_header_s *)NLMSG_DATA(nlh_pP);
|
||||
ue_ip_priv_t *priv_p;
|
||||
|
||||
priv_p = netdev_priv(ue_ip_dev[pdcph_p->inst]);
|
||||
|
||||
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
printk("[UE_IP_DRV][%s] QOS receive from PDCP, size %d, rab %d, inst %d\n",__FUNCTION__,
|
||||
pdcph_p->data_size,pdcph_p->rb_id,pdcph_p->inst);
|
||||
#endif
|
||||
|
||||
ue_ip_common_class_wireless2ip(pdcph_p->data_size,
|
||||
(unsigned char *)NLMSG_DATA(nlh_pP) + UE_IP_PDCPH_SIZE,
|
||||
pdcph_p->inst,
|
||||
pdcph_p->rb_id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -90,10 +90,8 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -101,10 +99,8 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
|
||||
|
||||
@@ -52,256 +52,216 @@ extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
|
||||
extern uint8_t nfapi_mode;
|
||||
extern uint16_t sf_ahead;
|
||||
|
||||
void handle_nr_rach(NR_UL_IND_t *UL_info)
|
||||
{
|
||||
void handle_nr_rach(NR_UL_IND_t *UL_info) {
|
||||
if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
LOG_D(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->slot, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) || (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
||||
);
|
||||
}
|
||||
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
|
||||
for (int i=0;i<UL_info->rach_ind_br.rach_indication_body.number_of_preambles;i++) {
|
||||
|
||||
for (int i=0; i<UL_info->rach_ind_br.rach_indication_body.number_of_preambles; i++) {
|
||||
AssertFatal(UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type>0,
|
||||
"Got regular PRACH preamble, not BL/CE\n");
|
||||
"Got regular PRACH preamble, not BL/CE\n");
|
||||
LOG_D(MAC,"Frame %d, Slot %d Calling initiate_ra_proc (CE_level %d)\n",UL_info->frame,UL_info->slot,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type-1);
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type-1);
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.preamble,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.rnti,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type);
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.preamble,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.rnti,
|
||||
UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type);
|
||||
}
|
||||
|
||||
UL_info->rach_ind_br.rach_indication_body.number_of_preambles=0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void handle_nr_sr(NR_UL_IND_t *UL_info)
|
||||
{
|
||||
if (nfapi_mode == 1) // PNF
|
||||
{
|
||||
if (UL_info->sr_ind.sr_indication_body.number_of_srs>0)
|
||||
{
|
||||
void handle_nr_sr(NR_UL_IND_t *UL_info) {
|
||||
if (nfapi_mode == 1) { // PNF
|
||||
if (UL_info->sr_ind.sr_indication_body.number_of_srs>0) {
|
||||
oai_nfapi_sr_indication(&UL_info->sr_ind);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0;i<UL_info->sr_ind.sr_indication_body.number_of_srs;i++)
|
||||
} else {
|
||||
for (int i=0; i<UL_info->sr_ind.sr_indication_body.number_of_srs; i++)
|
||||
SR_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
|
||||
}
|
||||
|
||||
UL_info->sr_ind.sr_indication_body.number_of_srs=0;
|
||||
}
|
||||
|
||||
void handle_nr_cqi(NR_UL_IND_t *UL_info) {
|
||||
|
||||
if (nfapi_mode == 1)
|
||||
{
|
||||
if (UL_info->cqi_ind.number_of_cqis>0)
|
||||
{
|
||||
if (nfapi_mode == 1) {
|
||||
if (UL_info->cqi_ind.number_of_cqis>0) {
|
||||
LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.number_of_cqis);
|
||||
nfapi_cqi_indication_t ind;
|
||||
|
||||
ind.header.message_id = NFAPI_RX_CQI_INDICATION;
|
||||
ind.sfn_sf = UL_info->frame<<4 | UL_info->slot;
|
||||
ind.cqi_indication_body = UL_info->cqi_ind;
|
||||
|
||||
oai_nfapi_cqi_indication(&ind);
|
||||
|
||||
UL_info->cqi_ind.number_of_cqis=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0;i<UL_info->cqi_ind.number_of_cqis;i++)
|
||||
} else {
|
||||
for (int i=0; i<UL_info->cqi_ind.number_of_cqis; i++)
|
||||
cqi_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->cqi_ind.cqi_pdu_list[i].rx_ue_information.rnti,
|
||||
&UL_info->cqi_ind.cqi_pdu_list[i].cqi_indication_rel9,
|
||||
UL_info->cqi_ind.cqi_raw_pdu_list[i].pdu,
|
||||
&UL_info->cqi_ind.cqi_pdu_list[i].ul_cqi_information);
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->slot,
|
||||
UL_info->cqi_ind.cqi_pdu_list[i].rx_ue_information.rnti,
|
||||
&UL_info->cqi_ind.cqi_pdu_list[i].cqi_indication_rel9,
|
||||
UL_info->cqi_ind.cqi_raw_pdu_list[i].pdu,
|
||||
&UL_info->cqi_ind.cqi_pdu_list[i].ul_cqi_information);
|
||||
|
||||
UL_info->cqi_ind.number_of_cqis=0;
|
||||
}
|
||||
}
|
||||
|
||||
void handle_nr_harq(NR_UL_IND_t *UL_info) {
|
||||
|
||||
if (nfapi_mode == 1 && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) // PNF
|
||||
{
|
||||
if (nfapi_mode == 1 && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) { // PNF
|
||||
//LOG_D(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
|
||||
|
||||
int retval = oai_nfapi_harq_indication(&UL_info->harq_ind);
|
||||
|
||||
if (retval!=0)
|
||||
{
|
||||
if (retval!=0) {
|
||||
LOG_E(PHY, "Failed to encode NFAPI HARQ_IND retval:%d\n", retval);
|
||||
}
|
||||
|
||||
UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0;i<UL_info->harq_ind.harq_indication_body.number_of_harqs;i++)
|
||||
} else {
|
||||
for (int i=0; i<UL_info->harq_ind.harq_indication_body.number_of_harqs; i++)
|
||||
harq_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->harq_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->harq_ind.sfn_sf),
|
||||
&UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->harq_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->harq_ind.sfn_sf),
|
||||
&UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
|
||||
|
||||
UL_info->harq_ind.harq_indication_body.number_of_harqs=0;
|
||||
}
|
||||
}
|
||||
|
||||
void handle_nr_ulsch(NR_UL_IND_t *UL_info) {
|
||||
|
||||
if(nfapi_mode == 1)
|
||||
{
|
||||
if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0)
|
||||
{
|
||||
if(nfapi_mode == 1) {
|
||||
if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0) {
|
||||
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
|
||||
|
||||
oai_nfapi_crc_indication(&UL_info->crc_ind);
|
||||
|
||||
UL_info->crc_ind.crc_indication_body.number_of_crcs = 0;
|
||||
}
|
||||
|
||||
if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0)
|
||||
{
|
||||
if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0) {
|
||||
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
|
||||
oai_nfapi_rx_ind(&UL_info->rx_ind);
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0 && UL_info->crc_ind.crc_indication_body.number_of_crcs>0) {
|
||||
for (int i=0;i<UL_info->rx_ind.rx_indication_body.number_of_pdus;i++) {
|
||||
for (int j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++) {
|
||||
for (int i=0; i<UL_info->rx_ind.rx_indication_body.number_of_pdus; i++) {
|
||||
for (int j=0; j<UL_info->crc_ind.crc_indication_body.number_of_crcs; j++) {
|
||||
// find crc_indication j corresponding rx_indication i
|
||||
LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n", j, UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i, UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
|
||||
LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n", j,
|
||||
UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i, UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
|
||||
|
||||
if (UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti ==
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti) {
|
||||
LOG_D(PHY, "UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d\n", j, UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
|
||||
|
||||
if (UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag == 1) { // CRC error indication
|
||||
LOG_D(MAC,"Frame %d, Slot %d Calling rx_sdu (CRC error) \n",UL_info->frame,UL_info->slot);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
(uint8_t *)NULL,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
}
|
||||
else {
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
(uint8_t *)NULL,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
} else {
|
||||
LOG_D(MAC,"Frame %d, Slot %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->slot);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].data,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].data,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
}
|
||||
|
||||
break;
|
||||
} //if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti ==
|
||||
|
||||
// UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
|
||||
} // for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
|
||||
} // for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
|
||||
|
||||
UL_info->crc_ind.crc_indication_body.number_of_crcs=0;
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
|
||||
} // UL_info->rx_ind.rx_indication_body.number_of_pdus>0 && UL_info->slot && UL_info->crc_ind.crc_indication_body.number_of_crcs>0
|
||||
else if (UL_info->rx_ind.rx_indication_body.number_of_pdus!=0 || UL_info->crc_ind.crc_indication_body.number_of_crcs!=0) {
|
||||
LOG_E(PHY,"hoping not to have mis-match between CRC ind and RX ind - hopefully the missing message is coming shortly rx_ind:%d(SFN/SF:%05d) crc_ind:%d(SFN/SF:%05d) UL_info(SFN/SF):%04d%d\n",
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf),
|
||||
UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf),
|
||||
UL_info->frame, UL_info->slot);
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf),
|
||||
UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf),
|
||||
UL_info->frame, UL_info->slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NR_UL_indication(NR_UL_IND_t *UL_info)
|
||||
{
|
||||
void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
||||
AssertFatal(UL_info!=NULL,"UL_INFO is null\n");
|
||||
|
||||
#ifdef DUMP_FAPI
|
||||
dump_ul(UL_info);
|
||||
#endif
|
||||
|
||||
module_id_t module_id = UL_info->module_id;
|
||||
int CC_id = UL_info->CC_id;
|
||||
NR_Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id];
|
||||
NR_IF_Module_t *ifi = if_inst[module_id];
|
||||
gNB_MAC_INST *mac = RC.nrmac[module_id];
|
||||
|
||||
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
|
||||
UL_info->frame,UL_info->slot,
|
||||
module_id,CC_id,
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis,
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
|
||||
if (nfapi_mode != 1)
|
||||
{
|
||||
if (nfapi_mode != 1) {
|
||||
if (ifi->CC_mask==0) {
|
||||
ifi->current_frame = UL_info->frame;
|
||||
ifi->current_slot = UL_info->slot;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
AssertFatal(UL_info->frame != ifi->current_frame,"CC_mask %x is not full and frame has changed\n",ifi->CC_mask);
|
||||
AssertFatal(UL_info->slot != ifi->current_slot,"CC_mask %x is not full and slot has changed\n",ifi->CC_mask);
|
||||
}
|
||||
|
||||
ifi->CC_mask |= (1<<CC_id);
|
||||
}
|
||||
|
||||
// clear DL/UL info for new scheduling round
|
||||
clear_nr_nfapi_information(mac,CC_id,UL_info->frame,UL_info->slot);
|
||||
|
||||
handle_nr_rach(UL_info);
|
||||
|
||||
handle_nr_sr(UL_info);
|
||||
|
||||
handle_nr_cqi(UL_info);
|
||||
|
||||
handle_nr_harq(UL_info);
|
||||
|
||||
// clear HI prior to handling ULSCH
|
||||
mac->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_hi = 0;
|
||||
|
||||
handle_nr_ulsch(UL_info);
|
||||
|
||||
if (nfapi_mode != 1)
|
||||
{
|
||||
if (nfapi_mode != 1) {
|
||||
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
|
||||
/*
|
||||
eNB_dlsch_ulsch_scheduler(module_id,
|
||||
@@ -309,20 +269,18 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
|
||||
(UL_info->slot+sf_ahead)%10);
|
||||
*/
|
||||
nfapi_nr_config_request_t *cfg = &mac->config[CC_id];
|
||||
int spf = get_spf(cfg);
|
||||
|
||||
int spf = get_spf(cfg);
|
||||
gNB_dlsch_ulsch_scheduler(module_id,
|
||||
(UL_info->frame+((UL_info->slot>(spf-1-sf_ahead))?1:0)) % 1024,
|
||||
(UL_info->slot+sf_ahead)%spf);
|
||||
|
||||
(UL_info->frame+((UL_info->slot>(spf-1-sf_ahead))?1:0)) % 1024,
|
||||
(UL_info->slot+sf_ahead)%spf);
|
||||
ifi->CC_mask = 0;
|
||||
|
||||
sched_info->module_id = module_id;
|
||||
sched_info->CC_id = CC_id;
|
||||
sched_info->frame = (UL_info->frame + ((UL_info->slot>(spf-1-sf_ahead)) ? 1 : 0)) % 1024;
|
||||
sched_info->slot = (UL_info->slot+sf_ahead)%spf;
|
||||
sched_info->DL_req = &mac->DL_req[CC_id];
|
||||
sched_info->HI_DCI0_req = &mac->HI_DCI0_req[CC_id];
|
||||
|
||||
if ((mac->common_channels[CC_id].tdd_Config==NULL) ||
|
||||
(is_nr_UL_slot(&mac->common_channels[CC_id],(sched_info->slot+sf_ahead)%spf)>0))
|
||||
sched_info->UL_req = &mac->UL_req[CC_id];
|
||||
@@ -330,13 +288,11 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
|
||||
sched_info->UL_req = NULL;
|
||||
|
||||
sched_info->TX_req = &mac->TX_req[CC_id];
|
||||
|
||||
#ifdef DUMP_FAPI
|
||||
dump_dl(sched_info);
|
||||
#endif
|
||||
|
||||
if (ifi->NR_Schedule_response)
|
||||
{
|
||||
if (ifi->NR_Schedule_response) {
|
||||
AssertFatal(ifi->NR_Schedule_response!=NULL,
|
||||
"nr_schedule_response is null (mod %d, cc %d)\n",
|
||||
module_id,
|
||||
@@ -349,21 +305,18 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
|
||||
}
|
||||
}
|
||||
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id)
|
||||
{
|
||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {
|
||||
AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
|
||||
|
||||
LOG_D(PHY,"Installing callbacks for IF_Module - UL_indication\n");
|
||||
|
||||
if (if_inst[Mod_id]==NULL) {
|
||||
if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t));
|
||||
memset((void*)if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
|
||||
|
||||
if_inst[Mod_id] = (NR_IF_Module_t *)malloc(sizeof(NR_IF_Module_t));
|
||||
memset((void *)if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
|
||||
if_inst[Mod_id]->CC_mask=0;
|
||||
if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
|
||||
|
||||
AssertFatal(pthread_mutex_init(&if_inst[Mod_id]->if_mutex,NULL)==0,
|
||||
"allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
|
||||
"allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
|
||||
}
|
||||
|
||||
return if_inst[Mod_id];
|
||||
}
|
||||
|
||||
@@ -50,12 +50,12 @@
|
||||
#define MAX_NUM_RACH_IND 100
|
||||
#define MAX_NUM_SRS_IND 100
|
||||
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// slot
|
||||
slot_t slot;
|
||||
@@ -75,10 +75,8 @@ typedef struct{
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
#endif
|
||||
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
@@ -91,9 +89,9 @@ typedef struct{
|
||||
// Downlink slot P7
|
||||
|
||||
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
uint8_t CC_id;
|
||||
/// frame
|
||||
@@ -111,16 +109,16 @@ typedef struct{
|
||||
} NR_Sched_Rsp_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t Mod_id;
|
||||
int CC_id;
|
||||
nfapi_nr_config_request_t *cfg;
|
||||
uint8_t Mod_id;
|
||||
int CC_id;
|
||||
nfapi_nr_config_request_t *cfg;
|
||||
} NR_PHY_Config_t;
|
||||
|
||||
typedef struct NR_IF_Module_s{
|
||||
//define the function pointer
|
||||
typedef struct NR_IF_Module_s {
|
||||
//define the function pointer
|
||||
void (*NR_UL_indication)(NR_UL_IND_t *UL_INFO);
|
||||
void (*NR_Schedule_response)(NR_Sched_Rsp_t *Sched_INFO);
|
||||
void (*NR_PHY_config_req)(NR_PHY_Config_t* config_INFO);
|
||||
void (*NR_PHY_config_req)(NR_PHY_Config_t *config_INFO);
|
||||
uint32_t CC_mask;
|
||||
uint16_t current_frame;
|
||||
uint8_t current_slot;
|
||||
|
||||
@@ -22,48 +22,40 @@ extern UL_RCC_IND_t UL_RCC_INFO;
|
||||
uint16_t frame_cnt=0;
|
||||
void handle_rach(UL_IND_t *UL_info) {
|
||||
int i;
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
|
||||
if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_RCC_INFO.rach_ind[j].sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
||||
UL_RCC_INFO.rach_ind[j].header.message_id = 0;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
|
||||
AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
|
||||
if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles>0) {
|
||||
AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_RCC_INFO.rach_ind[j].sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
||||
);
|
||||
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
||||
UL_RCC_INFO.rach_ind[j].header.message_id = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
|
||||
AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
|
||||
AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
|
||||
@@ -86,8 +78,6 @@ void handle_rach(UL_IND_t *UL_info) {
|
||||
|
||||
UL_info->rach_ind_br.rach_indication_body.number_of_preambles=0;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void handle_sr(UL_IND_t *UL_info) {
|
||||
@@ -97,17 +87,18 @@ void handle_sr(UL_IND_t *UL_info) {
|
||||
if (UL_info->sr_ind.sr_indication_body.number_of_srs>0) {
|
||||
oai_nfapi_sr_indication(&UL_info->sr_ind);
|
||||
}
|
||||
} else if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
|
||||
if(UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs > 0){
|
||||
for (i=0;i<UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs;i++){
|
||||
} else if(NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
|
||||
if(UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs > 0) {
|
||||
for (i=0; i<UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs; i++) {
|
||||
SR_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.sr_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.sr_ind[j].sfn_sf),
|
||||
UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.sr_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.sr_ind[j].sfn_sf),
|
||||
UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
|
||||
}
|
||||
|
||||
free(UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list);
|
||||
UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs=0;
|
||||
UL_RCC_INFO.sr_ind[j].header.message_id = 0;
|
||||
@@ -134,14 +125,13 @@ void handle_cqi(UL_IND_t *UL_info) {
|
||||
LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.cqi_indication_body.number_of_cqis);
|
||||
UL_info->cqi_ind.header.message_id = NFAPI_RX_CQI_INDICATION;
|
||||
UL_info->cqi_ind.sfn_sf = UL_info->frame<<4 | UL_info->subframe;
|
||||
|
||||
oai_nfapi_cqi_indication(&UL_info->cqi_ind);
|
||||
UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
|
||||
}
|
||||
} else if (NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
|
||||
if(UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis > 0){
|
||||
for (i=0;i<UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis;i++){
|
||||
for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
|
||||
if(UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis > 0) {
|
||||
for (i=0; i<UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis; i++) {
|
||||
cqi_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.cqi_ind[j].sfn_sf),
|
||||
@@ -159,15 +149,15 @@ void handle_cqi(UL_IND_t *UL_info) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i=0;i<UL_info->cqi_ind.cqi_indication_body.number_of_cqis;i++)
|
||||
for (i=0; i<UL_info->cqi_ind.cqi_indication_body.number_of_cqis; i++)
|
||||
cqi_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->cqi_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->cqi_ind.sfn_sf),
|
||||
UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti,
|
||||
&UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].cqi_indication_rel9,
|
||||
UL_info->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[i].pdu,
|
||||
&UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].ul_cqi_information);
|
||||
NFAPI_SFNSF2SFN(UL_info->cqi_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->cqi_ind.sfn_sf),
|
||||
UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti,
|
||||
&UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].cqi_indication_rel9,
|
||||
UL_info->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[i].pdu,
|
||||
&UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].ul_cqi_information);
|
||||
|
||||
UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
|
||||
}
|
||||
@@ -183,15 +173,15 @@ void handle_harq(UL_IND_t *UL_info) {
|
||||
}
|
||||
|
||||
UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
|
||||
}else if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
|
||||
if(UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs > 0){
|
||||
for (int i=0;i<UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs;i++){
|
||||
} else if(NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
|
||||
if(UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs > 0) {
|
||||
for (int i=0; i<UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs; i++) {
|
||||
harq_indication(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.harq_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.harq_ind[j].sfn_sf),
|
||||
&UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list[i]);
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.harq_ind[j].sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.harq_ind[j].sfn_sf),
|
||||
&UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list[i]);
|
||||
}
|
||||
|
||||
free(UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list);
|
||||
@@ -226,48 +216,52 @@ void handle_ulsch(UL_IND_t *UL_info) {
|
||||
oai_nfapi_rx_ind(&UL_info->rx_ind);
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
|
||||
}
|
||||
} else if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||
for(uint8_t k = 0;k < NUM_NFPAI_SUBFRAME;k++){
|
||||
if((UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus>0) && (UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs>0)){
|
||||
for (i=0;i<UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus;i++) {
|
||||
for (j=0;j<UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs;j++) {
|
||||
} else if(NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
for(uint8_t k = 0; k < NUM_NFPAI_SUBFRAME; k++) {
|
||||
if((UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus>0) && (UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs>0)) {
|
||||
for (i=0; i<UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus; i++) {
|
||||
for (j=0; j<UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs; j++) {
|
||||
// find crc_indication j corresponding rx_indication i
|
||||
LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n",
|
||||
j,UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i,UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
|
||||
j,UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i,UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
|
||||
|
||||
if (UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti == UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti) {
|
||||
LOG_D(PHY, "UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d\n",
|
||||
j, UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
|
||||
j, UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
|
||||
|
||||
if (UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag == 1) { // CRC error indication
|
||||
LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC error) \n",UL_info->frame,UL_info->subframe);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
(uint8_t *)NULL,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
(uint8_t *)NULL,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
} else {
|
||||
LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->subframe);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
}
|
||||
else {
|
||||
LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->subframe);
|
||||
rx_sdu(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
}
|
||||
if(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data != NULL){
|
||||
|
||||
if(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data != NULL) {
|
||||
free(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data);
|
||||
}
|
||||
|
||||
break;
|
||||
} //if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti == UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
|
||||
} // for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
|
||||
} // for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
|
||||
|
||||
free(UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list);
|
||||
free(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list);
|
||||
UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs = 0;
|
||||
@@ -699,11 +693,11 @@ void UL_indication(UL_IND_t *UL_info) {
|
||||
Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id];
|
||||
IF_Module_t *ifi = if_inst[module_id];
|
||||
eNB_MAC_INST *mac = RC.mac[module_id];
|
||||
|
||||
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
|
||||
UL_info->frame,UL_info->subframe,
|
||||
module_id,CC_id,
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs,
|
||||
UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
|
||||
if(UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0)
|
||||
frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big
|
||||
@@ -729,7 +723,6 @@ void UL_indication(UL_IND_t *UL_info) {
|
||||
handle_sr(UL_info);
|
||||
handle_cqi(UL_info);
|
||||
handle_harq(UL_info);
|
||||
|
||||
// clear HI prior to handling ULSCH
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_id], UL_info->subframe);
|
||||
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
#define MAX_NUM_RACH_IND 100
|
||||
#define MAX_NUM_SRS_IND 100
|
||||
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// subframe
|
||||
sub_frame_t subframe;
|
||||
@@ -75,12 +75,8 @@ typedef struct{
|
||||
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
#endif
|
||||
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
|
||||
@@ -91,7 +87,7 @@ typedef struct{
|
||||
|
||||
// Downlink subframe P7
|
||||
#define NUM_NFPAI_SUBFRAME 5
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
/// harq indication list
|
||||
nfapi_harq_indication_t harq_ind[NUM_NFPAI_SUBFRAME];
|
||||
|
||||
@@ -112,9 +108,9 @@ typedef struct{
|
||||
|
||||
} UL_RCC_IND_t;
|
||||
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
uint8_t CC_id;
|
||||
/// frame
|
||||
@@ -131,24 +127,24 @@ typedef struct{
|
||||
nfapi_tx_request_t *TX_req;
|
||||
/// Pointers to ue_release
|
||||
nfapi_ue_release_request_t *UE_release_req;
|
||||
}Sched_Rsp_t;
|
||||
} Sched_Rsp_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t Mod_id;
|
||||
int CC_id;
|
||||
nfapi_config_request_t *cfg;
|
||||
}PHY_Config_t;
|
||||
uint8_t Mod_id;
|
||||
int CC_id;
|
||||
nfapi_config_request_t *cfg;
|
||||
} PHY_Config_t;
|
||||
|
||||
typedef struct IF_Module_s{
|
||||
//define the function pointer
|
||||
typedef struct IF_Module_s {
|
||||
//define the function pointer
|
||||
void (*UL_indication)(UL_IND_t *UL_INFO);
|
||||
void (*schedule_response)(Sched_Rsp_t *Sched_INFO);
|
||||
void (*PHY_config_req)(PHY_Config_t* config_INFO);
|
||||
void (*PHY_config_req)(PHY_Config_t *config_INFO);
|
||||
uint32_t CC_mask;
|
||||
uint16_t current_frame;
|
||||
uint8_t current_subframe;
|
||||
pthread_mutex_t if_mutex;
|
||||
}IF_Module_t;
|
||||
} IF_Module_t;
|
||||
|
||||
// These mutex is used for multiple UEs L2 FAPI simulator.
|
||||
// Each UEs set these value in UL and UL_INFO is shared in all UE's thread.
|
||||
@@ -159,7 +155,7 @@ typedef struct {
|
||||
pthread_mutex_t harq_mutex;
|
||||
pthread_mutex_t cqi_mutex;
|
||||
pthread_mutex_t rach_mutex;
|
||||
}FILL_UL_INFO_MUTEX_t;
|
||||
} FILL_UL_INFO_MUTEX_t;
|
||||
|
||||
/*Initial */
|
||||
IF_Module_t *IF_Module_init(int Mod_id);
|
||||
|
||||
@@ -78,8 +78,8 @@ mac_rrc_data_req(
|
||||
carrier = &rrc->carrier[0];
|
||||
mib = &carrier->mib;
|
||||
|
||||
if(Srb_id == BCCH_SI_MBMS){
|
||||
if (frameP%4 == 0){
|
||||
if(Srb_id == BCCH_SI_MBMS) {
|
||||
if (frameP%4 == 0) {
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
|
||||
@@ -162,13 +162,12 @@ mac_rrc_data_req(
|
||||
}
|
||||
|
||||
if( (Srb_id & RAB_OFFSET ) == CCCH) {
|
||||
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
|
||||
|
||||
if (ue_context_p == NULL) return(0);
|
||||
|
||||
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
|
||||
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
|
||||
|
||||
Srb_info=&ue_p->Srb0;
|
||||
|
||||
// check if data is there for MAC
|
||||
@@ -197,8 +196,6 @@ mac_rrc_data_req(
|
||||
return (Sdu_size);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if((Srb_id & RAB_OFFSET) == MCCH) {
|
||||
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
|
||||
return 0; // this parameter is set in function init_mcch in rrc_eNB.c
|
||||
@@ -221,9 +218,6 @@ mac_rrc_data_req(
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
}
|
||||
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR) {
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
|
||||
@@ -238,7 +232,6 @@ mac_rrc_data_req(
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23_BR);
|
||||
}
|
||||
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -255,31 +248,25 @@ mac_rrc_data_ind(
|
||||
const rb_id_t srb_idP,
|
||||
const uint8_t *sduP,
|
||||
const sdu_size_t sdu_lenP,
|
||||
const uint8_t mbsfn_sync_areaP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, const boolean_t brOption
|
||||
#endif
|
||||
|
||||
const uint8_t mbsfn_sync_areaP,
|
||||
const boolean_t brOption
|
||||
)
|
||||
//--------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
|
||||
if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) {
|
||||
LOG_W(RRC,"[DU %d][RAPROC] Received SDU for CCCH on SRB %d length %d for UE id %d RNTI %x \n",
|
||||
module_idP, srb_idP, sdu_lenP, UE_id, rntiP);
|
||||
|
||||
module_idP, srb_idP, sdu_lenP, UE_id, rntiP);
|
||||
/* do ITTI message */
|
||||
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
|
||||
module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
rntiP,
|
||||
rntiP,
|
||||
sduP,
|
||||
sdu_lenP
|
||||
);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
//SRB_INFO *Srb_info;
|
||||
protocol_ctxt_t ctxt;
|
||||
@@ -293,9 +280,8 @@ mac_rrc_data_ind(
|
||||
|
||||
if((srb_idP & RAB_OFFSET) == CCCH) {
|
||||
LOG_D(RRC, "[eNB %d] Received SDU for CCCH on SRB %d\n", module_idP, srb_idP);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ctxt.brOption = brOption;
|
||||
#endif
|
||||
|
||||
/*Srb_info = &RC.rrc[module_idP]->carrier[CC_id].Srb0;
|
||||
if (sdu_lenP > 0) {
|
||||
memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
|
||||
@@ -362,10 +348,12 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
|
||||
} else {
|
||||
LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
|
||||
}
|
||||
|
||||
if (flexran_agent_get_rrc_xface(Mod_instP)) {
|
||||
flexran_agent_get_rrc_xface(Mod_instP)->flexran_agent_notify_ue_state_change(Mod_instP,
|
||||
rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
|
||||
rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
|
||||
}
|
||||
|
||||
//rrc_mac_remove_ue(Mod_instP,rntiP);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ mac_rrc_data_req_ue(
|
||||
//--------------------------------------------------------------------------
|
||||
{
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(RRC,"[UE %d] Frame %d Filling SL DISCOVERY SRB_ID %d\n",Mod_idP,frameP,Srb_id);
|
||||
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
|
||||
|
||||
@@ -73,7 +72,6 @@ mac_rrc_data_req_ue(
|
||||
return(Ret_size);
|
||||
}
|
||||
|
||||
#endif
|
||||
LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
|
||||
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);
|
||||
|
||||
@@ -138,39 +136,35 @@ mac_rrc_data_ind_ue(
|
||||
*/
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(srb_idP == BCCH_SI_MBMS) {
|
||||
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
|
||||
|
||||
if(srb_idP == BCCH_SI_MBMS) {
|
||||
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d 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);
|
||||
{
|
||||
MessageDef *message_p;
|
||||
int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
|
||||
|
||||
if (sdu_lenP > msg_sdu_size) {
|
||||
LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
|
||||
sdu_size = msg_sdu_size;
|
||||
} else {
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
|
||||
memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame = frameP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size = sdu_size;
|
||||
memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq = 30 /* TODO change phy to report rspq */;
|
||||
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);
|
||||
if (sdu_lenP > msg_sdu_size) {
|
||||
LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
|
||||
sdu_size = msg_sdu_size;
|
||||
} else {
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
#else
|
||||
decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
|
||||
#endif
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
|
||||
memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame = frameP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size = sdu_size;
|
||||
memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq = 30 /* TODO change phy to report rspq */;
|
||||
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 %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
|
||||
@@ -242,8 +236,6 @@ mac_rrc_data_ind_ue(
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if ((srb_idP & RAB_OFFSET) == MCCH) {
|
||||
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n",
|
||||
module_idP,frameP, mbsfn_sync_areaP, srb_idP & RAB_OFFSET,eNB_indexP);
|
||||
@@ -278,7 +270,6 @@ mac_rrc_data_ind_ue(
|
||||
decode_SL_Discovery_Message(&ctxt, eNB_indexP, sduP, sdu_lenP);
|
||||
}
|
||||
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -343,10 +334,7 @@ rrc_data_req_ue(
|
||||
confirmP,
|
||||
sdu_sizeP,
|
||||
buffer_pP,
|
||||
modeP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
modeP,NULL, NULL
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
+684
-1032
File diff suppressed because it is too large
Load Diff
@@ -64,14 +64,9 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
|
||||
@param phich_duration PHICH duration parameter
|
||||
@param frame radio frame number
|
||||
@return size of encoded bit stream in bytes*/
|
||||
uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
, uint32_t schedulingInfoSIB1
|
||||
#endif
|
||||
);
|
||||
uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame, uint32_t schedulingInfoSIB1);
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
\brief Generate configuration for MIB (eNB).
|
||||
@param carrier pointer to Carrier information
|
||||
@param N_RB_DL Number of downlink PRBs
|
||||
@@ -93,16 +88,13 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *c
|
||||
@param carrier pointer to Carrier information
|
||||
@param Mod_id Instance of eNB
|
||||
@param Component carrier Component carrier to configure
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@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
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
, BOOLEAN_t brOption
|
||||
#endif
|
||||
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
|
||||
,RrcConfigurationReq *configuration
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -114,7 +106,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@return size of encoded bit stream in bytes*/
|
||||
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -129,11 +121,7 @@ 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
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
, BOOLEAN_t brOption
|
||||
#endif
|
||||
uint8_t do_SIB23(uint8_t Mod_id,int CC_id, BOOLEAN_t brOption
|
||||
#if defined(ENABLE_ITTI)
|
||||
, RrcConfigurationReq *configuration
|
||||
#endif
|
||||
@@ -196,47 +184,46 @@ do_RRCConnectionSetup(
|
||||
LTE_SRB_ToAddModList_t **SRB_configList,
|
||||
struct LTE_PhysicalConfigDedicated **physicalConfigDedicated
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
uint8_t
|
||||
do_RRCConnectionSetup_BR(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rrc_eNB_ue_context_t* const ue_context_pP,
|
||||
int CC_id,
|
||||
uint8_t* const buffer,
|
||||
const uint8_t transmission_mode,
|
||||
const uint8_t Transaction_id,
|
||||
LTE_SRB_ToAddModList_t** SRB_configList,
|
||||
struct LTE_PhysicalConfigDedicated** physicalConfigDedicated
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
int CC_id,
|
||||
uint8_t *const buffer,
|
||||
const uint8_t transmission_mode,
|
||||
const uint8_t Transaction_id,
|
||||
LTE_SRB_ToAddModList_t **SRB_configList,
|
||||
struct LTE_PhysicalConfigDedicated **physicalConfigDedicated
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
|
||||
uint16_t
|
||||
do_RRCConnectionReconfiguration_BR(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
LTE_SRB_ToAddModList_t *SRB_list,
|
||||
LTE_DRB_ToAddModList_t *DRB_list,
|
||||
LTE_DRB_ToReleaseList_t *DRB_list2,
|
||||
struct LTE_SPS_Config *sps_Config,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_MeasObjectToAddModList_t *MeasObj_list,
|
||||
LTE_ReportConfigToAddModList_t *ReportConfig_list,
|
||||
LTE_QuantityConfig_t *quantityConfig,
|
||||
LTE_MeasIdToAddModList_t *MeasId_list,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_MobilityControlInfo_t *mobilityInfo,
|
||||
struct LTE_MeasConfig__speedStatePars *speedStatePars,
|
||||
LTE_RSRP_Range_t *rsrp,
|
||||
LTE_C_RNTI_t *cba_rnti,
|
||||
struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
|
||||
LTE_SCellToAddMod_r10_t *SCell_config
|
||||
);
|
||||
#endif
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
LTE_SRB_ToAddModList_t *SRB_list,
|
||||
LTE_DRB_ToAddModList_t *DRB_list,
|
||||
LTE_DRB_ToReleaseList_t *DRB_list2,
|
||||
struct LTE_SPS_Config *sps_Config,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_MeasObjectToAddModList_t *MeasObj_list,
|
||||
LTE_ReportConfigToAddModList_t *ReportConfig_list,
|
||||
LTE_QuantityConfig_t *quantityConfig,
|
||||
LTE_MeasIdToAddModList_t *MeasId_list,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_MobilityControlInfo_t *mobilityInfo,
|
||||
struct LTE_MeasConfig__speedStatePars *speedStatePars,
|
||||
LTE_RSRP_Range_t *rsrp,
|
||||
LTE_C_RNTI_t *cba_rnti,
|
||||
struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
|
||||
LTE_SCellToAddMod_r10_t *SCell_config
|
||||
);
|
||||
/**
|
||||
\brief Generate an RRCConnectionReconfiguration DL-DCCH-Message (eNB). This routine configures SRBToAddMod (SRB2) and one DRBToAddMod
|
||||
(DRB3). PhysicalConfigDedicated is not updated.
|
||||
@@ -261,9 +248,9 @@ do_RRCConnectionReconfiguration_BR(
|
||||
|
||||
uint16_t
|
||||
do_RRCConnectionReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
LTE_SRB_ToAddModList_t *SRB_list,
|
||||
LTE_DRB_ToAddModList_t *DRB_list,
|
||||
LTE_DRB_ToReleaseList_t *DRB_list2,
|
||||
@@ -282,10 +269,8 @@ do_RRCConnectionReconfiguration(
|
||||
LTE_C_RNTI_t *cba_rnti,
|
||||
struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
|
||||
LTE_SL_CommConfig_r12_t *sl_CommConfig,
|
||||
LTE_SL_DiscConfig_r12_t *sl_DiscConfig
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
, LTE_SCellToAddMod_r10_t *SCell_config
|
||||
#endif
|
||||
LTE_SL_DiscConfig_r12_t *sl_DiscConfig,
|
||||
LTE_SCellToAddMod_r10_t *SCell_config
|
||||
);
|
||||
/**
|
||||
\brief Generate an RRCConnectionReestablishment DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB2) and
|
||||
@@ -346,7 +331,6 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_
|
||||
* @returns Size of encoded bit stream in bytes
|
||||
*/
|
||||
uint8_t do_MCCHMessage(uint8_t *buffer);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/***
|
||||
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
|
||||
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
|
||||
@@ -357,7 +341,6 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
uint8_t *buffer,
|
||||
LTE_MCCH_Message_t *mcch_message,
|
||||
LTE_MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
|
||||
#endif
|
||||
|
||||
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t);
|
||||
|
||||
|
||||
@@ -110,9 +110,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
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;
|
||||
@@ -475,79 +473,10 @@ typedef struct UE_RRC_INST_NB_IoT_s {
|
||||
SRB_INFO_TABLE_ENTRY_NB_IoT Srb1[NB_CNX_UE];
|
||||
SRB_INFO_TABLE_ENTRY_NB_IoT Srb2[NB_CNX_UE];
|
||||
HANDOVER_INFO_UE_NB_IoT 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().
|
||||
*/
|
||||
LTE_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 (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
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 //
|
||||
CipheringAlgorithm_r12_t ciphering_algorithm;
|
||||
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
*/
|
||||
} UE_RRC_INST_NB_IoT;
|
||||
|
||||
|
||||
|
||||
+245
-1148
File diff suppressed because it is too large
Load Diff
+8
-121
@@ -184,20 +184,15 @@ void *send_UE_status_notification(void *);
|
||||
#include "LTE_BCCH-DL-SCH-Message.h"
|
||||
#include "LTE_SBCCH-SL-BCH-MessageType.h"
|
||||
#include "LTE_BCCH-BCH-Message.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MCCH-Message.h"
|
||||
#include "LTE_MBSFNAreaConfiguration-r9.h"
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#include "LTE_MCCH-Message.h"
|
||||
#include "LTE_MBSFNAreaConfiguration-r9.h"
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#include "LTE_AS-Config.h"
|
||||
#include "LTE_AS-Context.h"
|
||||
#include "LTE_UE-EUTRA-Capability.h"
|
||||
#include "LTE_MeasResults.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 0, 0))
|
||||
#include "LTE_SidelinkUEInformation-r12.h"
|
||||
#endif
|
||||
#include "LTE_SidelinkUEInformation-r12.h"
|
||||
|
||||
|
||||
/* for ImsiMobileIdentity_t */
|
||||
#include "MobileIdentity.h"
|
||||
@@ -207,68 +202,7 @@ void *send_UE_status_notification(void *);
|
||||
/* correct Rel(8|10)/Rel14 differences
|
||||
* the code is in favor of Rel14, those defines do the translation
|
||||
*/
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
#define CipheringAlgorithm_r12_t e_SecurityAlgorithmConfig__cipheringAlgorithm
|
||||
#define CipheringAlgorithm_r12_eea0 SecurityAlgorithmConfig__cipheringAlgorithm_eea0
|
||||
#define CipheringAlgorithm_r12_eea1 SecurityAlgorithmConfig__cipheringAlgorithm_eea1
|
||||
#define CipheringAlgorithm_r12_eea2 SecurityAlgorithmConfig__cipheringAlgorithm_eea2
|
||||
#define CipheringAlgorithm_r12_spare1 SecurityAlgorithmConfig__cipheringAlgorithm_spare1
|
||||
#define Alpha_r12_al0 UplinkPowerControlCommon__alpha_al0
|
||||
#define Alpha_r12_al04 UplinkPowerControlCommon__alpha_al04
|
||||
#define Alpha_r12_al05 UplinkPowerControlCommon__alpha_al05
|
||||
#define Alpha_r12_al06 UplinkPowerControlCommon__alpha_al06
|
||||
#define Alpha_r12_al07 UplinkPowerControlCommon__alpha_al07
|
||||
#define Alpha_r12_al08 UplinkPowerControlCommon__alpha_al08
|
||||
#define Alpha_r12_al09 UplinkPowerControlCommon__alpha_al09
|
||||
#define Alpha_r12_al1 UplinkPowerControlCommon__alpha_al1
|
||||
#define PreambleTransMax_n3 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3
|
||||
#define PreambleTransMax_n4 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4
|
||||
#define PreambleTransMax_n5 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5
|
||||
#define PreambleTransMax_n6 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6
|
||||
#define PreambleTransMax_n7 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7
|
||||
#define PreambleTransMax_n8 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8
|
||||
#define PreambleTransMax_n10 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10
|
||||
#define PreambleTransMax_n20 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20
|
||||
#define PreambleTransMax_n50 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50
|
||||
#define PreambleTransMax_n100 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100
|
||||
#define PreambleTransMax_n200 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200
|
||||
#define PeriodicBSR_Timer_r12_sf5 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf5
|
||||
#define PeriodicBSR_Timer_r12_sf10 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf10
|
||||
#define PeriodicBSR_Timer_r12_sf16 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf16
|
||||
#define PeriodicBSR_Timer_r12_sf20 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf20
|
||||
#define PeriodicBSR_Timer_r12_sf32 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf32
|
||||
#define PeriodicBSR_Timer_r12_sf40 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf40
|
||||
#define PeriodicBSR_Timer_r12_sf64 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64
|
||||
#define PeriodicBSR_Timer_r12_sf80 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf80
|
||||
#define PeriodicBSR_Timer_r12_sf128 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf128
|
||||
#define PeriodicBSR_Timer_r12_sf160 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf160
|
||||
#define PeriodicBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf320
|
||||
#define PeriodicBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf640
|
||||
#define PeriodicBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf1280
|
||||
#define PeriodicBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf2560
|
||||
#define PeriodicBSR_Timer_r12_infinity MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#define RetxBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320
|
||||
#define RetxBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf640
|
||||
#define RetxBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf1280
|
||||
#define RetxBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560
|
||||
#define RetxBSR_Timer_r12_sf5120 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf5120
|
||||
#define RetxBSR_Timer_r12_sf10240 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240
|
||||
#endif
|
||||
|
||||
// This corrects something generated by asn1c which is different between Rel8 and Rel10
|
||||
#if (LTE_RRC_VERSION <= MAKE_VERSION(10, 0, 0))
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib4
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib5
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib6
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib7
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib8
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib9
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
|
||||
#endif
|
||||
|
||||
|
||||
#define NB_SIG_CNX_CH 1
|
||||
@@ -276,13 +210,6 @@ void *send_UE_status_notification(void *);
|
||||
#define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
|
||||
#define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
|
||||
|
||||
/*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
|
||||
#endif
|
||||
*/
|
||||
//#include "L3_rrc_defs.h"
|
||||
#ifndef NO_RRM
|
||||
#include "L3_rrc_interface.h"
|
||||
#include "rrc_rrm_msg.h"
|
||||
@@ -419,25 +346,16 @@ typedef struct UE_RRC_INFO_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t SIB1systemInfoValueTag_MBMS;
|
||||
uint32_t SIStatus_MBMS;
|
||||
uint32_t SIcnt_MBMS;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
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
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t SIwindowsize_MBMS; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
#endif
|
||||
|
||||
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
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint16_t SIperiod_MBMS; //!< Corresponds to the SIB1-MBMS si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120 TODO
|
||||
#endif
|
||||
unsigned short UE_index;
|
||||
uint32_t T300_active;
|
||||
uint32_t T300_cnt;
|
||||
@@ -621,9 +539,7 @@ typedef struct rrc_gummei_s {
|
||||
|
||||
typedef struct eNB_RRC_UE_s {
|
||||
uint8_t primaryCC_id;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t sCell_config[2];
|
||||
#endif
|
||||
LTE_SRB_ToAddModList_t *SRB_configList;
|
||||
LTE_SRB_ToAddModList_t *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
LTE_DRB_ToAddModList_t *DRB_configList;
|
||||
@@ -755,7 +671,6 @@ typedef struct {
|
||||
uint8_t sizeof_SIB1;
|
||||
uint8_t *SIB23;
|
||||
uint8_t sizeof_SIB23;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t *SIB1_BR;
|
||||
uint8_t sizeof_SIB1_BR;
|
||||
uint8_t *SIB23_BR;
|
||||
@@ -764,7 +679,6 @@ typedef struct {
|
||||
uint8_t sizeof_MIB_FeMBMS;
|
||||
uint8_t *SIB1_MBMS;
|
||||
uint8_t sizeof_SIB1_MBMS;
|
||||
#endif
|
||||
int physCellId;
|
||||
int Ncp;
|
||||
int p_eNB;
|
||||
@@ -780,23 +694,17 @@ typedef struct {
|
||||
LTE_BCCH_DL_SCH_Message_t *siblock1_DU;
|
||||
LTE_BCCH_DL_SCH_Message_t systemInformation;
|
||||
LTE_BCCH_DL_SCH_Message_t systemInformation_BR;
|
||||
// SystemInformation_t systemInformation;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
|
||||
#endif
|
||||
LTE_SystemInformationBlockType1_t *sib1;
|
||||
LTE_SystemInformationBlockType2_t *sib2;
|
||||
LTE_SystemInformationBlockType3_t *sib3;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType1_t *sib1_BR;
|
||||
LTE_SystemInformationBlockType2_t *sib2_BR;
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
|
||||
uint8_t FeMBMS_flag;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
uint8_t FeMBMS_flag;
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13;
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t num_mbsfn_sync_area;
|
||||
@@ -805,7 +713,6 @@ typedef struct {
|
||||
LTE_MCCH_Message_t mcch;
|
||||
LTE_MBSFNAreaConfiguration_r9_t *mcch_message;
|
||||
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
|
||||
#endif
|
||||
//TTN - SIB 18,19,21 for D2D
|
||||
LTE_SystemInformationBlockType18_r12_t *sib18;
|
||||
LTE_SystemInformationBlockType19_r12_t *sib19;
|
||||
@@ -816,7 +723,7 @@ typedef struct {
|
||||
uint32_t sizeof_paging[MAX_MOBILES_PER_ENB];
|
||||
} rrc_eNB_carrier_data_t;
|
||||
|
||||
|
||||
|
||||
typedef struct eNB_RRC_INST_s {
|
||||
/// southbound midhaul configuration
|
||||
ngran_node_t node_type;
|
||||
@@ -898,22 +805,16 @@ typedef struct UE_RRC_INST_s {
|
||||
uint8_t sizeof_SI[NB_CNX_UE];
|
||||
uint8_t SIB1Status[NB_CNX_UE];
|
||||
uint8_t SIStatus[NB_CNX_UE];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t *SIB1_MBMS[NB_CNX_UE];
|
||||
uint8_t sizeof_SIB1_MBMS[NB_CNX_UE];
|
||||
uint8_t *SI_MBMS[NB_CNX_UE];
|
||||
uint8_t sizeof_SI_MBMS[NB_CNX_UE];
|
||||
uint8_t SIB1Status_MBMS[NB_CNX_UE];
|
||||
uint8_t SIStatus_MBMS[NB_CNX_UE];
|
||||
#endif
|
||||
LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS[NB_CNX_UE];
|
||||
#endif
|
||||
LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformation_MBMS_r14_t *si_MBMS[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
#endif
|
||||
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE];
|
||||
@@ -925,7 +826,6 @@ typedef struct UE_RRC_INST_s {
|
||||
LTE_SystemInformationBlockType10_t *sib10[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType11_t *sib11[NB_CNX_UE];
|
||||
uint8_t *MIB;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//SIB18
|
||||
LTE_SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE];
|
||||
@@ -944,9 +844,6 @@ typedef struct UE_RRC_INST_s {
|
||||
uint32_t destinationList[MAX_NUM_DEST];
|
||||
//sl_discovery..
|
||||
SRB_INFO SL_Discovery[NB_CNX_UE];
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
|
||||
@@ -954,15 +851,8 @@ typedef struct UE_RRC_INST_s {
|
||||
LTE_MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS[NB_CNX_UE];
|
||||
uint8_t FeMBMS_flag;
|
||||
#endif
|
||||
#ifdef CBA
|
||||
uint8_t num_active_cba_groups;
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
#endif
|
||||
uint8_t FeMBMS_flag;
|
||||
uint8_t num_srb;
|
||||
struct LTE_SRB_ToAddMod *SRB1_config[NB_CNX_UE];
|
||||
struct LTE_SRB_ToAddMod *SRB2_config[NB_CNX_UE];
|
||||
@@ -994,11 +884,8 @@ typedef struct UE_RRC_INST_s {
|
||||
/* Used integrity/ciphering algorithms */
|
||||
LTE_CipheringAlgorithm_r12_t ciphering_algorithm;
|
||||
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Used for Sidelink Preconfiguration
|
||||
LTE_DRB_ToAddModList_t *DRB_configList;
|
||||
#endif
|
||||
} UE_RRC_INST;
|
||||
|
||||
typedef struct UE_PF_PO_s {
|
||||
|
||||
+938
-1513
File diff suppressed because it is too large
Load Diff
+131
-151
@@ -77,15 +77,8 @@ static const uint16_t S1AP_ENCRYPTION_EEA2_MASK = 0x4000;
|
||||
static const uint16_t S1AP_INTEGRITY_EIA1_MASK = 0x8000;
|
||||
static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
|
||||
#define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
|
||||
#else
|
||||
#ifdef EXMIMO_IOT
|
||||
#define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
|
||||
#else
|
||||
#define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
|
||||
#endif
|
||||
#endif
|
||||
#define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
|
||||
|
||||
|
||||
void extract_imsi(uint8_t *pdu_buf, uint32_t pdu_len, rrc_eNB_ue_context_t *ue_context_pP) {
|
||||
/* Process NAS message locally to get the IMSI */
|
||||
@@ -251,20 +244,23 @@ rrc_eNB_S1AP_get_ue_ids(
|
||||
ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p, eNB_ue_s1ap_id); // get s1ap_eNB_ue_context
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB instance %d] Couldn't find the eNB S1AP context\n",
|
||||
instance);
|
||||
instance);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ue_desc_p != NULL) {
|
||||
struct s1ap_eNB_ue_context_s *s1ap_ue_context_p = NULL;
|
||||
|
||||
if ((s1ap_ue_context_p = RB_REMOVE(s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head, ue_desc_p)) != NULL) {
|
||||
LOG_E(RRC, "Removed UE context eNB_ue_s1ap_id %u\n", s1ap_ue_context_p->eNB_ue_s1ap_id);
|
||||
s1ap_eNB_free_ue_context(s1ap_ue_context_p);
|
||||
} else {
|
||||
LOG_E(RRC, "Removing UE context eNB_ue_s1ap_id %u: did not find context\n",ue_desc_p->eNB_ue_s1ap_id);
|
||||
}
|
||||
|
||||
return NULL; //skip the operation below to avoid loop
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
|
||||
if (ue_desc_p->ue_initial_id != UE_INITIAL_ID_INVALID) {
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
|
||||
@@ -647,7 +643,7 @@ rrc_eNB_send_S1AP_UPLINK_NAS(
|
||||
== LTE_ULInformationTransfer_r8_IEs__dedicatedInfoType_PR_dedicatedInfoNAS)) {
|
||||
/* This message hold a dedicated info NAS payload, forward it to NAS */
|
||||
struct LTE_ULInformationTransfer_r8_IEs__dedicatedInfoType *dedicatedInfoType =
|
||||
&ulInformationTransfer->criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType;
|
||||
&ulInformationTransfer->criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType;
|
||||
uint32_t pdu_length;
|
||||
uint8_t *pdu_buffer;
|
||||
MessageDef *msg_p;
|
||||
@@ -944,7 +940,6 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp;
|
||||
uint8_t inde_list[NB_RB_MAX - 3]= {0};
|
||||
int ret;
|
||||
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
protocol_ctxt_t ctxt;
|
||||
ue_initial_id = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).ue_initial_id;
|
||||
@@ -986,11 +981,11 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
|
||||
create_tunnel_req.rnti = ue_context_p->ue_context.rnti; // warning put zero above
|
||||
// create_tunnel_req.num_tunnels = i;
|
||||
|
||||
ret = gtpv1u_create_s1u_tunnel(
|
||||
instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
|
||||
if ( ret != 0 ) {
|
||||
LOG_E(RRC,"rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_s1u_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti);
|
||||
ue_context_p->ue_context.ue_release_timer_s1 = 1;
|
||||
@@ -1053,32 +1048,32 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
|
||||
// in case, send the S1SP initial context response if it is not sent with the attach complete message
|
||||
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
|
||||
LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
|
||||
LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
|
||||
//if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){}
|
||||
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
|
||||
}
|
||||
/*
|
||||
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container = ue_p->Srb0.Tx_buffer.Payload;
|
||||
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication = 1;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc = 0;
|
||||
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
|
||||
LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
|
||||
|
||||
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container = ue_p->Srb0.Tx_buffer.Payload;
|
||||
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication = 1;
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc = 0;
|
||||
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
|
||||
LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
|
||||
|
||||
}
|
||||
*/
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -1204,12 +1199,10 @@ rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(
|
||||
void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(
|
||||
module_id_t enb_mod_idP,
|
||||
uint32_t eNB_ue_s1ap_id
|
||||
)
|
||||
{
|
||||
) {
|
||||
MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_S1AP_ENB, NULL, 0,
|
||||
"0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
|
||||
eNB_ue_s1ap_id);
|
||||
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
itti_send_msg_to_task(TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
|
||||
@@ -1276,7 +1269,6 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
|
||||
protocol_ctxt_t ctxt;
|
||||
uint8_t e_rab_done;
|
||||
int ret = 0;
|
||||
|
||||
ue_initial_id = S1AP_E_RAB_SETUP_REQ (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_E_RAB_SETUP_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
@@ -1340,9 +1332,10 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
|
||||
create_tunnel_req.num_tunnels = e_rab_done;
|
||||
// NN: not sure if we should create a new tunnel: need to check teid, etc.
|
||||
ret = gtpv1u_create_s1u_tunnel(
|
||||
instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
|
||||
if ( ret != 0 ) {
|
||||
LOG_E(RRC,"rrc_eNB_process_S1AP_E_RAB_SETUP_REQ : gtpv1u_create_s1u_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti);
|
||||
ue_context_p->ue_context.ue_release_timer_s1 = 1;
|
||||
@@ -1847,7 +1840,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
/* set T = min(Tc,Tue) */
|
||||
T = Tc < Tue ? Ttab[Tc] : Ttab[Tue];
|
||||
/* set pcch_nB = PCCH-Config->nB */
|
||||
pcch_nB = (uint32_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_nB;
|
||||
pcch_nB = (uint32_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_nB;
|
||||
|
||||
switch (pcch_nB) {
|
||||
case LTE_PCCH_Config__nB_fourT:
|
||||
@@ -1993,12 +1986,12 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
|
||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
||||
h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
|
||||
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
||||
rrc_ue_s1ap_ids_p);
|
||||
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
||||
rrc_ue_s1ap_ids_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(S1AP, "[eNB %d] Error while hashtable_insert in initial_id2_s1ap_ids ue_initial_id %u\n",
|
||||
ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
|
||||
ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
|
||||
}
|
||||
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
@@ -2011,8 +2004,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).security_capabilities.encryption_algorithms=ue_context_pP->ue_context.security_capabilities.encryption_algorithms;
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).security_capabilities.integrity_algorithms=ue_context_pP->ue_context.security_capabilities.integrity_algorithms;
|
||||
LOG_I (RRC,"Path switch request: nb nb_of_e_rabs %u status %u\n",
|
||||
ue_context_pP->ue_context.nb_of_e_rabs,
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status);
|
||||
ue_context_pP->ue_context.nb_of_e_rabs,
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status);
|
||||
memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
|
||||
|
||||
// the context for UE to be handovered is obtained through ho_req message
|
||||
@@ -2032,62 +2025,60 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
||||
create_tunnel_req.rnti = ue_context_pP->ue_context.rnti;
|
||||
create_tunnel_req.num_tunnels = e_rabs_done;
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
ctxt_pP->instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
ctxt_pP->instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||
ctxt_pP,
|
||||
&create_tunnel_resp,
|
||||
&inde_list[0]);
|
||||
ctxt_pP,
|
||||
&create_tunnel_resp,
|
||||
&inde_list[0]);
|
||||
|
||||
for (e_rab = 0; e_rab < e_rabs_done; e_rab++) {
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id = create_tunnel_resp.eps_bearer_id[e_rab];
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid = create_tunnel_resp.enb_S1u_teid[e_rab];
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr = create_tunnel_resp.enb_addr;
|
||||
LOG_I (RRC,"enb_gtp_addr (msg index %d, e_rab index %d, status %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
|
||||
e_rabs_done, e_rab, ue_context_pP->ue_context.e_rab[inde_list[e_rab]].status,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id = create_tunnel_resp.eps_bearer_id[e_rab];
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid = create_tunnel_resp.enb_S1u_teid[e_rab];
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr = create_tunnel_resp.enb_addr;
|
||||
LOG_I (RRC,"enb_gtp_addr (msg index %d, e_rab index %d, status %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
|
||||
e_rabs_done, e_rab, ue_context_pP->ue_context.e_rab[inde_list[e_rab]].status,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).nb_of_e_rabs,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[0],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[1],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[2],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[3]);
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[0],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[1],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[2],
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[3]);
|
||||
}
|
||||
|
||||
// NN: add conditions for e_rabs_failed
|
||||
if (e_rabs_done > 0) {
|
||||
LOG_I(RRC,"S1AP_PATH_SWITCH_REQ: sending the message: nb_of_erabstobeswitched %d, total e_rabs %d, index %d\n",
|
||||
// NN: add conditions for e_rabs_failed
|
||||
if (e_rabs_done > 0) {
|
||||
LOG_I(RRC,"S1AP_PATH_SWITCH_REQ: sending the message: nb_of_erabstobeswitched %d, total e_rabs %d, index %d\n",
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).nb_of_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
MSC_S1AP_ENB,
|
||||
(const char *)&S1AP_PATH_SWITCH_REQ (msg_p),
|
||||
sizeof(s1ap_path_switch_req_t),
|
||||
MSC_AS_TIME_FMT" PATH_SWITCH_REQ UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ue_context_pP->ue_id_rnti,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
|
||||
e_rabs_done);
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
} else {
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
}
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
MSC_S1AP_ENB,
|
||||
(const char *)&S1AP_PATH_SWITCH_REQ (msg_p),
|
||||
sizeof(s1ap_path_switch_req_t),
|
||||
MSC_AS_TIME_FMT" PATH_SWITCH_REQ UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ue_context_pP->ue_id_rnti,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
|
||||
e_rabs_done);
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
} else {
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_context_t* const ue_context_target_p) {
|
||||
int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_context_t *const ue_context_target_p) {
|
||||
gtpv1u_enb_create_x2u_tunnel_req_t create_tunnel_req;
|
||||
gtpv1u_enb_create_x2u_tunnel_resp_t create_tunnel_resp;
|
||||
uint8_t e_rab_done;
|
||||
uint8_t inde_list[NB_RB_MAX - 3]= {0};
|
||||
|
||||
uint8_t e_rab_done;
|
||||
uint8_t inde_list[NB_RB_MAX - 3]= {0};
|
||||
|
||||
if (ue_context_target_p == NULL) {
|
||||
|
||||
return (-1);
|
||||
} else {
|
||||
|
||||
/* Save e RAB information for later */
|
||||
{
|
||||
LOG_I(RRC, "[eNB %d] rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ: rnti %u nb_of_e_rabs %d\n",
|
||||
@@ -2097,8 +2088,7 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
|
||||
uint8_t nb_e_rabs_tosetup = ue_context_target_p->ue_context.nb_of_e_rabs;
|
||||
e_rab_done = 0;
|
||||
|
||||
for (i = 0;i < nb_e_rabs_tosetup; i++) {
|
||||
|
||||
for (i = 0; i < nb_e_rabs_tosetup; i++) {
|
||||
if(ue_context_target_p->ue_context.e_rab[i].status >= E_RAB_STATUS_DONE)
|
||||
continue;
|
||||
|
||||
@@ -2107,7 +2097,7 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
|
||||
i,
|
||||
ue_context_target_p->ue_context.rnti,
|
||||
create_tunnel_req.eps_bearer_id[i] );
|
||||
inde_list[i] = e_rab_done;
|
||||
inde_list[i] = e_rab_done;
|
||||
e_rab_done++;
|
||||
}
|
||||
|
||||
@@ -2118,31 +2108,28 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
|
||||
instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
ue_context_target_p->ue_context.nb_x2u_e_rabs = create_tunnel_resp.num_tunnels;
|
||||
|
||||
ue_context_target_p->ue_context.nb_x2u_e_rabs = create_tunnel_resp.num_tunnels;
|
||||
for (i = 0; i < create_tunnel_resp.num_tunnels; i++) {
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]] = create_tunnel_resp.enb_X2u_teid[i];
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_addrs[inde_list[i]] = create_tunnel_resp.enb_addr;
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_ebi[inde_list[i]] = create_tunnel_resp.eps_bearer_id[i];
|
||||
|
||||
LOG_I(RRC, "rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ tunnel (%u, %u) bearer UE context index %u, msg index %u, eps bearer id %u, gtp addr len %d \n",
|
||||
create_tunnel_resp.enb_X2u_teid[i],
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]],
|
||||
inde_list[i],
|
||||
i,
|
||||
create_tunnel_resp.eps_bearer_id[i],
|
||||
create_tunnel_resp.enb_addr.length);
|
||||
}
|
||||
for (i = 0; i < create_tunnel_resp.num_tunnels; i++) {
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]] = create_tunnel_resp.enb_X2u_teid[i];
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_addrs[inde_list[i]] = create_tunnel_resp.enb_addr;
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_ebi[inde_list[i]] = create_tunnel_resp.eps_bearer_id[i];
|
||||
LOG_I(RRC, "rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ tunnel (%u, %u) bearer UE context index %u, msg index %u, eps bearer id %u, gtp addr len %d \n",
|
||||
create_tunnel_resp.enb_X2u_teid[i],
|
||||
ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]],
|
||||
inde_list[i],
|
||||
i,
|
||||
create_tunnel_resp.eps_bearer_id[i],
|
||||
create_tunnel_resp.enb_addr.length);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
const char *msg_name,
|
||||
instance_t instance)
|
||||
{
|
||||
const char *msg_name,
|
||||
instance_t instance) {
|
||||
uint16_t ue_initial_id;
|
||||
uint32_t eNB_ue_s1ap_id;
|
||||
//gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
|
||||
@@ -2175,10 +2162,11 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
ue_context_p->ue_context.nb_release_of_e_rabs = S1AP_PATH_SWITCH_REQ_ACK (msg_p).nb_e_rabs_tobereleased;
|
||||
|
||||
for (i = 0;
|
||||
i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
|
||||
i++) {
|
||||
// assume that we are releasing all the DRBs
|
||||
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_REESTABLISHED;
|
||||
i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
|
||||
i++) {
|
||||
// assume that we are releasing all the DRBs
|
||||
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_REESTABLISHED;
|
||||
|
||||
if (ue_context_p->ue_context.nb_release_of_e_rabs==0) {
|
||||
LOG_I(RRC,"Bearer re-established with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
|
||||
}
|
||||
@@ -2191,50 +2179,49 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
// the index for the rec
|
||||
if (nb_e_rabs_tobeswitched>0) {
|
||||
int e_rab_switch_index=0;
|
||||
for (i = 0;
|
||||
i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
|
||||
i++) {
|
||||
/* Harmonize with enb_gtp_teid, enb_gtp_addrs, and enb_gtp_rbi vars in the top level structure */
|
||||
|
||||
for (i = 0;
|
||||
i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
|
||||
i++) {
|
||||
/* Harmonize with enb_gtp_teid, enb_gtp_addrs, and enb_gtp_rbi vars in the top level structure */
|
||||
if (ue_context_p->ue_context.e_rab[i].param.e_rab_id == S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id) {
|
||||
ue_context_p->ue_context.e_rab[i].param.e_rab_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id;
|
||||
ue_context_p->ue_context.e_rab[i].param.sgw_addr= S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].sgw_addr;
|
||||
ue_context_p->ue_context.e_rab[i].param.gtp_teid = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].gtp_teid;
|
||||
ue_context_p->ue_context.e_rab[i].param.e_rab_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id;
|
||||
ue_context_p->ue_context.e_rab[i].param.sgw_addr= S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].sgw_addr;
|
||||
ue_context_p->ue_context.e_rab[i].param.gtp_teid = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].gtp_teid;
|
||||
e_rab_switch_index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ue_context_p->ue_context.ue_ambr=S1AP_PATH_SWITCH_REQ_ACK (msg_p).ue_ambr;
|
||||
|
||||
ue_context_p->ue_context.setup_e_rabs = ue_context_p->ue_context.setup_e_rabs - ue_context_p->ue_context.nb_release_of_e_rabs;
|
||||
ue_context_p->ue_context.nb_of_e_rabs = ue_context_p->ue_context.nb_of_e_rabs - ue_context_p->ue_context.nb_release_of_e_rabs;
|
||||
|
||||
memset(&delete_tunnel_req, 0 , sizeof(delete_tunnel_req));
|
||||
memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
|
||||
|
||||
if (ue_context_p->ue_context.nb_release_of_e_rabs>0) {
|
||||
int e_rab_release_index=0;
|
||||
for (i = 0;
|
||||
i < ue_context_p->ue_context.setup_e_rabs;
|
||||
i++) {
|
||||
|
||||
for (i = 0;
|
||||
i < ue_context_p->ue_context.setup_e_rabs;
|
||||
i++) {
|
||||
if (ue_context_p->ue_context.e_rab[i].param.e_rab_id == S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id) {
|
||||
LOG_I(RRC,"Bearer released with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
|
||||
LOG_I(RRC,"Bearer released with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
|
||||
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_TORELEASE;
|
||||
ue_context_p->ue_context.e_rabs_tobereleased[e_rab_release_index]=S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id;
|
||||
delete_tunnel_req.eps_bearer_id[e_rab_release_index] = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id;
|
||||
e_rab_release_index++;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_I(RRC,"Bearer re-established with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_context_p->ue_context.nb_release_of_e_rabs>0){
|
||||
if (ue_context_p->ue_context.nb_release_of_e_rabs>0) {
|
||||
delete_tunnel_req.rnti= ue_context_p->ue_context.rnti;
|
||||
delete_tunnel_req.num_erab= ue_context_p->ue_context.nb_release_of_e_rabs;
|
||||
/* this could also be done through ITTI message */
|
||||
gtpv1u_delete_s1u_tunnel(instance,
|
||||
&delete_tunnel_req);
|
||||
&delete_tunnel_req);
|
||||
/* TBD: release the DRB not admitted */
|
||||
//rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(&ctxt, ue_context_p, 0);
|
||||
}
|
||||
@@ -2242,33 +2229,26 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
/* Security key */
|
||||
ue_context_p->ue_context.next_hop_chain_count=S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_hop_chain_count;
|
||||
memcpy ( ue_context_p->ue_context.next_security_key,
|
||||
S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_security_key,
|
||||
SECURITY_KEY_LENGTH);
|
||||
|
||||
S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_security_key,
|
||||
SECURITY_KEY_LENGTH);
|
||||
rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(&ctxt, ue_context_p);
|
||||
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t* const ctxt_pP,
|
||||
rrc_eNB_ue_context_t* const ue_context_pP)
|
||||
{
|
||||
int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP) {
|
||||
MessageDef *msg_p = NULL;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, X2AP_UE_CONTEXT_RELEASE);
|
||||
|
||||
X2AP_UE_CONTEXT_RELEASE (msg_p).rnti = ue_context_pP->ue_context.rnti;
|
||||
X2AP_UE_CONTEXT_RELEASE (msg_p).source_assoc_id = ue_context_pP->ue_context.handover_info->assoc_id;
|
||||
itti_send_msg_to_task (TASK_X2AP, ctxt_pP->instance, msg_p);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
|
||||
int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id) {
|
||||
s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL;
|
||||
struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
|
||||
|
||||
s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
|
||||
DevAssert(s1ap_eNB_instance_p != NULL);
|
||||
|
||||
@@ -2276,7 +2256,7 @@ int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
|
||||
eNB_ue_s1ap_id)) == NULL) {
|
||||
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
|
||||
LOG_W(RRC,"Failed to find ue context associated with eNB ue s1ap id: %u\n",
|
||||
eNB_ue_s1ap_id);
|
||||
eNB_ue_s1ap_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2286,17 +2266,17 @@ int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
|
||||
if ((ue_context2_p = RB_REMOVE(s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head, ue_context_p))
|
||||
!= NULL) {
|
||||
LOG_W(RRC,"Removed UE context eNB_ue_s1ap_id %u\n",
|
||||
ue_context2_p->eNB_ue_s1ap_id);
|
||||
ue_context2_p->eNB_ue_s1ap_id);
|
||||
s1ap_eNB_free_ue_context(ue_context2_p);
|
||||
} else {
|
||||
LOG_W(RRC,"Removing UE context eNB_ue_s1ap_id %u: did not find context\n",
|
||||
ue_context_p->eNB_ue_s1ap_id);
|
||||
ue_context_p->eNB_ue_s1ap_id);
|
||||
}
|
||||
|
||||
/*RB_FOREACH(ue_context_p, s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head) {
|
||||
S1AP_WARN("in s1ap_ue_map: UE context eNB_ue_s1ap_id %u mme_ue_s1ap_id %u state %u\n",
|
||||
ue_context_p->eNB_ue_s1ap_id, ue_context_p->mme_ue_s1ap_id,
|
||||
ue_context_p->ue_state);
|
||||
}*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ openair_rrc_on_ue(
|
||||
|
||||
void rrc_top_cleanup(void);
|
||||
|
||||
/** \brief Function to update eNB timers every subframe.
|
||||
/** \brief Function to update eNB timers every subframe.
|
||||
@param ctxt_pP running context
|
||||
@param enb_index
|
||||
@param CC_id
|
||||
@@ -106,13 +106,11 @@ rrc_ue_decode_dcch(
|
||||
const uint8_t eNB_indexP
|
||||
);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int decode_SL_Discovery_Message(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t eNB_index,
|
||||
const uint8_t *Sdu,
|
||||
const uint8_t Sdu_len);
|
||||
#endif
|
||||
|
||||
/** \brief Generate/Encodes RRCConnnectionRequest message at UE
|
||||
\param ctxt_pP Running context
|
||||
@@ -223,7 +221,7 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP);
|
||||
\param buffer Pointer to SDU
|
||||
\param buffer_length length of SDU in bytes
|
||||
\param CC_id component carrier index*/
|
||||
int rrc_eNB_decode_ccch(protocol_ctxt_t* const ctxt_pP,
|
||||
int rrc_eNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t *buffer,
|
||||
int buffer_length,
|
||||
const int CC_id);
|
||||
@@ -312,9 +310,9 @@ void
|
||||
rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *buffer,
|
||||
int *_size
|
||||
//const uint8_t ho_state
|
||||
);
|
||||
int *_size
|
||||
//const uint8_t ho_state
|
||||
);
|
||||
void
|
||||
rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protocol_ctxt_t *const ctxt_pP);
|
||||
|
||||
@@ -339,7 +337,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(
|
||||
uint8_t *nas_buffer
|
||||
);
|
||||
|
||||
void
|
||||
void
|
||||
rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *ue_context_pP);
|
||||
|
||||
@@ -383,8 +381,8 @@ int
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
LTE_SL_DestinationInfoList_r12_t *destinationInfoList,
|
||||
int n_discoveryMessages
|
||||
LTE_SL_DestinationInfoList_r12_t *destinationInfoList,
|
||||
int n_discoveryMessages
|
||||
);
|
||||
|
||||
/** \brief process the received SidelinkUEInformation message at eNB
|
||||
@@ -404,7 +402,7 @@ rrc_eNB_process_SidelinkUEInformation(
|
||||
LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
LTE_SL_DestinationInfoList_r12_t *destinationInfoList
|
||||
LTE_SL_DestinationInfoList_r12_t *destinationInfoList
|
||||
);
|
||||
|
||||
/** \brief Get a Resource Pool for Discovery
|
||||
@@ -414,7 +412,7 @@ LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool(
|
||||
LTE_SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
int n_discoveryMessages
|
||||
int n_discoveryMessages
|
||||
);
|
||||
|
||||
/** \brief Process request from control socket
|
||||
@@ -446,10 +444,8 @@ mac_rrc_data_ind(
|
||||
const rb_id_t srb_idP,
|
||||
const uint8_t *sduP,
|
||||
const sdu_size_t sdu_lenP,
|
||||
const uint8_t mbsfn_sync_areaP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, const boolean_t brOption
|
||||
#endif
|
||||
const uint8_t mbsfn_sync_areaP,
|
||||
const boolean_t brOption
|
||||
);
|
||||
|
||||
int8_t
|
||||
@@ -481,22 +477,22 @@ mac_rrc_data_ind_ue(
|
||||
void mac_sync_ind( module_id_t Mod_instP, uint8_t status);
|
||||
|
||||
void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
|
||||
void mac_eNB_rrc_uplane_failure(const module_id_t Mod_instP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
|
||||
void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rnti);
|
||||
|
||||
uint8_t
|
||||
rrc_data_req(
|
||||
@@ -544,15 +540,13 @@ int decode_BCCH_DLSCH_Message(
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp );
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int decode_BCCH_MBMS_DLSCH_Message(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t eNB_index,
|
||||
uint8_t* const Sdu,
|
||||
uint8_t *const Sdu,
|
||||
const uint8_t Sdu_len,
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp );
|
||||
#endif
|
||||
|
||||
int decode_PCCH_DLSCH_Message(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
@@ -614,9 +608,9 @@ rrc_eNB_generate_HandoverPreparationInformation(
|
||||
|
||||
int
|
||||
flexran_rrc_eNB_trigger_handover (int mod_id,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *ue_context_pP,
|
||||
int target_cell_id);
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *ue_context_pP,
|
||||
int target_cell_id);
|
||||
|
||||
void
|
||||
check_handovers(
|
||||
@@ -651,7 +645,7 @@ rrc_eNB_free_mem_UE_context(
|
||||
|
||||
void
|
||||
rrc_eNB_free_UE(
|
||||
const module_id_t enb_mod_idP,
|
||||
const module_id_t enb_mod_idP,
|
||||
const struct rrc_eNB_ue_context_s *const ue_context_pP
|
||||
);
|
||||
|
||||
@@ -662,10 +656,10 @@ long binary_search_float(float elements[], long numElem, float value);
|
||||
void openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active);
|
||||
|
||||
void openair_rrc_top_init_ue(
|
||||
int eMBMS_active,
|
||||
int eMBMS_active,
|
||||
char *uecap_xer,
|
||||
uint8_t cba_group_active,
|
||||
uint8_t HO_active
|
||||
uint8_t cba_group_active,
|
||||
uint8_t HO_active
|
||||
);
|
||||
|
||||
extern pthread_mutex_t rrc_release_freelist;
|
||||
|
||||
+145
-149
@@ -58,27 +58,23 @@ struct LTE_LogicalChannelConfig__ul_SpecificParameters LCSRB2 = {3,
|
||||
&logicalChannelGroup0
|
||||
};
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
struct LTE_LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
|
||||
logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9
|
||||
logicalChannelSR_Mask_r9:
|
||||
&logicalChannelSR_Mask_r9
|
||||
};
|
||||
#endif
|
||||
|
||||
// These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6)
|
||||
LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
ext1: &logicalChannelSR_Mask_r9_ext1
|
||||
#endif
|
||||
};
|
||||
LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters:
|
||||
&LCSRB1,
|
||||
ext1:
|
||||
&logicalChannelSR_Mask_r9_ext1
|
||||
};
|
||||
|
||||
LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
ext1: &logicalChannelSR_Mask_r9_ext1
|
||||
#endif
|
||||
};
|
||||
LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters:
|
||||
&LCSRB2,
|
||||
ext1:
|
||||
&logicalChannelSR_Mask_r9_ext1
|
||||
};
|
||||
|
||||
//CONSTANTS
|
||||
rlc_info_t Rlc_info_um,Rlc_info_am_config;
|
||||
@@ -101,142 +97,142 @@ uint32_t timeToTrigger_ms[16] = {0,40,64,80,100,128,160,256,320,480,512,640,1024
|
||||
/* 36.133 Section 9.1.4 RSRP Measurement Report Mapping, Table: 9.1.4-1 */
|
||||
float RSRP_meas_mapping[98] = {
|
||||
-140,
|
||||
-139,
|
||||
-138,
|
||||
-137,
|
||||
-136,
|
||||
-135,
|
||||
-134,
|
||||
-133,
|
||||
-132,
|
||||
-131,
|
||||
-130,
|
||||
-129,
|
||||
-128,
|
||||
-127,
|
||||
-126,
|
||||
-125,
|
||||
-124,
|
||||
-123,
|
||||
-122,
|
||||
-121,
|
||||
-120,
|
||||
-119,
|
||||
-118,
|
||||
-117,
|
||||
-116,
|
||||
-115,
|
||||
-114,
|
||||
-113,
|
||||
-112,
|
||||
-111,
|
||||
-110,
|
||||
-109,
|
||||
-108,
|
||||
-107,
|
||||
-106,
|
||||
-105,
|
||||
-104,
|
||||
-103,
|
||||
-102,
|
||||
-101,
|
||||
-100,
|
||||
-99,
|
||||
-98,
|
||||
-97,
|
||||
-96,
|
||||
-95,
|
||||
-94,
|
||||
-93,
|
||||
-92,
|
||||
-91,
|
||||
-90,
|
||||
-89,
|
||||
-88,
|
||||
-87,
|
||||
-86,
|
||||
-85,
|
||||
-84,
|
||||
-83,
|
||||
-82,
|
||||
-81,
|
||||
-80,
|
||||
-79,
|
||||
-78,
|
||||
-77,
|
||||
-76,
|
||||
-75,
|
||||
-74,
|
||||
-73,
|
||||
-72,
|
||||
-71,
|
||||
-70,
|
||||
-69,
|
||||
-68,
|
||||
-67,
|
||||
-66,
|
||||
-65,
|
||||
-64,
|
||||
-63,
|
||||
-62,
|
||||
-61,
|
||||
-60,
|
||||
-59,
|
||||
-58,
|
||||
-57,
|
||||
-56,
|
||||
-55,
|
||||
-54,
|
||||
-53,
|
||||
-52,
|
||||
-51,
|
||||
-50,
|
||||
-49,
|
||||
-48,
|
||||
-47,
|
||||
-46,
|
||||
-45,
|
||||
-44,
|
||||
-43
|
||||
};
|
||||
-139,
|
||||
-138,
|
||||
-137,
|
||||
-136,
|
||||
-135,
|
||||
-134,
|
||||
-133,
|
||||
-132,
|
||||
-131,
|
||||
-130,
|
||||
-129,
|
||||
-128,
|
||||
-127,
|
||||
-126,
|
||||
-125,
|
||||
-124,
|
||||
-123,
|
||||
-122,
|
||||
-121,
|
||||
-120,
|
||||
-119,
|
||||
-118,
|
||||
-117,
|
||||
-116,
|
||||
-115,
|
||||
-114,
|
||||
-113,
|
||||
-112,
|
||||
-111,
|
||||
-110,
|
||||
-109,
|
||||
-108,
|
||||
-107,
|
||||
-106,
|
||||
-105,
|
||||
-104,
|
||||
-103,
|
||||
-102,
|
||||
-101,
|
||||
-100,
|
||||
-99,
|
||||
-98,
|
||||
-97,
|
||||
-96,
|
||||
-95,
|
||||
-94,
|
||||
-93,
|
||||
-92,
|
||||
-91,
|
||||
-90,
|
||||
-89,
|
||||
-88,
|
||||
-87,
|
||||
-86,
|
||||
-85,
|
||||
-84,
|
||||
-83,
|
||||
-82,
|
||||
-81,
|
||||
-80,
|
||||
-79,
|
||||
-78,
|
||||
-77,
|
||||
-76,
|
||||
-75,
|
||||
-74,
|
||||
-73,
|
||||
-72,
|
||||
-71,
|
||||
-70,
|
||||
-69,
|
||||
-68,
|
||||
-67,
|
||||
-66,
|
||||
-65,
|
||||
-64,
|
||||
-63,
|
||||
-62,
|
||||
-61,
|
||||
-60,
|
||||
-59,
|
||||
-58,
|
||||
-57,
|
||||
-56,
|
||||
-55,
|
||||
-54,
|
||||
-53,
|
||||
-52,
|
||||
-51,
|
||||
-50,
|
||||
-49,
|
||||
-48,
|
||||
-47,
|
||||
-46,
|
||||
-45,
|
||||
-44,
|
||||
-43
|
||||
};
|
||||
|
||||
float RSRQ_meas_mapping[35] = {
|
||||
-19,
|
||||
-18.5,
|
||||
-18,
|
||||
-17.5,
|
||||
-17,
|
||||
-16.5,
|
||||
-16,
|
||||
-15.5,
|
||||
-15,
|
||||
-14.5,
|
||||
-14,
|
||||
-13.5,
|
||||
-13,
|
||||
-12.5,
|
||||
-12,
|
||||
-11.5,
|
||||
-11,
|
||||
-10.5,
|
||||
-10,
|
||||
-9.5,
|
||||
-9,
|
||||
-8.5,
|
||||
-8,
|
||||
-7.5,
|
||||
-7,
|
||||
-6.5,
|
||||
-6,
|
||||
-5.5,
|
||||
-5,
|
||||
-4.5,
|
||||
-4,
|
||||
-3.5,
|
||||
-3,
|
||||
-2.5,
|
||||
-2
|
||||
};
|
||||
-18.5,
|
||||
-18,
|
||||
-17.5,
|
||||
-17,
|
||||
-16.5,
|
||||
-16,
|
||||
-15.5,
|
||||
-15,
|
||||
-14.5,
|
||||
-14,
|
||||
-13.5,
|
||||
-13,
|
||||
-12.5,
|
||||
-12,
|
||||
-11.5,
|
||||
-11,
|
||||
-10.5,
|
||||
-10,
|
||||
-9.5,
|
||||
-9,
|
||||
-8.5,
|
||||
-8,
|
||||
-7.5,
|
||||
-7,
|
||||
-6.5,
|
||||
-6,
|
||||
-5.5,
|
||||
-5,
|
||||
-4.5,
|
||||
-4,
|
||||
-3.5,
|
||||
-3,
|
||||
-2.5,
|
||||
-2
|
||||
};
|
||||
|
||||
// only used for RRC connection re-establishment procedure TS36.331 5.3.7
|
||||
// [0]: current C-RNTI, [1]: prior C-RNTI
|
||||
|
||||
@@ -240,12 +240,8 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
mib->message.choice.mib->spare.bits_unused = 7; // This makes a spare of 1 bits
|
||||
|
||||
mib->message.choice.mib->ssb_SubcarrierOffset = ssb_SubcarrierOffset;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = (pdcch_ConfigSIB1 / 16);
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = (pdcch_ConfigSIB1 % 16);
|
||||
#else
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1 = pdcch_ConfigSIB1;
|
||||
#endif
|
||||
switch (subCarrierSpacingCommon) {
|
||||
case 15:
|
||||
mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60;
|
||||
@@ -341,11 +337,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
//(*servingcellconfigcommon)->lte_CRS_ToMatchAround = CALLOC(1,sizeof(struct NR_SetupRelease_RateMatchPatternLTE_CRS));
|
||||
(*servingcellconfigcommon)->rateMatchPatternToAddModList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToAddModList));
|
||||
(*servingcellconfigcommon)->rateMatchPatternToReleaseList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList));
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 5, 0))
|
||||
(*servingcellconfigcommon)->ssbSubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
|
||||
#else
|
||||
(*servingcellconfigcommon)->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
|
||||
#endif
|
||||
(*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon));
|
||||
|
||||
|
||||
@@ -360,11 +352,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet));
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList));
|
||||
#else
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpace));
|
||||
#endif
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation = CALLOC(1,sizeof(NR_SearchSpaceId_t));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t));
|
||||
@@ -388,11 +376,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB = CALLOC(1,sizeof(NR_RSRP_Range_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL = CALLOC(1,sizeof(NR_RSRP_Range_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder = CALLOC(1,sizeof(long));
|
||||
#else
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding = CALLOC(1,sizeof(long));
|
||||
#endif
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_PUSCH_ConfigCommon_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long));
|
||||
@@ -588,32 +572,19 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1 = CALLOC(1,sizeof(long));
|
||||
#else
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity = CALLOC(1,sizeof(long));
|
||||
#endif
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id];
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2 = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
|
||||
#else
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->nrofPDCCH_Candidates = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
|
||||
#endif
|
||||
}else if (bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific){
|
||||
bwp_dl_searchspace->searchSpaceType->choice.ue_Specific->dci_Formats = configuration->ue_Specific__dci_Formats[CC_id];
|
||||
}
|
||||
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list,&bwp_dl_searchspace);
|
||||
#else
|
||||
ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace->list,&bwp_dl_searchspace);
|
||||
#endif
|
||||
|
||||
*((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1) = configuration->searchSpaceSIB1[CC_id];
|
||||
*((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation) = configuration->searchSpaceOtherSystemInformation[CC_id];
|
||||
@@ -701,11 +672,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig = configuration->restrictedSetConfig[CC_id];
|
||||
|
||||
if(configuration->msg3_transformPrecoding[CC_id]){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder) = NR_RACH_ConfigCommon__msg3_transformPrecoder_enabled;
|
||||
#else
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding) = NR_RACH_ConfigCommon__msg3_transformPrecoding_enabled;
|
||||
#endif
|
||||
}
|
||||
|
||||
//Fill initialUplinkBWP -> BWP-UplinkCommon -> rach_ConfigCommon -> rach_ConfigGeneric//
|
||||
@@ -740,12 +707,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal) = configuration->p0_nominal[CC_id];
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon) = configuration->pucch_ResourceCommon[CC_id];
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId) = configuration->hoppingId[CC_id];
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->dummy = configuration->UL_timeAlignmentTimerCommon[CC_id];
|
||||
#else
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->timeAlignmentTimerCommon = configuration->UL_timeAlignmentTimerCommon[CC_id];
|
||||
#endif
|
||||
|
||||
(*servingcellconfigcommon)->n_TimingAdvanceOffset = CALLOC(1,sizeof(long));
|
||||
*((*servingcellconfigcommon)->n_TimingAdvanceOffset)=configuration->ServingCellConfigCommon_n_TimingAdvanceOffset[CC_id];
|
||||
//ssb_PositionsInBurst
|
||||
@@ -860,11 +822,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
}
|
||||
|
||||
*(ratematchpattern->subcarrierSpacing) = configuration->RateMatchPattern_subcarrierSpacing[CC_id];
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
ratematchpattern->dummy = configuration->RateMatchPattern_mode[CC_id];
|
||||
#else
|
||||
ratematchpattern->mode = configuration->RateMatchPattern_mode[CC_id];
|
||||
#endif
|
||||
|
||||
ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToAddModList->list,&ratematchpattern);
|
||||
|
||||
@@ -873,11 +831,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToReleaseList->list,&ratematchpatternid);
|
||||
|
||||
//subcarrierSpacing
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 5, 0))
|
||||
*(*servingcellconfigcommon)->ssbSubcarrierSpacing = configuration->NIA_SubcarrierSpacing[CC_id];
|
||||
#else
|
||||
*(*servingcellconfigcommon)->subcarrierSpacing = configuration->NIA_SubcarrierSpacing[CC_id];
|
||||
#endif
|
||||
|
||||
//tdd_UL_DL_ConfigurationCommon
|
||||
(*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing = configuration->referenceSubcarrierSpacing[CC_id];
|
||||
@@ -1097,11 +1051,7 @@ void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->phr_ProhibitTimer = mac_cellgroup_config->phr_ProhibitTimer[CC_id];
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->phr_Tx_PowerFactorChange = mac_cellgroup_config->phr_Tx_PowerFactorChange[CC_id];
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->multiplePHR = mac_cellgroup_config->multiplePHR[CC_id];
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->dummy = mac_cellgroup_config->phr_Type2SpCell[CC_id];
|
||||
#else
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2SpCell = mac_cellgroup_config->phr_Type2SpCell[CC_id];
|
||||
#endif
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2OtherCell = mac_cellgroup_config->phr_Type2OtherCell[CC_id];
|
||||
mac_CellGroupConfig->phr_Config->choice.setup->phr_ModeOtherCG = mac_cellgroup_config->phr_ModeOtherCG[CC_id];
|
||||
|
||||
@@ -1116,11 +1066,7 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
|
||||
physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH = CALLOC(1,sizeof(long));
|
||||
physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH = CALLOC(1,sizeof(long));
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
physicalCellGroupConfig->p_NR_FR1 = CALLOC(1,sizeof(NR_P_Max_t));
|
||||
#else
|
||||
physicalCellGroupConfig->p_NR = CALLOC(1,sizeof(NR_P_Max_t));
|
||||
#endif
|
||||
physicalCellGroupConfig->tpc_SRS_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t));
|
||||
physicalCellGroupConfig->tpc_PUCCH_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t));
|
||||
physicalCellGroupConfig->tpc_PUSCH_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t));
|
||||
@@ -1128,11 +1074,7 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
|
||||
*(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUCCH[CC_id];
|
||||
*(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUSCH[CC_id];
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
*(physicalCellGroupConfig->p_NR_FR1) = physicalcellgroup_config->p_NR[CC_id];
|
||||
#else
|
||||
*(physicalCellGroupConfig->p_NR) = physicalcellgroup_config->p_NR[CC_id];
|
||||
#endif
|
||||
physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook = physicalcellgroup_config->pdsch_HARQ_ACK_Codebook[CC_id];
|
||||
*(physicalCellGroupConfig->tpc_SRS_RNTI) = physicalcellgroup_config->tpc_SRS_RNTI[CC_id];
|
||||
*(physicalCellGroupConfig->tpc_PUCCH_RNTI) = physicalcellgroup_config->tpc_PUCCH_RNTI[CC_id];
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
//-------------------
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
#include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
/* TODO: be sure this include is correct.
|
||||
@@ -79,11 +79,11 @@
|
||||
* issue #186.
|
||||
*/
|
||||
#if !defined(ENABLE_ITTI)
|
||||
# include "as_message.h"
|
||||
#include "as_message.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
# include "commonDef.h"
|
||||
#include "commonDef.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ typedef unsigned int uid_nr_t;
|
||||
/*typedef struct nr_uid_linear_allocator_s {
|
||||
unsigned int bitmap[NR_UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
|
||||
} nr_uid_allocator_t;*/
|
||||
|
||||
|
||||
|
||||
#define PROTOCOL_NR_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT
|
||||
#define PROTOCOL_NR_RRC_CTXT_UE_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
|
||||
@@ -158,13 +158,12 @@ typedef struct UE_RRC_INFO_NR_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
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
|
||||
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;
|
||||
@@ -229,7 +228,7 @@ typedef struct {
|
||||
|
||||
typedef struct RB_INFO_NR_s {
|
||||
uint16_t Rb_id; //=Lchan_id
|
||||
NR_LCHAN_DESC Lchan_desc[2];
|
||||
NR_LCHAN_DESC Lchan_desc[2];
|
||||
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
|
||||
} NR_RB_INFO;
|
||||
|
||||
@@ -260,25 +259,23 @@ typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
|
||||
|
||||
typedef struct gNB_RRC_UE_s {
|
||||
uint8_t primaryCC_id;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t sCell_config[2];
|
||||
#endif
|
||||
NR_SRB_ToAddModList_t* SRB_configList;
|
||||
NR_SRB_ToAddModList_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToAddModList_t* DRB_configList;
|
||||
NR_DRB_ToAddModList_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToReleaseList_t* DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_SRB_ToAddModList_t *SRB_configList;
|
||||
NR_SRB_ToAddModList_t *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToAddModList_t *DRB_configList;
|
||||
NR_DRB_ToAddModList_t *DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToReleaseList_t *DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
uint8_t DRB_active[8];
|
||||
|
||||
SRB_INFO SI;
|
||||
SRB_INFO Srb0;
|
||||
SRB_INFO_TABLE_ENTRY Srb1;
|
||||
SRB_INFO_TABLE_ENTRY Srb2;
|
||||
NR_MeasConfig_t* measConfig;
|
||||
HANDOVER_INFO* handover_info;
|
||||
NR_MeasResults_t* measResults;
|
||||
NR_MeasConfig_t *measConfig;
|
||||
HANDOVER_INFO *handover_info;
|
||||
NR_MeasResults_t *measResults;
|
||||
|
||||
NR_UE_NR_Capability_t* UE_Capability;
|
||||
NR_UE_NR_Capability_t *UE_Capability;
|
||||
ImsiMobileIdentity_t imsi;
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
@@ -340,7 +337,7 @@ typedef struct gNB_RRC_UE_s {
|
||||
uint32_t ue_reestablishment_timer;
|
||||
uint32_t ue_reestablishment_timer_thres;
|
||||
uint8_t e_rab_release_command_flag;
|
||||
//------------------------------------------------------------------------------//
|
||||
//------------------------------------------------------------------------------//
|
||||
NR_CellGroupId_t cellGroupId;
|
||||
struct NR_SpCellConfig *spCellConfig;
|
||||
struct NR_CellGroupConfig__sCellToAddModList *sCellconfig;
|
||||
@@ -349,7 +346,7 @@ typedef struct gNB_RRC_UE_s {
|
||||
struct NR_CellGroupConfig__rlc_BearerToReleaseList *rlc_BearerRelease;
|
||||
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig;
|
||||
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig;
|
||||
|
||||
|
||||
} gNB_RRC_UE_t;
|
||||
|
||||
typedef uid_t ue_uid_t;
|
||||
@@ -374,8 +371,8 @@ typedef struct rrc_gNB_ue_context_s {
|
||||
typedef struct {
|
||||
|
||||
// buffer that contains the encoded messages
|
||||
uint8_t *MIB;
|
||||
uint8_t sizeof_MIB;
|
||||
uint8_t *MIB;
|
||||
uint8_t sizeof_MIB;
|
||||
|
||||
uint8_t *ServingCellConfigCommon;
|
||||
uint8_t sizeof_servingcellconfigcommon;
|
||||
@@ -383,15 +380,15 @@ typedef struct {
|
||||
//implicit parameters needed
|
||||
int physCellId;
|
||||
int Ncp; //cyclic prefix for DL
|
||||
int Ncp_UL; //cyclic prefix for UL
|
||||
int Ncp_UL; //cyclic prefix for UL
|
||||
int p_gNB; //number of tx antenna port
|
||||
int p_rx_gNB; //number of receiving antenna ports
|
||||
int p_rx_gNB; //number of receiving antenna ports
|
||||
uint64_t dl_CarrierFreq; //detected by the UE
|
||||
uint64_t ul_CarrierFreq; //detected by the UE
|
||||
|
||||
|
||||
//are the only static one (memory has been already allocated)
|
||||
NR_BCCH_BCH_Message_t mib;
|
||||
|
||||
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon;
|
||||
|
||||
|
||||
@@ -410,7 +407,7 @@ typedef struct gNB_RRC_INST_s {
|
||||
rrc_gNB_carrier_data_t carrier[MAX_NUM_CCs];
|
||||
uid_allocator_t uid_allocator; // for rrc_ue_head
|
||||
RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
|
||||
|
||||
|
||||
uint8_t Nb_ue;
|
||||
|
||||
hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t
|
||||
|
||||
+122
-176
@@ -64,27 +64,27 @@
|
||||
#include "OCG_extern.h"
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
# include "UTIL/OSA/osa_defs.h"
|
||||
#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
|
||||
#include "rrc_eNB_S1AP.h"
|
||||
#include "rrc_eNB_GTPV1U.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
#else
|
||||
#include "../../S1AP/s1ap_eNB.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "pdcp.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
#include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
#if ENABLE_RAL
|
||||
# include "rrc_eNB_ral.h"
|
||||
#include "rrc_eNB_ral.h"
|
||||
#endif
|
||||
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
@@ -95,12 +95,12 @@
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#ifdef PHY_EMUL
|
||||
extern EMULATION_VARS *Emul_vars;
|
||||
extern EMULATION_VARS *Emul_vars;
|
||||
#endif
|
||||
//extern eNB_MAC_INST *eNB_mac_inst;
|
||||
//extern UE_MAC_INST *UE_mac_inst;
|
||||
#ifdef BIGPHYSAREA
|
||||
extern void* bigphys_malloc(int);
|
||||
extern void *bigphys_malloc(int);
|
||||
#endif
|
||||
|
||||
extern uint16_t two_tier_hexagonal_cellIds[7];
|
||||
@@ -110,8 +110,7 @@ mui_t rrc_gNB_mui = 0;
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
|
||||
void openair_nr_rrc_on(const protocol_ctxt_t* const ctxt_pP){
|
||||
|
||||
void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
|
||||
LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" gNB:OPENAIR NR RRC IN....\n",PROTOCOL_NR_RRC_CTXT_ARGS(ctxt_pP));
|
||||
|
||||
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
@@ -120,24 +119,21 @@ void openair_nr_rrc_on(const protocol_ctxt_t* const ctxt_pP){
|
||||
rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0, CCCH, 1);
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Active = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
|
||||
void rrc_gNB_process_SgNBAdditionRequest(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *ue_context_pP
|
||||
){
|
||||
|
||||
void rrc_gNB_process_SgNBAdditionRequest(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *ue_context_pP
|
||||
) {
|
||||
rrc_gNB_generate_SgNBAdditionRequestAcknowledge(ctxt_pP,ue_context_pP);
|
||||
}
|
||||
|
||||
void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP)
|
||||
{
|
||||
void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP) {
|
||||
//uint8_t size;
|
||||
//uint8_t buffer[100];
|
||||
//int CC_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
@@ -148,20 +144,17 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig;
|
||||
struct NR_SpCellConfig *spCellConfig;
|
||||
//struct NR_CellGroupConfig__sCellToAddModList *sCellToAddModList;
|
||||
|
||||
cellGroupconfig = CALLOC(1,sizeof(NR_CellGroupConfig_t));
|
||||
cellGroupconfig->rlc_BearerToAddModList = CALLOC(1,sizeof(struct NR_CellGroupConfig__rlc_BearerToAddModList));
|
||||
cellGroupconfig->mac_CellGroupConfig = CALLOC(1,sizeof(struct NR_MAC_CellGroupConfig));
|
||||
cellGroupconfig->physicalCellGroupConfig = CALLOC(1,sizeof(struct NR_PhysicalCellGroupConfig));
|
||||
cellGroupconfig->spCellConfig = CALLOC(1,sizeof(struct NR_SpCellConfig));
|
||||
//cellGroupconfig->sCellToAddModList = CALLOC(1,sizeof(struct NR_CellGroupConfig__sCellToAddModList));
|
||||
|
||||
rlc_BearerToAddModList = cellGroupconfig->rlc_BearerToAddModList;
|
||||
mac_CellGroupConfig = cellGroupconfig->mac_CellGroupConfig;
|
||||
physicalCellGroupConfig = cellGroupconfig->physicalCellGroupConfig;
|
||||
spCellConfig = cellGroupconfig->spCellConfig;
|
||||
//sCellToAddModList = cellGroupconfig->sCellToAddModList;
|
||||
|
||||
rlc_bearer_config_t *rlc_config;
|
||||
rlc_config = CALLOC(1,sizeof(rlc_bearer_config_t));
|
||||
//Fill rlc_bearer config value
|
||||
@@ -174,7 +167,6 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
ue_context_pP->ue_context.primaryCC_id,
|
||||
rlc_BearerToAddModList,
|
||||
rlc_config);
|
||||
|
||||
mac_cellgroup_t *mac_cellgroup_config;
|
||||
mac_cellgroup_config = CALLOC(1,sizeof(mac_cellgroup_t));
|
||||
//Fill mac_cellgroup_config config value
|
||||
@@ -187,7 +179,6 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
ue_context_pP->ue_context.primaryCC_id,
|
||||
mac_CellGroupConfig,
|
||||
mac_cellgroup_config);
|
||||
|
||||
physicalcellgroup_t *physicalcellgroup_config;
|
||||
physicalcellgroup_config = CALLOC(1,sizeof(physicalcellgroup_t));
|
||||
//Fill physicalcellgroup_config config value
|
||||
@@ -200,29 +191,23 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
ue_context_pP->ue_context.primaryCC_id,
|
||||
physicalCellGroupConfig,
|
||||
physicalcellgroup_config);
|
||||
|
||||
|
||||
do_SpCellConfig(ctxt_pP->module_id,
|
||||
ue_context_pP->ue_context.primaryCC_id,
|
||||
spCellConfig);
|
||||
|
||||
|
||||
}
|
||||
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
|
||||
static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
|
||||
static void init_NR_SI(const protocol_ctxt_t *const ctxt_pP,
|
||||
const int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
,
|
||||
gNB_RrcConfigurationReq * configuration
|
||||
#endif
|
||||
){
|
||||
#if defined(ENABLE_ITTI)
|
||||
,
|
||||
gNB_RrcConfigurationReq *configuration
|
||||
#endif
|
||||
) {
|
||||
//int i;
|
||||
|
||||
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
|
||||
|
||||
// copy basic parameters
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB = configuration->nb_antenna_ports[CC_id];
|
||||
@@ -230,67 +215,62 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp_UL = configuration->UL_prefix_type[CC_id];
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
|
||||
|
||||
///MIB
|
||||
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].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
|
||||
);
|
||||
|
||||
#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
|
||||
);
|
||||
do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id,
|
||||
CC_id,
|
||||
#if defined(ENABLE_ITTI)
|
||||
#if defined(ENABLE_ITTI)
|
||||
configuration,
|
||||
#endif
|
||||
#endif
|
||||
1
|
||||
);
|
||||
|
||||
);
|
||||
LOG_I(NR_RRC,"Done init_NR_SI\n");
|
||||
|
||||
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||
CC_id,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB,
|
||||
configuration->nr_band[CC_id],
|
||||
configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
|
||||
configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id],
|
||||
configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
|
||||
configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id],
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq,
|
||||
configuration->N_RB_DL[CC_id],
|
||||
(NR_BCCH_BCH_Message_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].mib,
|
||||
(NR_ServingCellConfigCommon_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].servingcellconfigcommon
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq* configuration){
|
||||
char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq *configuration) {
|
||||
protocol_ctxt_t ctxt;
|
||||
int CC_id;
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gnb_mod_idP, GNB_FLAG_YES, NOT_A_RNTI, 0, 0,gnb_mod_idP);
|
||||
LOG_I(NR_RRC,
|
||||
PROTOCOL_NR_RRC_CTXT_FMT" Init...\n",
|
||||
PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
|
||||
#if OCP_FRAMEWORK
|
||||
|
||||
#if OCP_FRAMEWORK
|
||||
while ( RC.nrrrc[gnb_mod_idP] == NULL ) {
|
||||
LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n");
|
||||
sleep(1);
|
||||
}
|
||||
#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
|
||||
while ( RC.nrrrc[gnb_mod_idP] == NULL ) {
|
||||
LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n");
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
#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++) {
|
||||
@@ -299,55 +279,24 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
|
||||
|
||||
uid_linear_allocator_init(&RC.nrrrc[ctxt.module_id]->uid_allocator);
|
||||
RB_INIT(&RC.nrrrc[ctxt.module_id]->rrc_ue_head);
|
||||
|
||||
RC.nrrrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
|
||||
RC.nrrrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
|
||||
|
||||
memcpy(&RC.nrrrc[ctxt.module_id]->configuration,configuration,sizeof(gNB_RrcConfigurationReq));
|
||||
|
||||
/// System Information INIT
|
||||
|
||||
LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Checking release \n",PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
for (j = 0; j < NUM_MAX_CBA_GROUP; j++) {
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[j] = CBA_OFFSET + j;
|
||||
}
|
||||
|
||||
if (RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) {
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
|
||||
}
|
||||
|
||||
LOG_D(NR_RRC,
|
||||
PROTOCOL_NR_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
|
||||
PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt),
|
||||
gnb_mod_idP, RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[0],
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[1],
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[2],
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[3],
|
||||
RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
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
|
||||
#if defined(ENABLE_ITTI)
|
||||
,configuration
|
||||
#endif
|
||||
);
|
||||
}//END for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
||||
|
||||
rrc_init_nr_global_param();
|
||||
|
||||
|
||||
openair_nr_rrc_on(&ctxt);
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}//END openair_rrc_gNB_configuration
|
||||
|
||||
|
||||
@@ -355,7 +304,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){
|
||||
void *rrc_gnb_task(void *args_p) {
|
||||
MessageDef *msg_p;
|
||||
const char *msg_name_p;
|
||||
instance_t instance;
|
||||
@@ -363,97 +312,94 @@ void* rrc_gnb_task(void* args_p){
|
||||
//SRB_INFO *srb_info_p;
|
||||
//int CC_id;
|
||||
//protocol_ctxt_t ctxt;
|
||||
|
||||
itti_mark_task_ready(TASK_RRC_GNB);
|
||||
LOG_I(NR_RRC,"Entering main loop of NR_RRC message task\n");
|
||||
|
||||
while (1) {
|
||||
// Wait for a message
|
||||
// Wait for a message
|
||||
itti_receive_msg(TASK_RRC_GNB, &msg_p);
|
||||
|
||||
msg_name_p = ITTI_MSG_NAME(msg_p);
|
||||
instance = ITTI_MSG_INSTANCE(msg_p);
|
||||
LOG_I(NR_RRC,"Received message %s\n",msg_name_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(RRC, " *** Exiting NR_RRC thread\n");
|
||||
itti_exit_task();
|
||||
break;
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(RRC, " *** Exiting NR_RRC thread\n");
|
||||
itti_exit_task();
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(RRC, "[gNB %d] Received %s\n", instance, msg_name_p);
|
||||
break;
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(RRC, "[gNB %d] Received %s\n", instance, msg_name_p);
|
||||
break;
|
||||
|
||||
/* Messages from MAC */
|
||||
|
||||
|
||||
/* Messages from PDCP */
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_USE_MME)
|
||||
/*
|
||||
#if defined(ENABLE_USE_MME)
|
||||
|
||||
// Messages from S1AP
|
||||
case S1AP_DOWNLINK_NAS:
|
||||
rrc_eNB_process_S1AP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui);
|
||||
break;
|
||||
// Messages from S1AP
|
||||
case S1AP_DOWNLINK_NAS:
|
||||
rrc_eNB_process_S1AP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui);
|
||||
break;
|
||||
|
||||
case S1AP_INITIAL_CONTEXT_SETUP_REQ:
|
||||
rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
case S1AP_INITIAL_CONTEXT_SETUP_REQ:
|
||||
rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_UE_CTXT_MODIFICATION_REQ:
|
||||
rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
case S1AP_UE_CTXT_MODIFICATION_REQ:
|
||||
rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_PAGING_IND:
|
||||
LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
|
||||
rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_E_RAB_SETUP_REQ:
|
||||
rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
case S1AP_PAGING_IND:
|
||||
LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
|
||||
rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_E_RAB_MODIFY_REQ:
|
||||
rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
case S1AP_E_RAB_SETUP_REQ:
|
||||
rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
|
||||
case S1AP_E_RAB_RELEASE_COMMAND:
|
||||
rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_UE_CONTEXT_RELEASE_REQ:
|
||||
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
case S1AP_E_RAB_MODIFY_REQ:
|
||||
rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_UE_CONTEXT_RELEASE_COMMAND:
|
||||
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
case S1AP_E_RAB_RELEASE_COMMAND:
|
||||
rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
|
||||
///Nothing to do. Apparently everything is done in S1AP processing
|
||||
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
|
||||
//instance, msg_name_p);
|
||||
if (rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)
|
||||
&& rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc > 0) {
|
||||
rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc =
|
||||
rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_thres_rrc;
|
||||
}
|
||||
break;
|
||||
case S1AP_UE_CONTEXT_RELEASE_REQ:
|
||||
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
#endif
|
||||
*/
|
||||
/* Messages from gNB app */
|
||||
case NRRRC_CONFIGURATION_REQ:
|
||||
LOG_I(NR_RRC, "[gNB %d] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(instance), &NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
break;
|
||||
case S1AP_UE_CONTEXT_RELEASE_COMMAND:
|
||||
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC, "[gNB %d] Received unexpected message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
|
||||
///Nothing to do. Apparently everything is done in S1AP processing
|
||||
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
|
||||
//instance, msg_name_p);
|
||||
if (rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)
|
||||
&& rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc > 0) {
|
||||
rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc =
|
||||
rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_thres_rrc;
|
||||
}
|
||||
break;
|
||||
|
||||
#endif
|
||||
*/
|
||||
/* Messages from gNB app */
|
||||
case NRRRC_CONFIGURATION_REQ:
|
||||
LOG_I(NR_RRC, "[gNB %d] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(instance), &NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC, "[gNB %d] Received unexpected message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
}
|
||||
|
||||
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
|
||||
@@ -384,7 +384,6 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
|
||||
break;
|
||||
|
||||
case NR_DL_DCCH_MessageType__c1_PR_NOTHING:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
case NR_DL_DCCH_MessageType__c1_PR_rrcResume:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_rrcRelease:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment:
|
||||
@@ -393,16 +392,6 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
|
||||
case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_counterCheck:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand:
|
||||
#else
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare15:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare14:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare13:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare12:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare11:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare10:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare9:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare8:
|
||||
#endif
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare7:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare6:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare5:
|
||||
|
||||
+7
-10
@@ -105,24 +105,21 @@ typedef enum radio_type_e {
|
||||
RADIO_TYPE_MAX
|
||||
} radio_type_t;
|
||||
|
||||
extern trace_mode_t opt_type;
|
||||
extern char in_ip[40];
|
||||
extern char in_path[FILENAME_MAX];
|
||||
|
||||
/**
|
||||
* function def
|
||||
*/
|
||||
|
||||
void trace_pdu(int direction,
|
||||
uint8_t *pdu_buffer,
|
||||
unsigned int pdu_buffer_size,
|
||||
uint8_t *pdu_buffer,
|
||||
unsigned int pdu_buffer_size,
|
||||
int ueid,
|
||||
int rntiType,
|
||||
int rnti,
|
||||
uint16_t sysFrame,
|
||||
uint8_t subframe,
|
||||
int rntiType,
|
||||
int rnti,
|
||||
uint16_t sysFrame,
|
||||
uint8_t subframe,
|
||||
int oob_event,
|
||||
int oob_event_value);
|
||||
int oob_event_value);
|
||||
|
||||
int init_opt(void);
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ what about the implementation
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include "opt.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "opt.h"
|
||||
#include "common/utils/system.h"
|
||||
|
||||
int opt_enabled=0;
|
||||
@@ -99,8 +99,8 @@ int opt_enabled=0;
|
||||
//static unsigned char g_PDUBuffer[1600];
|
||||
//static unsigned int g_PDUOffset;
|
||||
|
||||
char in_ip[40];
|
||||
char in_path[FILENAME_MAX];
|
||||
static char *in_ip;
|
||||
static char *in_path;
|
||||
FILE *file_fd = NULL;
|
||||
pcap_hdr_t file_header = {
|
||||
0xa1b2c3d4, /* magic number */
|
||||
@@ -132,8 +132,7 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
|
||||
uint8_t *pdu_buffer, unsigned int pdu_buffer_size);
|
||||
|
||||
static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||
const unsigned char *PDU,
|
||||
unsigned int length);
|
||||
const unsigned char *PDU, unsigned int length);
|
||||
|
||||
static void *opt_listener_thread(void *arg) {
|
||||
ssize_t ret;
|
||||
|
||||
@@ -151,8 +151,8 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
printf("x2ap_eNB_handle_sctp_association_resp at 4\n");
|
||||
dump_trees();
|
||||
/* Prepare new x2 Setup Request */
|
||||
x2ap_eNB_generate_ENDC_x2_setup_request(instance_p, x2ap_enb_data_p);
|
||||
//x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p);
|
||||
x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p);
|
||||
//x2ap_eNB_generate_ENDC_x2_setup_request(instance_p, x2ap_enb_data_p);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -134,9 +134,9 @@ int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint3
|
||||
length,
|
||||
0,
|
||||
0);
|
||||
//if (asn1_xer_print) {
|
||||
if (asn1_xer_print) {
|
||||
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, pdu);
|
||||
//}
|
||||
}
|
||||
|
||||
if (dec_ret.code != RC_OK) {
|
||||
X2AP_ERROR("Failed to decode pdu\n");
|
||||
|
||||
@@ -44,9 +44,9 @@ int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
|
||||
DevAssert(buffer != NULL);
|
||||
DevAssert(len != NULL);
|
||||
|
||||
//if (asn1_xer_print) {
|
||||
if (asn1_xer_print) {
|
||||
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)pdu);
|
||||
//}
|
||||
}
|
||||
|
||||
encoded = aper_encode_to_new_buffer(&asn_DEF_X2AP_X2AP_PDU, 0, pdu, (void **)buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user