Commit eebf79a0 authored by Guido Casati's avatar Guido Casati

Add logs to inform about cell updates in MAC-PHY and RRCReestablishment failures

These logs are very helpful to identify cell configuration
changes in MAC/PHY, for monitoring purposes, and to rapidly
signal integrity failures during re-establishment.
parent 4f8feaf5
......@@ -509,6 +509,15 @@ static int handle_sync_req_from_mac(PHY_VARS_NR_UE *UE)
uint64_t dl_CarrierFreq = get_carrier_frequency(fp->N_RB_DL, fp->numerology_index, cfg->dl_frequency);
uint64_t ul_CarrierFreq = get_carrier_frequency(fp->N_RB_UL, fp->numerology_index, cfg->uplink_frequency);
if (dl_CarrierFreq != fp->dl_CarrierFreq || ul_CarrierFreq != fp->ul_CarrierFreq) {
LOG_I(NR_PHY,
"[UE %d] RF frequency change: dl %lu->%lu Hz, ul %lu->%lu Hz (from dl_frequency=%u kHz, target_Nid_cell=%d)\n",
UE->Mod_id,
fp->dl_CarrierFreq,
dl_CarrierFreq,
fp->ul_CarrierFreq,
ul_CarrierFreq,
cfg->dl_frequency,
UE->target_Nid_cell);
fp->dl_CarrierFreq = dl_CarrierFreq;
fp->ul_CarrierFreq = ul_CarrierFreq;
nr_rf_card_config_freq(&UE->openair0_cfg[UE->rf_map.card], ul_CarrierFreq, dl_CarrierFreq, 0);
......
......@@ -406,6 +406,13 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommon_t
*scc->ssbSubcarrierSpacing,
frequencyInfoDL->absoluteFrequencyPointA)
/ 1000; // freq in kHz
LOG_I(NR_MAC,
"[UE %d] Set dl_frequency=%u kHz (from absoluteFrequencyPointA=%ld, band=%d, scs=%ld)\n",
mac->ue_id,
cfg->carrier_config.dl_frequency,
frequencyInfoDL->absoluteFrequencyPointA,
mac->nr_band,
*scc->ssbSubcarrierSpacing);
for (int i = 0; i < 5; i++) {
if (i == frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing) {
......
......@@ -833,8 +833,10 @@ static void nr_rrc_process_reconfigurationWithSync(NR_UE_RRC_INST_t *rrc,
/* if the frequencyInfoDL is included, consider the target SpCell
to be one on the SSB frequency indicated by the frequencyInfoDL */
const NR_DownlinkConfigCommon_t *dcc = reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon;
if (dcc && dcc->frequencyInfoDL && dcc->frequencyInfoDL->absoluteFrequencySSB)
if (dcc && dcc->frequencyInfoDL && dcc->frequencyInfoDL->absoluteFrequencySSB) {
rrc->arfcn_ssb = *dcc->frequencyInfoDL->absoluteFrequencySSB;
LOG_I(NR_RRC, "UE %ld: updated ARFCN_SSB=%ld\n", rrc->ue_id, rrc->arfcn_ssb);
}
// consider the target SpCell to be one with a physical cell identity indicated by the physCellId
if (!reconfigurationWithSync->spCellConfigCommon->physCellId)
......@@ -1662,6 +1664,15 @@ static void nr_rrc_ue_decode_NR_BCCH_BCH_Message(NR_UE_RRC_INST_t *rrc,
}
NR_BCCH_BCH_Message_t *bcch_message = NULL;
if (rrc->phyCellID != phycellid || rrc->arfcn_ssb != ssb_arfcn) {
LOG_I(NR_RRC,
"[UE %ld] BCCH update: phyCellID %d->%u, arfcn_ssb %ld->%ld\n",
rrc->ue_id,
rrc->phyCellID,
phycellid,
rrc->arfcn_ssb,
ssb_arfcn);
}
rrc->phyCellID = phycellid;
rrc->arfcn_ssb = ssb_arfcn;
......@@ -2287,6 +2298,7 @@ static void nr_rrc_ue_process_rrcReestablishment(NR_UE_RRC_INST_t *rrc,
// perform the actions upon going to RRC_IDLE as specified in 5.3.11
// with release cause 'RRC connection failure', upon which the procedure ends
if (!integrity_pass) {
LOG_W(NR_RRC, "Integrity of RRCReestablishment failed, going to IDLE\n");
NR_Release_Cause_t release_cause = RRC_CONNECTION_FAILURE;
nr_rrc_going_to_IDLE(rrc, release_cause, NULL);
return;
......
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