Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI

Switch to BWP where RA is configured, typically in the InitialBWP
At this point, MAC CE for C-RNTI received at gNB, UE already switched and triggered RA in that BWP, need to do BWP switching also at gNB for that C-RNTI
This commit is contained in:
luis_pereira87
2024-07-15 13:34:13 +01:00
parent e8a083767a
commit cbf8489707
@@ -899,6 +899,22 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
reset_dl_harq_list(&UE->UE_sched_ctrl);
reset_ul_harq_list(&UE->UE_sched_ctrl);
// Switch to BWP where RA is configured, typically in the InitialBWP
// At this point, UE already switched and triggered RA in that BWP, need to do BWP switching also at gNB for C-RNTI
if ((ra->DL_BWP.bwp_id != UE->current_DL_BWP.bwp_id) || (ra->UL_BWP.bwp_id != UE->current_UL_BWP.bwp_id)) {
LOG_I(NR_MAC,
"BWP switching at gNB from BWP id %ld to BWP id %ld due to RA configuration\n",
UE->current_DL_BWP.bwp_id,
ra->DL_BWP.bwp_id);
configure_UE_BWP(RC.nrmac[gnb_mod_idP],
RC.nrmac[gnb_mod_idP]->common_channels[CC_idP].ServingCellConfigCommon,
&UE->UE_sched_ctrl,
NULL,
UE,
ra->DL_BWP.bwp_id,
ra->UL_BWP.bwp_id);
}
if (UE->reconfigCellGroup) {
// Nothing to do
// A RRCReconfiguration message should be already pending (for example, an ongoing RRCReestablishment), and it will be