Commit e8e8c877 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

Fix warning in upper layer

parent fb38d1ae
...@@ -81,6 +81,8 @@ static void configure_nr_rrc(uint32_t gnb_id) ...@@ -81,6 +81,8 @@ static void configure_nr_rrc(uint32_t gnb_id)
} }
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/*
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties) static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties)
{ {
...@@ -92,7 +94,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, ...@@ -92,7 +94,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
{ {
s1ap_register_enb_req_t *s1ap_register_gNB; //Type Temporarily reuse s1ap_register_enb_req_t *s1ap_register_gNB; //Type Temporarily reuse
/* note: there is an implicit relationship between the data structure and the message name */ // note: there is an implicit relationship between the data structure and the message name
msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse
RCconfig_NR_S1(msg_p, gnb_id); RCconfig_NR_S1(msg_p, gnb_id);
...@@ -114,6 +116,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, ...@@ -114,6 +116,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
} }
# endif # endif
#endif #endif
*/
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void *gNB_app_task(void *args_p) void *gNB_app_task(void *args_p)
......
...@@ -599,18 +599,18 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -599,18 +599,18 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
int32_t srb1_poll_byte = 0; int32_t srb1_poll_byte = 0;
int32_t srb1_max_retx_threshold = 0; int32_t srb1_max_retx_threshold = 0;
int32_t my_int; //int32_t my_int;
paramdef_t GNBSParams[] = GNBSPARAMS_DESC; paramdef_t GNBSParams[] = GNBSPARAMS_DESC;
////////// Identification parameters ////////// Identification parameters
paramdef_t GNBParams[] = GNBPARAMS_DESC; paramdef_t GNBParams[] = GNBPARAMS_DESC;
paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST,NULL,0}; paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST,NULL,0};
////////// Physical parameters ////////// Physical parameters
checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK; //checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK;
paramdef_t CCsParams[] = NRCCPARAMS_DESC; paramdef_t CCsParams[] = NRCCPARAMS_DESC;
paramlist_def_t CCsParamList = {GNB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; paramlist_def_t CCsParamList = {GNB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0};
paramdef_t SRB1Params[] = SRB1PARAMS_DESC; //paramdef_t SRB1Params[] = SRB1PARAMS_DESC;
/* get global parameters, defined outside any section in the config file */ /* get global parameters, defined outside any section in the config file */
......
/*
* 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 eNB_scheduler_primitives.c
* \brief primitives used by eNB for BCH, RACH, ULSCH, DLSCH scheduling
* \author Navid Nikaein and Raymond Knopp
* \date 2010 - 2014
* \email: navid.nikaein@eurecom.fr
* \version 1.0
* @ingroup _mac
*/
#include "assertions.h"
#include "LAYER2/NR_MAC_gNB/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "RRC/NR/nr_rrc_extern.h"
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "T.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern int n_active_slices;
int is_nr_UL_sf(NR_COMMON_channels_t * ccP, sub_frame_t subframeP)
{
// if FDD return dummy value
if (ccP->tdd_Config == NULL)
return (0);
switch (ccP->tdd_Config->subframeAssignment) {
case 1:
switch (subframeP) {
case 0:
case 4:
case 5:
case 9:
return (0);
break;
case 2:
case 3:
case 7:
case 8:
return (1);
break;
default:
return (0);
break;
}
break;
case 3:
if ((subframeP <= 1) || (subframeP >= 5))
return (0);
else if ((subframeP > 1) && (subframeP < 5))
return (1);
else
AssertFatal(1 == 0, "Unknown subframe number\n");
break;
case 4:
if ((subframeP <= 1) || (subframeP >= 4))
return (0);
else if ((subframeP > 1) && (subframeP < 4))
return (1);
else
AssertFatal(1 == 0, "Unknown subframe number\n");
break;
case 5:
if ((subframeP <= 1) || (subframeP >= 3))
return (0);
else if ((subframeP > 1) && (subframeP < 3))
return (1);
else
AssertFatal(1 == 0, "Unknown subframe number\n");
break;
default:
AssertFatal(1 == 0,
"subframe %d Unsupported TDD configuration %d\n",
subframeP, (int) ccP->tdd_Config->subframeAssignment);
break;
}
}
\ No newline at end of file
...@@ -182,7 +182,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram ...@@ -182,7 +182,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
UE_list_t *UE_list = &gNB->UE_list; UE_list_t *UE_list = &gNB->UE_list;
nfapi_ul_config_request_body_t *ul_req; nfapi_ul_config_request_body_t *ul_req;
int CC_id, UE_id; int CC_id, UE_id;
COMMON_channels_t *cc = RC.nrmac[module_idP]->common_channels; NR_COMMON_channels_t *cc = RC.nrmac[module_idP]->common_channels;
SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon; SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon;
struct SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated; struct SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated;
uint8_t TSFC; uint8_t TSFC;
......
...@@ -113,27 +113,27 @@ typedef struct gNB_MAC_INST_s { ...@@ -113,27 +113,27 @@ typedef struct gNB_MAC_INST_s {
uint16_t pdu_index[NFAPI_CC_MAX]; uint16_t pdu_index[NFAPI_CC_MAX];
/// NFAPI Config Request Structure /// NFAPI Config Request Structure
nfapi_nr_config_request_t config[NFAPI_CC_MAX]; nfapi_nr_config_request_t config[NFAPI_CC_MAX];
/// NFAPI DL Config Request Structure /// NFAPI DL Config Request Structure
nfapi_nr_dl_config_request_t DL_req[NFAPI_CC_MAX]; nfapi_nr_dl_config_request_t DL_req[NFAPI_CC_MAX];
/// NFAPI UL Config Request Structure, send to L1 4 subframes before processing takes place /// NFAPI UL Config Request Structure, send to L1 4 subframes before processing takes place
nfapi_ul_config_request_t UL_req[NFAPI_CC_MAX]; nfapi_ul_config_request_t UL_req[NFAPI_CC_MAX];
/// Preallocated DL pdu list /// Preallocated DL pdu list
nfapi_dl_config_request_pdu_t dl_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_DL_PDU]; nfapi_nr_dl_config_request_pdu_t dl_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_DL_PDU];
/// Preallocated UL pdu list /// Preallocated UL pdu list
nfapi_ul_config_request_pdu_t ul_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_UL_PDU]; nfapi_ul_config_request_pdu_t ul_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_UL_PDU];
/// Preallocated UL pdu list for ULSCH (n+k delay) /// Preallocated UL pdu list for ULSCH (n+k delay)
nfapi_ul_config_request_pdu_t ul_config_pdu_list_tmp[NFAPI_CC_MAX][10][MAX_NUM_UL_PDU]; nfapi_ul_config_request_pdu_t ul_config_pdu_list_tmp[NFAPI_CC_MAX][10][MAX_NUM_UL_PDU];
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests /// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
nfapi_ul_config_request_t UL_req_tmp[NFAPI_CC_MAX][10]; nfapi_ul_config_request_t UL_req_tmp[NFAPI_CC_MAX][10];
/// Preallocated HI_DCI0 pdu list /// Preallocated HI_DCI0 pdu list
nfapi_hi_dci0_request_pdu_t hi_dci0_pdu_list[NFAPI_CC_MAX][MAX_NUM_HI_DCI0_PDU]; nfapi_hi_dci0_request_pdu_t hi_dci0_pdu_list[NFAPI_CC_MAX][MAX_NUM_HI_DCI0_PDU];
/// NFAPI HI/DCI0 Config Request Structure /// NFAPI HI/DCI0 Config Request Structure
nfapi_hi_dci0_request_t HI_DCI0_req[NFAPI_CC_MAX]; nfapi_hi_dci0_request_t HI_DCI0_req[NFAPI_CC_MAX];
/// Prealocated TX pdu list /// Prealocated TX pdu list
nfapi_tx_request_pdu_t tx_request_pdu[NFAPI_CC_MAX][MAX_NUM_TX_REQUEST_PDU]; nfapi_tx_request_pdu_t tx_request_pdu[NFAPI_CC_MAX][MAX_NUM_TX_REQUEST_PDU];
/// NFAPI DL PDU structure /// NFAPI DL PDU structure
nfapi_tx_request_t TX_req[NFAPI_CC_MAX]; nfapi_tx_request_t TX_req[NFAPI_CC_MAX];
UE_list_t UE_list; UE_list_t UE_list;
......
...@@ -19,6 +19,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -19,6 +19,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
NR_ServingCellConfigCommon_t *servingcellconfigcommon NR_ServingCellConfigCommon_t *servingcellconfigcommon
); );
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
int CC_idP,
frame_t frameP,
sub_frame_t subframeP)
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t frameP, frame_t frameP,
sub_frame_t subframeP); sub_frame_t subframeP);
......
...@@ -300,7 +300,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) ...@@ -300,7 +300,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
sched_info->DL_req = &mac->DL_req[CC_id]; sched_info->DL_req = &mac->DL_req[CC_id];
sched_info->HI_DCI0_req = &mac->HI_DCI0_req[CC_id]; sched_info->HI_DCI0_req = &mac->HI_DCI0_req[CC_id];
if ((mac->common_channels[CC_id].tdd_Config==NULL) || if ((mac->common_channels[CC_id].tdd_Config==NULL) ||
(is_UL_sf(&mac->common_channels[CC_id],(sched_info->subframe+sf_ahead)%10)>0)) (is_nr_UL_sf(&mac->common_channels[CC_id],(sched_info->subframe+sf_ahead)%10)>0))
sched_info->UL_req = &mac->UL_req[CC_id]; sched_info->UL_req = &mac->UL_req[CC_id];
else else
sched_info->UL_req = NULL; sched_info->UL_req = NULL;
......
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