UE: update PDCCH config if MAC config changes

without this fix, after sync is successful, RAR is not getting decoded.
PDCCH area also changes as SSB offset can change. if MAC configuration changes.
This commit is contained in:
Raghavendra Dinavahi
2026-03-03 16:36:52 +01:00
parent 757a3131a1
commit dafabe381c
3 changed files with 41 additions and 27 deletions
+4
View File
@@ -2106,6 +2106,10 @@ static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
configure_common_BWP_dl(mac, bwp_id, scc->downlinkConfigCommon->initialDownlinkBWP);
if (scc->uplinkConfigCommon)
configure_common_BWP_ul(mac, bwp_id, scc->uplinkConfigCommon->initialUplinkBWP);
// Update PDCCH config as MAC configuration has changed
if (IS_SA_MODE(get_softmodem_params()))
update_pdcch_config(mac);
}
mac->state = UE_NOT_SYNC_RECONF;
+1
View File
@@ -377,4 +377,5 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind, NR_UE_MAC_INST_t
NR_SearchSpace_t *get_common_search_space(const NR_UE_MAC_INST_t *mac, const NR_SearchSpaceId_t ss_id);
ssb_ro_preambles_t get_ssb_ro_preambles_4step(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB *config);
void update_pdcch_config(NR_UE_MAC_INST_t *mac);
#endif
@@ -422,6 +422,38 @@ static bool monitor_dci_for_other_SI(NR_UE_MAC_INST_t *mac,
return false;
}
void update_pdcch_config(NR_UE_MAC_INST_t *mac)
{
int scs = mac->current_DL_BWP ? mac->current_DL_BWP->scs : mac->numerology;
const int slots_per_frame = get_slots_per_frame_from_scs(scs);
int ssb_sc_offset_norm;
if (mac->ssb_subcarrier_offset < 24 && mac->frequency_range == FR1)
ssb_sc_offset_norm = mac->ssb_subcarrier_offset >> scs;
else
ssb_sc_offset_norm = mac->ssb_subcarrier_offset;
uint16_t ssb_offset_point_a = (mac->ssb_start_subcarrier - ssb_sc_offset_norm) / 12;
int ssb_start_symbol = get_ssb_start_symbol(mac->nr_band, scs, mac->mib_ssb);
get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config,
mac->mib_frame,
mac->mib,
slots_per_frame,
ssb_sc_offset_norm,
ssb_start_symbol,
scs,
mac->frequency_range,
mac->nr_band,
273, // at this point UE in principle doesn't know the grid size (we assume the largest)
mac->mib_ssb,
1, // If the UE is not configured with a periodicity, the UE assumes a periodicity of a half frame
ssb_offset_point_a);
if (mac->search_space_zero == NULL)
mac->search_space_zero = calloc(1, sizeof(*mac->search_space_zero));
if (mac->coreset0 == NULL)
mac->coreset0 = calloc(1, sizeof(*mac->coreset0));
fill_coresetZero(mac->coreset0, &mac->type0_PDCCH_CSS_config);
fill_searchSpaceZero(mac->search_space_zero, slots_per_frame, &mac->type0_PDCCH_CSS_config);
}
void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, const frame_t frame, const int slot)
{
const NR_UE_DL_BWP_t *current_DL_BWP = mac->current_DL_BWP;
@@ -430,37 +462,14 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
int scs = current_DL_BWP ? current_DL_BWP->scs : mac->numerology;
const int slots_per_frame = get_slots_per_frame_from_scs(scs);
if (mac->get_sib1) {
int ssb_sc_offset_norm;
if (mac->ssb_subcarrier_offset < 24 && mac->frequency_range == FR1)
ssb_sc_offset_norm = mac->ssb_subcarrier_offset >> scs;
else
ssb_sc_offset_norm = mac->ssb_subcarrier_offset;
uint16_t ssb_offset_point_a = (mac->ssb_start_subcarrier - ssb_sc_offset_norm) / 12;
int ssb_start_symbol = get_ssb_start_symbol(mac->nr_band, scs, mac->mib_ssb);
get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config,
mac->mib_frame,
mac->mib,
slots_per_frame,
ssb_sc_offset_norm,
ssb_start_symbol,
scs,
mac->frequency_range,
mac->nr_band,
273, // at this point UE in principle doesn't know the grid size (we assume the largest)
mac->mib_ssb,
1, // If the UE is not configured with a periodicity, the UE assumes a periodicity of a half frame
ssb_offset_point_a);
if (mac->search_space_zero == NULL)
mac->search_space_zero = calloc(1, sizeof(*mac->search_space_zero));
if (mac->coreset0 == NULL)
mac->coreset0 = calloc(1, sizeof(*mac->coreset0));
fill_coresetZero(mac->coreset0, &mac->type0_PDCCH_CSS_config);
fill_searchSpaceZero(mac->search_space_zero, slots_per_frame, &mac->type0_PDCCH_CSS_config);
if (is_ss_monitor_occasion(frame, slot, slots_per_frame, mac->search_space_zero)) {
update_pdcch_config(mac);
bool is_occasion = is_ss_monitor_occasion(frame, slot, slots_per_frame, mac->search_space_zero);
if (is_occasion) {
LOG_D(NR_MAC_DCI, "Monitoring DCI for SIB1 in frame %d slot %d\n", frame, slot);
config_dci_pdu(mac, dl_config, TYPE_SI_RNTI_, slot, mac->search_space_zero);
}
}
for (int i = 0; i < MAX_SI_GROUPS; i++) {
if (!mac->get_otherSI[i])
continue;