Commit eddc13d2 authored by LAD's avatar LAD

[to build] Check coverage extension through UE capabilities

parent 34f0bdac
......@@ -630,36 +630,108 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id,
LTE_UE_EUTRA_Capability_t *UEcap)
//-----------------------------------------------------------------------------
{
// CDRX not implemented for TDD
if (rrc_inst->carrier[CC_id].sib1->tdd_Config != NULL) {
LOG_E(RRC, "[do_DrxConfig] CDRX not implemented for TDD and LTE-M\n");
/* Need UE capabilities */
if (!UEcap) {
LOG_E(RRC,"[do_DrxConfig] No UEcap pointer\n");
return NULL;
}
/* Check CC id */
if (CC_id >= MAX_NUM_CCs) {
LOG_E(RRC, "[do_DrxConfig] Invalid CC_id for DRX configuration\n");
return NULL;
}
/* CDRX not implemented for TDD */
if (rrc_inst->carrier[CC_id].sib1->tdd_Config) {
LOG_E(RRC, "[do_DrxConfig] CDRX not implemented for TDD\n");
return NULL;
}
/* Check the UE capabilities, CDRX not implemented for Coverage Extension */
LTE_UE_EUTRA_Capability_v920_IEs_t *cap_920 = NULL;
LTE_UE_EUTRA_Capability_v940_IEs_t *cap_940 = NULL;
LTE_UE_EUTRA_Capability_v1020_IEs_t *cap_1020 = NULL;
LTE_UE_EUTRA_Capability_v1060_IEs_t *cap_1060 = NULL;
LTE_UE_EUTRA_Capability_v1090_IEs_t *cap_1090 = NULL;
LTE_UE_EUTRA_Capability_v1130_IEs_t *cap_1130 = NULL;
LTE_UE_EUTRA_Capability_v1170_IEs_t *cap_1170 = NULL;
LTE_UE_EUTRA_Capability_v1180_IEs_t *cap_1180 = NULL;
LTE_UE_EUTRA_Capability_v11a0_IEs_t *cap_11a0 = NULL;
LTE_UE_EUTRA_Capability_v1250_IEs_t *cap_1250 = NULL;
LTE_UE_EUTRA_Capability_v1260_IEs_t *cap_1260 = NULL;
LTE_UE_EUTRA_Capability_v1270_IEs_t *cap_1270 = NULL;
LTE_UE_EUTRA_Capability_v1280_IEs_t *cap_1280 = NULL;
LTE_UE_EUTRA_Capability_v1310_IEs_t *cap_1310 = NULL;
LTE_CE_Parameters_r13_t *CE_param = NULL;
long *ce_a_param = NULL;
cap_920 = UEcap->nonCriticalExtension;
if (cap_920) {
cap_940 = cap_920->nonCriticalExtension;
if (cap_940) {
cap_1020 = cap_940->nonCriticalExtension;
if (cap_1020) {
cap_1060 = cap_1020->nonCriticalExtension;
if (cap_1060) {
cap_1090 = cap_1060->nonCriticalExtension;
if (cap_1090) {
cap_1130 = cap_1090->nonCriticalExtension;
if (cap_1130) {
cap_1170 = cap_1130->nonCriticalExtension;
if (cap_1170) {
cap_1180 = cap_1170->nonCriticalExtension;
if (cap_1180) {
cap_11a0 = cap_1180->nonCriticalExtension;
if (cap_11a0) {
cap_1250 = cap_11a0->nonCriticalExtension;
if (cap_1250) {
cap_1260 = cap_1250->nonCriticalExtension;
if (cap_1260) {
cap_1270 = cap_1260->nonCriticalExtension;
if (cap_1270) {
cap_1280 = cap_1270->nonCriticalExtension;
if (cap_1280) {
cap_1310 = cap_1280->nonCriticalExtension;
if (cap_1310) {
CE_param = cap_1310->ce_Parameters_r13;
if (CE_param) {
ce_a_param = CE_param->ce_ModeA_r13;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (ce_a_param) {
LOG_E(RRC,"[do_DrxConfig] Coverage Extension not supported by CDRX\n");
return NULL;
}
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) {
if (featureGroupIndicators->size > 1 || (featureGroupIndicators->size == 1 && featureGroupIndicators->bits_unused < 4)) {
ueSupportCdrxShortFlag = ((featureGroupIndicators->buf[0] & (uint8_t) 0x10) > 0);
ueSupportCdrxLongFlag = ((featureGroupIndicators->buf[0] & (uint8_t) 0x08) > 0);
LOG_I(RRC,"[do_DrxConfig] featureGroupIndicators->buf[0]: %x\n", featureGroupIndicators->buf[0]);
} else LOG_W(RRC,"[do_DrxConfig] Not enough featureGroupIndicators bits\n");
} else LOG_W(RRC,"[do_DrxConfig] No featureGroupIndicators pointer\n");
} else LOG_W(RRC,"[do_DrxConfig] No UEcap pointer\n");
/* Check if UE support CE mode A */
// TODO
featureGroupIndicators = UEcap->featureGroupIndicators;
if (featureGroupIndicators) {
if (featureGroupIndicators->size > 1 || (featureGroupIndicators->size == 1 && featureGroupIndicators->bits_unused < 4)) {
ueSupportCdrxShortFlag = ((featureGroupIndicators->buf[0] & (uint8_t) 0x10) > 0);
ueSupportCdrxLongFlag = ((featureGroupIndicators->buf[0] & (uint8_t) 0x08) > 0);
LOG_I(RRC,"[do_DrxConfig] featureGroupIndicators->buf[0]: %x\n", featureGroupIndicators->buf[0]);
} else LOG_W(RRC,"[do_DrxConfig] Not enough featureGroupIndicators bits\n");
} else LOG_W(RRC,"[do_DrxConfig] No featureGroupIndicators pointer\n");
if (configuration->radioresourceconfig[CC_id].drx_Config_present == LTE_DRX_Config_PR_NOTHING) {
return NULL;
......
......@@ -3213,13 +3213,12 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
if (mac_MainConfig->drx_Config == NULL) {
LOG_E(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
}
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(module_id, rnti, mac_MainConfig->drx_Config);
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else {
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(module_id, rnti, mac_MainConfig->drx_Config);
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
}
/* End of CDRX configuration */
}
......
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