Remove update_pdsch_ps and update_pusch_ps flags to use_rrc_processing_timer instead
This commit is contained in:
@@ -917,7 +917,7 @@ void pf_dl(module_id_t module_id,
|
||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
if (ps->nrOfLayers != layers[UE_id] || ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
|
||||
if (ps->nrOfLayers != layers[UE_id] || ps->time_domain_allocation != tda) {
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
UE_info->CellGroup[UE_id],
|
||||
|
||||
@@ -579,7 +579,11 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1,
|
||||
bwpd = (NR_BWP_DownlinkDedicated_t*)bwpd0;
|
||||
}
|
||||
|
||||
if (sched_ctrl->update_pdsch_ps == true) {
|
||||
// Prevent gNB to enable 256QAM table while the RRCProcessing timer is running.
|
||||
// For example, after the RRC created RRC Reconfiguration message we need to prevent gNB to apply another MCS table
|
||||
// before the RRC Reconfiguration being received by the UE, otherwise UE will not be able to decode PDSCH
|
||||
// and the connection will drop.
|
||||
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||
if (bwpd &&
|
||||
bwpd->pdsch_Config &&
|
||||
bwpd->pdsch_Config->choice.setup &&
|
||||
@@ -592,7 +596,6 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1,
|
||||
} else {
|
||||
ps->mcsTableIdx = 0;
|
||||
}
|
||||
sched_ctrl->update_pdsch_ps = false;
|
||||
}
|
||||
LOG_D(NR_MAC,"MCS Table Index: %d\n",ps->mcsTableIdx);
|
||||
|
||||
@@ -2812,8 +2815,45 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
sched_ctrl->rrc_processing_timer--;
|
||||
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %d\n", frame, slot, UE_id);
|
||||
sched_ctrl->update_pdsch_ps = true;
|
||||
sched_ctrl->update_pusch_ps = true;
|
||||
|
||||
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon;
|
||||
|
||||
NR_BWP_DownlinkDedicated_t *bwpd = UE_info->CellGroup[UE_id] &&
|
||||
UE_info->CellGroup[UE_id]->spCellConfig &&
|
||||
UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated ?
|
||||
UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->initialDownlinkBWP : NULL;
|
||||
|
||||
const uint8_t layers = set_dl_nrOfLayers(sched_ctrl);
|
||||
const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Id : 0][slot];
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
UE_info->CellGroup[UE_id],
|
||||
sched_ctrl->active_bwp,
|
||||
bwpd,
|
||||
tda >= 0 ? tda : sched_ctrl->pdsch_semi_static.time_domain_allocation,
|
||||
layers,
|
||||
sched_ctrl,
|
||||
&sched_ctrl->pdsch_semi_static);
|
||||
|
||||
NR_BWP_UplinkDedicated_t *ubwpd = UE_info->CellGroup[UE_id] &&
|
||||
UE_info->CellGroup[UE_id]->spCellConfig &&
|
||||
UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated &&
|
||||
UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig ?
|
||||
UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP : NULL;
|
||||
|
||||
const uint8_t num_dmrs_cdm_grps_no_data = (sched_ctrl->active_ubwp || ubwpd) ? 1 : 2;
|
||||
int dci_format = get_dci_format(sched_ctrl);
|
||||
const int utda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0;
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
ubwpd,
|
||||
dci_format,
|
||||
utda >= 0 ? utda : sched_ctrl->pusch_semi_static.time_domain_allocation,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
&sched_ctrl->pusch_semi_static);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,8 +988,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -998,7 +997,6 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
|
||||
/* Check the resource is enough for retransmission */
|
||||
@@ -1247,8 +1245,7 @@ void pf_ul(module_id_t module_id,
|
||||
const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0;
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -1257,7 +1254,6 @@ void pf_ul(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC,"Looking for min_rb %d RBs, starting at %d\n", min_rb, rbStart);
|
||||
@@ -1385,8 +1381,7 @@ void pf_ul(module_id_t module_id,
|
||||
const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0;
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -1395,7 +1390,6 @@ void pf_ul(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
update_ul_ue_R_Qm(sched_pusch, ps);
|
||||
|
||||
|
||||
@@ -509,6 +509,7 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
|
||||
|
||||
uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
int get_dci_format(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp);
|
||||
void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ubwp);
|
||||
|
||||
|
||||
@@ -626,8 +626,6 @@ typedef struct {
|
||||
int ul_failure;
|
||||
struct CSI_Report CSI_report;
|
||||
bool SR;
|
||||
bool update_pdsch_ps;
|
||||
bool update_pusch_ps;
|
||||
bool set_mcs;
|
||||
/// information about every HARQ process
|
||||
NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
|
||||
|
||||
Reference in New Issue
Block a user