Revert tentative fix for double sib1 decoding because it doesn't behave as expected. Instead a new pending_sib variable is used for the same goal.
This reverts commit 35e9d1e0c2.
This commit is contained in:
@@ -68,12 +68,12 @@ void release_common_ss_cset(NR_BWP_PDCCH_t *pdcch);
|
||||
\param sibs_mask sibs mask
|
||||
\param pduP pointer to pdu
|
||||
\param pdu_length length of pdu */
|
||||
int8_t nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint8_t ack_nack,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len);
|
||||
void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint8_t ack_nack,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len);
|
||||
|
||||
void release_dl_BWP(NR_UE_MAC_INST_t *mac, int index);
|
||||
void release_ul_BWP(NR_UE_MAC_INST_t *mac, int index);
|
||||
|
||||
@@ -300,12 +300,12 @@ static void configure_ratematching_csi(fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsc
|
||||
}
|
||||
}
|
||||
|
||||
int8_t nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint8_t ack_nack,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len)
|
||||
void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint8_t ack_nack,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len)
|
||||
{
|
||||
if(ack_nack) {
|
||||
LOG_D(NR_MAC, "Decoding NR-BCCH-DL-SCH-Message (SIB1 or SI)\n");
|
||||
@@ -323,9 +323,10 @@ int8_t nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
|
||||
T_INT(0 /* harq_pid */),
|
||||
T_BUFFER(pduP, pdu_len));
|
||||
}
|
||||
else
|
||||
else {
|
||||
LOG_E(NR_MAC, "Got NACK on NR-BCCH-DL-SCH-Message (%s)\n", mac->get_sib1 ? "SIB1" : "other SI");
|
||||
return 0;
|
||||
nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, 0, 0, 0, mac->physCellId, 0, NR_BCCH_DL_SCH, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1108,7 +1108,8 @@ static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len)
|
||||
{
|
||||
return nr_ue_decode_BCCH_DL_SCH(mac, cc_id, gNB_index, ack_nack, pduP, pdu_len);
|
||||
nr_ue_decode_BCCH_DL_SCH(mac, cc_id, gNB_index, ack_nack, pduP, pdu_len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// L2 Abstraction Layer
|
||||
|
||||
@@ -59,15 +59,19 @@ void nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const sdu_size_t pdu_len)
|
||||
{
|
||||
sdu_size_t sdu_size = 0;
|
||||
|
||||
MessageDef *message_p;
|
||||
switch(channel) {
|
||||
case NR_BCCH_BCH:
|
||||
case NR_BCCH_DL_SCH:
|
||||
if (pdu_len>0) {
|
||||
LOG_T(NR_RRC, "[UE %d] Received SDU for NR-BCCH-DL-SCH on SRB %u from gNB %d\n", module_id, channel & RAB_OFFSET,
|
||||
message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_BCCH_DATA_IND);
|
||||
memset(NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu, 0, BCCH_SDU_SIZE);
|
||||
if (pdu_len > 0) {
|
||||
LOG_T(NR_RRC,
|
||||
"[UE %d] Received SDU for NR-BCCH-DL-SCH on SRB %u from gNB %d\n",
|
||||
module_id,
|
||||
channel & RAB_OFFSET,
|
||||
gNB_index);
|
||||
|
||||
MessageDef *message_p;
|
||||
int msg_sdu_size = BCCH_SDU_SIZE;
|
||||
|
||||
if (pdu_len > msg_sdu_size) {
|
||||
@@ -77,25 +81,23 @@ void nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
sdu_size = pdu_len;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_BCCH_DATA_IND);
|
||||
memset(NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu, 0, BCCH_SDU_SIZE);
|
||||
memcpy(NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu, pduP, sdu_size);
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).frame = frame; //frameP
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).slot = slot;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu_size = sdu_size;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).gnb_index = gNB_index;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).phycellid = cellid;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).ssb_arfcn = arfcn;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).is_bch = (channel == NR_BCCH_BCH);
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p);
|
||||
}
|
||||
else {
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu_size = 0;
|
||||
}
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).frame = frame; //frameP
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).slot = slot;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).gnb_index = gNB_index;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).phycellid = cellid;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).ssb_arfcn = arfcn;
|
||||
NR_RRC_MAC_BCCH_DATA_IND (message_p).is_bch = (channel == NR_BCCH_BCH);
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p);
|
||||
break;
|
||||
|
||||
case NR_SBCCH_SL_BCH:
|
||||
if (pdu_len > 0) {
|
||||
LOG_T(NR_RRC, "[UE %d] Received SL-MIB for NR_SBCCH_SL_BCH.\n", module_id);
|
||||
|
||||
MessageDef *message_p;
|
||||
int msg_sdu_size = BCCH_SDU_SIZE;
|
||||
|
||||
if (pdu_len > msg_sdu_size) {
|
||||
@@ -115,9 +117,8 @@ void nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
AssertFatal(false, "Invalid channel in data indication\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+74
-111
@@ -188,59 +188,59 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si,
|
||||
LOG_A(NR_RRC, "Found SIB%d\n", typeandinfo->present + 1);
|
||||
switch(typeandinfo->present) {
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib2:
|
||||
SI_info->sib2_validity = SIB_VALID;
|
||||
SI_info->sib2_validity = true;
|
||||
nr_timer_start(&SI_info->sib2_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib3:
|
||||
SI_info->sib3_validity = SIB_VALID;
|
||||
SI_info->sib3_validity = true;
|
||||
nr_timer_start(&SI_info->sib3_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib4:
|
||||
SI_info->sib4_validity = SIB_VALID;
|
||||
SI_info->sib4_validity = true;
|
||||
nr_timer_start(&SI_info->sib4_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib5:
|
||||
SI_info->sib5_validity = SIB_VALID;
|
||||
SI_info->sib5_validity = true;
|
||||
nr_timer_start(&SI_info->sib5_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib6:
|
||||
SI_info->sib6_validity = SIB_VALID;
|
||||
SI_info->sib6_validity = true;
|
||||
nr_timer_start(&SI_info->sib6_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib7:
|
||||
SI_info->sib7_validity = SIB_VALID;
|
||||
SI_info->sib7_validity = true;
|
||||
nr_timer_start(&SI_info->sib7_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib8:
|
||||
SI_info->sib8_validity = SIB_VALID;
|
||||
SI_info->sib8_validity = true;
|
||||
nr_timer_start(&SI_info->sib8_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib9:
|
||||
SI_info->sib9_validity = SIB_VALID;
|
||||
SI_info->sib9_validity = true;
|
||||
nr_timer_start(&SI_info->sib9_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib10_v1610:
|
||||
SI_info->sib10_validity = SIB_VALID;
|
||||
SI_info->sib10_validity = true;
|
||||
nr_timer_start(&SI_info->sib10_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib11_v1610:
|
||||
SI_info->sib11_validity = SIB_VALID;
|
||||
SI_info->sib11_validity = true;
|
||||
nr_timer_start(&SI_info->sib11_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib12_v1610:
|
||||
SI_info->sib12_validity = SIB_VALID;
|
||||
SI_info->sib12_validity = true;
|
||||
nr_timer_start(&SI_info->sib12_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib13_v1610:
|
||||
SI_info->sib13_validity = SIB_VALID;
|
||||
SI_info->sib13_validity = true;
|
||||
nr_timer_start(&SI_info->sib13_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib14_v1610:
|
||||
SI_info->sib14_validity = SIB_VALID;
|
||||
SI_info->sib14_validity = true;
|
||||
nr_timer_start(&SI_info->sib14_timer);
|
||||
break;
|
||||
case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib19_v1700:
|
||||
SI_info->SInfo_r17.sib19_validity = SIB_VALID;
|
||||
SI_info->SInfo_r17.sib19_validity = true;
|
||||
if (g_log->log_component[NR_RRC].level >= OAILOG_DEBUG)
|
||||
xer_fprint(stdout, &asn_DEF_NR_SIB19_r17, (const void *)typeandinfo->choice.sib19_v1700);
|
||||
sib19 = typeandinfo->choice.sib19_v1700;
|
||||
@@ -341,7 +341,7 @@ static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_inf
|
||||
xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void *) sib1);
|
||||
LOG_A(NR_RRC, "SIB1 decoded\n");
|
||||
nr_timer_start(&SI_info->sib1_timer);
|
||||
SI_info->sib1_validity = SIB_VALID;
|
||||
SI_info->sib1_validity = true;
|
||||
if (rrc->nrRrcState == RRC_STATE_IDLE_NR) {
|
||||
rrc->ra_trigger = RRC_CONNECTION_SETUP;
|
||||
}
|
||||
@@ -658,82 +658,56 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type)
|
||||
{
|
||||
switch (si_type) {
|
||||
case NR_SIB_TypeInfo__type_sibType2:
|
||||
if (SI_info->sib2_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib2_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib2_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType3:
|
||||
if (SI_info->sib3_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib3_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib3_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType4:
|
||||
if (SI_info->sib4_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib4_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib4_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType5:
|
||||
if (SI_info->sib5_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib5_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib5_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType6:
|
||||
if (SI_info->sib6_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib6_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib6_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType7:
|
||||
if (SI_info->sib7_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib7_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib7_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType8:
|
||||
if (SI_info->sib8_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib8_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib8_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType9:
|
||||
if (SI_info->sib9_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib9_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib9_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType10_v1610:
|
||||
if (SI_info->sib10_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib10_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib10_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType11_v1610:
|
||||
if (SI_info->sib11_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib11_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib11_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType12_v1610:
|
||||
if (SI_info->sib12_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib12_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib12_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType13_v1610:
|
||||
if (SI_info->sib13_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib13_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib13_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo__type_sibType14_v1610:
|
||||
if (SI_info->sib14_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib14_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib14_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
AssertFatal(false, "Invalid SIB type %d\n", si_type);
|
||||
@@ -745,46 +719,32 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type)
|
||||
{
|
||||
switch (si_type) {
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType15:
|
||||
if (SI_info->sib15_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib15_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib15_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType16:
|
||||
if (SI_info->sib16_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib16_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib16_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType17:
|
||||
if (SI_info->sib17_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib17_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib17_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType18:
|
||||
if (SI_info->sib18_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib18_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib18_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19:
|
||||
if (SI_info->sib19_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib19_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib19_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType20:
|
||||
if (SI_info->sib20_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib20_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib20_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType21:
|
||||
if (SI_info->sib21_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib21_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib21_validity)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
AssertFatal(false, "Invalid SIB r17 type %d\n", si_type);
|
||||
@@ -795,10 +755,8 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type)
|
||||
static int check_si_status(NR_UE_RRC_SI_INFO *SI_info)
|
||||
{
|
||||
// schedule reception of SIB1 if RRC doesn't have it
|
||||
if (SI_info->sib1_validity == SIB_NOT_VALID) {
|
||||
SI_info->sib1_validity = SIB_REQUESTED;
|
||||
if (!SI_info->sib1_validity)
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
for (int j = 0; j < MAX_SI_GROUPS; j++) {
|
||||
if (!SI_info->default_otherSI_map[j])
|
||||
@@ -861,14 +819,17 @@ static void nr_rrc_ue_decode_NR_BCCH_BCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
// not used
|
||||
}
|
||||
|
||||
NR_UE_RRC_SI_INFO *SI_info = &rrc->perNB[gNB_index].SInfo;
|
||||
int get_sib = 0;
|
||||
if (IS_SA_MODE(get_softmodem_params())
|
||||
&& !SI_info->sib_pending
|
||||
&& bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib
|
||||
&& bcch_message->message.choice.mib->cellBarred == NR_MIB__cellBarred_notBarred
|
||||
&& rrc->nrRrcState != RRC_STATE_DETACH_NR) {
|
||||
NR_UE_RRC_SI_INFO *SI_info = &rrc->perNB[gNB_index].SInfo;
|
||||
// to schedule MAC to get SI if required
|
||||
get_sib = check_si_status(SI_info);
|
||||
if (get_sib)
|
||||
SI_info->sib_pending = true;
|
||||
}
|
||||
if (bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib) {
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_MIB);
|
||||
@@ -958,18 +919,20 @@ static void nr_rrc_handle_msg3_indication(NR_UE_RRC_INST_t *rrc, rnti_t rnti)
|
||||
}
|
||||
}
|
||||
|
||||
static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
const uint8_t gNB_index,
|
||||
uint8_t *const Sdu,
|
||||
const uint8_t Sdu_len,
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp)
|
||||
static void nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
const uint8_t gNB_index,
|
||||
uint8_t *const Sdu,
|
||||
const uint8_t Sdu_len,
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp)
|
||||
{
|
||||
NR_BCCH_DL_SCH_Message_t *bcch_message = NULL;
|
||||
|
||||
NR_UE_RRC_SI_INFO *SI_info = &rrc->perNB[gNB_index].SInfo;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN);
|
||||
SI_info->sib_pending = false;
|
||||
if (Sdu_len == 0) // decoding failed in L2
|
||||
return;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN);
|
||||
NR_BCCH_DL_SCH_Message_t *bcch_message = NULL;
|
||||
asn_dec_rval_t dec_rval = uper_decode_complete(NULL,
|
||||
&asn_DEF_NR_BCCH_DL_SCH_Message,
|
||||
(void **)&bcch_message,
|
||||
@@ -982,7 +945,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
// free the memory
|
||||
SEQUENCE_free(&asn_DEF_NR_BCCH_DL_SCH_Message, (void *)bcch_message, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
@@ -1008,7 +971,6 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
}
|
||||
SEQUENCE_free(&asn_DEF_NR_BCCH_DL_SCH_Message, bcch_message, ASFM_FREE_EVERYTHING);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void nr_rrc_signal_maxrtxindication(int ue_id)
|
||||
@@ -2619,27 +2581,28 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
|
||||
rrcPerNB_t *nb = &rrc->perNB[i];
|
||||
NR_UE_RRC_SI_INFO *SI_info = &nb->SInfo;
|
||||
init_SI_timers(SI_info);
|
||||
SI_info->sib1_validity = SIB_NOT_VALID;
|
||||
SI_info->sib2_validity = SIB_NOT_VALID;
|
||||
SI_info->sib3_validity = SIB_NOT_VALID;
|
||||
SI_info->sib4_validity = SIB_NOT_VALID;
|
||||
SI_info->sib5_validity = SIB_NOT_VALID;
|
||||
SI_info->sib6_validity = SIB_NOT_VALID;
|
||||
SI_info->sib7_validity = SIB_NOT_VALID;
|
||||
SI_info->sib8_validity = SIB_NOT_VALID;
|
||||
SI_info->sib9_validity = SIB_NOT_VALID;
|
||||
SI_info->sib10_validity = SIB_NOT_VALID;
|
||||
SI_info->sib11_validity = SIB_NOT_VALID;
|
||||
SI_info->sib12_validity = SIB_NOT_VALID;
|
||||
SI_info->sib13_validity = SIB_NOT_VALID;
|
||||
SI_info->sib14_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib15_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib16_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib17_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib18_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib19_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib20_validity = SIB_NOT_VALID;
|
||||
SI_info->SInfo_r17.sib21_validity = SIB_NOT_VALID;
|
||||
SI_info->sib_pending = false;
|
||||
SI_info->sib1_validity = false;
|
||||
SI_info->sib2_validity = false;
|
||||
SI_info->sib3_validity = false;
|
||||
SI_info->sib4_validity = false;
|
||||
SI_info->sib5_validity = false;
|
||||
SI_info->sib6_validity = false;
|
||||
SI_info->sib7_validity = false;
|
||||
SI_info->sib8_validity = false;
|
||||
SI_info->sib9_validity = false;
|
||||
SI_info->sib10_validity = false;
|
||||
SI_info->sib11_validity = false;
|
||||
SI_info->sib12_validity = false;
|
||||
SI_info->sib13_validity = false;
|
||||
SI_info->sib14_validity = false;
|
||||
SI_info->SInfo_r17.sib15_validity = false;
|
||||
SI_info->SInfo_r17.sib16_validity = false;
|
||||
SI_info->SInfo_r17.sib17_validity = false;
|
||||
SI_info->SInfo_r17.sib18_validity = false;
|
||||
SI_info->SInfo_r17.sib19_validity = false;
|
||||
SI_info->SInfo_r17.sib20_validity = false;
|
||||
SI_info->SInfo_r17.sib21_validity = false;
|
||||
}
|
||||
|
||||
if (rrc->nrRrcState == RRC_STATE_DETACH_NR) {
|
||||
|
||||
@@ -104,58 +104,53 @@ typedef enum RA_trigger_e {
|
||||
BEAM_FAILURE_RECOVERY,
|
||||
} RA_trigger_t;
|
||||
|
||||
typedef enum {
|
||||
SIB_NOT_VALID,
|
||||
SIB_VALID,
|
||||
SIB_REQUESTED,
|
||||
} SIB_validity_t;
|
||||
|
||||
typedef struct UE_RRC_SI_INFO_NR_r17_s {
|
||||
SIB_validity_t sib15_validity;
|
||||
bool sib15_validity;
|
||||
NR_timer_t sib15_timer;
|
||||
SIB_validity_t sib16_validity;
|
||||
bool sib16_validity;
|
||||
NR_timer_t sib16_timer;
|
||||
SIB_validity_t sib17_validity;
|
||||
bool sib17_validity;
|
||||
NR_timer_t sib17_timer;
|
||||
SIB_validity_t sib18_validity;
|
||||
bool sib18_validity;
|
||||
NR_timer_t sib18_timer;
|
||||
SIB_validity_t sib19_validity;
|
||||
bool sib19_validity;
|
||||
NR_timer_t sib19_timer;
|
||||
SIB_validity_t sib20_validity;
|
||||
bool sib20_validity;
|
||||
NR_timer_t sib20_timer;
|
||||
SIB_validity_t sib21_validity;
|
||||
bool sib21_validity;
|
||||
NR_timer_t sib21_timer;
|
||||
} NR_UE_RRC_SI_INFO_r17;
|
||||
|
||||
typedef struct UE_RRC_SI_INFO_NR_s {
|
||||
bool sib_pending;
|
||||
uint32_t default_otherSI_map[MAX_SI_GROUPS];
|
||||
SIB_validity_t sib1_validity;
|
||||
bool sib1_validity;
|
||||
NR_timer_t sib1_timer;
|
||||
SIB_validity_t sib2_validity;
|
||||
bool sib2_validity;
|
||||
NR_timer_t sib2_timer;
|
||||
SIB_validity_t sib3_validity;
|
||||
bool sib3_validity;
|
||||
NR_timer_t sib3_timer;
|
||||
SIB_validity_t sib4_validity;
|
||||
bool sib4_validity;
|
||||
NR_timer_t sib4_timer;
|
||||
SIB_validity_t sib5_validity;
|
||||
bool sib5_validity;
|
||||
NR_timer_t sib5_timer;
|
||||
SIB_validity_t sib6_validity;
|
||||
bool sib6_validity;
|
||||
NR_timer_t sib6_timer;
|
||||
SIB_validity_t sib7_validity;
|
||||
bool sib7_validity;
|
||||
NR_timer_t sib7_timer;
|
||||
SIB_validity_t sib8_validity;
|
||||
bool sib8_validity;
|
||||
NR_timer_t sib8_timer;
|
||||
SIB_validity_t sib9_validity;
|
||||
bool sib9_validity;
|
||||
NR_timer_t sib9_timer;
|
||||
SIB_validity_t sib10_validity;
|
||||
bool sib10_validity;
|
||||
NR_timer_t sib10_timer;
|
||||
SIB_validity_t sib11_validity;
|
||||
bool sib11_validity;
|
||||
NR_timer_t sib11_timer;
|
||||
SIB_validity_t sib12_validity;
|
||||
bool sib12_validity;
|
||||
NR_timer_t sib12_timer;
|
||||
SIB_validity_t sib13_validity;
|
||||
bool sib13_validity;
|
||||
NR_timer_t sib13_timer;
|
||||
SIB_validity_t sib14_validity;
|
||||
bool sib14_validity;
|
||||
NR_timer_t sib14_timer;
|
||||
NR_UE_RRC_SI_INFO_r17 SInfo_r17;
|
||||
} NR_UE_RRC_SI_INFO;
|
||||
|
||||
@@ -43,33 +43,83 @@ void init_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
|
||||
nr_timer_setup(&SInfo->SInfo_r17.sib19_timer, 10800000, 10);
|
||||
}
|
||||
|
||||
static SIB_validity_t check_sib_timer_validity(SIB_validity_t sib_validity, NR_timer_t *sib_timer)
|
||||
{
|
||||
if (sib_validity == SIB_VALID) {
|
||||
bool sib_expired = nr_timer_tick(sib_timer);
|
||||
if (sib_expired)
|
||||
return SIB_NOT_VALID;
|
||||
}
|
||||
return sib_validity;
|
||||
}
|
||||
|
||||
void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
|
||||
{
|
||||
SInfo->sib1_validity = check_sib_timer_validity(SInfo->sib1_validity, &SInfo->sib1_timer);
|
||||
SInfo->sib2_validity = check_sib_timer_validity(SInfo->sib2_validity, &SInfo->sib2_timer);
|
||||
SInfo->sib3_validity = check_sib_timer_validity(SInfo->sib3_validity, &SInfo->sib3_timer);
|
||||
SInfo->sib4_validity = check_sib_timer_validity(SInfo->sib4_validity, &SInfo->sib4_timer);
|
||||
SInfo->sib5_validity = check_sib_timer_validity(SInfo->sib5_validity, &SInfo->sib5_timer);
|
||||
SInfo->sib6_validity = check_sib_timer_validity(SInfo->sib6_validity, &SInfo->sib6_timer);
|
||||
SInfo->sib7_validity = check_sib_timer_validity(SInfo->sib7_validity, &SInfo->sib7_timer);
|
||||
SInfo->sib8_validity = check_sib_timer_validity(SInfo->sib8_validity, &SInfo->sib8_timer);
|
||||
SInfo->sib9_validity = check_sib_timer_validity(SInfo->sib9_validity, &SInfo->sib9_timer);
|
||||
SInfo->sib10_validity = check_sib_timer_validity(SInfo->sib10_validity, &SInfo->sib10_timer);
|
||||
SInfo->sib11_validity = check_sib_timer_validity(SInfo->sib11_validity, &SInfo->sib11_timer);
|
||||
SInfo->sib12_validity = check_sib_timer_validity(SInfo->sib12_validity, &SInfo->sib12_timer);
|
||||
SInfo->sib13_validity = check_sib_timer_validity(SInfo->sib13_validity, &SInfo->sib13_timer);
|
||||
SInfo->sib14_validity = check_sib_timer_validity(SInfo->sib14_validity, &SInfo->sib14_timer);
|
||||
SInfo->SInfo_r17.sib19_validity = check_sib_timer_validity(SInfo->SInfo_r17.sib19_validity, &SInfo->SInfo_r17.sib19_timer);
|
||||
if (SInfo->sib1_validity) {
|
||||
bool sib1_expired = nr_timer_tick(&SInfo->sib1_timer);
|
||||
if (sib1_expired)
|
||||
SInfo->sib1_validity = false;
|
||||
}
|
||||
if (SInfo->sib2_validity) {
|
||||
bool sib2_expired = nr_timer_tick(&SInfo->sib2_timer);
|
||||
if (sib2_expired)
|
||||
SInfo->sib2_validity = false;
|
||||
}
|
||||
if (SInfo->sib3_validity) {
|
||||
bool sib3_expired = nr_timer_tick(&SInfo->sib3_timer);
|
||||
if (sib3_expired)
|
||||
SInfo->sib3_validity = false;
|
||||
}
|
||||
if (SInfo->sib4_validity) {
|
||||
bool sib4_expired = nr_timer_tick(&SInfo->sib4_timer);
|
||||
if (sib4_expired)
|
||||
SInfo->sib4_validity = false;
|
||||
}
|
||||
if (SInfo->sib5_validity) {
|
||||
bool sib5_expired = nr_timer_tick(&SInfo->sib5_timer);
|
||||
if (sib5_expired)
|
||||
SInfo->sib5_validity = false;
|
||||
}
|
||||
if (SInfo->sib6_validity) {
|
||||
bool sib6_expired = nr_timer_tick(&SInfo->sib6_timer);
|
||||
if (sib6_expired)
|
||||
SInfo->sib6_validity = false;
|
||||
}
|
||||
if (SInfo->sib7_validity) {
|
||||
bool sib7_expired = nr_timer_tick(&SInfo->sib7_timer);
|
||||
if (sib7_expired)
|
||||
SInfo->sib7_validity = false;
|
||||
}
|
||||
if (SInfo->sib8_validity) {
|
||||
bool sib8_expired = nr_timer_tick(&SInfo->sib8_timer);
|
||||
if (sib8_expired)
|
||||
SInfo->sib8_validity = false;
|
||||
}
|
||||
if (SInfo->sib9_validity) {
|
||||
bool sib9_expired = nr_timer_tick(&SInfo->sib9_timer);
|
||||
if (sib9_expired)
|
||||
SInfo->sib9_validity = false;
|
||||
}
|
||||
if (SInfo->sib10_validity) {
|
||||
bool sib10_expired = nr_timer_tick(&SInfo->sib10_timer);
|
||||
if (sib10_expired)
|
||||
SInfo->sib10_validity = false;
|
||||
}
|
||||
if (SInfo->sib11_validity) {
|
||||
bool sib11_expired = nr_timer_tick(&SInfo->sib11_timer);
|
||||
if (sib11_expired)
|
||||
SInfo->sib11_validity = false;
|
||||
}
|
||||
if (SInfo->sib12_validity) {
|
||||
bool sib12_expired = nr_timer_tick(&SInfo->sib12_timer);
|
||||
if (sib12_expired)
|
||||
SInfo->sib12_validity = false;
|
||||
}
|
||||
if (SInfo->sib13_validity) {
|
||||
bool sib13_expired = nr_timer_tick(&SInfo->sib13_timer);
|
||||
if (sib13_expired)
|
||||
SInfo->sib13_validity = false;
|
||||
}
|
||||
if (SInfo->sib14_validity) {
|
||||
bool sib14_expired = nr_timer_tick(&SInfo->sib14_timer);
|
||||
if (sib14_expired)
|
||||
SInfo->sib14_validity = false;
|
||||
}
|
||||
if (SInfo->SInfo_r17.sib19_validity) {
|
||||
bool sib19_expired = nr_timer_tick(&SInfo->SInfo_r17.sib19_timer);
|
||||
if (sib19_expired)
|
||||
SInfo->SInfo_r17.sib19_validity = false;
|
||||
}
|
||||
}
|
||||
|
||||
void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc)
|
||||
|
||||
Reference in New Issue
Block a user