[to build] Monolithic: move RRC features in do_drxconfig

parent 206f17b2
...@@ -6,3 +6,6 @@ log/ ...@@ -6,3 +6,6 @@ log/
lte_build_oai/ lte_build_oai/
targets/bin/ targets/bin/
cmake_targets/nas_sim_tools/build/ cmake_targets/nas_sim_tools/build/
# vscode
.vscode
\ No newline at end of file
...@@ -646,8 +646,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -646,8 +646,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
} }
int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
const f1ap_ul_rrc_message_t *msg) const f1ap_ul_rrc_message_t *msg) {
{
const rnti_t rnti = msg->rnti; const rnti_t rnti = msg->rnti;
F1AP_F1AP_PDU_t pdu; F1AP_F1AP_PDU_t pdu;
......
...@@ -630,6 +630,17 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id, ...@@ -630,6 +630,17 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id,
LTE_UE_EUTRA_Capability_t *UEcap) 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");
return NULL;
}
if (CC_id >= MAX_NUM_CCs) {
LOG_E(RRC, "[do_DrxConfig] Invalid CC_id for DRX configuration\n");
return NULL;
}
LTE_DRX_Config_t *drxConfig = NULL; LTE_DRX_Config_t *drxConfig = NULL;
BIT_STRING_t *featureGroupIndicators = NULL; BIT_STRING_t *featureGroupIndicators = NULL;
bool ueSupportCdrxShortFlag = false; bool ueSupportCdrxShortFlag = false;
...@@ -647,6 +658,9 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id, ...@@ -647,6 +658,9 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id,
} else LOG_W(RRC,"[do_DrxConfig] No featureGroupIndicators pointer\n"); } else LOG_W(RRC,"[do_DrxConfig] No featureGroupIndicators pointer\n");
} else LOG_W(RRC,"[do_DrxConfig] No UEcap pointer\n"); } else LOG_W(RRC,"[do_DrxConfig] No UEcap pointer\n");
/* Check if UE support CE mode A */
// TODO
if (configuration->radioresourceconfig[CC_id].drx_Config_present == LTE_DRX_Config_PR_NOTHING) { if (configuration->radioresourceconfig[CC_id].drx_Config_present == LTE_DRX_Config_PR_NOTHING) {
return NULL; return NULL;
} }
......
...@@ -3207,39 +3207,19 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3207,39 +3207,19 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) { if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
/* CDRX Configuration */ /* CDRX Configuration */
// Need to check if UE is a BR UE LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
int UE_id = find_UE_id(module_id, rnti);
/* Process the IE drx_Config */
if (UE_id != -1) { mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
eNB_MAC_INST *mac = RC.mac[module_id];
UE_list_t *UE_list = &(mac->UE_list);
if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
(UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
// CDRX can be only configured in case of FDD and non BR UE (09/04/19)
LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
/* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
if (mac_MainConfig->drx_Config == NULL) { if (mac_MainConfig->drx_Config == NULL) {
LOG_E(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n"); LOG_E(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\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");
}
} else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
}
} else { // CDRX not implemented for TDD and LTE-M (09/04/19)
LOG_E(RRC, "CDRX not implemented for TDD and LTE-M\n");
}
} else { // UE_id invalid
LOG_E(RRC, "Invalid UE_id found!\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");
/* End of CDRX configuration */ /* 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