Clean up previous BWP switching implementation that was not F1 compliant
This commit is contained in:
@@ -1271,7 +1271,6 @@ set(L2_NR_SRC
|
|||||||
${NR_SDAP_SRC}
|
${NR_SDAP_SRC}
|
||||||
${NR_RRC_DIR}/rrc_gNB.c
|
${NR_RRC_DIR}/rrc_gNB.c
|
||||||
${NR_RRC_DIR}/nr_rrc_common.c
|
${NR_RRC_DIR}/nr_rrc_common.c
|
||||||
${NR_RRC_DIR}/L2_nr_interface.c
|
|
||||||
${NR_RRC_DIR}/mac_rrc_dl_direct.c
|
${NR_RRC_DIR}/mac_rrc_dl_direct.c
|
||||||
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
|
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
|
||||||
${NR_RRC_DIR}/nr_rrc_config.c
|
${NR_RRC_DIR}/nr_rrc_config.c
|
||||||
|
|||||||
@@ -1901,7 +1901,6 @@ INPUT = \
|
|||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_extern.h \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_extern.h \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/L2_nr_interface.c \
|
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
|
||||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \
|
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \
|
||||||
|
|||||||
@@ -201,8 +201,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
|
|||||||
|
|
||||||
nr_mac_update_timers(module_idP, frame, slot);
|
nr_mac_update_timers(module_idP, frame, slot);
|
||||||
|
|
||||||
schedule_nr_bwp_switch(module_idP, frame, slot);
|
|
||||||
|
|
||||||
// This schedules MIB
|
// This schedules MIB
|
||||||
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
|
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
|
||||||
|
|
||||||
|
|||||||
@@ -2012,8 +2012,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
|||||||
else {
|
else {
|
||||||
DL_BWP = &UE->current_DL_BWP;
|
DL_BWP = &UE->current_DL_BWP;
|
||||||
UL_BWP = &UE->current_UL_BWP;
|
UL_BWP = &UE->current_UL_BWP;
|
||||||
sched_ctrl->next_dl_bwp_id = -1;
|
|
||||||
sched_ctrl->next_ul_bwp_id = -1;
|
|
||||||
CellGroup = UE->CellGroup;
|
CellGroup = UE->CellGroup;
|
||||||
}
|
}
|
||||||
NR_BWP_Downlink_t *dl_bwp = NULL;
|
NR_BWP_Downlink_t *dl_bwp = NULL;
|
||||||
@@ -2302,8 +2300,6 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
|||||||
sched_ctrl->sched_pusch.time_domain_allocation = -1;
|
sched_ctrl->sched_pusch.time_domain_allocation = -1;
|
||||||
|
|
||||||
/* Set default BWPs */
|
/* Set default BWPs */
|
||||||
sched_ctrl->next_dl_bwp_id = -1;
|
|
||||||
sched_ctrl->next_ul_bwp_id = -1;
|
|
||||||
AssertFatal(ul_bwp->n_ul_bwp <= NR_MAX_NUM_BWP,
|
AssertFatal(ul_bwp->n_ul_bwp <= NR_MAX_NUM_BWP,
|
||||||
"uplinkBWP_ToAddModList has %d BWP!\n",
|
"uplinkBWP_ToAddModList has %d BWP!\n",
|
||||||
ul_bwp->n_ul_bwp);
|
ul_bwp->n_ul_bwp);
|
||||||
@@ -2851,39 +2847,6 @@ void nr_mac_update_timers(module_id_t module_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void schedule_nr_bwp_switch(module_id_t module_id,
|
|
||||||
frame_t frame,
|
|
||||||
sub_frame_t slot)
|
|
||||||
{
|
|
||||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
|
||||||
NR_SCHED_ENSURE_LOCKED(&RC.nrmac[module_id]->sched_lock);
|
|
||||||
|
|
||||||
NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info;
|
|
||||||
|
|
||||||
// TODO: Implementation of a algorithm to perform:
|
|
||||||
// - DL BWP selection: sched_ctrl->next_dl_bwp_id = dl_bwp_id
|
|
||||||
// - UL BWP selection: sched_ctrl->next_ul_bwp_id = ul_bwp_id
|
|
||||||
|
|
||||||
UE_iterator(UE_info->list, UE) {
|
|
||||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
|
||||||
NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP;
|
|
||||||
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
|
||||||
if (sched_ctrl->rrc_processing_timer == 0 && UE->Msg4_ACKed && sched_ctrl->next_dl_bwp_id >= 0) {
|
|
||||||
LOG_W(NR_MAC,
|
|
||||||
"%4d.%2d UE %04x Scheduling BWP switch from DL_BWP %ld to %ld and from UL_BWP %ld to %ld\n",
|
|
||||||
frame,
|
|
||||||
slot,
|
|
||||||
UE->rnti,
|
|
||||||
dl_bwp->bwp_id,
|
|
||||||
sched_ctrl->next_dl_bwp_id,
|
|
||||||
ul_bwp->bwp_id,
|
|
||||||
sched_ctrl->next_ul_bwp_id);
|
|
||||||
|
|
||||||
nr_mac_rrc_bwp_switch_req(module_id, frame, slot, UE->rnti, sched_ctrl->next_dl_bwp_id, sched_ctrl->next_ul_bwp_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int ul_buffer_index(int frame, int slot, int scs, int size)
|
int ul_buffer_index(int frame, int slot, int scs, int size)
|
||||||
{
|
{
|
||||||
const int abs_slot = frame * nr_slots_per_frame[scs] + slot;
|
const int abs_slot = frame * nr_slots_per_frame[scs] + slot;
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ void nr_mac_update_timers(module_id_t module_id,
|
|||||||
|
|
||||||
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, sub_frame_t slot_rxP, NR_Sched_Rsp_t *sched_info);
|
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, sub_frame_t slot_rxP, NR_Sched_Rsp_t *sched_info);
|
||||||
|
|
||||||
void schedule_nr_bwp_switch(module_id_t module_id,
|
|
||||||
frame_t frame,
|
|
||||||
sub_frame_t slot);
|
|
||||||
|
|
||||||
/* \brief main DL scheduler function. Calls a preprocessor to decide on
|
/* \brief main DL scheduler function. Calls a preprocessor to decide on
|
||||||
* resource allocation, then "post-processes" resource allocation (nFAPI
|
* resource allocation, then "post-processes" resource allocation (nFAPI
|
||||||
* messages, statistics, HARQ handling, CEs, ... */
|
* messages, statistics, HARQ handling, CEs, ... */
|
||||||
|
|||||||
@@ -539,11 +539,6 @@ typedef struct NR_UE_ul_harq {
|
|||||||
/*! \brief scheduling control information set through an API */
|
/*! \brief scheduling control information set through an API */
|
||||||
#define MAX_CSI_REPORTS 48
|
#define MAX_CSI_REPORTS 48
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/// the next active BWP ID in DL
|
|
||||||
NR_BWP_Id_t next_dl_bwp_id;
|
|
||||||
/// the next active BWP ID in UL
|
|
||||||
NR_BWP_Id_t next_ul_bwp_id;
|
|
||||||
|
|
||||||
/// CCE index and aggregation, should be coherent with cce_list
|
/// CCE index and aggregation, should be coherent with cce_list
|
||||||
NR_SearchSpace_t *search_space;
|
NR_SearchSpace_t *search_space;
|
||||||
NR_ControlResourceSet_t *coreset;
|
NR_ControlResourceSet_t *coreset;
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright ownership.
|
|
||||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
|
||||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
||||||
* except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.openairinterface.org/?page_id=698
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*-------------------------------------------------------------------------------
|
|
||||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
||||||
* contact@openairinterface.org
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! \file L2_nr_interface.c
|
|
||||||
* \brief layer 2 interface, used to support different RRC sublayer
|
|
||||||
* \author Raymond Knopp and Navid Nikaein, WEI-TAI CHEN
|
|
||||||
* \date 2010-2014, 2018
|
|
||||||
* \version 1.0
|
|
||||||
* \company Eurecom, NTUST
|
|
||||||
* \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "platform_types.h"
|
|
||||||
#include "nr_rrc_defs.h"
|
|
||||||
#include "nr_rrc_extern.h"
|
|
||||||
#include "common/utils/LOG/log.h"
|
|
||||||
#include "common/ran_context.h"
|
|
||||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
|
||||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
|
||||||
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
|
||||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
|
||||||
|
|
||||||
#include "uper_encoder.h"
|
|
||||||
|
|
||||||
#include "NR_MIB.h"
|
|
||||||
#include "NR_BCCH-BCH-Message.h"
|
|
||||||
#include "rrc_gNB_UE_context.h"
|
|
||||||
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
|
|
||||||
#include "nr_pdcp/nr_pdcp_oai_api.h"
|
|
||||||
|
|
||||||
|
|
||||||
extern RAN_CONTEXT_t RC;
|
|
||||||
|
|
||||||
int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const sub_frame_t sub_frameP,
|
|
||||||
const rnti_t rntiP,
|
|
||||||
const int dl_bwp_id,
|
|
||||||
const int ul_bwp_id) {
|
|
||||||
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[module_idP], rntiP);
|
|
||||||
|
|
||||||
protocol_ctxt_t ctxt;
|
|
||||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, GNB_FLAG_YES, rntiP, frameP, sub_frameP, 0);
|
|
||||||
nr_rrc_reconfiguration_req(ue_context_p, &ctxt, dl_bwp_id, ul_bwp_id);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -110,13 +110,6 @@ void *rrc_gnb_task(void *args_p);
|
|||||||
\ *reOffset Pointer to RE Offset Value */
|
\ *reOffset Pointer to RE Offset Value */
|
||||||
void rrc_config_dl_ptrs_params(NR_BWP_Downlink_t *bwp, long *ptrsNrb, long *ptrsMcs, long *epre_Ratio, long *reOffset);
|
void rrc_config_dl_ptrs_params(NR_BWP_Downlink_t *bwp, long *ptrsNrb, long *ptrsMcs, long *epre_Ratio, long *reOffset);
|
||||||
|
|
||||||
int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const sub_frame_t sub_frameP,
|
|
||||||
const rnti_t rntiP,
|
|
||||||
const int dl_bwp_id,
|
|
||||||
const int ul_bwp_id);
|
|
||||||
|
|
||||||
int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP,
|
int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||||
protocol_ctxt_t *const ctxt_pP,
|
protocol_ctxt_t *const ctxt_pP,
|
||||||
const int dl_bwp_id,
|
const int dl_bwp_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user