Commit 1ae494cc authored by General ABS's avatar General ABS Committed by abs

Received the UEContextModificationResponse

parent bf9fb2d4
......@@ -503,7 +503,7 @@ int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_S
NR_UE_info_t *UE_info = find_nr_UE(&nrmac->UE_info,rnti);
if (!UE_info) {
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
LOG_W(NR_MAC, "Could not find UE for RNTI %04x\n", rnti);
NR_SCHED_UNLOCK(&nrmac->sched_lock);
return -1;
}
......@@ -522,6 +522,18 @@ int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_S
return 0;
}
int nr_transmission_action_indicator_stop(module_id_t module_id, rnti_t rnti)
{
NR_UE_info_t *UE_info = find_nr_UE(&RC.nrmac[module_id]->UE_info, rnti);
if (!UE_info) {
LOG_W(NR_MAC, "Could not find UE for RNTI %04x\n", rnti);
return -1;
}
UE_info->UE_sched_ctrl.transmission_stop = true;
LOG_I(NR_MAC, "gNB-DU received the TransmissionActionIndicator with Stop value for UE %04x\n", UE_info->rnti);
return 0;
}
void nr_mac_config_scc(gNB_MAC_INST *nrmac,
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts,
int pusch_AntennaPorts,
......
......@@ -329,7 +329,8 @@ static void nr_store_dlsch_buffer(module_id_t module_id, frame_t frame, sub_fram
const int lcid = sched_ctrl->dl_lc_ids[i];
const uint16_t rnti = UE->rnti;
LOG_D(NR_MAC, "In %s: UE %x: LCID %d\n", __FUNCTION__, rnti, lcid);
if (lcid == DL_SCH_LCID_DTCH && sched_ctrl->rrc_processing_timer > 0) {
if ((lcid == DL_SCH_LCID_DTCH && sched_ctrl->rrc_processing_timer > 0) ||
(sched_ctrl->transmission_stop && sched_ctrl->rrc_processing_timer == 0)) {
continue;
}
start_meas(&RC.nrmac[module_id]->rlc_status_ind);
......@@ -910,7 +911,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
* Possible improvement: take the periodicity from input file.
* If such UE is not scheduled now, it will be by the preprocessor later.
* If we add the CE, ta_apply will be reset */
if (frame == (sched_ctrl->ta_frame + 10) % 1024) {
if ((frame == (sched_ctrl->ta_frame + 10) % 1024) && (sched_ctrl->transmission_stop == false)) {
sched_ctrl->ta_apply = true; /* the timer is reset once TA CE is scheduled */
LOG_D(NR_MAC, "[UE %04x][%d.%d] UL timing alignment procedures: setting flag for Timing Advance command\n", UE->rnti, frame, slot);
}
......
......@@ -2557,7 +2557,7 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo
UE_iterator(UE_info->list, UE) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
if (sched_ctrl->rrc_processing_timer > 0) {
if ((sched_ctrl->rrc_processing_timer > 0) || sched_ctrl->transmission_stop) {
continue;
}
......
......@@ -260,7 +260,8 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
sched_ctrl->sched_srs.srs_scheduled = false;
}
if ((sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) || sched_ctrl->rrc_processing_timer > 0) {
if ((sched_ctrl->ul_failure && !get_softmodem_params()->phy_test) ||
sched_ctrl->rrc_processing_timer > 0 || sched_ctrl->transmission_stop) {
continue;
}
......
......@@ -209,7 +209,8 @@ void nr_csi_meas_reporting(int Mod_idP,
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
if ((sched_ctrl->rrc_processing_timer > 0) || (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)) {
if ((sched_ctrl->rrc_processing_timer > 0) || sched_ctrl->transmission_stop ||
(sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)) {
continue;
}
const NR_CSI_MeasConfig_t *csi_measconfig = ul_bwp->csi_MeasConfig;
......@@ -1219,7 +1220,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
if (sched_ctrl->ul_failure || sched_ctrl->rrc_processing_timer > 0)
if (sched_ctrl->ul_failure || sched_ctrl->rrc_processing_timer > 0 || sched_ctrl->transmission_stop)
continue;
NR_PUCCH_Config_t *pucch_Config = ul_bwp->pucch_Config;
......
......@@ -1690,7 +1690,7 @@ static void pf_ul(module_id_t module_id,
const bool do_sched = nr_UE_is_to_be_scheduled(scc, 0, UE, sched_pusch->frame, sched_pusch->slot, nrmac->ulsch_max_frame_inactivity);
LOG_D(NR_MAC,"pf_ul: do_sched UE %04x => %s\n",UE->rnti,do_sched ? "yes" : "no");
if ((B == 0 && !do_sched) || (sched_ctrl->rrc_processing_timer > 0)) {
if ((B == 0 && !do_sched) || (sched_ctrl->rrc_processing_timer > 0) || sched_ctrl->transmission_stop) {
continue;
}
......
......@@ -269,6 +269,11 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
/* works? */
nr_mac_update_cellgroup(RC.nrmac[0], req->rnti, UE->CellGroup);
}
if (req->transmission_action_indicator != NULL) {
nr_transmission_action_indicator_stop(0, req->rnti);
}
NR_SCHED_UNLOCK(&mac->sched_lock);
/* some sanity checks, since we use the same type for request and response */
......
......@@ -620,6 +620,9 @@ typedef struct {
/// sri, ul_ri and tpmi based on SRS
nr_srs_feedback_t srs_feedback;
/// Stop transmission when gNB-DU receives the transmission action indicator with value Stop
bool transmission_stop;
} NR_UE_sched_ctrl_t;
typedef struct {
......
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