Commit 78173581 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

Cleanup of enb_config.c config.c asn1_msg.c asn1_msg.h

parent 8359b968
......@@ -1189,7 +1189,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
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",
"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);
}
......
......@@ -1058,9 +1058,9 @@ void eNB_Config_Local_DRX(
return;
}
/* Modify scheduling control structure according to DRX configuration */
/* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */
UE_scheduling_control->cdrx_configured = TRUE;
UE_scheduling_control->bypass_cdrx = TRUE;
UE_scheduling_control->bypass_cdrx = 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->on_duration_timer = 0;
......
......@@ -317,13 +317,22 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
return((enc_rval.encoded+7)/8);
}
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap)
//-----------------------------------------------------------------------------
/*
* Generate the configuration structure for CDRX feature
*/
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
int CC_id,
RrcConfigurationReq *configuration,
LTE_UE_EUTRA_Capability_t *UEcap)
//-----------------------------------------------------------------------------
{
LTE_DRX_Config_t *drxConfig = NULL;
BIT_STRING_t *featureGroupIndicators = NULL;
bool ueSupportCdrxShortFlag = false;
bool ueSupportCdrxLongFlag = false;
/* Check the UE capabilities for short and long CDRX cycles support */
if (UEcap) {
featureGroupIndicators = UEcap->featureGroupIndicators;
if (featureGroupIndicators) {
......@@ -339,6 +348,7 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *c
if (drxConfig == NULL) return NULL;
memset(drxConfig, 0, sizeof(LTE_DRX_Config_t));
/* Long DRX cycle support is mandatory for CDRX activation */
if (!ueSupportCdrxLongFlag || configuration == NULL) {
drxConfig->present = LTE_DRX_Config_PR_release;
} else {
......@@ -405,6 +415,8 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *c
default:
break;
}
/* Short DRX cycle configuration */
if (!ueSupportCdrxShortFlag || configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer == 0) {
drxConfig->choice.setup.shortDRX = NULL;
} else {
......
......@@ -71,12 +71,12 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
);
/**
\brief Generate configuration for DRX_Config
\brief Generate configuration structure for DRX_Config
@param Mod_id Instance of eNB
@param CC_id Id of component to configure
@param configuration Pointer Configuration Request structure
@param UEcap Pointer Configuration UE capablities
@return DRX_Config structure pointer or NULL => error*/
@return DRX_Config structure pointer or NULL => error */
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment