Commit 5f00b40e authored by Stefan Schaffelder's avatar Stefan Schaffelder

asn1_msg.do_DrxConfig

parent 5ddad9bd
...@@ -625,8 +625,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier, ...@@ -625,8 +625,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
/* /*
* Generate the configuration structure for CDRX feature * Generate the configuration structure for CDRX feature
*/ */
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, LTE_DRX_Config_t *do_DrxConfig(int CC_id,
int CC_id,
RrcConfigurationReq *configuration, RrcConfigurationReq *configuration,
LTE_UE_EUTRA_Capability_t *UEcap) LTE_UE_EUTRA_Capability_t *UEcap)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -666,58 +665,60 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, ...@@ -666,58 +665,60 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
if (drxConfig->present == LTE_DRX_Config_PR_release) { if (drxConfig->present == LTE_DRX_Config_PR_release) {
drxConfig->choice.release = (NULL_t) 0; drxConfig->choice.release = (NULL_t) 0;
} else { } else {
drxConfig->choice.setup.onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer; struct LTE_DRX_Config__setup *choiceSetup = &drxConfig->choice.setup;
drxConfig->choice.setup.drx_InactivityTimer = configuration->radioresourceconfig[CC_id].drx_InactivityTimer; choiceSetup->onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer;
drxConfig->choice.setup.drx_RetransmissionTimer = configuration->radioresourceconfig[CC_id].drx_RetransmissionTimer; // drxConfig->choice.setup.onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer;
drxConfig->choice.setup.longDRX_CycleStartOffset.present = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset_present; choiceSetup->drx_InactivityTimer = configuration->radioresourceconfig[CC_id].drx_InactivityTimer;
switch (drxConfig->choice.setup.longDRX_CycleStartOffset.present) { choiceSetup->drx_RetransmissionTimer = configuration->radioresourceconfig[CC_id].drx_RetransmissionTimer;
choiceSetup->longDRX_CycleStartOffset.present = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset_present;
switch (choiceSetup->longDRX_CycleStartOffset.present) {
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf10 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf10 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf20 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf20 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf32 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf32 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf40 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf40 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf64 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf64 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf80 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf80 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf128 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf128 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf160 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf160 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf256 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf256 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf320 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf320 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf512 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf512 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf640 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf640 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf1024 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf1024 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf1280 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf1280 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf2048 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf2048 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560: case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf2560 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset; choiceSetup->longDRX_CycleStartOffset.choice.sf2560 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
break; break;
default: default:
break; break;
...@@ -725,12 +726,12 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, ...@@ -725,12 +726,12 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
/* Short DRX cycle configuration */ /* Short DRX cycle configuration */
if (!ueSupportCdrxShortFlag || configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer == 0) { if (!ueSupportCdrxShortFlag || configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer == 0) {
drxConfig->choice.setup.shortDRX = NULL; choiceSetup->shortDRX = NULL;
} else { } else {
drxConfig->choice.setup.shortDRX = MALLOC(sizeof(struct LTE_DRX_Config__setup__shortDRX)); choiceSetup->shortDRX = MALLOC(sizeof(struct LTE_DRX_Config__setup__shortDRX));
memset(drxConfig->choice.setup.shortDRX, 0, sizeof(struct LTE_DRX_Config__setup__shortDRX)); memset(choiceSetup->shortDRX, 0, sizeof(struct LTE_DRX_Config__setup__shortDRX));
drxConfig->choice.setup.shortDRX->shortDRX_Cycle = configuration->radioresourceconfig[CC_id].drx_shortDrx_Cycle; choiceSetup->shortDRX->shortDRX_Cycle = configuration->radioresourceconfig[CC_id].drx_shortDrx_Cycle;
drxConfig->choice.setup.shortDRX->drxShortCycleTimer = configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer; choiceSetup->shortDRX->drxShortCycleTimer = configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer;
} }
} }
......
...@@ -81,12 +81,11 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich ...@@ -81,12 +81,11 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame); uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame);
/** /**
\brief Generate configuration structure 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 CC_id Id of component to configure
@param configuration Pointer Configuration Request structure @param configuration Pointer Configuration Request structure
@param UEcap Pointer Configuration UE capablities @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); LTE_DRX_Config_t *do_DrxConfig(int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
/** /**
\brief Generate configuration for SIB1 (eNB). \brief Generate configuration for SIB1 (eNB).
......
...@@ -3219,7 +3219,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3219,7 +3219,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
/* Process the IE drx_Config */ /* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) { if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
} else { } else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n"); LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
} }
...@@ -3951,7 +3951,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt ...@@ -3951,7 +3951,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
/* Process the IE drx_Config */ /* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) { if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
} else { } else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n"); LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
} }
......
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