NR UE: RRC layer now explicitly tells MAC layer when the RA procedure can be started

This commit is contained in:
Thomas Schlichter
2025-02-14 17:04:47 +00:00
parent 48c8d67393
commit 11b87d8744
6 changed files with 28 additions and 15 deletions
+6 -4
View File
@@ -138,12 +138,14 @@ void process_msg_rcc_to_mac(MessageDef *msg)
break;
case NR_MAC_RRC_CONFIG_SIB1: {
NR_SIB1_t *sib1 = NR_MAC_RRC_CONFIG_SIB1(msg).sib1;
nr_rrc_mac_config_req_sib1(ue_id, 0, sib1);
bool can_start_ra = NR_MAC_RRC_CONFIG_SIB1(msg).can_start_ra;
nr_rrc_mac_config_req_sib1(ue_id, 0, sib1, can_start_ra);
SEQUENCE_free(&asn_DEF_NR_SIB1, NR_MAC_RRC_CONFIG_SIB1(msg).sib1, ASFM_FREE_EVERYTHING);
} break;
case NR_MAC_RRC_CONFIG_OTHER_SIB:
nr_rrc_mac_config_other_sib(ue_id, NR_MAC_RRC_CONFIG_OTHER_SIB(msg).sib19);
break;
case NR_MAC_RRC_CONFIG_OTHER_SIB: {
bool can_start_ra = NR_MAC_RRC_CONFIG_OTHER_SIB(msg).can_start_ra;
nr_rrc_mac_config_other_sib(ue_id, NR_MAC_RRC_CONFIG_OTHER_SIB(msg).sib19, can_start_ra);
} break;
default:
LOG_E(NR_MAC, "Unexpected msg from RRC: %d\n", ITTI_MSG_ID(msg));
}
+10 -5
View File
@@ -165,8 +165,9 @@ static void set_DRB_status(NR_UE_RRC_INST_t *rrc, NR_DRB_Identity_t drb_id, NR_R
rrc->status_DRBs[drb_id - 1] = status;
}
static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, instance_t ue_id)
static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, NR_UE_RRC_INST_t *rrc)
{
instance_t ue_id = rrc->ue_id;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN);
// Dump contents
@@ -253,6 +254,7 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si,
if (sib19) {
MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_OTHER_SIB);
asn_copy(&asn_DEF_NR_SIB19_r17, (void **)&NR_MAC_RRC_CONFIG_OTHER_SIB(msg).sib19, sib19);
NR_MAC_RRC_CONFIG_OTHER_SIB(msg).can_start_ra = rrc->is_NTN_UE;
itti_send_msg_to_task(TASK_MAC_UE, ue_id, msg);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_OUT);
@@ -308,7 +310,7 @@ static void nr_rrc_configure_default_SI(NR_UE_RRC_SI_INFO *SI_info,
}
}
static void verify_NTN_access(const NR_UE_RRC_SI_INFO *SI_info, const NR_SIB1_v1700_IEs_t *sib1_v1700)
static bool verify_NTN_access(const NR_UE_RRC_SI_INFO *SI_info, const NR_SIB1_v1700_IEs_t *sib1_v1700)
{
// SIB1 indicates if NTN access is present in the cell
bool ntn_access = false;
@@ -320,6 +322,8 @@ static void verify_NTN_access(const NR_UE_RRC_SI_INFO *SI_info, const NR_SIB1_v1
int sib19_present = SI_info->SInfo_r17.default_otherSI_map_r17 & sib19_mask;
AssertFatal(!ntn_access || sib19_present, "NTN cell, but SIB19 not configured.\n");
return ntn_access && sib19_present;
}
static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_info, NR_SIB1_t *sib1)
@@ -346,7 +350,7 @@ static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_inf
// configure default SI
nr_rrc_configure_default_SI(SI_info, sib1->si_SchedulingInfo, si_SchedInfo_v1700);
verify_NTN_access(SI_info, sib1_v1700);
rrc->is_NTN_UE = verify_NTN_access(SI_info, sib1_v1700);
// configure timers and constant
nr_rrc_set_sib1_timers_and_constants(&rrc->timers_and_constants, sib1);
@@ -354,6 +358,7 @@ static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_inf
UPDATE_IE(rrc->timers_and_constants.sib1_TimersAndConstants, sib1->ue_TimersAndConstants, NR_UE_TimersAndConstants_t);
MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_SIB1);
NR_MAC_RRC_CONFIG_SIB1(msg).sib1 = sib1;
NR_MAC_RRC_CONFIG_SIB1(msg).can_start_ra = !rrc->is_NTN_UE;
itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg);
}
@@ -414,7 +419,7 @@ static void nr_rrc_process_reconfiguration_v1530(NR_UE_RRC_INST_t *rrc, NR_RRCRe
SEQUENCE_free(&asn_DEF_NR_SystemInformation, si, 1);
} else {
LOG_I(NR_RRC, "[UE %ld] Decoding dedicatedSystemInformationDelivery\n", rrc->ue_id);
nr_decode_SI(SI_info, si, rrc->ue_id);
nr_decode_SI(SI_info, si, rrc);
}
}
if (rec_1530->otherConfig) {
@@ -976,7 +981,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation:
LOG_I(NR_RRC, "[UE %ld] Decoding SI\n", rrc->ue_id);
NR_SystemInformation_t *si = bcch_message->message.choice.c1->choice.systemInformation;
nr_decode_SI(SI_info, si, rrc->ue_id);
nr_decode_SI(SI_info, si, rrc);
break;
case NR_BCCH_DL_SCH_MessageType__c1_PR_NOTHING:
default:
+2
View File
@@ -241,6 +241,8 @@ typedef struct NR_UE_RRC_INST_s {
bool reconfig_after_reestab;
//Sidelink params
NR_SL_PreconfigurationNR_r16_t *sl_preconfig;
// NTN params
bool is_NTN_UE;
} NR_UE_RRC_INST_t;
#endif