Commit 4e69a10c authored by francescomani's avatar francescomani

change BWP when Msg3_dcch_dtch

parent d71658d3
...@@ -1834,19 +1834,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1834,19 +1834,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
harq->round = 0; harq->round = 0;
harq->ndi ^= 1; harq->ndi ^= 1;
// Pause scheduling according to: configure_UE_BWP(nr_mac,
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs scc,
const NR_COMMON_channels_t *common_channels = &RC.nrmac[module_idP]->common_channels[0]; sched_ctrl,
const NR_SIB1_t *sib1 = common_channels->sib1 ? common_channels->sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL; NULL,
const NR_ServingCellConfig_t *servingCellConfig = UE->CellGroup ? UE->CellGroup->spCellConfig->spCellConfigDedicated : NULL; UE);
NR_BWP_t *genericParameters = get_dl_bwp_genericParameters(sched_ctrl->active_bwp,
common_channels->ServingCellConfigCommon,
sib1);
uint32_t delay_ms = servingCellConfig && servingCellConfig->downlinkBWP_ToAddModList ?
NR_RRC_SETUP_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_SETUP_DELAY_MS;
sched_ctrl->rrc_processing_timer = (delay_ms << genericParameters->subcarrierSpacing);
LOG_I(NR_MAC, "(%d.%d) Activating RRC processing timer for UE %04x with %d ms\n", frameP, slotP, UE->rnti, delay_ms);
// Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE // Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE
UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt = 0; UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt = 0;
......
...@@ -2218,13 +2218,21 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, ...@@ -2218,13 +2218,21 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
csi_MeasConfig = servingCellConfig->csi_MeasConfig ? servingCellConfig->csi_MeasConfig->choice.setup : NULL; csi_MeasConfig = servingCellConfig->csi_MeasConfig ? servingCellConfig->csi_MeasConfig->choice.setup : NULL;
target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
// (re)configuring BWP if(UE && UE->Msg3_dcch_dtch) {
// TODO BWP switching not via RRC reconfiguration // switching to initial BWP
// via RRC if firstActiveXlinkBWP_Id is NULL, MAC stays on the same BWP as before DL_BWP->bwp_id = 0;
if (servingCellConfig->firstActiveDownlinkBWP_Id) UL_BWP->bwp_id = 0;
DL_BWP->bwp_id = *servingCellConfig->firstActiveDownlinkBWP_Id; UE->Msg3_dcch_dtch = false;
if (servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id) }
UL_BWP->bwp_id = *servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id; else {
// (re)configuring BWP
// TODO BWP switching not via RRC reconfiguration
// via RRC if firstActiveXlinkBWP_Id is NULL, MAC stays on the same BWP as before
if (servingCellConfig->firstActiveDownlinkBWP_Id)
DL_BWP->bwp_id = *servingCellConfig->firstActiveDownlinkBWP_Id;
if (servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id)
UL_BWP->bwp_id = *servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id;
}
const struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = servingCellConfig->downlinkBWP_ToAddModList; const struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = servingCellConfig->downlinkBWP_ToAddModList;
if(bwpList) if(bwpList)
......
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