Commit 683a39c9 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/NR_UE_RRC_Reconfiguration_improvements'...

Merge remote-tracking branch 'origin/NR_UE_RRC_Reconfiguration_improvements' into integration_2024_w47 (!2996)

Improvements in handling RRC Reconfiguration at UE
parents 8b7b918c 3c6a588e
......@@ -1676,6 +1676,32 @@ static int get_ta_offset(long *n_TimingAdvanceOffset)
return -1;
}
static void configure_si_schedulingInfo(NR_UE_MAC_INST_t *mac,
NR_SI_SchedulingInfo_t *si_SchedulingInfo,
NR_SI_SchedulingInfo_v1700_t *si_SchedulingInfo_v1700)
{
asn_sequence_empty(&mac->si_SchedInfo.si_SchedInfo_list);
if (si_SchedulingInfo) {
mac->si_SchedInfo.si_WindowLength = si_SchedulingInfo->si_WindowLength;
for (int i = 0; i < si_SchedulingInfo->schedulingInfoList.list.count; i++) {
si_schedinfo_config_t *config = calloc_or_fail(1, sizeof(*config));
config->type = NR_SI_INFO;
config->si_WindowPosition = i + 1;
config->si_Periodicity = si_SchedulingInfo->schedulingInfoList.list.array[i]->si_Periodicity;
ASN_SEQUENCE_ADD(&mac->si_SchedInfo.si_SchedInfo_list, config);
}
}
if (si_SchedulingInfo_v1700) {
for (int i = 0; i < si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.count; i++) {
si_schedinfo_config_t *config = calloc_or_fail(1, sizeof(*config));
config->type = NR_SI_INFO_v1700;
config->si_WindowPosition = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[i]->si_WindowPosition_r17;
config->si_Periodicity = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[i]->si_Periodicity_r17;
ASN_SEQUENCE_ADD(&mac->si_SchedInfo.si_SchedInfo_list, config);
}
}
}
void nr_rrc_mac_config_req_sib1(module_id_t module_id,
int cc_idP,
NR_SI_SchedulingInfo_t *si_SchedulingInfo,
......@@ -1688,8 +1714,7 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
AssertFatal(scc, "SIB1 SCC should not be NULL\n");
UPDATE_IE(mac->tdd_UL_DL_ConfigurationCommon, scc->tdd_UL_DL_ConfigurationCommon, NR_TDD_UL_DL_ConfigCommon_t);
UPDATE_IE(mac->si_SchedulingInfo, si_SchedulingInfo, NR_SI_SchedulingInfo_t);
UPDATE_IE(mac->si_SchedulingInfo_v1700, si_SchedulingInfo_v1700, NR_SI_SchedulingInfo_v1700_t);
configure_si_schedulingInfo(mac, si_SchedulingInfo, si_SchedulingInfo_v1700);
mac->n_ta_offset = get_ta_offset(scc->n_TimingAdvanceOffset);
config_common_ue_sa(mac, scc, cc_idP);
......@@ -1734,35 +1759,32 @@ void nr_rrc_mac_config_req_sib19_r17(module_id_t module_id,
static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
int cc_idP,
const NR_ReconfigurationWithSync_t *reconfigurationWithSync)
const NR_ReconfigurationWithSync_t *reconfWithSync)
{
mac->crnti = reconfigurationWithSync->newUE_Identity;
reset_mac_inst(mac);
mac->crnti = reconfWithSync->newUE_Identity;
LOG_I(NR_MAC, "Configuring CRNTI %x\n", mac->crnti);
RA_config_t *ra = &mac->ra;
if (reconfigurationWithSync->rach_ConfigDedicated) {
AssertFatal(
reconfigurationWithSync->rach_ConfigDedicated->present == NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink,
"RACH on supplementaryUplink not supported\n");
UPDATE_IE(ra->rach_ConfigDedicated, reconfigurationWithSync->rach_ConfigDedicated->choice.uplink, NR_RACH_ConfigDedicated_t);
if (reconfWithSync->rach_ConfigDedicated) {
AssertFatal(reconfWithSync->rach_ConfigDedicated->present == NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink,
"RACH on supplementaryUplink not supported\n");
UPDATE_IE(ra->rach_ConfigDedicated, reconfWithSync->rach_ConfigDedicated->choice.uplink, NR_RACH_ConfigDedicated_t);
}
if (reconfigurationWithSync->spCellConfigCommon) {
NR_ServingCellConfigCommon_t *scc = reconfigurationWithSync->spCellConfigCommon;
if (reconfWithSync->spCellConfigCommon) {
NR_ServingCellConfigCommon_t *scc = reconfWithSync->spCellConfigCommon;
mac->n_ta_offset = get_ta_offset(scc->n_TimingAdvanceOffset);
if (scc->physCellId)
mac->physCellId = *scc->physCellId;
mac->dmrs_TypeA_Position = scc->dmrs_TypeA_Position;
UPDATE_IE(mac->tdd_UL_DL_ConfigurationCommon, scc->tdd_UL_DL_ConfigurationCommon, NR_TDD_UL_DL_ConfigCommon_t);
config_common_ue(mac, scc, cc_idP);
const int bwp_id = 0;
if (scc->downlinkConfigCommon)
configure_common_BWP_dl(mac,
0, // bwp-id
scc->downlinkConfigCommon->initialDownlinkBWP);
configure_common_BWP_dl(mac, bwp_id, scc->downlinkConfigCommon->initialDownlinkBWP);
if (scc->uplinkConfigCommon)
configure_common_BWP_ul(mac,
0, // bwp-id
scc->uplinkConfigCommon->initialUplinkBWP);
configure_common_BWP_ul(mac, bwp_id, scc->uplinkConfigCommon->initialUplinkBWP);
}
mac->state = UE_NOT_SYNC;
......
......@@ -537,6 +537,23 @@ typedef struct {
int NPRB;
} ue_mac_stats_t;
typedef enum {
NR_SI_INFO,
NR_SI_INFO_v1700
} nr_si_info_type;
typedef struct {
nr_si_info_type type;
long si_Periodicity;
long si_WindowPosition;
} si_schedinfo_config_t;
typedef struct {
int si_window_start;
int si_WindowLength;
A_SEQUENCE_OF(si_schedinfo_config_t) si_SchedInfo_list;
} si_schedInfo_t;
/*!\brief Top level UE MAC structure */
typedef struct NR_UE_MAC_INST_s {
module_id_t ue_id;
......@@ -547,9 +564,8 @@ typedef struct NR_UE_MAC_INST_s {
bool get_sib1;
bool get_otherSI;
NR_MIB_t *mib;
struct NR_SI_SchedulingInfo *si_SchedulingInfo;
struct NR_SI_SchedulingInfo_v1700 *si_SchedulingInfo_v1700;
int si_window_start;
si_schedInfo_t si_SchedInfo;
ssb_list_info_t ssb_list[MAX_NUM_BWP_UE];
prach_association_pattern_t prach_assoc_pattern[MAX_NUM_BWP_UE];
......
......@@ -60,7 +60,7 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac)
mac->get_sib1 = false;
mac->get_otherSI = false;
memset(&mac->phy_config, 0, sizeof(mac->phy_config));
mac->si_window_start = -1;
mac->si_SchedInfo.si_window_start = -1;
mac->servCellIndex = 0;
mac->harq_ACK_SpatialBundlingPUCCH = false;
mac->harq_ACK_SpatialBundlingPUSCH = false;
......@@ -261,7 +261,7 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, NR_UE_MAC_reset_cause_t ca
asn1cFreeStruc(asn_DEF_NR_MIB, mac->mib);
asn1cFreeStruc(asn_DEF_NR_SearchSpace, mac->search_space_zero);
asn1cFreeStruc(asn_DEF_NR_ControlResourceSet, mac->coreset0);
asn1cFreeStruc(asn_DEF_NR_SI_SchedulingInfo, mac->si_SchedulingInfo);
asn_sequence_empty(&mac->si_SchedInfo.si_SchedInfo_list);
asn1cFreeStruc(asn_DEF_NR_TDD_UL_DL_ConfigCommon, mac->tdd_UL_DL_ConfigurationCommon);
for (int i = mac->lc_ordered_list.count; i > 0 ; i--)
asn_sequence_del(&mac->lc_ordered_list, i - 1, 1);
......
......@@ -444,8 +444,8 @@ bool search_space_monitoring_ocasion_other_si(NR_UE_MAC_INST_t *mac,
int K = mac->ssb_list->nb_ssb_per_index[mac->mib_ssb];
// numbering current frame and slot in terms of monitoring occasions in window
int current_monitor_occasion =
((abs_slot - mac->si_window_start) % period) + (duration * (abs_slot - mac->si_window_start) / period);
int rel_slot = abs_slot - mac->si_SchedInfo.si_window_start;
int current_monitor_occasion = (rel_slot % period) + (duration * rel_slot / period);
return current_monitor_occasion % N == K;
}
}
......@@ -455,12 +455,12 @@ bool search_space_monitoring_ocasion_other_si(NR_UE_MAC_INST_t *mac,
bool is_window_valid(NR_UE_MAC_INST_t *mac, int window_slots, int abs_slot)
{
if (mac->si_window_start == -1) {
if (mac->si_SchedInfo.si_window_start == -1) {
// out of window
return false;
} else if (abs_slot > mac->si_window_start + window_slots) {
} else if (abs_slot > mac->si_SchedInfo.si_window_start + window_slots) {
// window expired
mac->si_window_start = -1;
mac->si_SchedInfo.si_window_start = -1;
return false;
}
return true;
......@@ -472,56 +472,38 @@ bool monitor_dci_for_other_SI(NR_UE_MAC_INST_t *mac,
const int frame,
const int slot)
{
const struct NR_SI_SchedulingInfo *si_SchedulingInfo = mac->si_SchedulingInfo;
const struct NR_SI_SchedulingInfo_v1700 *si_SchedulingInfo_v1700 = mac->si_SchedulingInfo_v1700;
// 5.2.2.3.2 in 331
if (!si_SchedulingInfo_v1700 && !si_SchedulingInfo) {
LOG_D(NR_MAC_DCI, "No scheduling info provided in SIB1\n");
return false;
}
// according to 5.2.2.3.2 in 331
const int abs_slot = frame * slots_per_frame + slot;
const int bwp_id = mac->current_DL_BWP->bwp_id;
if (si_SchedulingInfo) {
const int si_window_slots = 5 << si_SchedulingInfo->si_WindowLength;
for (int n = 0; n < si_SchedulingInfo->schedulingInfoList.list.count; n++) {
struct NR_SchedulingInfo *sched_Info = si_SchedulingInfo->schedulingInfoList.list.array[n];
if (mac->si_window_start == -1) {
int x = n * si_window_slots;
int T = 8 << sched_Info->si_Periodicity; // radio frame periodicity
if ((frame % T) == (x / slots_per_frame) && (x % slots_per_frame == 0))
mac->si_window_start = abs_slot; // in terms of absolute slot number
}
bool check_valid = is_window_valid(mac, si_window_slots, abs_slot);
if (check_valid && search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id)) {
return true;
}
}
}
if (si_SchedulingInfo_v1700) {
for (int n = 0; n < si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.count; n++) {
struct NR_SchedulingInfo2_r17 *sched_Info = si_SchedulingInfo_v1700->schedulingInfoList2_r17.list.array[n];
const int T = 8 << sched_Info->si_Periodicity_r17;
const int window_slots = 5 << 1; // 10 slots
const int x = ((sched_Info->si_WindowPosition_r17 - 1) * window_slots); // currently window starts from slot 0, maybe + 1?
const int N = 10; // TS 38.211
if (mac->si_window_start == -1) {
// this condition will calculate where SI-window starts
// 5.2.2.3.2
if ((frame % T == floor(x / N)) && (slot == x % N)) {
mac->si_window_start = abs_slot;
for (int i = 0; i < mac->si_SchedInfo.si_SchedInfo_list.count; i++) {
si_schedinfo_config_t *config = mac->si_SchedInfo.si_SchedInfo_list.array[i];
int window_slots = 5 << mac->si_SchedInfo.si_WindowLength;
int x = (config->si_WindowPosition - 1) * window_slots;
int T = 8 << config->si_Periodicity; // radio frame periodicity
bool check_valid;
switch (config->type) {
case NR_SI_INFO :
if (mac->si_SchedInfo.si_window_start == -1) {
if ((frame % T) == (x / slots_per_frame) && (x % slots_per_frame == 0))
mac->si_SchedInfo.si_window_start = abs_slot; // in terms of absolute slot number
}
}
bool check_valid = is_window_valid(mac, window_slots, abs_slot);
if (check_valid && (sched_Info->si_WindowPosition_r17 - 1) == slot) {
return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id);
}
check_valid = is_window_valid(mac, window_slots, abs_slot);
if (check_valid && search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id))
return true;
break;
case NR_SI_INFO_v1700 :
if (mac->si_SchedInfo.si_window_start == -1) {
if ((frame % T == floor(x / slots_per_frame)) && (slot == x % slots_per_frame))
mac->si_SchedInfo.si_window_start = abs_slot;
}
window_slots = 10; // TODO window length hardcoded to 10 at gNB for NTN
check_valid = is_window_valid(mac, window_slots, abs_slot);
if (check_valid && (config->si_WindowPosition - 1) == slot)
return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame, bwp_id);
break;
default :
AssertFatal(false, "Invalid SI-SchedulingInfo case\n");
}
}
return false;
......
This diff is collapsed.
......@@ -106,51 +106,51 @@ typedef enum RA_trigger_e {
typedef struct UE_RRC_SI_INFO_NR_r17_s {
uint32_t default_otherSI_map_r17;
NR_SIB15_r17_t *sib15;
bool sib15_validity;
NR_timer_t sib15_timer;
NR_SIB16_r17_t *sib16;
bool sib16_validity;
NR_timer_t sib16_timer;
NR_SIB17_r17_t *sib17;
bool sib17_validity;
NR_timer_t sib17_timer;
NR_SIB18_r17_t *sib18;
bool sib18_validity;
NR_timer_t sib18_timer;
NR_SIB19_r17_t *sib19;
bool sib19_validity;
NR_timer_t sib19_timer;
NR_SIB20_r17_t *sib20;
bool sib20_validity;
NR_timer_t sib20_timer;
NR_SIB21_r17_t *sib21;
bool sib21_validity;
NR_timer_t sib21_timer;
} NR_UE_RRC_SI_INFO_r17;
typedef struct UE_RRC_SI_INFO_NR_s {
uint32_t default_otherSI_map;
NR_SIB1_t *sib1;
bool sib1_validity;
NR_timer_t sib1_timer;
NR_SIB2_t *sib2;
bool sib2_validity;
NR_timer_t sib2_timer;
NR_SIB3_t *sib3;
bool sib3_validity;
NR_timer_t sib3_timer;
NR_SIB4_t *sib4;
bool sib4_validity;
NR_timer_t sib4_timer;
NR_SIB5_t *sib5;
bool sib5_validity;
NR_timer_t sib5_timer;
NR_SIB6_t *sib6;
bool sib6_validity;
NR_timer_t sib6_timer;
NR_SIB7_t *sib7;
bool sib7_validity;
NR_timer_t sib7_timer;
NR_SIB8_t *sib8;
bool sib8_validity;
NR_timer_t sib8_timer;
NR_SIB9_t *sib9;
bool sib9_validity;
NR_timer_t sib9_timer;
NR_SIB10_r16_t *sib10;
bool sib10_validity;
NR_timer_t sib10_timer;
NR_SIB11_r16_t *sib11;
bool sib11_validity;
NR_timer_t sib11_timer;
NR_SIB12_r16_t *sib12;
bool sib12_validity;
NR_timer_t sib12_timer;
NR_SIB13_r16_t *sib13;
bool sib13_validity;
NR_timer_t sib13_timer;
NR_SIB14_r16_t *sib14;
bool sib14_validity;
NR_timer_t sib14_timer;
NR_UE_RRC_SI_INFO_r17 SInfo_r17;
} NR_UE_RRC_SI_INFO;
......@@ -175,6 +175,7 @@ typedef struct NR_UE_Timers_Constants_s {
// constants (limits configured by the network)
uint32_t N310_k;
uint32_t N311_k;
NR_UE_TimersAndConstants_t *sib1_TimersAndConstants;
} NR_UE_Timers_Constants_t;
typedef enum {
......@@ -230,7 +231,8 @@ typedef struct NR_UE_RRC_INST_s {
NR_RRCRelease_t *RRCRelease;
long selected_plmn_identity;
Rrc_State_NR_t nrRrcState;
// flag to identify 1st reconfiguration after reestablishment
bool reconfig_after_reestab;
//Sidelink params
NR_SL_PreconfigurationNR_r16_t *sl_preconfig;
......
......@@ -55,7 +55,7 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
void handle_RRCRelease(NR_UE_RRC_INST_t *rrc);
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1);
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_UE_TimersAndConstants_t *ue_TimersAndConstants);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
......
......@@ -45,80 +45,80 @@ void init_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
{
if (SInfo->sib1) {
if (SInfo->sib1_validity) {
bool sib1_expired = nr_timer_tick(&SInfo->sib1_timer);
if (sib1_expired)
asn1cFreeStruc(asn_DEF_NR_SIB1, SInfo->sib1);
SInfo->sib1_validity = false;
}
if (SInfo->sib2) {
if (SInfo->sib2_validity) {
bool sib2_expired = nr_timer_tick(&SInfo->sib2_timer);
if (sib2_expired)
asn1cFreeStruc(asn_DEF_NR_SIB2, SInfo->sib2);
SInfo->sib2_validity = false;
}
if (SInfo->sib3) {
if (SInfo->sib3_validity) {
bool sib3_expired = nr_timer_tick(&SInfo->sib3_timer);
if (sib3_expired)
asn1cFreeStruc(asn_DEF_NR_SIB3, SInfo->sib3);
SInfo->sib3_validity = false;
}
if (SInfo->sib4) {
if (SInfo->sib4_validity) {
bool sib4_expired = nr_timer_tick(&SInfo->sib4_timer);
if (sib4_expired)
asn1cFreeStruc(asn_DEF_NR_SIB4, SInfo->sib4);
SInfo->sib4_validity = false;
}
if (SInfo->sib5) {
if (SInfo->sib5_validity) {
bool sib5_expired = nr_timer_tick(&SInfo->sib5_timer);
if (sib5_expired)
asn1cFreeStruc(asn_DEF_NR_SIB5, SInfo->sib5);
SInfo->sib5_validity = false;
}
if (SInfo->sib6) {
if (SInfo->sib6_validity) {
bool sib6_expired = nr_timer_tick(&SInfo->sib6_timer);
if (sib6_expired)
asn1cFreeStruc(asn_DEF_NR_SIB6, SInfo->sib6);
SInfo->sib6_validity = false;
}
if (SInfo->sib7) {
if (SInfo->sib7_validity) {
bool sib7_expired = nr_timer_tick(&SInfo->sib7_timer);
if (sib7_expired)
asn1cFreeStruc(asn_DEF_NR_SIB7, SInfo->sib7);
SInfo->sib7_validity = false;
}
if (SInfo->sib8) {
if (SInfo->sib8_validity) {
bool sib8_expired = nr_timer_tick(&SInfo->sib8_timer);
if (sib8_expired)
asn1cFreeStruc(asn_DEF_NR_SIB8, SInfo->sib8);
SInfo->sib8_validity = false;
}
if (SInfo->sib9) {
if (SInfo->sib9_validity) {
bool sib9_expired = nr_timer_tick(&SInfo->sib9_timer);
if (sib9_expired)
asn1cFreeStruc(asn_DEF_NR_SIB9, SInfo->sib9);
SInfo->sib9_validity = false;
}
if (SInfo->sib10) {
if (SInfo->sib10_validity) {
bool sib10_expired = nr_timer_tick(&SInfo->sib10_timer);
if (sib10_expired)
asn1cFreeStruc(asn_DEF_NR_SIB10_r16, SInfo->sib10);
SInfo->sib10_validity = false;
}
if (SInfo->sib11) {
if (SInfo->sib11_validity) {
bool sib11_expired = nr_timer_tick(&SInfo->sib11_timer);
if (sib11_expired)
asn1cFreeStruc(asn_DEF_NR_SIB11_r16, SInfo->sib11);
SInfo->sib11_validity = false;
}
if (SInfo->sib12) {
if (SInfo->sib12_validity) {
bool sib12_expired = nr_timer_tick(&SInfo->sib12_timer);
if (sib12_expired)
asn1cFreeStruc(asn_DEF_NR_SIB12_r16, SInfo->sib12);
SInfo->sib12_validity = false;
}
if (SInfo->sib13) {
if (SInfo->sib13_validity) {
bool sib13_expired = nr_timer_tick(&SInfo->sib13_timer);
if (sib13_expired)
asn1cFreeStruc(asn_DEF_NR_SIB13_r16, SInfo->sib13);
SInfo->sib13_validity = false;
}
if (SInfo->sib14) {
if (SInfo->sib14_validity) {
bool sib14_expired = nr_timer_tick(&SInfo->sib14_timer);
if (sib14_expired)
asn1cFreeStruc(asn_DEF_NR_SIB14_r16, SInfo->sib14);
SInfo->sib14_validity = false;
}
if (SInfo->SInfo_r17.sib19) {
if (SInfo->SInfo_r17.sib19_validity) {
bool sib19_expired = nr_timer_tick(&SInfo->SInfo_r17.sib19_timer);
if (sib19_expired)
asn1cFreeStruc(asn_DEF_NR_SIB19_r17, SInfo->SInfo_r17.sib19);
SInfo->SInfo_r17.sib19_validity = false;
}
}
......@@ -205,11 +205,11 @@ int nr_rrc_get_T304(long t304)
return target;
}
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1)
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_UE_TimersAndConstants_t *ue_TimersAndConstants)
{
if(sib1 && sib1->ue_TimersAndConstants) {
if(ue_TimersAndConstants) {
int k = 0;
switch (sib1->ue_TimersAndConstants->t301) {
switch (ue_TimersAndConstants->t301) {
case NR_UE_TimersAndConstants__t301_ms100 :
k = 100;
break;
......@@ -235,10 +235,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 2000;
break;
default :
AssertFatal(false, "Invalid T301 %ld\n", sib1->ue_TimersAndConstants->t301);
AssertFatal(false, "Invalid T301 %ld\n", ue_TimersAndConstants->t301);
}
nr_timer_setup(&tac->T301, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->t310) {
switch (ue_TimersAndConstants->t310) {
case NR_UE_TimersAndConstants__t310_ms0 :
k = 0;
break;
......@@ -261,10 +261,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 2000;
break;
default :
AssertFatal(false, "Invalid T310 %ld\n", sib1->ue_TimersAndConstants->t310);
AssertFatal(false, "Invalid T310 %ld\n", ue_TimersAndConstants->t310);
}
nr_timer_setup(&tac->T310, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->t311) {
switch (ue_TimersAndConstants->t311) {
case NR_UE_TimersAndConstants__t311_ms1000 :
k = 1000;
break;
......@@ -287,10 +287,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 30000;
break;
default :
AssertFatal(false, "Invalid T311 %ld\n", sib1->ue_TimersAndConstants->t311);
AssertFatal(false, "Invalid T311 %ld\n", ue_TimersAndConstants->t311);
}
nr_timer_setup(&tac->T311, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->n310) {
switch (ue_TimersAndConstants->n310) {
case NR_UE_TimersAndConstants__n310_n1 :
tac->N310_k = 1;
break;
......@@ -316,9 +316,9 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac->N310_k = 20;
break;
default :
AssertFatal(false, "Invalid N310 %ld\n", sib1->ue_TimersAndConstants->n310);
AssertFatal(false, "Invalid N310 %ld\n", ue_TimersAndConstants->n310);
}
switch (sib1->ue_TimersAndConstants->n311) {
switch (ue_TimersAndConstants->n311) {
case NR_UE_TimersAndConstants__n311_n1 :
tac->N311_k = 1;
break;
......@@ -344,16 +344,16 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac->N311_k = 10;
break;
default :
AssertFatal(false, "Invalid N311 %ld\n", sib1->ue_TimersAndConstants->n311);
AssertFatal(false, "Invalid N311 %ld\n", ue_TimersAndConstants->n311);
}
}
else
LOG_E(NR_RRC,"SIB1 should not be NULL and neither UE_Timers_Constants\n");
LOG_E(NR_RRC,"UE_Timers_Constants should not be NULL\n");
}
void nr_rrc_set_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1)
{
set_rlf_sib1_timers_and_constants(tac, sib1);
set_rlf_sib1_timers_and_constants(tac, sib1->ue_TimersAndConstants);
if(sib1 && sib1->ue_TimersAndConstants) {
int k = 0;
switch (sib1->ue_TimersAndConstants->t300) {
......@@ -430,7 +430,7 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
switch(rlf_TimersAndConstants->present){
case NR_SetupRelease_RLF_TimersAndConstants_PR_release :
// use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1
set_rlf_sib1_timers_and_constants(tac, rrc->perNB[0].SInfo.sib1);
set_rlf_sib1_timers_and_constants(tac, rrc->timers_and_constants.sib1_TimersAndConstants);
break;
case NR_SetupRelease_RLF_TimersAndConstants_PR_setup :
rlf_tac = rlf_TimersAndConstants->choice.setup;
......
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