Commit b01623f6 authored by Stefan Schaffelder's avatar Stefan Schaffelder

cdrx_configured update

parent 5f00b40e
...@@ -1018,31 +1018,30 @@ void eNB_Config_Local_DRX( ...@@ -1018,31 +1018,30 @@ void eNB_Config_Local_DRX(
/* Get struct to modify */ /* Get struct to modify */
UE_scheduling_control = &(UE_list_mac->UE_sched_ctrl[UE_id]); UE_scheduling_control = &(UE_list_mac->UE_sched_ctrl[UE_id]);
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error
/* Check drx_Configuration */ /* Check drx_Configuration */
if (drx_Configuration == NULL) { if (drx_Configuration == NULL) {
LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n"); LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
UE_scheduling_control->cdrx_configured = FALSE;
return; return;
} }
/* Check if drx config present */ /* Check if drx config present */
if (drx_Configuration->present != LTE_DRX_Config_PR_setup) { if (drx_Configuration->present != LTE_DRX_Config_PR_setup) {
LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n"); LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n");
UE_scheduling_control->cdrx_configured = FALSE;
return; return;
} }
/* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */ /* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when ACK is received LOG_I(MAC, "Initial cdrx_waiting_ack state: %s\n", UE_scheduling_control->cdrx_waiting_ack ? "TRUE" : "FALSE");
UE_scheduling_control->cdrx_waiting_ack = TRUE; // set to true first, waiting for the UE to configure CDRX on its side UE_scheduling_control->cdrx_configured = TRUE; // will be set to true
UE_scheduling_control->cdrx_waiting_ack = TRUE; // For debugging only
UE_scheduling_control->in_active_time = FALSE; UE_scheduling_control->in_active_time = FALSE;
UE_scheduling_control->dci0_ongoing_timer = 0; UE_scheduling_control->dci0_ongoing_timer = 0;
UE_scheduling_control->on_duration_timer = 0; UE_scheduling_control->on_duration_timer = 0;
switch (drx_Configuration->choice.setup.onDurationTimer) { struct LTE_DRX_Config__setup *choiceSetup = &drx_Configuration->choice.setup;
switch (choiceSetup->onDurationTimer) {
case 0: case 0:
UE_scheduling_control->on_duration_timer_thres = 1; UE_scheduling_control->on_duration_timer_thres = 1;
break; break;
...@@ -1097,7 +1096,7 @@ void eNB_Config_Local_DRX( ...@@ -1097,7 +1096,7 @@ void eNB_Config_Local_DRX(
} }
UE_scheduling_control->drx_inactivity_timer = 0; UE_scheduling_control->drx_inactivity_timer = 0;
switch (drx_Configuration->choice.setup.drx_InactivityTimer) { switch (choiceSetup->drx_InactivityTimer) {
case 0: case 0:
UE_scheduling_control->drx_inactivity_timer_thres = 1; UE_scheduling_control->drx_inactivity_timer_thres = 1;
break; break;
...@@ -1172,7 +1171,7 @@ void eNB_Config_Local_DRX( ...@@ -1172,7 +1171,7 @@ void eNB_Config_Local_DRX(
break; break;
} }
if (drx_Configuration->choice.setup.shortDRX == NULL) { if (choiceSetup->shortDRX == NULL) {
UE_scheduling_control->in_short_drx_cycle = FALSE; UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->drx_shortCycle_timer_value = 0; UE_scheduling_control->drx_shortCycle_timer_value = 0;
UE_scheduling_control->short_drx_cycle_duration = 0; UE_scheduling_control->short_drx_cycle_duration = 0;
...@@ -1180,8 +1179,8 @@ void eNB_Config_Local_DRX( ...@@ -1180,8 +1179,8 @@ void eNB_Config_Local_DRX(
UE_scheduling_control->drx_shortCycle_timer_thres = -1; UE_scheduling_control->drx_shortCycle_timer_thres = -1;
} else { } else {
UE_scheduling_control->in_short_drx_cycle = FALSE; UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) drx_Configuration->choice.setup.shortDRX->drxShortCycleTimer; UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) choiceSetup->shortDRX->drxShortCycleTimer;
switch (drx_Configuration->choice.setup.shortDRX->shortDRX_Cycle) { switch (choiceSetup->shortDRX->shortDRX_Cycle) {
case 0: case 0:
UE_scheduling_control->short_drx_cycle_duration = 2; UE_scheduling_control->short_drx_cycle_duration = 2;
break; break;
...@@ -1241,70 +1240,70 @@ void eNB_Config_Local_DRX( ...@@ -1241,70 +1240,70 @@ void eNB_Config_Local_DRX(
UE_scheduling_control->in_long_drx_cycle = FALSE; UE_scheduling_control->in_long_drx_cycle = FALSE;
UE_scheduling_control->drx_longCycle_timer = 0; UE_scheduling_control->drx_longCycle_timer = 0;
switch (drx_Configuration->choice.setup.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:
UE_scheduling_control->drx_longCycle_timer_thres = 10; UE_scheduling_control->drx_longCycle_timer_thres = 10;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf10; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf10;
break; 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_longCycle_timer_thres = 20;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf20; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf20;
break; 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_longCycle_timer_thres = 32;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf32; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf32;
break; 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_longCycle_timer_thres = 40;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf40; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf40;
break; 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_longCycle_timer_thres = 64;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf64; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf64;
break; 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_longCycle_timer_thres = 80;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf80; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf80;
break; 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_longCycle_timer_thres = 128;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf128; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf128;
break; 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_longCycle_timer_thres = 160;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf160; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf160;
break; 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_longCycle_timer_thres = 256;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf256; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf256;
break; 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_longCycle_timer_thres = 320;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf320; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf320;
break; 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_longCycle_timer_thres = 512;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf512; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf512;
break; 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_longCycle_timer_thres = 640;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf640; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf640;
break; 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_longCycle_timer_thres = 1024;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1024; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf1024;
break; 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_longCycle_timer_thres = 1280;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1280; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf1280;
break; 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_longCycle_timer_thres = 2048;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2048; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf2048;
break; 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_longCycle_timer_thres = 2560;
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2560; UE_scheduling_control->drx_start_offset = (uint16_t) choiceSetup->longDRX_CycleStartOffset.choice.sf2560;
break; break;
default: default:
LOG_E(MAC, "Invalid long_DRX value in DRX local configuration\n"); LOG_E(MAC, "Invalid long_DRX value in DRX local configuration\n");
...@@ -1312,7 +1311,7 @@ void eNB_Config_Local_DRX( ...@@ -1312,7 +1311,7 @@ void eNB_Config_Local_DRX(
} }
memset(UE_scheduling_control->drx_retransmission_timer, 0, sizeof(UE_scheduling_control->drx_retransmission_timer)); memset(UE_scheduling_control->drx_retransmission_timer, 0, sizeof(UE_scheduling_control->drx_retransmission_timer));
switch (drx_Configuration->choice.setup.drx_RetransmissionTimer) { switch (choiceSetup->drx_RetransmissionTimer) {
case 0: case 0:
memset(UE_scheduling_control->drx_retransmission_timer_thres, 1, sizeof(UE_scheduling_control->drx_retransmission_timer_thres)); memset(UE_scheduling_control->drx_retransmission_timer_thres, 1, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
break; break;
......
...@@ -667,7 +667,6 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id, ...@@ -667,7 +667,6 @@ LTE_DRX_Config_t *do_DrxConfig(int CC_id,
} else { } else {
struct LTE_DRX_Config__setup *choiceSetup = &drxConfig->choice.setup; struct LTE_DRX_Config__setup *choiceSetup = &drxConfig->choice.setup;
choiceSetup->onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer; choiceSetup->onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer;
// drxConfig->choice.setup.onDurationTimer = configuration->radioresourceconfig[CC_id].drx_onDurationTimer;
choiceSetup->drx_InactivityTimer = configuration->radioresourceconfig[CC_id].drx_InactivityTimer; choiceSetup->drx_InactivityTimer = configuration->radioresourceconfig[CC_id].drx_InactivityTimer;
choiceSetup->drx_RetransmissionTimer = configuration->radioresourceconfig[CC_id].drx_RetransmissionTimer; choiceSetup->drx_RetransmissionTimer = configuration->radioresourceconfig[CC_id].drx_RetransmissionTimer;
choiceSetup->longDRX_CycleStartOffset.present = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset_present; choiceSetup->longDRX_CycleStartOffset.present = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset_present;
......
...@@ -6503,8 +6503,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6503,8 +6503,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_waiting_ack = FALSE;
UE_scheduling_control->cdrx_configured = TRUE; // UE_scheduling_control->cdrx_configured = TRUE;
LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n"); LOG_I(RRC, "CDRX configuration after first RRC Connection Reconfiguration Complete reception\n");
} }
} // No CDRX with the CU/DU split in this version of the code } // No CDRX with the CU/DU split in this version of the code
......
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