Merge branch 'develop' into 'nasmesh_kernel_5.8'
# Conflicts: # openair2/NETWORK_DRIVER/MESH/device.c
This commit is contained in:
@@ -28,10 +28,13 @@
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_TYPES_H__
|
||||
# define __PLATFORM_TYPES_H__
|
||||
#define __PLATFORM_TYPES_H__
|
||||
|
||||
#if !defined(NAS_NETLINK)
|
||||
#include <stdint.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <linux/types.h>
|
||||
typedef void * intptr_t;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -229,9 +232,7 @@ typedef uint8_t ebi_t; // eps bearer id
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// may be ITTI not enabled, but type instance is useful also for OTG,
|
||||
#if !defined(instance_t)
|
||||
typedef uint16_t instance_t;
|
||||
#endif
|
||||
typedef intptr_t instance_t;
|
||||
typedef struct protocol_ctxt_s {
|
||||
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
||||
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||
@@ -292,7 +293,7 @@ typedef struct protocol_ctxt_s {
|
||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp)
|
||||
|
||||
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02u][RNTI %" PRIx16 "]"
|
||||
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx16 "]"
|
||||
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
|
||||
(CTXT_Pp)->frame, \
|
||||
((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \
|
||||
|
||||
@@ -399,8 +399,8 @@ typedef struct NbIoTRrcConfigurationReq_s {
|
||||
|
||||
// gNB: GNB_APP -> RRC messages
|
||||
typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
uint16_t tac;
|
||||
uint64_t cell_identity;
|
||||
uint32_t tac;
|
||||
uint16_t mcc[PLMN_LIST_MAX_SIZE];
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD "prach_dtx_emtc3_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD "pucch1_dtx_emtc3_threshold"
|
||||
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD "pucch1ab_dtx_emtc3_threshold"
|
||||
#define CONFIG_STRING_L1_PUSCH_SIGNAL_THRESHOLD "pusch_signal_threshold"
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* L1 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -89,7 +90,8 @@
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0} \
|
||||
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_L1_PUSCH_SIGNAL_THRESHOLD, NULL, 0, iptr:NULL, defintval:635, TYPE_INT, 0} \
|
||||
}
|
||||
#define L1_CC_IDX 0
|
||||
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
@@ -115,6 +117,7 @@
|
||||
#define L1_PRACH_DTX_EMTC3_THRESHOLD_IDX 21
|
||||
#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 22
|
||||
#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 23
|
||||
#define L1_PUSCH_SIGNAL_THRESHOLD_IDX 24
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
+24
-24
@@ -70,7 +70,7 @@ extern RAN_CONTEXT_t RC;
|
||||
// for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
// {
|
||||
//
|
||||
// //msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
// //msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
|
||||
// //RCconfig_S1(msg_p, enb_id);
|
||||
//
|
||||
// if (enb_id == 0) RCconfig_gtpu();
|
||||
@@ -93,14 +93,14 @@ static uint32_t eNB_app_register_m2(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
MessageDef *msg_p;
|
||||
uint32_t register_enb_m2_pending = 0;
|
||||
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP,MESSAGE_TEST );
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0,MESSAGE_TEST );
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
|
||||
LOG_D(ENB_APP,"Register ...\n");
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
{
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_REGISTER_ENB_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, M2AP_REGISTER_ENB_REQ);
|
||||
RCconfig_M2(msg_p, enb_id);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
register_enb_m2_pending++;
|
||||
@@ -115,28 +115,28 @@ static uint32_t eNB_app_register_m2(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
static uint32_t eNB_app_handle_m2ap_mbms_scheduling_information(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
return 0;
|
||||
}
|
||||
static uint32_t eNB_app_handle_m2ap_mbms_session_start_req(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_START_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, M2AP_MBMS_SESSION_START_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
return 0;
|
||||
}
|
||||
static uint32_t eNB_app_handle_m2ap_mbms_session_stop_req(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_STOP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, M2AP_MBMS_SESSION_STOP_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
return 0;
|
||||
}
|
||||
static uint32_t eNB_app_handle_m2ap_mbms_session_update_req(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_UPDATE_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, M2AP_MBMS_SESSION_UPDATE_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
|
||||
if (NODE_IS_DU(node_type)) { // F1AP registration
|
||||
// configure F1AP here for F1C
|
||||
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SETUP_REQ);
|
||||
RCconfig_DU_F1(msg_p, enb_id);
|
||||
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
@@ -164,7 +164,7 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
|
||||
}
|
||||
else { // S1AP registration
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
|
||||
RCconfig_S1(msg_p, enb_id);
|
||||
|
||||
if (enb_id == 0) RCconfig_gtpu();
|
||||
@@ -191,7 +191,7 @@ static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end)
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
{
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, X2AP_REGISTER_ENB_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, X2AP_REGISTER_ENB_REQ);
|
||||
RCconfig_X2(msg_p, enb_id);
|
||||
itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
register_enb_x2_pending++;
|
||||
@@ -247,7 +247,7 @@ void *eNB_app_task(void *args_p) {
|
||||
do {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_ENB_APP, &msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
instance = ITTI_MSG_DESTINATION_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -266,7 +266,7 @@ void *eNB_app_task(void *args_p) {
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_I(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
register_enb_pending--;
|
||||
|
||||
@@ -280,7 +280,7 @@ void *eNB_app_task(void *args_p) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
@@ -323,7 +323,7 @@ void *eNB_app_task(void *args_p) {
|
||||
/* If all eNB cells are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
@@ -347,7 +347,7 @@ void *eNB_app_task(void *args_p) {
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
@@ -380,13 +380,13 @@ void *eNB_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case X2AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2);
|
||||
/* TODO handle recovering of registration */
|
||||
break;
|
||||
|
||||
case X2AP_REGISTER_ENB_CNF:
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_I(ENB_APP, "[eNB %ld] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
X2AP_REGISTER_ENB_CNF(msg_p).nb_x2);
|
||||
DevAssert(x2_register_enb_pending > 0);
|
||||
x2_register_enb_pending--;
|
||||
@@ -422,13 +422,13 @@ void *eNB_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case M2AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M2AP_DEREGISTERED_ENB_IND(msg_p).nb_m2);
|
||||
/* TODO handle recovering of registration */
|
||||
break;
|
||||
|
||||
case M2AP_REGISTER_ENB_CNF:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M2AP_REGISTER_ENB_CNF(msg_p).nb_m2);
|
||||
DevAssert(m2_register_enb_pending > 0);
|
||||
m2_register_enb_pending--;
|
||||
@@ -485,7 +485,7 @@ void *eNB_app_task(void *args_p) {
|
||||
// /* If all eNB cells are registered, start L2L1 task */
|
||||
// MessageDef *msg_init_p;
|
||||
|
||||
// msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
// msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
// itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
// } else {
|
||||
@@ -508,15 +508,15 @@ void *eNB_app_task(void *args_p) {
|
||||
|
||||
case M2AP_MBMS_SCHEDULING_INFORMATION:
|
||||
LOG_I(ENB_APP,"M2AP_SCHEDULING_INFORMATION received\n");
|
||||
eNB_app_handle_m2ap_mbms_scheduling_information(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
eNB_app_handle_m2ap_mbms_scheduling_information(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_START_REQ:
|
||||
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_START_REQ received\n");
|
||||
eNB_app_handle_m2ap_mbms_session_start_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
eNB_app_handle_m2ap_mbms_session_start_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_STOP_REQ:
|
||||
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_STOP_REQ received\n");
|
||||
eNB_app_handle_m2ap_mbms_session_stop_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
eNB_app_handle_m2ap_mbms_session_stop_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
case M2AP_RESET:
|
||||
LOG_I(ENB_APP,"M2AP_RESET received\n");
|
||||
@@ -529,7 +529,7 @@ void *eNB_app_task(void *args_p) {
|
||||
break;
|
||||
case M2AP_ERROR_INDICATION:
|
||||
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_UPDATE_REQ\n");
|
||||
eNB_app_handle_m2ap_mbms_session_update_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
eNB_app_handle_m2ap_mbms_session_update_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
case M2AP_MBMS_SERVICE_COUNTING_REQ:
|
||||
LOG_I(ENB_APP,"M2AP_MBMS_SERVICE_COUNTING_REQ\n");
|
||||
|
||||
@@ -121,15 +121,14 @@ void RCconfig_L1(void) {
|
||||
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
|
||||
|
||||
if (RC.eNB[j] == NULL) {
|
||||
RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
|
||||
RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
|
||||
LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
|
||||
memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
|
||||
}
|
||||
|
||||
for (i=0; i<RC.nb_L1_CC[j]; i++) {
|
||||
if (RC.eNB[j][i] == NULL) {
|
||||
RC.eNB[j][i] = (PHY_VARS_eNB *)malloc(sizeof(PHY_VARS_eNB));
|
||||
memset((void *)RC.eNB[j][i],0,sizeof(PHY_VARS_eNB));
|
||||
RC.eNB[j][i] = (PHY_VARS_eNB *)calloc(1, sizeof(PHY_VARS_eNB));
|
||||
LOG_I(PHY,"RC.eNB[%d][%d] = %p\n",j,i,RC.eNB[j][i]);
|
||||
RC.eNB[j][i]->Mod_id = j;
|
||||
RC.eNB[j][i]->CC_id = i;
|
||||
@@ -170,6 +169,10 @@ void RCconfig_L1(void) {
|
||||
RC.eNB[j][0]->pucch1_DTX_threshold_emtc[ce_level] = *(L1_ParamList.paramarray[j][L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX+ce_level].iptr);
|
||||
RC.eNB[j][0]->pucch1ab_DTX_threshold_emtc[ce_level] = *(L1_ParamList.paramarray[j][L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX+ce_level].iptr);
|
||||
}
|
||||
|
||||
|
||||
RC.eNB[j][0]->pusch_signal_threshold = *(L1_ParamList.paramarray[j][L1_PUSCH_SIGNAL_THRESHOLD_IDX].iptr);
|
||||
LOG_I(ENB_APP,"PUSCH singal threshold = %d \n",RC.eNB[j][0]->pusch_signal_threshold);
|
||||
}// j=0..num_inst
|
||||
|
||||
LOG_I(ENB_APP,"Initializing northbound interface for L1\n");
|
||||
@@ -287,7 +290,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
int32_t offsetMaxLimit = 0;
|
||||
int32_t cycleNb = 0;
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_CONFIGURATION_REQ);
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_CONFIGURATION_REQ);
|
||||
ccparams_lte_t ccparams_lte;
|
||||
ccparams_sidelink_t SLconfig;
|
||||
ccparams_eMTC_t eMTCconfig;
|
||||
@@ -2051,7 +2054,7 @@ int RCconfig_gtpu(void ) {
|
||||
|
||||
if (address) {
|
||||
MessageDef *message;
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_ENB_APP, GTPV1U_ENB_S1_REQ))!=NULL,"");
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_ENB_APP, 0, GTPV1U_ENB_S1_REQ))!=NULL,"");
|
||||
IPV4_STR_ADDR_TO_INT_NWBO ( address, GTPV1U_ENB_S1_REQ(message).enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
|
||||
LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,GTPV1U_ENB_S1_REQ(message).enb_ip_address_for_S1u_S12_S4_up);
|
||||
GTPV1U_ENB_S1_REQ(message).enb_port_for_S1u_S12_S4_up = enb_port_for_S1U;
|
||||
|
||||
@@ -251,7 +251,7 @@ int flexran_agent_start(mid_t mod_id)
|
||||
pthread_mutex_unlock(&flexran->mutex_node_ctrl);
|
||||
|
||||
/* reconfigure RRC again, the agent might have changed the configuration */
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
|
||||
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[mod_id]->configuration;
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg_p);
|
||||
}
|
||||
|
||||
@@ -565,6 +565,6 @@ void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c)
|
||||
}
|
||||
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message(TASK_FLEXRAN_AGENT, SOFT_RESTART_MESSAGE);
|
||||
msg = itti_alloc_new_message(TASK_FLEXRAN_AGENT, 0, SOFT_RESTART_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
|
||||
}
|
||||
|
||||
@@ -3465,7 +3465,7 @@ int flexran_add_s1ap_mme(mid_t mod_id, size_t n_mme, char **mme_ipv4) {
|
||||
if (!rrc_is_present(mod_id)) return -2;
|
||||
|
||||
/* Reconstruct S1AP_REGISTER_ENB_REQ */
|
||||
MessageDef *m = itti_alloc_new_message(TASK_FLEXRAN_AGENT, S1AP_REGISTER_ENB_REQ);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_FLEXRAN_AGENT, 0, S1AP_REGISTER_ENB_REQ);
|
||||
RCconfig_S1(m, mod_id);
|
||||
|
||||
const int CC_id = 0;
|
||||
@@ -3491,22 +3491,22 @@ int flexran_add_s1ap_mme(mid_t mod_id, size_t n_mme, char **mme_ipv4) {
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_num[n] = mme->broadcast_plmn_num;
|
||||
for (int i = 0; i < mme->broadcast_plmn_num; ++i)
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_index[n][i] = mme->broadcast_plmn_index[i];
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_port[n] = mme->mme_port;
|
||||
S1AP_REGISTER_ENB_REQ(m).nb_mme += 1;
|
||||
}
|
||||
|
||||
if (S1AP_REGISTER_ENB_REQ(m).nb_mme + n_mme > S1AP_MAX_NB_MME_IP_ADDRESS)
|
||||
return -1;
|
||||
|
||||
for (int i = 0; i < n_mme; ++i) {
|
||||
const int n = S1AP_REGISTER_ENB_REQ(m).nb_mme;
|
||||
strcpy(S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv4_address, mme_ipv4[0]);
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv4 = 1;
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv6 = 0;
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_num[n] = S1AP_REGISTER_ENB_REQ(m).num_plmn;
|
||||
for (int i = 0; i < S1AP_REGISTER_ENB_REQ(m).num_plmn; ++i)
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_index[n][i] = i;
|
||||
S1AP_REGISTER_ENB_REQ(m).nb_mme += 1;
|
||||
}
|
||||
const int n = S1AP_REGISTER_ENB_REQ(m).nb_mme;
|
||||
strcpy(S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv4_address, mme_ipv4[0]);
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv4 = 1;
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_ip_address[n].ipv6 = 0;
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_num[n] = S1AP_REGISTER_ENB_REQ(m).num_plmn;
|
||||
for (int i = 0; i < S1AP_REGISTER_ENB_REQ(m).num_plmn; ++i)
|
||||
S1AP_REGISTER_ENB_REQ(m).broadcast_plmn_index[n][i] = i;
|
||||
S1AP_REGISTER_ENB_REQ(m).mme_port[n] = S1AP_PORT_NUMBER;
|
||||
S1AP_REGISTER_ENB_REQ(m).nb_mme += 1;
|
||||
|
||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(mod_id), m);
|
||||
|
||||
@@ -3525,7 +3525,7 @@ int flexran_remove_s1ap_mme(mid_t mod_id, size_t n_mme, char **mme_ipv4) {
|
||||
if (!mme)
|
||||
return -2;
|
||||
|
||||
MessageDef *m = itti_alloc_new_message(TASK_FLEXRAN_AGENT, SCTP_CLOSE_ASSOCIATION);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_FLEXRAN_AGENT, 0, SCTP_CLOSE_ASSOCIATION);
|
||||
SCTP_CLOSE_ASSOCIATION(m).assoc_id = mme->assoc_id;
|
||||
itti_send_msg_to_task (TASK_SCTP, ENB_MODULE_ID_TO_INSTANCE(mod_id), m);
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, F1AP_SETUP_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_SETUP_REQ);
|
||||
|
||||
/* assoc_id */
|
||||
F1AP_SETUP_REQ(message_p).assoc_id = assoc_id;
|
||||
|
||||
@@ -116,7 +116,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_ProtocolIE_ID_id_RRCContainer, true);
|
||||
|
||||
// create an ITTI message and copy SDU
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_MAC_CCCH_DATA_IND);
|
||||
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
ccch_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
@@ -197,7 +197,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
|
||||
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n",
|
||||
LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %ld)\n",
|
||||
(unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
// create an ITTI message and copy SDU
|
||||
/*
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, RRC_DCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_DCCH_DATA_IND);
|
||||
|
||||
RRC_DCCH_DATA_IND (message_p).sdu_p = malloc(ie->value.choice.RRCContainer.size);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
@@ -78,7 +78,7 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
|
||||
.remote_port = RC.rrc[instance]->eth_params_s.remote_portd
|
||||
};
|
||||
AssertFatal(proto_agent_start(instance, ¶ms) == 0,
|
||||
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
|
||||
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
|
||||
}
|
||||
|
||||
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
|
||||
@@ -101,7 +101,7 @@ void cu_task_send_sctp_init_req(instance_t enb_id) {
|
||||
LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket)\n");
|
||||
MessageDef *message_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, SCTP_INIT_MSG);
|
||||
message_p = itti_alloc_new_message (TASK_CU_F1, 0, SCTP_INIT_MSG);
|
||||
message_p->ittiMsg.sctp_init.port = F1AP_PORT_NUMBER;
|
||||
message_p->ittiMsg.sctp_init.ppid = F1AP_SCTP_PPID;
|
||||
message_p->ittiMsg.sctp_init.ipv4 = 1;
|
||||
@@ -138,43 +138,43 @@ void *F1AP_CU_task(void *arg) {
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %ld\n",
|
||||
ITTI_MSG_DESTINATION_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %ld\n",
|
||||
ITTI_MSG_DESTINATION_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_I(F1AP, "CU Task Received SCTP_DATA_IND for Instance %d\n",
|
||||
ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
LOG_I(F1AP, "CU Task Received SCTP_DATA_IND for Instance %ld\n",
|
||||
ITTI_MSG_DESTINATION_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_data_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
case F1AP_SETUP_RESP: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_SETUP_RESP\n");
|
||||
// CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// CU_send_f1setup_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
// &F1AP_SETUP_RESP(received_msg));
|
||||
CU_send_F1_SETUP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
CU_send_F1_SETUP_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_RESP(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_DL_RRC_MESSAGE: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n");
|
||||
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_DL_RRC_MESSAGE(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc
|
||||
LOG_I(F1AP, "CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD\n");
|
||||
CU_send_UE_CONTEXT_RELEASE_COMMAND(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
CU_send_UE_CONTEXT_RELEASE_COMMAND(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_UE_CONTEXT_RELEASE_CMD(received_msg));
|
||||
break;
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
int num_cells_to_activate = 0;
|
||||
F1AP_Cells_to_be_Activated_List_Item_t *cell;
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, F1AP_SETUP_RESP);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, 0, F1AP_SETUP_RESP);
|
||||
|
||||
LOG_D(F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
|
||||
@@ -143,7 +143,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
// BK: need check
|
||||
// create an ITTI message and copy SDU
|
||||
|
||||
// message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
|
||||
// message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_MAC_CCCH_DATA_IND);
|
||||
// memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
rrc_dl_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
// memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
@@ -402,7 +402,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
MessageDef *message_p = NULL;
|
||||
|
||||
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, RRC_MAC_DRX_CONFIG_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, 0, RRC_MAC_DRX_CONFIG_REQ);
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = ctxt.rnti;
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
||||
itti_send_msg_to_task(TASK_MAC_ENB, ctxt.module_id, message_p);
|
||||
@@ -599,7 +599,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t len;
|
||||
|
||||
|
||||
LOG_I(F1AP, "[DU %d] %s: size %d UE RNTI %x in SRB %d\n",
|
||||
LOG_I(F1AP, "[DU %ld] %s: size %d UE RNTI %x in SRB %d\n",
|
||||
instance, __func__, msg->rrc_container_length, rnti, msg->srb_id);
|
||||
|
||||
//LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length);
|
||||
|
||||
@@ -50,7 +50,7 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_new_association_req_t *sctp_new_association_req_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, SCTP_NEW_ASSOCIATION_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, 0, SCTP_NEW_ASSOCIATION_REQ);
|
||||
|
||||
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
|
||||
sctp_new_association_req_p->ulp_cnx_id = instance;
|
||||
@@ -86,7 +86,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
@@ -109,7 +109,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
|
||||
.remote_port = RC.mac[instance]->eth_params_n.remote_portd
|
||||
};
|
||||
AssertFatal(proto_agent_start(instance, ¶ms) == 0,
|
||||
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
|
||||
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
|
||||
|
||||
DU_send_F1_SETUP_REQUEST(instance);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
// 2. store the message in f1ap context, that is also stored in RC
|
||||
// 2. send a sctp_association req
|
||||
LOG_I(F1AP, "DU Task Received F1AP_SETUP_REQ\n");
|
||||
du_task_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
du_task_send_sctp_association_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_REQ(received_msg));
|
||||
break;
|
||||
|
||||
@@ -164,26 +164,26 @@ void *F1AP_DU_task(void *arg) {
|
||||
// 1. store the respon
|
||||
// 2. send the f1setup_req
|
||||
LOG_I(F1AP, "DU Task Received SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
du_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
du_task_handle_sctp_association_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
// ex: any F1 incoming message for DU ends here
|
||||
LOG_I(F1AP, "DU Task Received SCTP_DATA_IND\n");
|
||||
du_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
du_task_handle_sctp_data_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
case F1AP_UL_RRC_MESSAGE: // to rrc
|
||||
LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n");
|
||||
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_UL_RRC_MESSAGE(received_msg));
|
||||
break;
|
||||
|
||||
case F1AP_UE_CONTEXT_RELEASE_REQ: // from MAC
|
||||
LOG_I(F1AP, "DU Task Received F1AP_UE_CONTEXT_RELEASE_REQ\n");
|
||||
DU_send_UE_CONTEXT_RELEASE_REQUEST(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
DU_send_UE_CONTEXT_RELEASE_REQUEST(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_UE_CONTEXT_RELEASE_REQ(received_msg));
|
||||
break;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
F1AP_UEContextSetupRequestIEs_t *ie;
|
||||
int i;
|
||||
DevAssert(pdu);
|
||||
msg_p = itti_alloc_new_message(TASK_DU_F1, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
f1ap_ue_context_setup_req_t *f1ap_ue_context_setup_req;
|
||||
f1ap_ue_context_setup_req = &F1AP_UE_CONTEXT_SETUP_REQ(msg_p);
|
||||
container = &pdu->choice.initiatingMessage->value.choice.UEContextSetupRequest;
|
||||
|
||||
@@ -119,7 +119,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
}
|
||||
|
||||
/* Calling the right handler */
|
||||
LOG_I(F1AP, "Calling handler with instance %d\n",instance);
|
||||
LOG_I(F1AP, "Calling handler with instance %ld\n",instance);
|
||||
ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])
|
||||
(instance, assoc_id, stream, &pdu);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu);
|
||||
|
||||
@@ -28,7 +28,7 @@ void cu_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_CU_F1, SCTP_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_CU_F1, 0, SCTP_DATA_REQ);
|
||||
|
||||
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
|
||||
|
||||
@@ -46,7 +46,7 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, SCTP_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_DU_F1, 0, SCTP_DATA_REQ);
|
||||
|
||||
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
|
||||
|
||||
@@ -64,7 +64,7 @@ void f1ap_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_CLOSE_ASSOCIATION);
|
||||
message_p = itti_alloc_new_message(TASK_S1AP, 0, SCTP_CLOSE_ASSOCIATION);
|
||||
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
|
||||
sctp_close_association_p->assoc_id = assoc_id;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
/* cell configuration section name */
|
||||
#define GNB_CONFIG_STRING_GNB_LIST "gNBs"
|
||||
|
||||
#define GNB_CONFIG_STRING_PDCCH_CONFIGSIB1 "pdcch_ConfigSIB1"
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON "servingCellConfigCommon"
|
||||
#define GNB_CONFIG_STRING_PHYSCELLID "physCellId"
|
||||
#define GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET "n_TimingAdvanceOffset"
|
||||
@@ -210,6 +211,21 @@
|
||||
|
||||
#define CARRIERBANDWIDTH_OKVALUES {11,18,24,25,31,32,38,51,52,65,66,78,79,93,106,107,121,132,133,135,160,162,189,216,217,245,264,270,273}
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||
/* pdcch_ConfigSIB1 parameters */
|
||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CONTROL_RESOURCE_SET_ZERO "controlResourceSetZero"
|
||||
#define SEARCH_SPACE_ZERO "searchSpaceZero"
|
||||
|
||||
#define PDCCH_CONFIGSIB1PARAMS_DESC(pdcch_ConfigSIB1) { \
|
||||
{CONTROL_RESOURCE_SET_ZERO, NULL, 0, i64ptr:&pdcch_ConfigSIB1->controlResourceSetZero, defintval:0, TYPE_INT64, 0}, \
|
||||
{SEARCH_SPACE_ZERO, NULL, 0, i64ptr:&pdcch_ConfigSIB1->searchSpaceZero, defintval:0, TYPE_INT64, 0} \
|
||||
}
|
||||
|
||||
#define CONTROL_RESOURCE_SET_ZERO_IDX 0
|
||||
#define SEARCH_SPACE_ZERO_IDX 1
|
||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* Serving Cell Config Common configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
|
||||
@@ -56,7 +56,7 @@ static void configure_nr_rrc(uint32_t gnb_id)
|
||||
MessageDef *msg_p = NULL;
|
||||
// int CC_id;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, NRRRC_CONFIGURATION_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NRRRC_CONFIGURATION_REQ);
|
||||
|
||||
if (RC.nrrrc[gnb_id]) {
|
||||
RCconfig_NRRRC(msg_p,gnb_id, RC.nrrrc[gnb_id]);
|
||||
@@ -84,7 +84,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
|
||||
ngap_register_gnb_req_t *ngap_register_gNB; //Type Temporarily reuse
|
||||
|
||||
// note: there is an implicit relationship between the data structure and the message name
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
|
||||
|
||||
RCconfig_NR_NG(msg_p, gnb_id);
|
||||
|
||||
@@ -115,7 +115,7 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end)
|
||||
|
||||
for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
|
||||
{
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, X2AP_REGISTER_ENB_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, X2AP_REGISTER_ENB_REQ);
|
||||
LOG_I(X2AP, "GNB_ID: %d \n", gnb_id);
|
||||
RCconfig_NR_X2(msg_p, gnb_id);
|
||||
itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
|
||||
@@ -182,7 +182,7 @@ void *gNB_app_task(void *args_p)
|
||||
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);//, gnb_properties_p);
|
||||
} else {
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
msg_p = itti_alloc_new_message(TASK_GNB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ void *gNB_app_task(void *args_p)
|
||||
itti_receive_msg (TASK_GNB_APP, &msg_p);
|
||||
|
||||
msg_name = ITTI_MSG_NAME (msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
instance = ITTI_MSG_DESTINATION_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -206,7 +206,7 @@ void *gNB_app_task(void *args_p)
|
||||
|
||||
|
||||
case NGAP_REGISTER_GNB_CNF:
|
||||
LOG_I(GNB_APP, "[gNB %d] Received %s: associated AMF %d\n", instance, msg_name,
|
||||
LOG_I(GNB_APP, "[gNB %ld] Received %s: associated AMF %d\n", instance, msg_name,
|
||||
NGAP_REGISTER_GNB_CNF(msg_p).nb_amf);
|
||||
/*
|
||||
DevAssert(register_gnb_pending > 0);
|
||||
@@ -223,7 +223,7 @@ void *gNB_app_task(void *args_p)
|
||||
// If all gNB are registered, start L2L1 task
|
||||
MessageDef *msg_init_p;
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_GNB_APP, INITIALIZE_MESSAGE);
|
||||
msg_init_p = itti_alloc_new_message (TASK_GNB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
@@ -248,7 +248,7 @@ void *gNB_app_task(void *args_p)
|
||||
break;
|
||||
|
||||
case NGAP_DEREGISTERED_GNB_IND:
|
||||
LOG_W(GNB_APP, "[gNB %d] Received %s: associated AMF %d\n", instance, msg_name,
|
||||
LOG_W(GNB_APP, "[gNB %ld] Received %s: associated AMF %d\n", instance, msg_name,
|
||||
NGAP_DEREGISTERED_GNB_IND(msg_p).nb_amf);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
|
||||
@@ -574,6 +574,17 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
|
||||
}
|
||||
|
||||
// pdcch_ConfigSIB1
|
||||
rrc->carrier.pdcch_ConfigSIB1 = calloc(1,sizeof(NR_PDCCH_ConfigSIB1_t));
|
||||
paramdef_t pdcch_ConfigSIB1[] = PDCCH_CONFIGSIB1PARAMS_DESC(rrc->carrier.pdcch_ConfigSIB1);
|
||||
paramlist_def_t pdcch_ConfigSIB1ParamList = {GNB_CONFIG_STRING_PDCCH_CONFIGSIB1, NULL, 0};
|
||||
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
|
||||
config_getlist(&pdcch_ConfigSIB1ParamList, NULL, 0, aprefix);
|
||||
if (pdcch_ConfigSIB1ParamList.numelt > 0) {
|
||||
sprintf(aprefix, "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_PDCCH_CONFIGSIB1, 0);
|
||||
config_get(pdcch_ConfigSIB1,sizeof(pdcch_ConfigSIB1)/sizeof(paramdef_t),aprefix);
|
||||
}
|
||||
|
||||
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
|
||||
|
||||
config_getlist(&SCCsParamList, NULL, 0, aprefix);
|
||||
@@ -715,7 +726,7 @@ int RCconfig_nr_gtpu(void ) {
|
||||
|
||||
if (address) {
|
||||
MessageDef *message;
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_GNB_APP, GTPV1U_ENB_S1_REQ))!=NULL,"");
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_GNB_APP, 0, GTPV1U_ENB_S1_REQ))!=NULL,"");
|
||||
// IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
|
||||
// LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up);
|
||||
|
||||
@@ -1009,7 +1020,7 @@ void NRRCConfig(void) {
|
||||
paramdef_t GNBSParams[] = GNBSPARAMS_DESC;
|
||||
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
|
||||
|
||||
LOG_I(GNB_APP, "Getting GNBSParams\n");
|
||||
|
||||
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
@@ -78,7 +78,6 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
|
||||
|
||||
|
||||
/* global parameters, not under a specific section */
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
|
||||
@@ -473,7 +473,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) {
|
||||
// note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311)
|
||||
if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) {
|
||||
MessageDef *m = itti_alloc_new_message(TASK_MAC_ENB, F1AP_UE_CONTEXT_RELEASE_REQ);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_MAC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
|
||||
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rnti;
|
||||
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
|
||||
@@ -596,13 +596,41 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if (((frameP & 127) == 0) && (subframeP == 0)) {
|
||||
LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
|
||||
double total_bler;
|
||||
if(UE_scheduling_control->pusch_rx_num[CC_id] == 0 && UE_scheduling_control->pusch_rx_error_num[CC_id] == 0) {
|
||||
total_bler = 0;
|
||||
}
|
||||
else {
|
||||
total_bler = (double)UE_scheduling_control->pusch_rx_error_num[CC_id] / (double)(UE_scheduling_control->pusch_rx_error_num[CC_id] + UE_scheduling_control->pusch_rx_num[CC_id]) * 100;
|
||||
}
|
||||
LOG_I(MAC,"UE %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf mcsoff %d bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d\n",
|
||||
rnti,
|
||||
UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync",
|
||||
UE_info->UE_template[CC_id][UE_id].phr_info,
|
||||
UE_scheduling_control->dl_cqi[CC_id],
|
||||
(5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10,
|
||||
(5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10);
|
||||
UE_scheduling_control->pusch_snr_avg[CC_id],
|
||||
UE_scheduling_control->pucch1_snr[CC_id],
|
||||
UE_scheduling_control->rlc_out_of_resources_cnt,
|
||||
UE_scheduling_control->pusch_rx_num[CC_id],
|
||||
UE_scheduling_control->pusch_rx_error_num[CC_id],
|
||||
total_bler,
|
||||
UE_scheduling_control->mcs_offset[CC_id],
|
||||
UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer,
|
||||
UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes,
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes_rx,
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_num_pdus_rx,
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes,
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_num_pdus,
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used,
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
UE_info->UE_template[CC_id][UE_id].dl_buffer_total,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
UE_scheduling_control->first_cnt[CC_id],
|
||||
UE_scheduling_control->ret_cnt[CC_id],
|
||||
UE_scheduling_control->aperiodic_ri_received[CC_id]
|
||||
);
|
||||
}
|
||||
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63;
|
||||
|
||||
@@ -212,13 +212,6 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP, subframeP, sf_ahead_dl);
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
|
||||
if (NFAPI_MODE != NFAPI_MONOLITHIC) {
|
||||
oai_nfapi_hi_dci0_req(hi_dci0_req);
|
||||
hi_dci0_req_body->number_of_hi=0;
|
||||
}
|
||||
|
||||
LOG_D(MAC, "MSG3: HI_DCI0 SFN/SF:%d number_of_dci:%d number_of_hi:%d\n", NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req_body->number_of_dci, hi_dci0_req_body->number_of_hi);
|
||||
|
||||
// save UL scheduling information for preprocessor
|
||||
for (j = 0; j < ra->msg3_nb_rb; j++)
|
||||
cc->vrb_map_UL[ra->msg3_first_rb + j] = 1;
|
||||
|
||||
@@ -821,6 +821,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
|
||||
/* reset ta_update */
|
||||
ue_sched_ctrl->ta_update = 31;
|
||||
ue_sched_ctrl->ta_update_f = 31.0;
|
||||
}
|
||||
|
||||
int ta_len = (ta_update != 31) ? 2 : 0;
|
||||
@@ -1050,7 +1051,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
// this is the snr
|
||||
// unit is not dBm, it's special from nfapi
|
||||
// converting to dBm
|
||||
int snr = (5 * ue_sched_ctrl->pucch1_snr[CC_id] - 640) / 10;
|
||||
int snr = ue_sched_ctrl->pucch1_snr[CC_id];
|
||||
int target_snr = eNB->puCch10xSnr / 10;
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
@@ -1366,6 +1367,7 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
|
||||
/* Reset ta_update */
|
||||
ue_sched_ctl->ta_update = 31;
|
||||
ue_sched_ctl->ta_update_f = 31.0;
|
||||
} else {
|
||||
ta_update = 31;
|
||||
}
|
||||
@@ -1684,7 +1686,7 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
/* Do PUCCH power control */
|
||||
/* This is the snr */
|
||||
/* unit is not dBm, it's special from nfapi, convert to dBm */
|
||||
snr = (5 * ue_sched_ctl->pucch1_snr[CC_id] - 640) / 10;
|
||||
snr = ue_sched_ctl->pucch1_snr[CC_id];
|
||||
target_snr = mac->puCch10xSnr / 10;
|
||||
/* This assumes accumulated tpc */
|
||||
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
||||
|
||||
@@ -61,7 +61,9 @@ extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
|
||||
/* internal vars */
|
||||
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs];
|
||||
int last_dlsch_ue_id[MAX_NUM_CCs] = {-1};
|
||||
int last_dlsch_ue_id_volte[MAX_NUM_CCs] = {-1};
|
||||
int last_ulsch_ue_id[MAX_NUM_CCs] = {-1};
|
||||
int last_ulsch_ue_id_volte[MAX_NUM_CCs] = {-1};
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
@@ -1567,6 +1569,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
|
||||
/* reset ta_update */
|
||||
ue_sched_ctl->ta_update = 31;
|
||||
ue_sched_ctl->ta_update_f = 31.0;
|
||||
} else {
|
||||
ta_update = 31;
|
||||
}
|
||||
@@ -1998,14 +2001,15 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
// this is the snr
|
||||
eNB_UE_stats = &UE_info->eNB_UE_stats[CC_id][UE_id];
|
||||
/* Unit is not dBm, it's special from nfapi */
|
||||
snr = (5 * ue_sched_ctl->pucch1_snr[CC_id] - 640) / 10;
|
||||
target_snr = eNB->puCch10xSnr / 10;
|
||||
snr = ue_sched_ctl->pucch1_snr[CC_id];
|
||||
target_snr = eNB->puCch10xSnr/10;
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
int32_t framex10psubframe = UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame*10+UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
|
||||
int pucch_tpc_interval=10;
|
||||
|
||||
if (((framex10psubframe+10)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=10)))) //frame wrap-around
|
||||
if (((framex10psubframe+pucch_tpc_interval)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=pucch_tpc_interval)))) //frame wrap-around
|
||||
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
|
||||
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
|
||||
UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP;
|
||||
@@ -2300,6 +2304,18 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
}
|
||||
}
|
||||
|
||||
if (mac_eNB_get_rrc_status(module_idP, rnti) == RRC_HO_EXECUTION) {
|
||||
aggregation = 4;
|
||||
|
||||
if(get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0)>4)
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
}else{
|
||||
//aggregation = 2;
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
|
||||
UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
|
||||
format0);
|
||||
}
|
||||
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
//harq_pid
|
||||
harq_pid = subframe2harqpid(cc,(frameP+(sched_subframeP<subframeP ? 1 : 0)),sched_subframeP);
|
||||
@@ -2331,7 +2347,10 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
//
|
||||
int bytes_to_schedule = UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
if (bytes_to_schedule < 0) {
|
||||
bytes_to_schedule = 0;
|
||||
UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes = 0;
|
||||
}
|
||||
|
||||
if ( UE_id > last_ulsch_ue_id[CC_id] && ((ulsch_ue_select[CC_id].ue_num+ue_first_num[CC_id]) < ulsch_ue_max_num[CC_id]) ) {
|
||||
if ( bytes_to_schedule > 0 ) {
|
||||
@@ -2351,9 +2370,9 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
|
||||
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
if ( ((UE_sched_ctl->ul_inactivity_timer>64)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
((UE_sched_ctl->cqi_req_timer>64)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
|
||||
first_ue_total[CC_id] [ue_first_num[CC_id]] = 0;
|
||||
ue_first_num[CC_id]++;
|
||||
@@ -2457,16 +2476,28 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
int bytes_to_schedule = UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
if (bytes_to_schedule < 0) {
|
||||
bytes_to_schedule = 0;
|
||||
UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes = 0;
|
||||
}
|
||||
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
|
||||
if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>64)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
((UE_sched_ctl->cqi_req_timer>64)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||
format_flag = 2;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
if (mac_eNB_get_rrc_status(module_idP, rnti) == RRC_HO_EXECUTION) {
|
||||
aggregation = 4;
|
||||
|
||||
if(get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0)>4)
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
}else {
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
|
||||
UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
|
||||
format0);
|
||||
}
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
@@ -2569,7 +2600,10 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
uint8_t total_rbs=0;
|
||||
uint8_t average_rbs;
|
||||
uint16_t first_rb[MAX_NUM_CCs];
|
||||
uint8_t mcs;
|
||||
int8_t mcs;
|
||||
uint8_t snr;
|
||||
double bler_filter=0.9;
|
||||
double bler;
|
||||
uint8_t rb_table_index;
|
||||
uint8_t num_pucch_rb;
|
||||
uint32_t tbs;
|
||||
@@ -2663,33 +2697,74 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
} else {
|
||||
UE_template = &UE_info->UE_template[CC_id][UE_id];
|
||||
|
||||
if ( UE_info->UE_sched_ctrl[UE_id].phr_received == 1 ) {
|
||||
mcs = 20;
|
||||
} else {
|
||||
mcs = 10;
|
||||
int32_t framex10psubframe = UE_template->pusch_bler_calc_frame*10+UE_template->pusch_bler_calc_subframe;
|
||||
int pusch_bler_interval=50;
|
||||
double total_bler;
|
||||
|
||||
if(UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id] == 0 && UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id] == 0) {
|
||||
total_bler = 0;
|
||||
}
|
||||
else {
|
||||
total_bler = (double)UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id] / (double)(UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id] + UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id]) * 100;
|
||||
}
|
||||
|
||||
if (((framex10psubframe+pusch_bler_interval)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=pusch_bler_interval)))) { //frame wrap-around
|
||||
|
||||
UE_template->pusch_bler_calc_frame=frameP;
|
||||
UE_template->pusch_bler_calc_subframe=subframeP;
|
||||
|
||||
int pusch_rx_num_diff = UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id] - UE_info->UE_sched_ctrl[UE_id].pusch_rx_num_old[CC_id];
|
||||
int pusch_rx_error_num_diff = UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id] - UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num_old[CC_id];
|
||||
|
||||
if((pusch_rx_num_diff == 0) && (pusch_rx_error_num_diff == 0)) { /* first rx case or no rx among interval time */
|
||||
bler = UE_info->UE_sched_ctrl[UE_id].pusch_bler[CC_id];
|
||||
}
|
||||
else {
|
||||
bler = (double)pusch_rx_error_num_diff / (double)(pusch_rx_num_diff + pusch_rx_error_num_diff) * 100;
|
||||
}
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_bler[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_bler[CC_id] * bler_filter + bler * (1.0-bler_filter);
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id];
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id];
|
||||
|
||||
if(bler < 0.5) {
|
||||
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] !=0) {
|
||||
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]--;
|
||||
}
|
||||
}
|
||||
if(bler >= 2) {
|
||||
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]++;
|
||||
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] >= 20) {
|
||||
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]=20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
snr = UE_info->UE_sched_ctrl[UE_id].pusch_snr_avg[CC_id];
|
||||
|
||||
mcs = 20 - UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id];
|
||||
if(mcs < 6) {
|
||||
mcs = 6;
|
||||
}
|
||||
|
||||
if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_FIRST ) {
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
if (bytes_to_schedule < 0) {
|
||||
bytes_to_schedule = 0;
|
||||
UE_template->scheduled_ul_bytes = 0;
|
||||
}
|
||||
|
||||
if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ul_total_buffer > 0 ) {
|
||||
rb_table_index = 2;
|
||||
tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
|
||||
tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0);
|
||||
|
||||
while ( (((UE_template->phr_info - tx_power) < 0 ) || (tbs > bytes_to_schedule)) && (mcs > 3) ) {
|
||||
mcs--;
|
||||
tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
|
||||
tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0);
|
||||
}
|
||||
tx_power = (int8_t)(hundred_times_log10_NPRB[rb_table[rb_table_index] - 1] / 100);
|
||||
|
||||
while ( (tbs < bytes_to_schedule) && (rb_table[rb_table_index]<(frame_parms->N_RB_UL-num_pucch_rb-first_rb[CC_id])) &&
|
||||
((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) {
|
||||
rb_table_index++;
|
||||
tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
|
||||
tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0);
|
||||
tx_power = (int8_t)(hundred_times_log10_NPRB[rb_table[rb_table_index] - 1] / 100);
|
||||
}
|
||||
|
||||
if ( rb_table[rb_table_index]<3 ) {
|
||||
@@ -2719,6 +2794,10 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = rb_table_index;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
|
||||
}
|
||||
LOG_D(MAC,"[eNB %hu] frame %u subframe %u, UE %d/%x CC %d snr %hhu snr_inst %hhu mcs %hhd mcs_offset %hhu bler %lf total_bler %lf ( %lu %lu ) rb_num %hhu phr_info %hhd tx_power %hd bsr %d estimated_ul_buffer %d scheduled_ul_bytes %d\n",
|
||||
module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id, snr, UE_info->UE_sched_ctrl[UE_id].pusch_snr[CC_id], mcs, UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id], UE_info->UE_sched_ctrl[UE_id].pusch_bler[CC_id],
|
||||
total_bler, UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id], UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id], rb_table[rb_table_index-1], UE_template->phr_info, tx_power, bytes_to_schedule, UE_template->estimated_ul_buffer, UE_template->scheduled_ul_bytes);
|
||||
|
||||
} else {
|
||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) {
|
||||
// assigne RBS( 6 RBs)
|
||||
@@ -3032,12 +3111,24 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP);
|
||||
rnti = UE_RNTI(CC_id,UE_id);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
if (mac_eNB_get_rrc_status(module_idP, rnti) == RRC_HO_EXECUTION) {
|
||||
aggregation = 4;
|
||||
if(get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0)>4)
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
}else{
|
||||
//aggregation = 2;
|
||||
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
|
||||
UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
|
||||
format0);
|
||||
}
|
||||
LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n",
|
||||
module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL);
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
if (bytes_to_schedule < 0) {
|
||||
bytes_to_schedule = 0;
|
||||
UE_template->scheduled_ul_bytes = 0;
|
||||
}
|
||||
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = bytes_to_schedule;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP]);
|
||||
@@ -3051,7 +3142,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_sched_ctrl->cqi_received = 0;
|
||||
UE_sched_ctrl->cqi_req_timer = 0;
|
||||
cqi_req = 0;
|
||||
}else if (UE_sched_ctrl->cqi_req_timer>30) {
|
||||
}else if (UE_sched_ctrl->cqi_req_timer>64) {
|
||||
cqi_req = 1;
|
||||
|
||||
// To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition
|
||||
@@ -3082,14 +3173,15 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
// this is the normalized RX power and this should be constant (regardless of mcs
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
snr = UE_sched_ctrl->pusch_snr_avg[CC_id];
|
||||
target_snr = eNB->puSch10xSnr / 10;
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame*10+UE_template->pusch_tpc_tx_subframe;
|
||||
int pusch_tpc_interval=500;
|
||||
|
||||
if (((framex10psubframe+10)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=10)))) { //frame wrap-around
|
||||
if (((framex10psubframe+pusch_tpc_interval)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=pusch_tpc_interval)))) { //frame wrap-around
|
||||
UE_template->pusch_tpc_tx_frame=frameP;
|
||||
UE_template->pusch_tpc_tx_subframe=subframeP;
|
||||
|
||||
@@ -3133,6 +3225,17 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_template->mcs_UL[harq_pid]=10;//cmin (10, openair_daq_vars.target_ue_ul_mcs);
|
||||
rb_table_index=5; // for PHR
|
||||
}
|
||||
if( (UE_sched_ctrl->ul_scheduled | (1<<harq_pid))>0 ){
|
||||
UE_template->scheduled_ul_bytes -= UE_template->TBS_UL[harq_pid];
|
||||
|
||||
if (UE_template->scheduled_ul_bytes < 0) {
|
||||
UE_template->scheduled_ul_bytes = 0;
|
||||
}
|
||||
UE_template->estimated_ul_buffer -= UE_template->TBS_UL[harq_pid];
|
||||
if (UE_template->estimated_ul_buffer < 0) {
|
||||
UE_template->estimated_ul_buffer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=UE_template->mcs_UL[harq_pid];
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]);
|
||||
@@ -3194,8 +3297,8 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
nfapi_hi_dci0_request_t *nfapi_hi_dci0_req = &eNB->HI_DCI0_req[CC_id][subframeP];
|
||||
nfapi_hi_dci0_req->sfn_sf = frameP<<4|subframeP; // sfnsf_add_subframe(sched_frame, sched_subframeP, 0); // sunday!
|
||||
nfapi_hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n",
|
||||
harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP);
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d mcs %d first_rb %d num_rb %d round %d mcs %d sinr %d bler %lf\n",
|
||||
harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP,UE_template->mcs_UL[harq_pid],first_rb[CC_id],rb_table[rb_table_index],0,UE_template->mcs_UL[harq_pid],UE_sched_ctrl->pusch_snr_avg[CC_id],UE_sched_ctrl->pusch_bler[CC_id]);
|
||||
ul_req_index = 0;
|
||||
dlsch_flag = 0;
|
||||
|
||||
@@ -3309,7 +3412,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
mcs_rv = 31;
|
||||
}
|
||||
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb);
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_TBS=UE_template->TBS_UL[harq_pid];
|
||||
|
||||
if (mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED)
|
||||
@@ -3345,8 +3447,9 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
hi_dci0_req->number_of_dci++;
|
||||
// Add UL_config PDUs
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n",
|
||||
harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP);
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d mcs %d first_rb %d num_rb %d round %d mcs %d sinr %d bler %lf\n",
|
||||
harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP,mcs_rv,ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb,ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_sched_ctrl->round_UL[CC_id][harq_pid],UE_template->mcs_UL[harq_pid],UE_sched_ctrl->pusch_snr_avg[CC_id],UE_sched_ctrl->pusch_bler[CC_id]);
|
||||
|
||||
ul_req_index = 0;
|
||||
dlsch_flag = 0;
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
// this is the snr and this should be constant (regardless of mcs)
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
snr = UE_sched_ctrl->pusch_snr[CC_id];
|
||||
// new transmission
|
||||
ndi = 1-UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid]=ndi;
|
||||
|
||||
@@ -2173,6 +2173,7 @@ add_new_ue(module_id_t mod_idP,
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
eNB_MAC_INST *eNB = RC.mac[mod_idP];
|
||||
int UE_id;
|
||||
int i, j;
|
||||
UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info;
|
||||
@@ -2215,7 +2216,19 @@ add_new_ue(module_id_t mod_idP,
|
||||
0,
|
||||
sizeof(eNB_UE_STATS));
|
||||
UE_info->UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].ta_update_f = 31.0;
|
||||
UE_info->UE_sched_ctrl[UE_id].ta_update = 31;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_snr[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_cqi_f[cc_idP] = (eNB->puSch10xSnr+640)/5;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_cqi[cc_idP] = (eNB->puSch10xSnr+640)/5;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_snr_avg[cc_idP] = eNB->puSch10xSnr/10;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_num_old[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num_old[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_bler[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].ret_cnt[cc_idP] = 0;
|
||||
UE_info->UE_sched_ctrl[UE_id].first_cnt[cc_idP] = 0;
|
||||
|
||||
for (j = 0; j < 8; j++) {
|
||||
UE_info->UE_template[cc_idP][UE_id].oldNDI[j] = 0;
|
||||
@@ -4934,6 +4947,7 @@ cqi_indication(module_id_t mod_idP,
|
||||
{
|
||||
int UE_id = find_UE_id(mod_idP, rntiP);
|
||||
UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info;
|
||||
uint64_t pdu_val = *(uint64_t *) pdu;
|
||||
|
||||
if (UE_id == -1) {
|
||||
LOG_W(MAC, "cqi_indication: UE %x not found\n", rntiP);
|
||||
@@ -4973,10 +4987,10 @@ cqi_indication(module_id_t mod_idP,
|
||||
subframeP,
|
||||
pdu,
|
||||
rel9->length);
|
||||
LOG_D(MAC,"Frame %d Subframe %d update CQI:%d\n",
|
||||
LOG_D(MAC,"Frame %d Subframe %d update CQI:%d pdu 0x%016"PRIx64"\n",
|
||||
frameP,
|
||||
subframeP,
|
||||
sched_ctl->dl_cqi[CC_idP]);
|
||||
sched_ctl->dl_cqi[CC_idP],pdu_val);
|
||||
sched_ctl->cqi_req_flag &= (~(1 << subframeP));
|
||||
sched_ctl->cqi_received = 1;
|
||||
}
|
||||
@@ -5164,7 +5178,7 @@ harq_indication(module_id_t mod_idP,
|
||||
/* don't care about cqi reporting if NACK/DTX is there */
|
||||
if (channel == 0 && !nack_or_dtx_reported(cc,
|
||||
harq_pdu)) {
|
||||
sched_ctl->pucch1_snr[CC_idP] = ul_cqi;
|
||||
sched_ctl->pucch1_snr[CC_idP] = (5 * ul_cqi - 640) / 10;
|
||||
sched_ctl->pucch1_cqi_update[CC_idP] = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -160,13 +160,29 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
UE_scheduling_control->ul_scheduled &= (~(1 << harq_pid));
|
||||
UE_scheduling_control->pusch_rx_num[CC_idP]++;
|
||||
|
||||
/* Update with smoothing: 3/4 of old value and 1/4 of new.
|
||||
* This is the logic that was done in the function
|
||||
* lte_est_timing_advance_pusch, maybe it's not necessary?
|
||||
* maybe it's even not correct at all?
|
||||
*/
|
||||
UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
|
||||
UE_scheduling_control->ta_update_f = ((double)UE_scheduling_control->ta_update_f * 3 + (double)timing_advance) / 4;
|
||||
UE_scheduling_control->ta_update = (int)UE_scheduling_control->ta_update_f;
|
||||
int tmp_snr = (5 * ul_cqi - 640) / 10;
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = tmp_snr;
|
||||
|
||||
if(tmp_snr > 0 && tmp_snr < 63) {
|
||||
double snr_filter_tpc=0.7;
|
||||
int snr_thres_tpc=30;
|
||||
int diff = UE_scheduling_control->pusch_snr_avg[CC_idP] - UE_scheduling_control->pusch_snr[CC_idP];
|
||||
if(abs(diff) < snr_thres_tpc) {
|
||||
UE_scheduling_control->pusch_cqi_f[CC_idP] = ((double)UE_scheduling_control->pusch_cqi_f[CC_idP] * snr_filter_tpc + (double)ul_cqi * (1-snr_filter_tpc));
|
||||
UE_scheduling_control->pusch_cqi[CC_idP] = (int)UE_scheduling_control->pusch_cqi_f[CC_idP];
|
||||
UE_scheduling_control->pusch_snr_avg[CC_idP] = (5 * UE_scheduling_control->pusch_cqi[CC_idP] - 640) / 10;
|
||||
}
|
||||
}
|
||||
|
||||
UE_scheduling_control->ul_consecutive_errors = 0;
|
||||
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
|
||||
|
||||
@@ -182,6 +198,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->scheduled_ul_bytes = 0;
|
||||
}
|
||||
} else { // sduP == NULL => error
|
||||
UE_scheduling_control->pusch_rx_error_num[CC_idP]++;
|
||||
LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d, UE_id %d, RNTI %x (len %d)\n",
|
||||
enb_mod_idP,
|
||||
harq_pid,
|
||||
@@ -195,7 +212,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
sdu_lenP);
|
||||
|
||||
if (ul_cqi > 200) { // too high energy pattern
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = (5 * ul_cqi - 640) / 10;
|
||||
LOG_W(MAC, "[MAC] Too high energy pattern\n");
|
||||
}
|
||||
|
||||
@@ -290,6 +307,23 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = NULL;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP + sf_ahead_dl) % 10];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_hi_pdu);
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = first_rb;
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = 0;
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
|
||||
hi_dci0_req_body->number_of_hi++;
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 0);
|
||||
hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP, subframeP, sf_ahead_dl);
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
} else {
|
||||
if (ra->rach_resource_type > 0) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
||||
@@ -638,7 +672,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
switch (rx_lcids[i]) {
|
||||
case CCCH:
|
||||
if (rx_lengths[i] > CCCH_PAYLOAD_SIZE_MAX) {
|
||||
if ((rx_lengths[i] > CCCH_PAYLOAD_SIZE_MAX) || (rx_lengths[i] < 0) || (rx_lengths[i] > (sdu_lenP - (payload_ptr - sduP)))) {
|
||||
LOG_E(MAC, "[eNB %d/%d] frame %d received CCCH of size %d (too big, maximum allowed is %d, sdu_len %d), dropping packet\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
@@ -759,6 +793,17 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
if ((rx_lengths[i] > DCH_PAYLOAD_SIZE_MAX) || (rx_lengths[i] < 0) || (rx_lengths[i] > (sdu_lenP - (payload_ptr - sduP)))) {
|
||||
LOG_E(MAC, "[eNB %d/%d] frame %d received DCCH of size %d (too big, maximum allowed is %d, sdu_len %d), dropping packet\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP,
|
||||
rx_lengths[i],
|
||||
DCH_PAYLOAD_SIZE_MAX,
|
||||
sdu_lenP);
|
||||
break;
|
||||
}
|
||||
|
||||
if (UE_id != -1) {
|
||||
if (lcgid_updated[UE_template_ptr->lcgidmap[rx_lcids[i]]] == 0) {
|
||||
/* Adjust buffer occupancy of the correponding logical channel group */
|
||||
@@ -803,8 +848,18 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
if (rx_lcids[i] < NB_RB_MAX) {
|
||||
if ((rx_lengths[i] > SCH_PAYLOAD_SIZE_MAX) || (rx_lengths[i] < 0) || (rx_lengths[i] > (sdu_lenP - (payload_ptr - sduP)))) {
|
||||
LOG_E(MAC, "[eNB %d/%d] frame %d received DTCH of size %d (too big, maximum allowed is %d, sdu_len %d), dropping packet\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP,
|
||||
rx_lengths[i],
|
||||
DCH_PAYLOAD_SIZE_MAX,
|
||||
sdu_lenP);
|
||||
UE_info->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
|
||||
break;
|
||||
}
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
@@ -814,6 +869,25 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
rx_lcids[i]);
|
||||
|
||||
if (UE_id != -1) {
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], current_rnti);
|
||||
if (ue_contextP != NULL) {
|
||||
if (ue_contextP->ue_context.DRB_active[rx_lcids[i] - 2] == 0) {
|
||||
LOG_E(MAC, "[eNB %d/%d] frame %d received non active DTCH of size %d ( sdu_len %d, lcid %d), dropping packet\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP,
|
||||
rx_lengths[i],
|
||||
sdu_lenP,rx_lcids[i]);
|
||||
UE_info->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
LOG_E(MAC, "[eNB %d] CC_id %d Couldn't find the context associated to UE (RNTI %d) and reset RRC inactivity timer\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
current_rnti);
|
||||
break;
|
||||
}
|
||||
/* Adjust buffer occupancy of the correponding logical channel group */
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d, removing from LCGID %ld, %d\n",
|
||||
enb_mod_idP,
|
||||
@@ -837,48 +911,45 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->ul_buffer_info[1] +
|
||||
UE_template_ptr->ul_buffer_info[2] +
|
||||
UE_template_ptr->ul_buffer_info[3];
|
||||
if (UE_template_ptr->estimated_ul_buffer == 0) {
|
||||
UE_template_ptr->scheduled_ul_bytes = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
|
||||
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL);
|
||||
UE_info->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
|
||||
UE_info->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||
/* Clear uplane_inactivity_timer */
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
/* Reset RRC inactivity timer after uplane activity */
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], current_rnti);
|
||||
|
||||
if (ue_contextP != NULL) {
|
||||
ue_contextP->ue_context.ue_rrc_inactivity_timer = 1;
|
||||
} else {
|
||||
LOG_E(MAC, "[eNB %d] CC_id %d Couldn't find the context associated to UE (RNTI %d) and reset RRC inactivity timer\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
current_rnti);
|
||||
}
|
||||
} else { /* rx_length[i] Max size */
|
||||
UE_info->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
|
||||
LOG_E(MAC, "[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
|
||||
|
||||
} else { // end if (UE_id != -1)
|
||||
LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP,
|
||||
rx_lcids[i],
|
||||
UE_id);
|
||||
}
|
||||
} else { // end if (UE_id != -1)
|
||||
LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
|
||||
}else {
|
||||
LOG_E(MAC, "[eNB %d/%d] frame %d received a invalid LCID of size %d ( sdu_len %d, lcid %d), dropping packet\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP,
|
||||
rx_lcids[i],
|
||||
UE_id);
|
||||
}
|
||||
rx_lengths[i],
|
||||
sdu_lenP,rx_lcids[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if((sdu_lenP - (payload_ptr - sduP)) >= rx_lengths[i]){
|
||||
payload_ptr += rx_lengths[i];
|
||||
}else{
|
||||
LOG_E(MAC,"[eNB %d/%d] frame %d subframe %d rnti %x sdu_len %d remain_len %d rx_lengths %d\n",
|
||||
enb_mod_idP,CC_idP,frameP,subframeP,rntiP,sdu_lenP,(uint16_t)(sdu_lenP - (payload_ptr - sduP)), rx_lengths[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* CDRX UL HARQ timers */
|
||||
@@ -1031,6 +1102,10 @@ parse_ulsch_header(unsigned char *mac_header,
|
||||
tb_length,
|
||||
length,
|
||||
mac_header_ptr - mac_header);
|
||||
if(num_sdus >= NB_RB_MAX){
|
||||
LOG_E(MAC,"parse_ulsch_header: num_sdus(%d) reach max\n",num_sdus);
|
||||
return NULL;
|
||||
}
|
||||
rx_lcids[num_sdus] = lcid;
|
||||
rx_lengths[num_sdus] = length;
|
||||
num_sdus++;
|
||||
@@ -1038,6 +1113,10 @@ parse_ulsch_header(unsigned char *mac_header,
|
||||
if (lcid == SHORT_PADDING) {
|
||||
mac_header_ptr++;
|
||||
} else {
|
||||
if(num_ces >= MAX_NUM_CE){
|
||||
LOG_E(MAC,"parse_ulsch_header: num_ces(%d) reach max\n",num_ces);
|
||||
return NULL;
|
||||
}
|
||||
rx_ces[num_ces] = lcid;
|
||||
num_ces++;
|
||||
mac_header_ptr++;
|
||||
@@ -1284,6 +1363,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
eNB_MAC_INST *mac = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
UE_info_t *UE_info = &mac->UE_info;
|
||||
//uint8_t aggregation = 2;
|
||||
|
||||
int sched_frame = frameP;
|
||||
|
||||
@@ -1404,7 +1484,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
* This is the normalized RX snr and this should be constant (regardless
|
||||
* of mcs) Is not in dBm, unit from nfapi, converting to dBm
|
||||
*/
|
||||
const int32_t snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10;
|
||||
const int32_t snr = UE_sched_ctrl_ptr->pusch_snr[CC_id];
|
||||
const int32_t target_snr = mac->puSch10xSnr / 10;
|
||||
|
||||
/*
|
||||
@@ -1562,8 +1642,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
UE_template_ptr->cshift[harq_pid] = cshift;
|
||||
/* Setting DCI0 NFAPI struct */
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[dci_ul_pdu_idx];
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = UE_template_ptr->pre_first_nb_rb_ul;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block =
|
||||
@@ -1985,7 +2067,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
cqi_req = 0;
|
||||
/* Power control: compute the expected ULSCH RX snr (for the stats) */
|
||||
/* This is the normalized snr and this should be constant (regardless of mcs) */
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
snr = UE_sched_ctrl->pusch_snr[CC_id];
|
||||
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
|
||||
/* This assumes accumulated tpc */
|
||||
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
||||
|
||||
@@ -469,6 +469,7 @@ typedef struct {
|
||||
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
||||
|
||||
|
||||
|
||||
/*! \brief Downlink SCH PDU Structure */
|
||||
typedef struct {
|
||||
uint8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
|
||||
@@ -906,6 +907,11 @@ typedef struct {
|
||||
uint32_t pucch_tpc_tx_frame;
|
||||
uint32_t pucch_tpc_tx_subframe;
|
||||
|
||||
/// stores the frame where the last bler was calculated
|
||||
uint32_t pusch_bler_calc_frame;
|
||||
uint32_t pusch_bler_calc_subframe;
|
||||
|
||||
|
||||
uint8_t rach_resource_type;
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
frame_t Msg2_frame;
|
||||
@@ -928,6 +934,8 @@ typedef struct {
|
||||
|
||||
/// Current DL harq round per harq_pid on each CC
|
||||
uint8_t round[NFAPI_CC_MAX][10];
|
||||
uint32_t ret_cnt[NFAPI_CC_MAX];
|
||||
uint32_t first_cnt[NFAPI_CC_MAX];
|
||||
/// Current Active TBs per harq_pid on each CC
|
||||
uint8_t tbcnt[NFAPI_CC_MAX][10];
|
||||
/// Current UL harq round per harq_pid on each CC
|
||||
@@ -937,6 +945,7 @@ typedef struct {
|
||||
unsigned char rballoc_sub_UE[NFAPI_CC_MAX][N_RBG_MAX];
|
||||
int pre_dci_dl_pdu_idx;
|
||||
uint16_t ta_timer;
|
||||
double ta_update_f;
|
||||
int16_t ta_update;
|
||||
uint16_t ul_consecutive_errors;
|
||||
int32_t context_active_timer;
|
||||
@@ -954,13 +963,22 @@ typedef struct {
|
||||
int32_t phr_received;
|
||||
uint8_t periodic_ri_received[NFAPI_CC_MAX];
|
||||
uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
|
||||
uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch1_snr[NFAPI_CC_MAX];
|
||||
uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch2_snr[NFAPI_CC_MAX];
|
||||
uint8_t pucch3_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch3_snr[NFAPI_CC_MAX];
|
||||
uint8_t pusch_snr[NFAPI_CC_MAX];
|
||||
int16_t pucch1_cqi_update[NFAPI_CC_MAX];
|
||||
int16_t pucch1_snr[NFAPI_CC_MAX];
|
||||
int16_t pucch2_cqi_update[NFAPI_CC_MAX];
|
||||
int16_t pucch2_snr[NFAPI_CC_MAX];
|
||||
int16_t pucch3_cqi_update[NFAPI_CC_MAX];
|
||||
int16_t pucch3_snr[NFAPI_CC_MAX];
|
||||
double pusch_cqi_f[NFAPI_CC_MAX];
|
||||
int16_t pusch_cqi[NFAPI_CC_MAX];
|
||||
int16_t pusch_snr[NFAPI_CC_MAX];
|
||||
int16_t pusch_snr_avg[NFAPI_CC_MAX];
|
||||
uint64_t pusch_rx_num[NFAPI_CC_MAX];
|
||||
uint64_t pusch_rx_num_old[NFAPI_CC_MAX];
|
||||
uint64_t pusch_rx_error_num[NFAPI_CC_MAX];
|
||||
uint64_t pusch_rx_error_num_old[NFAPI_CC_MAX];
|
||||
double pusch_bler[NFAPI_CC_MAX];
|
||||
uint8_t mcs_offset[NFAPI_CC_MAX];
|
||||
uint16_t feedback_cnt[NFAPI_CC_MAX];
|
||||
uint16_t timing_advance;
|
||||
uint16_t timing_advance_r9;
|
||||
@@ -1039,6 +1057,7 @@ typedef struct {
|
||||
/// DRX UL retransmission timer, one per UL HARQ process
|
||||
/* Not implemented yet */
|
||||
/* End of C-DRX related timers */
|
||||
uint32_t rlc_out_of_resources_cnt;
|
||||
} UE_sched_ctrl_t;
|
||||
|
||||
/*! \brief eNB template for the Random access information */
|
||||
|
||||
@@ -219,7 +219,7 @@ void *mac_enb_task(void *arg)
|
||||
case RRC_MAC_DRX_CONFIG_REQ:
|
||||
LOG_I(MAC, "MAC Task Received RRC_MAC_DRX_CONFIG_REQ\n");
|
||||
/* Set timers and thresholds values in local MAC context of UE */
|
||||
eNB_Config_Local_DRX(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.rrc_mac_drx_config_req);
|
||||
eNB_Config_Local_DRX(ITTI_MSG_DESTINATION_INSTANCE(received_msg), &received_msg->ittiMsg.rrc_mac_drx_config_req);
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE:
|
||||
|
||||
@@ -3064,8 +3064,8 @@ ue_scheduler(const module_id_t module_idP,
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case RRC_MAC_CCCH_DATA_REQ:
|
||||
LOG_I(MAC,
|
||||
"Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
|
||||
ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_INSTANCE(msg_p),
|
||||
"Received %s from %s: instance %ld, frameP %d, eNB_index %d\n",
|
||||
ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_DESTINATION_INSTANCE(msg_p),
|
||||
RRC_MAC_CCCH_DATA_REQ(msg_p).frame,
|
||||
RRC_MAC_CCCH_DATA_REQ(msg_p).enb_index);
|
||||
// TODO process CCCH data req.
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include <limits.h>
|
||||
|
||||
#define reserved 0xffff
|
||||
|
||||
const uint8_t nr_slots_per_frame[5] = {10, 20, 40, 80, 160};
|
||||
|
||||
// Table 6.3.3.1-5 (38.211) NCS for preamble formats with delta_f_RA = 1.25 KHz
|
||||
@@ -48,6 +50,73 @@ uint16_t NCS_restricted_TypeB_delta_f_RA_5[14] = {36,57,60,63,65,68,71,77,81,8
|
||||
// Table 6.3.3.1-7 (38.211) NCS for preamble formats with delta_f_RA = 15 * 2mu KHz where mu = {0,1,2,3}
|
||||
uint16_t NCS_unrestricted_delta_f_RA_15[16] = {0,2,4,6,8,10,12,13,15,17,19,23,27,34,46,69};
|
||||
|
||||
|
||||
// specification mapping talbe, table_38$x_$y_$z_c$a
|
||||
// - $x: specification
|
||||
// - $y: subclause-major
|
||||
// - $z: subclause-minor
|
||||
// - $a: ($a)th of column in table, start from zero
|
||||
const int32_t table_38213_13_1_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_1_c2[16] = {24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48, 96, 96, 96, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_1_c3[16] = { 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 2, 3, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_1_c4[16] = { 0, 2, 4, 0, 2, 4, 12, 16, 12, 16, 12, 16, 38, 38, 38, reserved}; // index 15 reserved
|
||||
|
||||
const int32_t table_38213_13_2_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, reserved, reserved}; // index 14-15 reserved
|
||||
const int32_t table_38213_13_2_c2[16] = {24, 24, 24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48, reserved, reserved}; // index 14-15 reserved
|
||||
const int32_t table_38213_13_2_c3[16] = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 2, 2, 3, 3, reserved, reserved}; // index 14-15 reserved
|
||||
const int32_t table_38213_13_2_c4[16] = { 5, 6, 7, 8, 5, 6, 7, 8, 18, 20, 18, 20, 18, 20, reserved, reserved}; // index 14-15 reserved
|
||||
|
||||
const int32_t table_38213_13_3_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_3_c2[16] = {48, 48, 48, 48, 48, 48, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_3_c3[16] = { 1, 1, 2, 2, 3, 3, 1, 2, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_3_c4[16] = { 2, 6, 2, 6, 2, 6, 28, 28, 28, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
|
||||
const int32_t table_38213_13_4_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
const int32_t table_38213_13_4_c2[16] = {24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48};
|
||||
const int32_t table_38213_13_4_c3[16] = { 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 1, 1, 1, 2, 2, 2};
|
||||
const int32_t table_38213_13_4_c4[16] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 12, 14, 16, 12, 14, 16};
|
||||
|
||||
const int32_t table_38213_13_5_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_5_c2[16] = {48, 48, 48, 96, 96, 96, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_5_c3[16] = { 1, 2, 3, 1, 1, 2, 2, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_5_c4[16] = { 4, 4, 4, 0, 56, 0, 56, 0, 56, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
|
||||
const int32_t table_38213_13_6_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
const int32_t table_38213_13_6_c2[16] = {24, 24, 24, 24, 48, 48, 48, 48, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
const int32_t table_38213_13_6_c3[16] = { 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
const int32_t table_38213_13_6_c4[16] = { 0, 4, 0, 4, 0, 28, 0, 28, 0, 28, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
|
||||
const int32_t table_38213_13_7_c1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, reserved, reserved, reserved, reserved}; // index 12-15 reserved
|
||||
const int32_t table_38213_13_7_c2[16] = {48, 48, 48, 48, 48, 48, 96, 96, 48, 48, 96, 96, reserved, reserved, reserved, reserved}; // index 12-15 reserved
|
||||
const int32_t table_38213_13_7_c3[16] = { 1, 1, 2, 2, 3, 3, 1, 2, 1, 1, 1, 1, reserved, reserved, reserved, reserved}; // index 12-15 reserved
|
||||
const int32_t table_38213_13_7_c4[16] = { 0, 8, 0, 8, 0, 8, 28, 28,-41, 49,-41, 97, reserved, reserved, reserved, reserved}; // index 12-15 reserved, condition A as default
|
||||
|
||||
const int32_t table_38213_13_8_c1[16] = { 1, 1, 1, 1, 3, 3, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_8_c2[16] = {24, 24, 48, 48, 24, 24, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_8_c3[16] = { 2, 2, 1, 2, 2, 2, 2, 2, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_8_c4[16] = { 0, 4, 14, 14,-20, 24,-20, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved, condition A as default
|
||||
|
||||
const int32_t table_38213_13_9_c1[16] = {1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
const int32_t table_38213_13_9_c2[16] = {96, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
const int32_t table_38213_13_9_c3[16] = { 1, 1, 2, 2, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
const int32_t table_38213_13_9_c4[16] = { 0, 16, 0, 16, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
|
||||
const int32_t table_38213_13_10_c1[16] = {1, 1, 1, 1, 2, 2, 2, 2, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved
|
||||
const int32_t table_38213_13_10_c2[16] = {48, 48, 48, 48, 24, 24, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved
|
||||
const int32_t table_38213_13_10_c3[16] = { 1, 1, 2, 2, 1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved
|
||||
const int32_t table_38213_13_10_c4[16] = { 0, 8, 0, 8,-41, 25,-41, 49, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved, condition A as default
|
||||
|
||||
const float table_38213_13_11_c1[16] = { 0, 0, 2, 2, 5, 5, 7, 7, 0, 5, 0, 0, 2, 2, 5, 5}; // O
|
||||
const int32_t table_38213_13_11_c2[16] = { 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
const float table_38213_13_11_c3[16] = { 1, 0.5f, 1, 0.5f, 1, 0.5f, 1, 0.5f, 1, 1, 1, 1, 1, 1, 1, 1}; // M
|
||||
const int32_t table_38213_13_11_c4[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2}; // i is even as default
|
||||
|
||||
const float table_38213_13_12_c1[16] = { 0, 0, 2.5f, 2.5f, 5, 5, 0, 2.5f, 5, 7.5f, 7.5f, 7.5f, 0, 5, reserved, reserved}; // O, index 14-15 reserved
|
||||
const int32_t table_38213_13_12_c2[16] = { 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, reserved, reserved}; // index 14-15 reserved
|
||||
const float table_38213_13_12_c3[16] = { 1, 0.5f, 1, 0.5f, 1, 0.5f, 0.5f, 0.5f, 0.5f, 1, 0.5f, 0.5f, 1, 1, reserved, reserved}; // M, index 14-15 reserved
|
||||
|
||||
const int32_t table_38213_10_1_1_c2[5] = { 0, 0, 4, 2, 1 };
|
||||
|
||||
const char *prachfmt[]={"0","1","2","3", "A1","A2","A3","B1","B4","C0","C2","A1/B1","A2/B2","A3/B3"};
|
||||
const char *duplex_mode[]={"FDD","TDD"};
|
||||
|
||||
@@ -974,6 +1043,33 @@ int64_t *get_prach_config_info(uint32_t pointa,
|
||||
return prach_config_info_p;
|
||||
}
|
||||
|
||||
void find_aggregation_candidates(uint8_t *aggregation_level,
|
||||
uint8_t *nr_of_candidates,
|
||||
NR_SearchSpace_t *ss) {
|
||||
|
||||
if (ss->nrofCandidates->aggregationLevel1 != NR_SearchSpace__nrofCandidates__aggregationLevel1_n0) {
|
||||
*aggregation_level = 1;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel1;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel2 != NR_SearchSpace__nrofCandidates__aggregationLevel2_n0) {
|
||||
*aggregation_level = 2;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel2;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel4 != NR_SearchSpace__nrofCandidates__aggregationLevel4_n0) {
|
||||
*aggregation_level = 4;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel4;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel8 != NR_SearchSpace__nrofCandidates__aggregationLevel8_n0) {
|
||||
*aggregation_level = 8;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel8;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel16 != NR_SearchSpace__nrofCandidates__aggregationLevel16_n0) {
|
||||
*aggregation_level = 16;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void find_monitoring_periodicity_offset_common(NR_SearchSpace_t *ss,
|
||||
uint16_t *slot_period,
|
||||
uint16_t *offset) {
|
||||
@@ -2297,11 +2393,19 @@ uint16_t nr_dci_size(NR_ServingCellConfigCommon_t *scc,
|
||||
long rbg_size_config;
|
||||
int num_entries = 0;
|
||||
int pusch_antenna_ports = 1; // TODO hardcoded number of antenna ports for pusch
|
||||
NR_BWP_Downlink_t *bwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
NR_BWP_Uplink_t *ubwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
NR_PDSCH_Config_t *pdsch_config = bwp->bwp_Dedicated->pdsch_Config->choice.setup;
|
||||
NR_PUSCH_Config_t *pusch_Config = ubwp->bwp_Dedicated->pusch_Config->choice.setup;
|
||||
NR_SRS_Config_t *srs_config = ubwp->bwp_Dedicated->srs_Config->choice.setup;
|
||||
|
||||
NR_BWP_Downlink_t *bwp = NULL;
|
||||
NR_BWP_Uplink_t *ubwp = NULL;
|
||||
NR_PDSCH_Config_t *pdsch_config = NULL;
|
||||
NR_PUSCH_Config_t *pusch_Config = NULL;
|
||||
NR_SRS_Config_t *srs_config = NULL;
|
||||
if(bwp_id > 0) {
|
||||
bwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
ubwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
pdsch_config = bwp->bwp_Dedicated->pdsch_Config->choice.setup;
|
||||
pusch_Config = ubwp->bwp_Dedicated->pusch_Config->choice.setup;
|
||||
srs_config = ubwp->bwp_Dedicated->srs_Config->choice.setup;
|
||||
}
|
||||
|
||||
switch(format) {
|
||||
/*Only sizes for 0_0 and 1_0 are correct at the moment*/
|
||||
@@ -2506,8 +2610,13 @@ uint16_t nr_dci_size(NR_ServingCellConfigCommon_t *scc,
|
||||
|
||||
case NR_DL_DCI_FORMAT_1_0:
|
||||
/// fixed: Format identifier 1, VRB2PRB 1, MCS 5, NDI 1, RV 2, HARQ PID 4, DAI 2, PUCCH TPC 2, PUCCH RInd 3, PDSCH to HARQ TInd 3 Time Domain assgnmt 4 -- 28
|
||||
size += 28;
|
||||
size = 28;
|
||||
size += (uint8_t)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); // Freq domain assignment
|
||||
|
||||
dci_pdu->frequency_domain_assignment.nbits = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
dci_pdu->time_domain_assignment.nbits = 4;
|
||||
dci_pdu->vrb_to_prb_mapping.nbits = 1;
|
||||
|
||||
break;
|
||||
|
||||
case NR_DL_DCI_FORMAT_1_1:
|
||||
@@ -2757,8 +2866,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
|
||||
case 5 :
|
||||
case 6 :
|
||||
case 7 :
|
||||
AssertFatal(1==0,"Incoompatible NrOfSymbols %d and dmrs_Additional_Position %d\n",
|
||||
NrOfSymbols,(int)*dmrs_config->dmrs_AdditionalPosition);
|
||||
return(1<<l0);
|
||||
break;
|
||||
case 8 :
|
||||
case 9:
|
||||
@@ -2766,26 +2874,26 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
if (*dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
return(1<<l0 | 1<<9);
|
||||
else
|
||||
return(1<<l0 | 1<<6 | 1<<9);
|
||||
break;
|
||||
case 12:
|
||||
if (*dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
return(1<<l0 | 1<<9);
|
||||
else if (pos2==1)
|
||||
return(1<<l0 | 1<<6 | 1<<9);
|
||||
else if (*dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3)
|
||||
else if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3)
|
||||
return(1<<l0 | 1<<5 | 1<<8 | 1<<11);
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
if (*dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1)
|
||||
return(1<<l0 | 1<<11);
|
||||
else if (pos2==1)
|
||||
return(1<<l0 | 1<<7 | 1<<11);
|
||||
else if (*dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3)
|
||||
else if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3)
|
||||
return(1<<l0 | 1<<5 | 1<<8 | 1<<11);
|
||||
break;
|
||||
}
|
||||
@@ -2931,3 +3039,373 @@ bool set_dl_ptrs_values(NR_PTRS_DownlinkConfig_t *ptrs_config,
|
||||
//printf("[MAC] PTRS is set K= %u L= %u\n", *K_ptrs,1<<*L_ptrs);
|
||||
return valid;
|
||||
}
|
||||
uint32_t get_ssb_slot(uint32_t ssb_index){
|
||||
// this function now only support f <= 3GHz
|
||||
return ssb_index & 0x3 ;
|
||||
|
||||
// return first_symbol(case, freq, ssb_index) / 14
|
||||
}
|
||||
|
||||
int get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
NR_MIB_t *mib,
|
||||
uint8_t extra_bits,
|
||||
uint32_t ssb_length,
|
||||
uint32_t ssb_index,
|
||||
uint32_t ssb_offset_point_a) {
|
||||
|
||||
// deafult for testing
|
||||
subcarrier_spacing_t scs_ssb = scs_30kHz;
|
||||
channel_bandwidth_t min_channel_bw = bw_10MHz;
|
||||
frequency_range_t frequency_range = FR1;
|
||||
const uint32_t num_slot_per_frame = 20;
|
||||
|
||||
type0_PDCCH_CSS_config->ssb_length = ssb_length;
|
||||
type0_PDCCH_CSS_config->ssb_index = ssb_index;
|
||||
type0_PDCCH_CSS_config->frame = (mib->systemFrameNumber.buf[0] >> mib->systemFrameNumber.bits_unused);
|
||||
|
||||
uint16_t frame_number_4lsb = 0;
|
||||
for (int i=0; i<4; i++) {
|
||||
frame_number_4lsb |= ((extra_bits>>i)&1)<<(3-i);
|
||||
}
|
||||
|
||||
uint8_t ssb_subcarrier_offset_msb = ( extra_bits >> 5 ) & 0x1; // extra bits[5]
|
||||
uint8_t ssb_subcarrier_offset = (uint8_t)mib->ssb_SubcarrierOffset;
|
||||
|
||||
type0_PDCCH_CSS_config->frame = type0_PDCCH_CSS_config->frame << 4;
|
||||
type0_PDCCH_CSS_config->frame = type0_PDCCH_CSS_config->frame | frame_number_4lsb;
|
||||
|
||||
if(type0_PDCCH_CSS_config->ssb_length == 64){
|
||||
type0_PDCCH_CSS_config->ssb_index = type0_PDCCH_CSS_config->ssb_index & (( extra_bits >> 2 ) & 0x1C ); // { extra_bits[5:7], ssb_index[2:0] }
|
||||
}else{
|
||||
if(ssb_subcarrier_offset_msb){
|
||||
ssb_subcarrier_offset = ssb_subcarrier_offset | 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
// assume carrier frequency < 6GHz
|
||||
subcarrier_spacing_t scs_pdcch;
|
||||
if(mib->subCarrierSpacingCommon == NR_MIB__subCarrierSpacingCommon_scs15or60){
|
||||
scs_pdcch = scs_15kHz;
|
||||
}else{ //NR_MIB__subCarrierSpacingCommon_scs30or120
|
||||
scs_pdcch = scs_30kHz;
|
||||
}
|
||||
|
||||
uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13
|
||||
uint32_t index_4msb = (mib->pdcch_ConfigSIB1.controlResourceSetZero);
|
||||
uint32_t index_4lsb = (mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
|
||||
type0_PDCCH_CSS_config->num_rbs = -1;
|
||||
type0_PDCCH_CSS_config->num_symbols = -1;
|
||||
type0_PDCCH_CSS_config->rb_offset = -1;
|
||||
|
||||
// type0-pdcch coreset
|
||||
switch( (scs_ssb << 5) | scs_pdcch ){
|
||||
case (scs_15kHz << 5) | scs_15kHz :
|
||||
AssertFatal(index_4msb < 15, "38.213 Table 13-1 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_1_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_1_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_1_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_15kHz << 5) | scs_30kHz:
|
||||
AssertFatal(index_4msb < 14, "38.213 Table 13-2 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_2_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_2_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_2_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_30kHz << 5) | scs_15kHz:
|
||||
if((min_channel_bw & bw_5MHz) | (min_channel_bw & bw_10MHz)){
|
||||
AssertFatal(index_4msb < 9, "38.213 Table 13-3 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_3_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_3_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_3_c4[index_4msb];
|
||||
}else if(min_channel_bw & bw_40MHz){
|
||||
AssertFatal(index_4msb < 9, "38.213 Table 13-5 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_5_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_5_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_5_c4[index_4msb];
|
||||
}else{ ; }
|
||||
|
||||
break;
|
||||
|
||||
case (scs_30kHz << 5) | scs_30kHz:
|
||||
if((min_channel_bw & bw_5MHz) | (min_channel_bw & bw_10MHz)){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_4_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_4_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_4_c4[index_4msb];
|
||||
|
||||
}else if(min_channel_bw & bw_40MHz){
|
||||
AssertFatal(index_4msb < 10, "38.213 Table 13-6 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_6_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_6_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_6_c4[index_4msb];
|
||||
}else{ ; }
|
||||
break;
|
||||
|
||||
case (scs_120kHz << 5) | scs_60kHz:
|
||||
AssertFatal(index_4msb < 12, "38.213 Table 13-7 4 MSB out of range\n");
|
||||
if(index_4msb & 0x7){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x18){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 2;
|
||||
}else{ ; }
|
||||
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_7_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_7_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 8 || index_4msb == 10)){
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_7_c4[index_4msb] - 1;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_7_c4[index_4msb];
|
||||
}
|
||||
break;
|
||||
|
||||
case (scs_120kHz << 5) | scs_120kHz:
|
||||
AssertFatal(index_4msb < 8, "38.213 Table 13-8 4 MSB out of range\n");
|
||||
if(index_4msb & 0x3){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x0c){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 3;
|
||||
}
|
||||
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_8_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_8_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 4 || index_4msb == 6)){
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_8_c4[index_4msb] - 1;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_8_c4[index_4msb];
|
||||
}
|
||||
break;
|
||||
|
||||
case (scs_240kHz << 5) | scs_60kHz:
|
||||
AssertFatal(index_4msb < 4, "38.213 Table 13-9 4 MSB out of range\n");
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_9_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_9_c3[index_4msb];
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_9_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_240kHz << 5) | scs_120kHz:
|
||||
AssertFatal(index_4msb < 8, "38.213 Table 13-10 4 MSB out of range\n");
|
||||
if(index_4msb & 0x3){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x0c){
|
||||
type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern = 2;
|
||||
}
|
||||
type0_PDCCH_CSS_config->num_rbs = table_38213_13_10_c2[index_4msb];
|
||||
type0_PDCCH_CSS_config->num_symbols = table_38213_13_10_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 4 || index_4msb == 6)){
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_10_c4[index_4msb]-1;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->rb_offset = table_38213_13_10_c4[index_4msb];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_D(MAC,"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d\n",
|
||||
index_4msb,type0_PDCCH_CSS_config->num_rbs,type0_PDCCH_CSS_config->num_symbols,type0_PDCCH_CSS_config->rb_offset );
|
||||
|
||||
AssertFatal(type0_PDCCH_CSS_config->num_rbs != -1, "Type0 PDCCH coreset num_rbs undefined");
|
||||
AssertFatal(type0_PDCCH_CSS_config->num_symbols != -1, "Type0 PDCCH coreset num_symbols undefined");
|
||||
AssertFatal(type0_PDCCH_CSS_config->rb_offset != -1, "Type0 PDCCH coreset rb_offset undefined");
|
||||
|
||||
|
||||
//uint32_t cell_id = 0; // obtain from L1 later
|
||||
|
||||
//mac->type0_pdcch_dci_config.coreset.rb_start = rb_offset;
|
||||
//mac->type0_pdcch_dci_config.coreset.rb_end = rb_offset + num_rbs - 1;
|
||||
|
||||
// uint64_t mask = 0x0;
|
||||
// uint8_t i;
|
||||
// for(i=0; i<(type0_PDCCH_CSS_config->num_rbs/6); ++i){ // 38.331 Each bit corresponds a group of 6 RBs
|
||||
// mask = mask >> 1;
|
||||
// mask = mask | 0x100000000000;
|
||||
// }
|
||||
|
||||
//LOG_I(MAC,">>>>>>>>mask %x num_rbs %d rb_offset %d\n", mask, num_rbs, rb_offset);
|
||||
|
||||
// mac->type0_pdcch_dci_config.coreset.frequency_domain_resource = mask;
|
||||
// mac->type0_pdcch_dci_config.coreset.rb_offset = rb_offset; // additional parameter other than coreset
|
||||
//
|
||||
// //mac->type0_pdcch_dci_config.type0_pdcch_coreset.duration = num_symbols;
|
||||
// mac->type0_pdcch_dci_config.coreset.cce_reg_mapping_type = CCE_REG_MAPPING_TYPE_INTERLEAVED;
|
||||
// mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_reg_bundle_size = 6; // L 38.211 7.3.2.2
|
||||
// mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_interleaver_size = 2; // R 38.211 7.3.2.2
|
||||
// mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_shift_index = cell_id;
|
||||
// mac->type0_pdcch_dci_config.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
|
||||
// mac->type0_pdcch_dci_config.coreset.pdcch_dmrs_scrambling_id = cell_id;
|
||||
|
||||
|
||||
// type0-pdcch search space
|
||||
float big_o = 0.0f;
|
||||
float big_m = 0.0f;
|
||||
type0_PDCCH_CSS_config->sfn_c = SFN_C_IMPOSSIBLE; // only valid for mux=1
|
||||
type0_PDCCH_CSS_config->n_c = UINT_MAX;
|
||||
type0_PDCCH_CSS_config->number_of_search_space_per_slot = UINT_MAX;
|
||||
type0_PDCCH_CSS_config->first_symbol_index = UINT_MAX;
|
||||
type0_PDCCH_CSS_config->search_space_duration = 0; // element of search space
|
||||
// 38.213 table 10.1-1
|
||||
|
||||
/// MUX PATTERN 1
|
||||
if(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 1 && frequency_range == FR1){
|
||||
big_o = table_38213_13_11_c1[index_4lsb];
|
||||
type0_PDCCH_CSS_config->number_of_search_space_per_slot = table_38213_13_11_c2[index_4lsb];
|
||||
big_m = table_38213_13_11_c3[index_4lsb];
|
||||
|
||||
uint32_t temp = (uint32_t)(big_o*scs_pdcch) + (uint32_t)(type0_PDCCH_CSS_config->ssb_index*big_m);
|
||||
type0_PDCCH_CSS_config->n_c = temp / num_slot_per_frame;
|
||||
if((temp/num_slot_per_frame) & 0x1){
|
||||
type0_PDCCH_CSS_config->sfn_c = SFN_C_MOD_2_EQ_1;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->sfn_c = SFN_C_MOD_2_EQ_0;
|
||||
}
|
||||
|
||||
if((index_4lsb == 1 || index_4lsb == 3 || index_4lsb == 5 || index_4lsb == 7) && (type0_PDCCH_CSS_config->ssb_index&1)){
|
||||
type0_PDCCH_CSS_config->first_symbol_index = type0_PDCCH_CSS_config->num_symbols;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->first_symbol_index = table_38213_13_11_c4[index_4lsb];
|
||||
}
|
||||
// 38.213 chapter 13: over two consecutive slots
|
||||
type0_PDCCH_CSS_config->search_space_duration = 2;
|
||||
}
|
||||
|
||||
if(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 1 && frequency_range == FR2){
|
||||
big_o = table_38213_13_12_c1[index_4lsb];
|
||||
type0_PDCCH_CSS_config->number_of_search_space_per_slot = table_38213_13_11_c2[index_4lsb];
|
||||
big_m = table_38213_13_12_c3[index_4lsb];
|
||||
|
||||
if((index_4lsb == 1 || index_4lsb == 3 || index_4lsb == 5 || index_4lsb == 10) && (type0_PDCCH_CSS_config->ssb_index&1)){
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 7;
|
||||
}else if((index_4lsb == 6 || index_4lsb == 7 || index_4lsb == 8 || index_4lsb == 11) && (type0_PDCCH_CSS_config->ssb_index&1)){
|
||||
type0_PDCCH_CSS_config->first_symbol_index = type0_PDCCH_CSS_config->num_symbols;
|
||||
}else{
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 0;
|
||||
}
|
||||
// 38.213 chapter 13: over two consecutive slots
|
||||
type0_PDCCH_CSS_config->search_space_duration = 2;
|
||||
}
|
||||
|
||||
/// MUX PATTERN 2
|
||||
if(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 2){
|
||||
|
||||
if((scs_ssb == scs_120kHz) && (scs_pdcch == scs_60kHz)){
|
||||
// 38.213 Table 13-13
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-13 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
type0_PDCCH_CSS_config->n_c = get_ssb_slot(type0_PDCCH_CSS_config->ssb_index);
|
||||
switch(type0_PDCCH_CSS_config->ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
case 0:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 0;
|
||||
break;
|
||||
case 1:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 1;
|
||||
break;
|
||||
case 2:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 6;
|
||||
break;
|
||||
case 3:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 7;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
}else if((scs_ssb == scs_240kHz) && (scs_pdcch == scs_120kHz)){
|
||||
// 38.213 Table 13-14
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-14 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
type0_PDCCH_CSS_config->n_c = get_ssb_slot(type0_PDCCH_CSS_config->ssb_index);
|
||||
switch(type0_PDCCH_CSS_config->ssb_index & 0x7){ // ssb_index(i) mod 8
|
||||
case 0:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 0;
|
||||
break;
|
||||
case 1:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 1;
|
||||
break;
|
||||
case 2:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 2;
|
||||
break;
|
||||
case 3:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 3;
|
||||
break;
|
||||
case 4:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 12;
|
||||
type0_PDCCH_CSS_config->n_c = get_ssb_slot(type0_PDCCH_CSS_config->ssb_index) - 1;
|
||||
break;
|
||||
case 5:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 13;
|
||||
type0_PDCCH_CSS_config->n_c = get_ssb_slot(type0_PDCCH_CSS_config->ssb_index) - 1;
|
||||
break;
|
||||
case 6:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 0;
|
||||
break;
|
||||
case 7:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 1;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}else{ ; }
|
||||
// 38.213 chapter 13: over one slot
|
||||
type0_PDCCH_CSS_config->search_space_duration = 1;
|
||||
}
|
||||
|
||||
/// MUX PATTERN 3
|
||||
if(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 3){
|
||||
if((scs_ssb == scs_120kHz) && (scs_pdcch == scs_120kHz)){
|
||||
// 38.213 Table 13-15
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-15 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
type0_PDCCH_CSS_config->n_c = get_ssb_slot(type0_PDCCH_CSS_config->ssb_index);
|
||||
switch(type0_PDCCH_CSS_config->ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
case 0:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 4;
|
||||
break;
|
||||
case 1:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 8;
|
||||
break;
|
||||
case 2:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 2;
|
||||
break;
|
||||
case 3:
|
||||
type0_PDCCH_CSS_config->first_symbol_index = 6;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}else{ ; }
|
||||
// 38.213 chapter 13: over one slot
|
||||
type0_PDCCH_CSS_config->search_space_duration = 1;
|
||||
}
|
||||
|
||||
AssertFatal(type0_PDCCH_CSS_config->number_of_search_space_per_slot!=UINT_MAX,"");
|
||||
|
||||
// uint32_t coreset_duration = num_symbols * number_of_search_space_per_slot;
|
||||
// mac->type0_pdcch_dci_config.number_of_candidates[0] = table_38213_10_1_1_c2[0];
|
||||
// mac->type0_pdcch_dci_config.number_of_candidates[1] = table_38213_10_1_1_c2[1];
|
||||
// mac->type0_pdcch_dci_config.number_of_candidates[2] = table_38213_10_1_1_c2[2]; // CCE aggregation level = 4
|
||||
// mac->type0_pdcch_dci_config.number_of_candidates[3] = table_38213_10_1_1_c2[3]; // CCE aggregation level = 8
|
||||
// mac->type0_pdcch_dci_config.number_of_candidates[4] = table_38213_10_1_1_c2[4]; // CCE aggregation level = 16
|
||||
// mac->type0_pdcch_dci_config.duration = search_space_duration;
|
||||
// mac->type0_pdcch_dci_config.coreset.duration = coreset_duration; // coreset
|
||||
// AssertFatal(first_symbol_index!=UINT_MAX,"");
|
||||
// mac->type0_pdcch_dci_config.monitoring_symbols_within_slot = (0x3fff << first_symbol_index) & (0x3fff >> (14-coreset_duration-first_symbol_index)) & 0x3fff;
|
||||
|
||||
AssertFatal(type0_PDCCH_CSS_config->sfn_c!=SFN_C_IMPOSSIBLE,"");
|
||||
AssertFatal(type0_PDCCH_CSS_config->n_c!=UINT_MAX,"");
|
||||
|
||||
type0_PDCCH_CSS_config->n_0 = ((uint32_t)(big_o*scs_pdcch) + (uint32_t)(type0_PDCCH_CSS_config->ssb_index*big_m))%num_slot_per_frame;
|
||||
type0_PDCCH_CSS_config->cset_start_rb = ssb_offset_point_a - type0_PDCCH_CSS_config->rb_offset;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,24 @@
|
||||
#ifndef __LAYER2_NR_MAC_COMMON_H__
|
||||
#define __LAYER2_NR_MAC_COMMON_H__
|
||||
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_PDSCH-Config.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "nr_mac.h"
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
|
||||
#define TABLE_38213_13_1_NUM_INDEXES 15
|
||||
#define TABLE_38213_13_2_NUM_INDEXES 14
|
||||
#define TABLE_38213_13_3_NUM_INDEXES 9
|
||||
#define TABLE_38213_13_4_NUM_INDEXES 16
|
||||
#define TABLE_38213_13_5_NUM_INDEXES 9
|
||||
#define TABLE_38213_13_6_NUM_INDEXES 10
|
||||
#define TABLE_38213_13_7_NUM_INDEXES 12
|
||||
#define TABLE_38213_13_8_NUM_INDEXES 8
|
||||
#define TABLE_38213_13_9_NUM_INDEXES 4
|
||||
#define TABLE_38213_13_10_NUM_INDEXES 8
|
||||
#define TABLE_38213_13_11_NUM_INDEXES 16
|
||||
#define TABLE_38213_13_12_NUM_INDEXES 14
|
||||
|
||||
|
||||
// ===============================================
|
||||
@@ -45,8 +60,8 @@
|
||||
#define MAX_FDM (8) // Maximum nb of PRACH occasions FDMed in a slot
|
||||
|
||||
typedef enum frequency_range_e {
|
||||
FR1 = 0,
|
||||
FR2
|
||||
FR1 = 0,
|
||||
FR2
|
||||
} frequency_range_t;
|
||||
|
||||
// PRACH occasion details
|
||||
@@ -99,6 +114,52 @@ typedef enum {
|
||||
NR_RNTI_MCS_C,
|
||||
} nr_rnti_type_t;
|
||||
|
||||
typedef enum subcarrier_spacing_e {
|
||||
scs_15kHz = 0x1,
|
||||
scs_30kHz = 0x2,
|
||||
scs_60kHz = 0x4,
|
||||
scs_120kHz = 0x8,
|
||||
scs_240kHz = 0x16
|
||||
} subcarrier_spacing_t;
|
||||
|
||||
typedef enum channel_bandwidth_e {
|
||||
bw_5MHz = 0x1,
|
||||
bw_10MHz = 0x2,
|
||||
bw_20MHz = 0x4,
|
||||
bw_40MHz = 0x8,
|
||||
bw_80MHz = 0x16,
|
||||
bw_100MHz = 0x32
|
||||
} channel_bandwidth_t;
|
||||
|
||||
typedef enum nr_ssb_and_cset_mux_pattern_type_e {
|
||||
NR_SSB_AND_CSET_MUX_PATTERN_TYPE1=1,
|
||||
NR_SSB_AND_CSET_MUX_PATTERN_TYPE2,
|
||||
NR_SSB_AND_CSET_MUX_PATTERN_TYPE3
|
||||
} nr_ssb_and_cset_mux_pattern_type_t;
|
||||
|
||||
typedef enum {
|
||||
SFN_C_MOD_2_EQ_0,
|
||||
SFN_C_MOD_2_EQ_1,
|
||||
SFN_C_IMPOSSIBLE
|
||||
} SFN_C_TYPE;
|
||||
|
||||
typedef struct Type0_PDCCH_CSS_config_s {
|
||||
int32_t num_rbs;
|
||||
int32_t num_symbols;
|
||||
int32_t rb_offset; // Offset from SSB RB0
|
||||
uint32_t type0_pdcch_ss_mux_pattern;
|
||||
uint16_t frame;
|
||||
SFN_C_TYPE sfn_c;
|
||||
uint32_t n_c;
|
||||
uint32_t n_0;
|
||||
uint32_t number_of_search_space_per_slot;
|
||||
uint32_t first_symbol_index;
|
||||
uint32_t search_space_duration;
|
||||
uint32_t ssb_length;
|
||||
uint32_t ssb_index;
|
||||
uint32_t cset_start_rb;
|
||||
} NR_Type0_PDCCH_CSS_config_t;
|
||||
|
||||
uint16_t config_bandwidth(int mu, int nb_rb, int nr_band);
|
||||
|
||||
void get_frame_type(uint16_t nr_bandP, uint8_t scs_index, lte_frame_type_t *current_type);
|
||||
@@ -123,6 +184,10 @@ uint16_t nr_dci_size(NR_ServingCellConfigCommon_t *scc,
|
||||
uint16_t N_RB,
|
||||
int bwp_id);
|
||||
|
||||
void find_aggregation_candidates(uint8_t *aggregation_level,
|
||||
uint8_t *nr_of_candidates,
|
||||
NR_SearchSpace_t *ss);
|
||||
|
||||
void find_monitoring_periodicity_offset_common(NR_SearchSpace_t *ss,
|
||||
uint16_t *slot_period,
|
||||
uint16_t *offset);
|
||||
@@ -184,6 +249,13 @@ int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmr
|
||||
uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint8_t mcs_table);
|
||||
uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB);
|
||||
|
||||
int get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
NR_MIB_t *mib,
|
||||
uint8_t extra_bits,
|
||||
uint32_t ssb_length,
|
||||
uint32_t ssb_index,
|
||||
uint32_t ssb_offset_point_a);
|
||||
|
||||
int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH);
|
||||
|
||||
bool set_dl_ptrs_values(NR_PTRS_DownlinkConfig_t *ptrs_config,
|
||||
|
||||
@@ -77,5 +77,66 @@ extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
#endif*/
|
||||
|
||||
// Type0-PDCCH search space
|
||||
extern const int32_t table_38213_13_1_c1[16];
|
||||
extern const int32_t table_38213_13_1_c2[16];
|
||||
extern const int32_t table_38213_13_1_c3[16];
|
||||
extern const int32_t table_38213_13_1_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_2_c1[16];
|
||||
extern const int32_t table_38213_13_2_c2[16];
|
||||
extern const int32_t table_38213_13_2_c3[16];
|
||||
extern const int32_t table_38213_13_2_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_3_c1[16];
|
||||
extern const int32_t table_38213_13_3_c2[16];
|
||||
extern const int32_t table_38213_13_3_c3[16];
|
||||
extern const int32_t table_38213_13_3_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_4_c1[16];
|
||||
extern const int32_t table_38213_13_4_c2[16];
|
||||
extern const int32_t table_38213_13_4_c3[16];
|
||||
extern const int32_t table_38213_13_4_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_5_c1[16];
|
||||
extern const int32_t table_38213_13_5_c2[16];
|
||||
extern const int32_t table_38213_13_5_c3[16];
|
||||
extern const int32_t table_38213_13_5_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_6_c1[16];
|
||||
extern const int32_t table_38213_13_6_c2[16];
|
||||
extern const int32_t table_38213_13_6_c3[16];
|
||||
extern const int32_t table_38213_13_6_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_7_c1[16];
|
||||
extern const int32_t table_38213_13_7_c2[16];
|
||||
extern const int32_t table_38213_13_7_c3[16];
|
||||
extern const int32_t table_38213_13_7_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_8_c1[16];
|
||||
extern const int32_t table_38213_13_8_c2[16];
|
||||
extern const int32_t table_38213_13_8_c3[16];
|
||||
extern const int32_t table_38213_13_8_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_9_c1[16];
|
||||
extern const int32_t table_38213_13_9_c2[16];
|
||||
extern const int32_t table_38213_13_9_c3[16];
|
||||
extern const int32_t table_38213_13_9_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_10_c1[16];
|
||||
extern const int32_t table_38213_13_10_c2[16];
|
||||
extern const int32_t table_38213_13_10_c3[16];
|
||||
extern const int32_t table_38213_13_10_c4[16];
|
||||
|
||||
extern const float table_38213_13_11_c1[16];
|
||||
extern const int32_t table_38213_13_11_c2[16];
|
||||
extern const float table_38213_13_11_c3[16];
|
||||
extern const int32_t table_38213_13_11_c4[16];
|
||||
|
||||
extern const float table_38213_13_12_c1[16];
|
||||
extern const int32_t table_38213_13_12_c2[16];
|
||||
extern const float table_38213_13_12_c3[16];
|
||||
|
||||
extern const int32_t table_38213_10_1_1_c2[5];
|
||||
|
||||
#endif //DEF_H
|
||||
|
||||
@@ -390,13 +390,71 @@ void config_control_ue(NR_UE_MAC_INST_t *mac){
|
||||
NR_SearchSpace_t *css = commonSearchSpaceList->list.array[css_id];
|
||||
AssertFatal(css->controlResourceSetId != NULL, "ss->controlResourceSetId is null\n");
|
||||
AssertFatal(*css->controlResourceSetId == mac->coreset[bwp_id - 1][coreset_id - 1]->controlResourceSetId, "ss->controlResourceSetId is unknown\n");
|
||||
AssertFatal(css->searchSpaceId != 0, "css->searchSpaceId is 0\n");
|
||||
AssertFatal(css->searchSpaceType != NULL, "css->searchSpaceType is null\n");
|
||||
AssertFatal(css->monitoringSymbolsWithinSlot != NULL, "css->monitoringSymbolsWithinSlot is null\n");
|
||||
AssertFatal(css->monitoringSymbolsWithinSlot->buf != NULL, "css->monitoringSymbolsWithinSlot->buf is null\n");
|
||||
mac->SSpace[0][0][ss_id] = css;
|
||||
ss_id++;
|
||||
}
|
||||
|
||||
// TODO: Merge this code in a single function as fill_default_searchSpaceZero() in rrc_gNB_reconfig.c
|
||||
// Search space zero
|
||||
if(mac->search_space_zero == NULL) mac->search_space_zero=calloc(1,sizeof(*mac->search_space_zero));
|
||||
if(mac->search_space_zero->controlResourceSetId == NULL) mac->search_space_zero->controlResourceSetId=calloc(1,sizeof(*mac->search_space_zero->controlResourceSetId));
|
||||
if(mac->search_space_zero->monitoringSymbolsWithinSlot == NULL) mac->search_space_zero->monitoringSymbolsWithinSlot = calloc(1,sizeof(*mac->search_space_zero->monitoringSymbolsWithinSlot));
|
||||
if(mac->search_space_zero->monitoringSymbolsWithinSlot->buf == NULL) mac->search_space_zero->monitoringSymbolsWithinSlot->buf = calloc(1,2);
|
||||
if(mac->search_space_zero->nrofCandidates == NULL) mac->search_space_zero->nrofCandidates = calloc(1,sizeof(*mac->search_space_zero->nrofCandidates));
|
||||
if(mac->search_space_zero->searchSpaceType == NULL) mac->search_space_zero->searchSpaceType = calloc(1,sizeof(*mac->search_space_zero->searchSpaceType));
|
||||
if(mac->search_space_zero->searchSpaceType->choice.common == NULL) mac->search_space_zero->searchSpaceType->choice.common=calloc(1,sizeof(*mac->search_space_zero->searchSpaceType->choice.common));
|
||||
if(mac->search_space_zero->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 == NULL) mac->search_space_zero->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 = calloc(1,sizeof(*mac->search_space_zero->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0));
|
||||
mac->search_space_zero->searchSpaceId = 0;
|
||||
*mac->search_space_zero->controlResourceSetId = 0;
|
||||
mac->search_space_zero->monitoringSlotPeriodicityAndOffset = calloc(1,sizeof(*mac->search_space_zero->monitoringSlotPeriodicityAndOffset));
|
||||
mac->search_space_zero->monitoringSlotPeriodicityAndOffset->present = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
|
||||
mac->search_space_zero->duration=NULL;
|
||||
// should be '1100 0000 0000 00'B (LSB first!), first two symbols in slot, adjust if needed
|
||||
mac->search_space_zero->monitoringSymbolsWithinSlot->buf[1] = 0;
|
||||
mac->search_space_zero->monitoringSymbolsWithinSlot->buf[0] = (1<<7) | (1<<6);
|
||||
mac->search_space_zero->monitoringSymbolsWithinSlot->size = 2;
|
||||
mac->search_space_zero->monitoringSymbolsWithinSlot->bits_unused = 2;
|
||||
|
||||
// FIXME: update values from TS38.213 Section 10.1 Table 10.1-1: CCE aggregation levels and maximum number of PDCCH candidates per CCE aggregation level for CSS sets configured by searchSpaceSIB1
|
||||
mac->search_space_zero->nrofCandidates->aggregationLevel1 = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
|
||||
mac->search_space_zero->nrofCandidates->aggregationLevel2 = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
|
||||
mac->search_space_zero->nrofCandidates->aggregationLevel4 = NR_SearchSpace__nrofCandidates__aggregationLevel4_n0;
|
||||
mac->search_space_zero->nrofCandidates->aggregationLevel8 = NR_SearchSpace__nrofCandidates__aggregationLevel8_n1;
|
||||
mac->search_space_zero->nrofCandidates->aggregationLevel16 = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0;
|
||||
mac->search_space_zero->searchSpaceType->present = NR_SearchSpace__searchSpaceType_PR_common;
|
||||
|
||||
// Coreset0
|
||||
if(mac->coreset0 == NULL) mac->coreset0 = calloc(1,sizeof(*mac->coreset0));
|
||||
mac->coreset0->controlResourceSetId = 0;
|
||||
// frequencyDomainResources '11111111 00000000 00000000 00000000 00000000 00000'B,
|
||||
if(mac->coreset0->frequencyDomainResources.buf == NULL) mac->coreset0->frequencyDomainResources.buf = calloc(1,6);
|
||||
mac->coreset0->frequencyDomainResources.buf[0] = 0xff;
|
||||
mac->coreset0->frequencyDomainResources.buf[1] = 0;
|
||||
mac->coreset0->frequencyDomainResources.buf[2] = 0;
|
||||
mac->coreset0->frequencyDomainResources.buf[3] = 0;
|
||||
mac->coreset0->frequencyDomainResources.buf[4] = 0;
|
||||
mac->coreset0->frequencyDomainResources.buf[5] = 0;
|
||||
mac->coreset0->frequencyDomainResources.size = 6;
|
||||
mac->coreset0->frequencyDomainResources.bits_unused = 3;
|
||||
mac->coreset0->duration = 1;
|
||||
mac->coreset0->cce_REG_MappingType.choice.interleaved=calloc(1,sizeof(*mac->coreset0->cce_REG_MappingType.choice.interleaved));
|
||||
mac->coreset0->cce_REG_MappingType.choice.interleaved->interleaverSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2;
|
||||
mac->coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex = NULL;
|
||||
mac->coreset0->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle;
|
||||
if(mac->coreset0->tci_StatesPDCCH_ToAddList == NULL) mac->coreset0->tci_StatesPDCCH_ToAddList = calloc(1,sizeof(*mac->coreset0->tci_StatesPDCCH_ToAddList));
|
||||
NR_TCI_StateId_t *tci[8];
|
||||
for (int i=0;i<8;i++) {
|
||||
tci[i]=calloc(1,sizeof(*tci[i]));
|
||||
*tci[i] = i;
|
||||
ASN_SEQUENCE_ADD(&mac->coreset0->tci_StatesPDCCH_ToAddList->list,tci[i]);
|
||||
}
|
||||
mac->coreset0->tci_StatesPDCCH_ToReleaseList = NULL;
|
||||
mac->coreset0->tci_PresentInDCI = NULL;
|
||||
mac->coreset0->pdcch_DMRS_ScramblingID = NULL;
|
||||
|
||||
}
|
||||
|
||||
int nr_rrc_mac_config_req_ue(
|
||||
@@ -421,6 +479,8 @@ int nr_rrc_mac_config_req_ue(
|
||||
mac->scg = cell_group_config;
|
||||
mac->servCellIndex = *cell_group_config->spCellConfig->servCellIndex;
|
||||
config_control_ue(mac);
|
||||
mac->msg3_frame = -1; // initialize to an invalid value
|
||||
mac->msg3_slot = -1;
|
||||
if (cell_group_config->spCellConfig->reconfigurationWithSync) {
|
||||
mac->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink;
|
||||
mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
|
||||
|
||||
@@ -76,13 +76,6 @@
|
||||
/*!\brief value for indicating BSR Timer is not running */
|
||||
#define NR_MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF)
|
||||
|
||||
|
||||
typedef enum {
|
||||
SFN_C_MOD_2_EQ_0,
|
||||
SFN_C_MOD_2_EQ_1,
|
||||
SFN_C_IMPOSSIBLE
|
||||
} SFN_C_TYPE;
|
||||
|
||||
// LTE structure, might need to be adapted for NR
|
||||
typedef struct {
|
||||
/// buffer status for each lcgid
|
||||
@@ -227,9 +220,9 @@ typedef struct {
|
||||
/// Random-access variable for window calculation (subframe of last change in window counter)
|
||||
uint8_t RA_tx_subframe;
|
||||
/// Scheduled TX frame for RA Msg3
|
||||
frame_t msg3_frame;
|
||||
int16_t msg3_frame;
|
||||
/// Scheduled TX slot for RA Msg3
|
||||
slot_t msg3_slot;
|
||||
int16_t msg3_slot;
|
||||
/// Random-access variable for backoff (frame of last change in backoff counter)
|
||||
uint32_t RA_backoff_frame;
|
||||
/// Random-access variable for backoff (subframe of last change in backoff counter)
|
||||
@@ -250,6 +243,8 @@ typedef struct {
|
||||
uint8_t RA_BI_found;
|
||||
/// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot
|
||||
uint8_t generate_nr_prach;
|
||||
/// SSB index from MIB decoding
|
||||
uint8_t mib_ssb;
|
||||
|
||||
//// FAPI-like interface message
|
||||
fapi_nr_ul_config_request_t *ul_config_request;
|
||||
@@ -265,6 +260,11 @@ typedef struct {
|
||||
|
||||
/// PHR
|
||||
uint8_t PHR_reporting_active;
|
||||
|
||||
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config;
|
||||
NR_SearchSpace_t *search_space_zero;
|
||||
NR_ControlResourceSet_t *coreset0;
|
||||
|
||||
} NR_UE_MAC_INST_t;
|
||||
|
||||
typedef enum seach_space_mask_e {
|
||||
@@ -275,24 +275,6 @@ typedef enum seach_space_mask_e {
|
||||
type3_pdcch = 0x10
|
||||
} search_space_mask_t;
|
||||
|
||||
typedef enum subcarrier_spacing_e {
|
||||
scs_15kHz = 0x1,
|
||||
scs_30kHz = 0x2,
|
||||
scs_60kHz = 0x4,
|
||||
scs_120kHz = 0x8,
|
||||
scs_240kHz = 0x16
|
||||
} subcarrier_spacing_t;
|
||||
|
||||
typedef enum channel_bandwidth_e {
|
||||
bw_5MHz = 0x1,
|
||||
bw_10MHz = 0x2,
|
||||
bw_20MHz = 0x4,
|
||||
bw_40MHz = 0x8,
|
||||
bw_80MHz = 0x16,
|
||||
bw_100MHz = 0x32
|
||||
} channel_bandwidth_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t identifier_dci_formats ; // 0 IDENTIFIER_DCI_FORMATS:
|
||||
uint8_t carrier_ind ; // 1 CARRIER_IND: 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213]
|
||||
|
||||
@@ -34,58 +34,6 @@
|
||||
|
||||
//extern NR_UE_MAC_INST_t *UE_mac_inst;
|
||||
|
||||
// Type0-PDCCH search space
|
||||
extern const int32_t table_38213_13_1_c2[16];
|
||||
extern const int32_t table_38213_13_1_c3[16];
|
||||
extern const int32_t table_38213_13_1_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_2_c2[16];
|
||||
extern const int32_t table_38213_13_2_c3[16];
|
||||
extern const int32_t table_38213_13_2_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_3_c2[16];
|
||||
extern const int32_t table_38213_13_3_c3[16];
|
||||
extern const int32_t table_38213_13_3_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_4_c2[16];
|
||||
extern const int32_t table_38213_13_4_c3[16];
|
||||
extern const int32_t table_38213_13_4_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_5_c2[16];
|
||||
extern const int32_t table_38213_13_5_c3[16];
|
||||
extern const int32_t table_38213_13_5_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_6_c2[16];
|
||||
extern const int32_t table_38213_13_6_c3[16];
|
||||
extern const int32_t table_38213_13_6_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_7_c2[16];
|
||||
extern const int32_t table_38213_13_7_c3[16];
|
||||
extern const int32_t table_38213_13_7_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_8_c2[16];
|
||||
extern const int32_t table_38213_13_8_c3[16];
|
||||
extern const int32_t table_38213_13_8_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_9_c2[16];
|
||||
extern const int32_t table_38213_13_9_c3[16];
|
||||
extern const int32_t table_38213_13_9_c4[16];
|
||||
|
||||
extern const int32_t table_38213_13_10_c2[16];
|
||||
extern const int32_t table_38213_13_10_c3[16];
|
||||
extern const int32_t table_38213_13_10_c4[16];
|
||||
|
||||
extern const float table_38213_13_11_c1[16];
|
||||
extern const int32_t table_38213_13_11_c2[16];
|
||||
extern const float table_38213_13_11_c3[16];
|
||||
extern const int32_t table_38213_13_11_c4[16];
|
||||
|
||||
extern const float table_38213_13_12_c1[16];
|
||||
extern const int32_t table_38213_13_12_c2[16];
|
||||
extern const float table_38213_13_12_c3[16];
|
||||
|
||||
extern const int32_t table_38213_10_1_1_c2[5];
|
||||
|
||||
// DCI extraction
|
||||
// for PUSCH from TS 38.214 subclause 6.1.2.1.1
|
||||
extern uint8_t table_6_1_2_1_1_2_time_dom_res_alloc_A[16][3];
|
||||
|
||||
@@ -58,6 +58,19 @@ int8_t nr_ue_decode_mib(
|
||||
void *pduP,
|
||||
uint16_t cell_id );
|
||||
|
||||
/**\brief decode sib1 pdu in NR_UE, from if_module dl_ind
|
||||
\param module_id module id
|
||||
\param cc_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param sibs_mask sibs mask
|
||||
\param pduP pointer to pdu
|
||||
\param pdu_length length of pdu */
|
||||
int8_t nr_ue_decode_sib1(module_id_t module_id,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint32_t sibs_mask,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len);
|
||||
|
||||
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
|
||||
\param module_id module id
|
||||
@@ -125,8 +138,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
int nr_ue_process_dci_indication_pdu(module_id_t module_id, int cc_id, int gNB_index, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci);
|
||||
|
||||
uint32_t get_ssb_frame(uint32_t test);
|
||||
uint32_t get_ssb_slot(uint32_t ssb_index);
|
||||
|
||||
|
||||
uint32_t mr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t eNB_id, uint16_t rnti, sub_frame_t subframe);
|
||||
|
||||
|
||||
@@ -32,64 +32,6 @@
|
||||
|
||||
#include "mac_defs.h"
|
||||
|
||||
#define reserved 0xffff
|
||||
|
||||
// specification mapping talbe, table_38$x_$y_$z_c$a
|
||||
// - $x: specification
|
||||
// - $y: subclause-major
|
||||
// - $z: subclause-minor
|
||||
// - $a: ($a)th of column in table, start from zero
|
||||
const int32_t table_38213_13_1_c2[16] = {24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48, 96, 96, 96, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_1_c3[16] = { 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 2, 3, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_1_c4[16] = { 0, 2, 4, 0, 2, 4, 12, 16, 12, 16, 12, 16, 38, 38, 38, reserved}; // index 15 reserved
|
||||
|
||||
const int32_t table_38213_13_2_c2[16] = {24, 24, 24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48, reserved, reserved}; // index 14-15 reserved
|
||||
const int32_t table_38213_13_2_c3[16] = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 2, 2, 3, 3, reserved, reserved}; // index 14-15 reserved
|
||||
const int32_t table_38213_13_2_c4[16] = { 5, 6, 7, 8, 5, 6, 7, 8, 18, 20, 18, 20, 18, 20, reserved, reserved}; // index 14-15 reserved
|
||||
|
||||
const int32_t table_38213_13_3_c2[16] = {48, 48, 48, 48, 48, 48, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_3_c3[16] = { 1, 1, 2, 2, 3, 3, 1, 2, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_3_c4[16] = { 2, 6, 2, 6, 2, 6, 28, 28, 28, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
|
||||
const int32_t table_38213_13_4_c2[16] = {24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48};
|
||||
const int32_t table_38213_13_4_c3[16] = { 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 1, 1, 1, 2, 2, 2};
|
||||
const int32_t table_38213_13_4_c4[16] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 12, 14, 16, 12, 14, 16};
|
||||
|
||||
const int32_t table_38213_13_5_c2[16] = {48, 48, 48, 96, 96, 96, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_5_c3[16] = { 1, 2, 3, 1, 1, 2, 2, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
const int32_t table_38213_13_5_c4[16] = { 4, 4, 4, 0, 56, 0, 56, 0, 56, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 09-15 reserved
|
||||
|
||||
const int32_t table_38213_13_6_c2[16] = {24, 24, 24, 24, 48, 48, 48, 48, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
const int32_t table_38213_13_6_c3[16] = { 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
const int32_t table_38213_13_6_c4[16] = { 0, 4, 0, 4, 0, 28, 0, 28, 0, 28, reserved, reserved, reserved, reserved, reserved, reserved}; // index 10-15 reserved
|
||||
|
||||
const int32_t table_38213_13_7_c2[16] = {48, 48, 48, 48, 48, 48, 96, 96, 48, 48, 96, 96, reserved, reserved, reserved, reserved}; // index 12-15 reserved
|
||||
const int32_t table_38213_13_7_c3[16] = { 1, 1, 2, 2, 3, 3, 1, 2, 1, 1, 1, 1, reserved, reserved, reserved, reserved}; // index 12-15 reserved
|
||||
const int32_t table_38213_13_7_c4[16] = { 0, 8, 0, 8, 0, 8, 28, 28,-41, 49,-41, 97, reserved, reserved, reserved, reserved}; // index 12-15 reserved, condition A as default
|
||||
|
||||
const int32_t table_38213_13_8_c2[16] = { 1, 1, 1, 1, 3, 3, 3, 3, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_8_c3[16] = {24, 24, 48, 48, 24, 24, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved
|
||||
const int32_t table_38213_13_8_c4[16] = { 0, 4, 14, 14,-20, 24,-20, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 15 reserved, condition A as default
|
||||
|
||||
const int32_t table_38213_13_9_c2[16] = {96, 96, 96, 96, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
const int32_t table_38213_13_9_c3[16] = { 1, 1, 2, 2, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
const int32_t table_38213_13_9_c4[16] = { 0, 16, 0, 16, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 04-15 reserved
|
||||
|
||||
const int32_t table_38213_13_10_c2[16] = {48, 48, 48, 48, 24, 24, 48, 48, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved
|
||||
const int32_t table_38213_13_10_c3[16] = { 1, 1, 2, 2, 1, 1, 1, 1, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved
|
||||
const int32_t table_38213_13_10_c4[16] = { 0, 8, 0, 8,-41, 25,-41, 49, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved}; // index 08-15 reserved, condition A as default
|
||||
|
||||
const float table_38213_13_11_c1[16] = { 0, 0, 2, 2, 5, 5, 7, 7, 0, 5, 0, 0, 2, 2, 5, 5}; // O
|
||||
const int32_t table_38213_13_11_c2[16] = { 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
const float table_38213_13_11_c3[16] = { 1, 0.5f, 1, 0.5f, 1, 0.5f, 1, 0.5f, 1, 1, 1, 1, 1, 1, 1, 1}; // M
|
||||
const int32_t table_38213_13_11_c4[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2}; // i is even as default
|
||||
|
||||
const float table_38213_13_12_c1[16] = { 0, 0, 2.5f, 2.5f, 5, 5, 0, 2.5f, 5, 7.5f, 7.5f, 7.5f, 0, 5, reserved, reserved}; // O, index 14-15 reserved
|
||||
const int32_t table_38213_13_12_c2[16] = { 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, reserved, reserved}; // index 14-15 reserved
|
||||
const float table_38213_13_12_c3[16] = { 1, 0.5f, 1, 0.5f, 1, 0.5f, 0.5f, 0.5f, 0.5f, 1, 0.5f, 0.5f, 1, 1, reserved, reserved}; // M, index 14-15 reserved
|
||||
|
||||
const int32_t table_38213_10_1_1_c2[5] = { 0, 0, 4, 2, 1 };
|
||||
|
||||
/*
|
||||
#define mu_pusch 1
|
||||
// definition table j Table 6.1.2.1.1-4
|
||||
|
||||
@@ -52,7 +52,6 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(sizeof(NR_UE_MAC_INST_t),NB_NR_UE_MAC_INST);
|
||||
if (rrc_inst) {
|
||||
nr_rrc_mac_config_req_ue(0,0,0,NULL,rrc_inst->cell_group_config);
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__);
|
||||
pdcp_layer_init();
|
||||
|
||||
@@ -559,7 +559,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
|
||||
mac->RA_window_cnt = -1;
|
||||
mac->ra_state = RA_SUCCEEDED;
|
||||
mac->generate_nr_prach = 2;
|
||||
LOG_I(MAC, "[MAC][UE %d][RAPROC]: RAR successfully received \n", mod_id);
|
||||
LOG_I(MAC, "[MAC][UE %d][RAPROC]: frame %d slot %d RAR successfully received\n", mod_id, frame, nr_slot_tx);
|
||||
|
||||
} else if (mac->RA_window_cnt == 0 && !mac->RA_RAPID_found) {
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include <stdio.h>
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
#define LOG_DCI_D(a...) printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) ->" a)
|
||||
@@ -53,17 +54,33 @@ dci_pdu_rel15_t *def_dci_pdu_rel15;
|
||||
void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) {
|
||||
|
||||
LOG_D(MAC,"Filling search candidates for DCI\n");
|
||||
|
||||
rel15->number_of_candidates=4;
|
||||
rel15->CCE[0]=0;
|
||||
rel15->L[0]=4;
|
||||
rel15->CCE[1]=4;
|
||||
rel15->L[1]=4;
|
||||
rel15->CCE[2]=8;
|
||||
rel15->L[2]=4;
|
||||
rel15->CCE[3]=12;
|
||||
rel15->L[3]=4;
|
||||
|
||||
if(ss->searchSpaceId == 0) {
|
||||
// TODO: Update the maximum number of PDCCH candidates accordingly with Aggregation Level
|
||||
rel15->number_of_candidates=1;
|
||||
rel15->CCE[0]=0;
|
||||
rel15->L[0]=6;
|
||||
} else {
|
||||
rel15->number_of_candidates=4;
|
||||
rel15->CCE[0]=0;
|
||||
rel15->L[0]=4;
|
||||
rel15->CCE[1]=4;
|
||||
rel15->L[1]=4;
|
||||
rel15->CCE[2]=8;
|
||||
rel15->L[2]=4;
|
||||
rel15->CCE[3]=12;
|
||||
rel15->L[3]=4;
|
||||
}
|
||||
|
||||
uint8_t aggregation;
|
||||
find_aggregation_candidates(&aggregation,
|
||||
&rel15->number_of_candidates,
|
||||
ss);
|
||||
|
||||
for (int i=0; i<rel15->number_of_candidates; i++) {
|
||||
rel15->CCE[i] = i*aggregation;
|
||||
rel15->L[i] = aggregation;
|
||||
}
|
||||
}
|
||||
|
||||
void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dl_config_request_t *dl_config, int rnti_type, int ss_id){
|
||||
@@ -76,11 +93,21 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
|
||||
NR_ServingCellConfigCommon_t *scc = mac->scc;
|
||||
NR_BWP_DownlinkCommon_t *bwp_Common = mac->DLbwp[bwp_id - 1]->bwp_Common;
|
||||
NR_BWP_DownlinkCommon_t *initialDownlinkBWP = scc->downlinkConfigCommon->initialDownlinkBWP;
|
||||
NR_SearchSpace_t *ss = mac->SSpace[bwp_id - 1][coreset_id - 1][ss_id];
|
||||
|
||||
// CORESET configuration
|
||||
NR_ControlResourceSet_t *coreset = mac->coreset[bwp_id - 1][coreset_id - 1];
|
||||
NR_SearchSpace_t *ss;
|
||||
NR_ControlResourceSet_t *coreset;
|
||||
if(ss_id>=0) {
|
||||
ss = mac->SSpace[bwp_id - 1][coreset_id - 1][ss_id];
|
||||
coreset = mac->coreset[bwp_id - 1][coreset_id - 1];
|
||||
rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
|
||||
} else {
|
||||
ss = mac->search_space_zero;
|
||||
coreset = mac->coreset0;
|
||||
rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
|
||||
}
|
||||
|
||||
rel15->coreset.duration = coreset->duration;
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
rel15->coreset.frequency_domain_resource[i] = coreset->frequencyDomainResources.buf[i];
|
||||
rel15->coreset.CceRegMappingType = coreset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved ? FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED : FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED;
|
||||
@@ -95,7 +122,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
|
||||
rel15->coreset.InterleaverSize = 0;
|
||||
rel15->coreset.ShiftIndex = 0;
|
||||
}
|
||||
rel15->coreset.CoreSetType = 1;
|
||||
|
||||
rel15->coreset.precoder_granularity = coreset->precoderGranularity;
|
||||
|
||||
// Scrambling RNTI
|
||||
@@ -145,6 +172,20 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
|
||||
case NR_RNTI_SP_CSI:
|
||||
break;
|
||||
case NR_RNTI_SI:
|
||||
// we use DL BWP dedicated
|
||||
sps = bwp_Common->genericParameters.cyclicPrefix == NULL ? 14 : 12;
|
||||
|
||||
// for SPS=14 8 MSBs in positions 13 down to 6
|
||||
monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps));
|
||||
|
||||
rel15->rnti = SI_RNTI; // SI-RNTI - 3GPP TS 38.321 Table 7.1-1: RNTI values
|
||||
rel15->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
rel15->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
|
||||
rel15->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon;
|
||||
|
||||
for (int i = 0; i < rel15->num_dci_options; i++) {
|
||||
rel15->dci_length_options[i] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[i], NR_RNTI_SI, rel15->BWPSize, 0);
|
||||
}
|
||||
break;
|
||||
case NR_RNTI_SFI:
|
||||
break;
|
||||
@@ -206,8 +247,11 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
|
||||
// Fetch configuration for searchSpaceZero
|
||||
// note: The search space with the SearchSpaceId = 0 identifies the search space configured via PBCH (MIB) and in ServingCellConfigCommon (searchSpaceZero).
|
||||
if (pdcch_ConfigCommon->choice.setup->searchSpaceZero){
|
||||
if (pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 == NULL){
|
||||
pdcch_ConfigCommon->choice.setup->searchSpaceSIB1=calloc(1,sizeof(*pdcch_ConfigCommon->choice.setup->searchSpaceSIB1));
|
||||
}
|
||||
*pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = 0;
|
||||
LOG_D(MAC, "[DCI_CONFIG] Configure SearchSpace#0 of the initial BWP\n");
|
||||
LOG_W(MAC, "[DCI_CONFIG] This should not be available yet...");
|
||||
}
|
||||
if (ss->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0){
|
||||
// check available SS IDs
|
||||
@@ -327,4 +371,25 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Search space 0, CORESET ID 0
|
||||
|
||||
NR_BWP_DownlinkCommon_t *bwp_Common = bwp->bwp_Common;
|
||||
NR_SetupRelease_PDCCH_ConfigCommon_t *pdcch_ConfigCommon = bwp_Common->pdcch_ConfigCommon;
|
||||
|
||||
if (pdcch_ConfigCommon->choice.setup->searchSpaceSIB1){
|
||||
|
||||
NR_SearchSpace_t *ss0 = mac->search_space_zero;
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15;
|
||||
|
||||
if (ss0->searchSpaceId == *pdcch_ConfigCommon->choice.setup->searchSpaceSIB1){
|
||||
if( (frame%2 == mac->type0_PDCCH_CSS_config.sfn_c) && (slot == mac->type0_PDCCH_CSS_config.n_0) ){
|
||||
rel15->num_dci_options = 1;
|
||||
rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0;
|
||||
config_dci_pdu(mac, rel15, dl_config, NR_RNTI_SI, -1);
|
||||
fill_dci_search_candidates(ss0, rel15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "NR_MAC_COMMON/nr_mac.h"
|
||||
#include "NR_MAC_UE/mac_proto.h"
|
||||
#include "NR_MAC_UE/mac_extern.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
/* PHY */
|
||||
@@ -787,13 +788,6 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response,
|
||||
scheduled_response->thread_id = thread_id;
|
||||
}
|
||||
|
||||
uint32_t get_ssb_slot(uint32_t ssb_index){
|
||||
// this function now only support f <= 3GHz
|
||||
return ssb_index & 0x3 ;
|
||||
|
||||
// return first_symbol(case, freq, ssb_index) / 14
|
||||
}
|
||||
|
||||
uint8_t table_9_2_2_1[16][8]={
|
||||
{0,12,2, 0, 0,3,0,0},
|
||||
{0,12,2, 0, 0,4,8,0},
|
||||
@@ -993,348 +987,34 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
|
||||
LOG_D(MAC,"cell barred (0=barred,1=notBarred): %d\n", (int)mac->mib->cellBarred);
|
||||
LOG_D(MAC,"intra frequency reselection (0=allowed,1=notAllowed): %d\n", (int)mac->mib->intraFreqReselection);
|
||||
LOG_D(MAC,"half frame bit(extra bits): %d\n", (int)half_frame_bit);
|
||||
LOG_D(MAC,"ssb index(extra bits): %d\n", (int)ssb_index);
|
||||
LOG_I(MAC,"ssb index(extra bits): %d\n", (int)ssb_index);
|
||||
|
||||
subcarrier_spacing_t scs_ssb = scs_30kHz; // default for
|
||||
//const uint32_t scs_index = 0;
|
||||
const uint32_t num_slot_per_frame = 20;
|
||||
subcarrier_spacing_t scs_pdcch;
|
||||
//storing ssb index in the mac structure
|
||||
mac->mib_ssb = ssb_index;
|
||||
|
||||
// assume carrier frequency < 6GHz
|
||||
if(mac->mib->subCarrierSpacingCommon == NR_MIB__subCarrierSpacingCommon_scs15or60){
|
||||
scs_pdcch = scs_15kHz;
|
||||
}else{ //NR_MIB__subCarrierSpacingCommon_scs30or120
|
||||
scs_pdcch = scs_30kHz;
|
||||
}
|
||||
get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config, mac->mib, extra_bits, ssb_length, ssb_index,
|
||||
mac->phy_config.config_req.ssb_table.ssb_offset_point_a);
|
||||
|
||||
channel_bandwidth_t min_channel_bw = bw_10MHz; // deafult for testing
|
||||
|
||||
uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13
|
||||
frequency_range_t frequency_range = FR1;
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero);
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
int32_t num_rbs = -1;
|
||||
int32_t num_symbols = -1;
|
||||
int32_t rb_offset = -1;
|
||||
LOG_D(MAC,"<<<<<<<<<configSIB1: controlResourceSetZero %d searchSpaceZero %d scs_ssb %d scs_pdcch %d switch %d ",
|
||||
index_4msb,index_4lsb,scs_ssb,scs_pdcch, (scs_ssb << 5)|scs_pdcch);
|
||||
ssb_index = mac->type0_PDCCH_CSS_config.ssb_index; // TODO: ssb_index should obtain from L1 in case Lssb != 64
|
||||
mac->type0_pdcch_ss_mux_pattern = mac->type0_PDCCH_CSS_config.type0_pdcch_ss_mux_pattern;
|
||||
mac->type0_pdcch_ss_sfn_c = mac->type0_PDCCH_CSS_config.sfn_c;
|
||||
mac->type0_pdcch_ss_n_c = mac->type0_PDCCH_CSS_config.n_c;
|
||||
mac->dl_config_request.sfn = mac->type0_PDCCH_CSS_config.frame;
|
||||
mac->dl_config_request.slot = (ssb_index>>1) + ((ssb_index>>4)<<1); // not valid for 240kHz SCS
|
||||
|
||||
// type0-pdcch coreset
|
||||
switch( (scs_ssb << 5)|scs_pdcch ){
|
||||
case (scs_15kHz << 5) | scs_15kHz :
|
||||
AssertFatal(index_4msb < 15, "38.213 Table 13-1 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_1_c2[index_4msb];
|
||||
num_symbols = table_38213_13_1_c3[index_4msb];
|
||||
rb_offset = table_38213_13_1_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_15kHz << 5) | scs_30kHz:
|
||||
AssertFatal(index_4msb < 14, "38.213 Table 13-2 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_2_c2[index_4msb];
|
||||
num_symbols = table_38213_13_2_c3[index_4msb];
|
||||
rb_offset = table_38213_13_2_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_30kHz << 5) | scs_15kHz:
|
||||
if((min_channel_bw & bw_5MHz) | (min_channel_bw & bw_10MHz)){
|
||||
AssertFatal(index_4msb < 9, "38.213 Table 13-3 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_3_c2[index_4msb];
|
||||
num_symbols = table_38213_13_3_c3[index_4msb];
|
||||
rb_offset = table_38213_13_3_c4[index_4msb];
|
||||
}else if(min_channel_bw & bw_40MHz){
|
||||
AssertFatal(index_4msb < 9, "38.213 Table 13-5 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_5_c2[index_4msb];
|
||||
num_symbols = table_38213_13_5_c3[index_4msb];
|
||||
rb_offset = table_38213_13_5_c4[index_4msb];
|
||||
}else{ ; }
|
||||
|
||||
break;
|
||||
|
||||
case (scs_30kHz << 5) | scs_30kHz:
|
||||
if((min_channel_bw & bw_5MHz) | (min_channel_bw & bw_10MHz)){
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_4_c2[index_4msb];
|
||||
num_symbols = table_38213_13_4_c3[index_4msb];
|
||||
rb_offset = table_38213_13_4_c4[index_4msb];
|
||||
LOG_D(MAC,"<<<<<<<<<index_4msb %d num_rbs %d num_symb %d rb_offset %d\n",index_4msb,num_rbs,num_symbols,rb_offset );
|
||||
}else if(min_channel_bw & bw_40MHz){
|
||||
AssertFatal(index_4msb < 10, "38.213 Table 13-6 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_6_c2[index_4msb];
|
||||
num_symbols = table_38213_13_6_c3[index_4msb];
|
||||
rb_offset = table_38213_13_6_c4[index_4msb];
|
||||
}else{ ; }
|
||||
break;
|
||||
|
||||
case (scs_120kHz << 5) | scs_60kHz:
|
||||
AssertFatal(index_4msb < 12, "38.213 Table 13-7 4 MSB out of range\n");
|
||||
if(index_4msb & 0x7){
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x18){
|
||||
mac->type0_pdcch_ss_mux_pattern = 2;
|
||||
}else{ ; }
|
||||
|
||||
num_rbs = table_38213_13_7_c2[index_4msb];
|
||||
num_symbols = table_38213_13_7_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 8 || index_4msb == 10)){
|
||||
rb_offset = table_38213_13_7_c4[index_4msb] - 1;
|
||||
}else{
|
||||
rb_offset = table_38213_13_7_c4[index_4msb];
|
||||
}
|
||||
break;
|
||||
|
||||
case (scs_120kHz << 5) | scs_120kHz:
|
||||
AssertFatal(index_4msb < 8, "38.213 Table 13-8 4 MSB out of range\n");
|
||||
if(index_4msb & 0x3){
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x0c){
|
||||
mac->type0_pdcch_ss_mux_pattern = 3;
|
||||
}
|
||||
|
||||
num_rbs = table_38213_13_8_c2[index_4msb];
|
||||
num_symbols = table_38213_13_8_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 4 || index_4msb == 6)){
|
||||
rb_offset = table_38213_13_8_c4[index_4msb] - 1;
|
||||
}else{
|
||||
rb_offset = table_38213_13_8_c4[index_4msb];
|
||||
}
|
||||
break;
|
||||
|
||||
case (scs_240kHz << 5) | scs_60kHz:
|
||||
AssertFatal(index_4msb < 4, "38.213 Table 13-9 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
num_rbs = table_38213_13_9_c2[index_4msb];
|
||||
num_symbols = table_38213_13_9_c3[index_4msb];
|
||||
rb_offset = table_38213_13_9_c4[index_4msb];
|
||||
break;
|
||||
|
||||
case (scs_240kHz << 5) | scs_120kHz:
|
||||
AssertFatal(index_4msb < 8, "38.213 Table 13-10 4 MSB out of range\n");
|
||||
if(index_4msb & 0x3){
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
}else if(index_4msb & 0x0c){
|
||||
mac->type0_pdcch_ss_mux_pattern = 2;
|
||||
}
|
||||
num_rbs = table_38213_13_10_c2[index_4msb];
|
||||
num_symbols = table_38213_13_10_c3[index_4msb];
|
||||
if(!is_condition_A && (index_4msb == 4 || index_4msb == 6)){
|
||||
rb_offset = table_38213_13_10_c4[index_4msb]-1;
|
||||
}else{
|
||||
rb_offset = table_38213_13_10_c4[index_4msb];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(num_rbs != -1, "Type0 PDCCH coreset num_rbs undefined");
|
||||
AssertFatal(num_symbols != -1, "Type0 PDCCH coreset num_symbols undefined");
|
||||
AssertFatal(rb_offset != -1, "Type0 PDCCH coreset rb_offset undefined");
|
||||
|
||||
//uint32_t cell_id = 0; // obtain from L1 later
|
||||
|
||||
//mac->type0_pdcch_dci_config.coreset.rb_start = rb_offset;
|
||||
//mac->type0_pdcch_dci_config.coreset.rb_end = rb_offset + num_rbs - 1;
|
||||
uint64_t mask = 0x0;
|
||||
uint8_t i;
|
||||
for(i=0; i<(num_rbs/6); ++i){ // 38.331 Each bit corresponds a group of 6 RBs
|
||||
mask = mask >> 1;
|
||||
mask = mask | 0x100000000000;
|
||||
}
|
||||
//LOG_I(MAC,">>>>>>>>mask %x num_rbs %d rb_offset %d\n", mask, num_rbs, rb_offset);
|
||||
/*
|
||||
mac->type0_pdcch_dci_config.coreset.frequency_domain_resource = mask;
|
||||
mac->type0_pdcch_dci_config.coreset.rb_offset = rb_offset; // additional parameter other than coreset
|
||||
|
||||
//mac->type0_pdcch_dci_config.type0_pdcch_coreset.duration = num_symbols;
|
||||
mac->type0_pdcch_dci_config.coreset.cce_reg_mapping_type = CCE_REG_MAPPING_TYPE_INTERLEAVED;
|
||||
mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_reg_bundle_size = 6; // L 38.211 7.3.2.2
|
||||
mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_interleaver_size = 2; // R 38.211 7.3.2.2
|
||||
mac->type0_pdcch_dci_config.coreset.cce_reg_interleaved_shift_index = cell_id;
|
||||
mac->type0_pdcch_dci_config.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
|
||||
mac->type0_pdcch_dci_config.coreset.pdcch_dmrs_scrambling_id = cell_id;
|
||||
*/
|
||||
|
||||
|
||||
// type0-pdcch search space
|
||||
float big_o;
|
||||
float big_m;
|
||||
uint32_t temp;
|
||||
SFN_C_TYPE sfn_c=SFN_C_IMPOSSIBLE; // only valid for mux=1
|
||||
uint32_t n_c=UINT_MAX;
|
||||
uint32_t number_of_search_space_per_slot=UINT_MAX;
|
||||
// uint32_t first_symbol_index=UINT_MAX;
|
||||
// uint32_t search_space_duration; // element of search space
|
||||
// 38.213 table 10.1-1
|
||||
|
||||
/// MUX PATTERN 1
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 1 && frequency_range == FR1){
|
||||
big_o = table_38213_13_11_c1[index_4lsb];
|
||||
number_of_search_space_per_slot = table_38213_13_11_c2[index_4lsb];
|
||||
big_m = table_38213_13_11_c3[index_4lsb];
|
||||
|
||||
temp = (uint32_t)(big_o*pow(2, scs_pdcch)) + (uint32_t)(ssb_index*big_m);
|
||||
n_c = temp / num_slot_per_frame;
|
||||
if((temp/num_slot_per_frame) & 0x1){
|
||||
sfn_c = SFN_C_MOD_2_EQ_1;
|
||||
}else{
|
||||
sfn_c = SFN_C_MOD_2_EQ_0;
|
||||
}
|
||||
|
||||
// if((index_4lsb == 1 || index_4lsb == 3 || index_4lsb == 5 || index_4lsb == 7) && (ssb_index&1)){
|
||||
// first_symbol_index = num_symbols;
|
||||
// }else{
|
||||
// first_symbol_index = table_38213_13_11_c4[index_4lsb];
|
||||
// }
|
||||
// 38.213 chapter 13: over two consecutive slots
|
||||
// search_space_duration = 2;
|
||||
}
|
||||
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 1 && frequency_range == FR2){
|
||||
big_o = table_38213_13_12_c1[index_4lsb];
|
||||
number_of_search_space_per_slot = table_38213_13_11_c2[index_4lsb];
|
||||
big_m = table_38213_13_12_c3[index_4lsb];
|
||||
|
||||
// if((index_4lsb == 1 || index_4lsb == 3 || index_4lsb == 5 || index_4lsb == 10) && (ssb_index&1)){
|
||||
// first_symbol_index = 7;
|
||||
// }else if((index_4lsb == 6 || index_4lsb == 7 || index_4lsb == 8 || index_4lsb == 11) && (ssb_index&1)){
|
||||
// first_symbol_index = num_symbols;
|
||||
// }else{
|
||||
// first_symbol_index = 0;
|
||||
// }
|
||||
// 38.213 chapter 13: over two consecutive slots
|
||||
//search_space_duration = 2;
|
||||
}
|
||||
|
||||
/// MUX PATTERN 2
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 2){
|
||||
|
||||
if((scs_ssb == scs_120kHz) && (scs_pdcch == scs_60kHz)){
|
||||
// 38.213 Table 13-13
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-13 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
// switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
// case 0:
|
||||
// first_symbol_index = 0;
|
||||
// break;
|
||||
// case 1:
|
||||
// first_symbol_index = 1;
|
||||
// break;
|
||||
// case 2:
|
||||
// first_symbol_index = 6;
|
||||
// break;
|
||||
// case 3:
|
||||
// first_symbol_index = 7;
|
||||
// break;
|
||||
// default: break;
|
||||
// }
|
||||
|
||||
}else if((scs_ssb == scs_240kHz) && (scs_pdcch == scs_120kHz)){
|
||||
// 38.213 Table 13-14
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-14 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
switch(ssb_index & 0x7){ // ssb_index(i) mod 8
|
||||
case 0:
|
||||
// first_symbol_index = 0;
|
||||
break;
|
||||
case 1:
|
||||
// first_symbol_index = 1;
|
||||
break;
|
||||
case 2:
|
||||
// first_symbol_index = 2;
|
||||
break;
|
||||
case 3:
|
||||
// first_symbol_index = 3;
|
||||
break;
|
||||
case 4:
|
||||
// first_symbol_index = 12;
|
||||
n_c = get_ssb_slot(ssb_index) - 1;
|
||||
break;
|
||||
case 5:
|
||||
// first_symbol_index = 13;
|
||||
n_c = get_ssb_slot(ssb_index) - 1;
|
||||
break;
|
||||
case 6:
|
||||
// first_symbol_index = 0;
|
||||
break;
|
||||
case 7:
|
||||
// first_symbol_index = 1;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}else{ ; }
|
||||
// 38.213 chapter 13: over one slot
|
||||
// search_space_duration = 1;
|
||||
}
|
||||
|
||||
/// MUX PATTERN 3
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 3){
|
||||
if((scs_ssb == scs_120kHz) && (scs_pdcch == scs_120kHz)){
|
||||
// 38.213 Table 13-15
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-15 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
// switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
// case 0:
|
||||
// first_symbol_index = 4;
|
||||
// break;
|
||||
// case 1:
|
||||
// first_symbol_index = 8;
|
||||
// break;
|
||||
// case 2:
|
||||
// first_symbol_index = 2;
|
||||
// break;
|
||||
// case 3:
|
||||
// first_symbol_index = 6;
|
||||
// break;
|
||||
// default: break;
|
||||
// }
|
||||
}else{ ; }
|
||||
// 38.213 chapter 13: over one slot
|
||||
// search_space_duration = 1;
|
||||
}
|
||||
|
||||
AssertFatal(number_of_search_space_per_slot!=UINT_MAX,"");
|
||||
/*
|
||||
uint32_t coreset_duration = num_symbols * number_of_search_space_per_slot;
|
||||
mac->type0_pdcch_dci_config.number_of_candidates[0] = table_38213_10_1_1_c2[0];
|
||||
mac->type0_pdcch_dci_config.number_of_candidates[1] = table_38213_10_1_1_c2[1];
|
||||
mac->type0_pdcch_dci_config.number_of_candidates[2] = table_38213_10_1_1_c2[2]; // CCE aggregation level = 4
|
||||
mac->type0_pdcch_dci_config.number_of_candidates[3] = table_38213_10_1_1_c2[3]; // CCE aggregation level = 8
|
||||
mac->type0_pdcch_dci_config.number_of_candidates[4] = table_38213_10_1_1_c2[4]; // CCE aggregation level = 16
|
||||
mac->type0_pdcch_dci_config.duration = search_space_duration;
|
||||
mac->type0_pdcch_dci_config.coreset.duration = coreset_duration; // coreset
|
||||
AssertFatal(first_symbol_index!=UINT_MAX,"");
|
||||
mac->type0_pdcch_dci_config.monitoring_symbols_within_slot = (0x3fff << first_symbol_index) & (0x3fff >> (14-coreset_duration-first_symbol_index)) & 0x3fff;
|
||||
*/
|
||||
AssertFatal(sfn_c!=SFN_C_IMPOSSIBLE,"");
|
||||
AssertFatal(n_c!=UINT_MAX,"");
|
||||
mac->type0_pdcch_ss_sfn_c = sfn_c;
|
||||
mac->type0_pdcch_ss_n_c = n_c;
|
||||
|
||||
// fill in the elements in config request inside P5 message
|
||||
mac->phy_config.Mod_id = module_id;
|
||||
mac->phy_config.CC_id = cc_id;
|
||||
|
||||
mac->dl_config_request.sfn = frame;
|
||||
mac->dl_config_request.slot = (ssb_index>>1) + ((ssb_index>>4)<<1); // not valid for 240kHz SCS
|
||||
|
||||
//}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int8_t nr_ue_decode_sib1(module_id_t module_id,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
uint32_t sibs_mask,
|
||||
uint8_t *pduP,
|
||||
uint32_t pdu_len) {
|
||||
LOG_D(MAC, "Decode sib1\n");
|
||||
nr_mac_rrc_data_ind_ue(module_id, cc_id, gNB_index, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: change to UE parameter, scs: 15KHz, slot duration: 1ms
|
||||
uint32_t get_ssb_frame(uint32_t test){
|
||||
@@ -1579,6 +1259,44 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
ulcfg_pdu->pusch_config_pdu.pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
|
||||
}
|
||||
|
||||
/* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (ulcfg_pdu->pusch_config_pdu.transform_precoding == transform_precoder_enabled) {
|
||||
|
||||
uint32_t n_RS_Id = 0;
|
||||
|
||||
NR_PUSCH_Config_t *pusch_config=mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup;
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = NULL;
|
||||
|
||||
ulcfg_pdu->pusch_config_pdu.num_dmrs_cdm_grps_no_data = 2;
|
||||
|
||||
if(pusch_config->dmrs_UplinkForPUSCH_MappingTypeA != NULL)
|
||||
NR_DMRS_ulconfig = pusch_config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup;
|
||||
else
|
||||
NR_DMRS_ulconfig = pusch_config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup;
|
||||
|
||||
|
||||
if (NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity != NULL)
|
||||
n_RS_Id = *NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity;
|
||||
else
|
||||
n_RS_Id = *mac->scc->physCellId;
|
||||
|
||||
// U as specified in section 6.4.1.1.1.2 in 38.211, if sequence hopping and group hopping are disabled
|
||||
ulcfg_pdu->pusch_config_pdu.dfts_ofdm.low_papr_group_number = n_RS_Id % 30;
|
||||
|
||||
// V as specified in section 6.4.1.1.1.2 in 38.211 V = 0 if sequence hopping and group hopping are disabled
|
||||
if ((NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) &&
|
||||
(NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceHopping == NULL))
|
||||
ulcfg_pdu->pusch_config_pdu.dfts_ofdm.low_papr_sequence_number = 0;
|
||||
else
|
||||
AssertFatal(1==0,"SequenceGroupHopping or sequenceHopping are NOT Supported\n");
|
||||
|
||||
LOG_D(MAC,"TRANSFORM PRECODING IS ENABLED. CDM groups: %d, U: %d \n", ulcfg_pdu->pusch_config_pdu.num_dmrs_cdm_grps_no_data,
|
||||
ulcfg_pdu->pusch_config_pdu.dfts_ofdm.low_papr_group_number);
|
||||
}
|
||||
|
||||
/* TRANSFORM PRECODING --------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
get_num_re_dmrs(&ulcfg_pdu->pusch_config_pdu,
|
||||
&nb_dmrs_re_per_rb,
|
||||
&number_dmrs_symbols);
|
||||
@@ -1661,7 +1379,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(ul_info->module_id);
|
||||
|
||||
if (mac->RA_active && ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
||||
if (ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
||||
|
||||
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
@@ -1698,7 +1416,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
}
|
||||
//}
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x\n",
|
||||
LOG_I(MAC, "[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x\n",
|
||||
ul_info->module_id,
|
||||
ul_info->frame_tx,
|
||||
ul_info->slot_tx,
|
||||
@@ -1718,6 +1436,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){
|
||||
mac->if_module->scheduled_response(&scheduled_response);
|
||||
}
|
||||
mac->msg3_frame = -1; // re-initialize to an invalid value after scheduling
|
||||
mac->msg3_slot = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1760,9 +1480,7 @@ void nr_ue_msg3_scheduler(NR_UE_MAC_INST_t *mac,
|
||||
else
|
||||
mac->msg3_frame = current_frame;
|
||||
|
||||
#ifdef DEBUG_MSG3
|
||||
LOG_D(MAC, "[DEBUG_MSG3] current_slot %d k2 %d delta %d temp_slot %d mac->msg3_frame %d mac->msg3_slot %d \n", current_slot, k2, delta, current_slot + k2 + delta, mac->msg3_frame, mac->msg3_slot);
|
||||
#endif
|
||||
}
|
||||
|
||||
// This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211, tables 6.3.3.2.x
|
||||
@@ -1793,9 +1511,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
|
||||
if (is_nr_UL_slot(scc, slotP)) {
|
||||
|
||||
// WIP Need to get the proper selected ssb_idx
|
||||
// Initial beam selection functionality is not available yet
|
||||
uint8_t selected_gnb_ssb_idx = 0;
|
||||
uint8_t selected_gnb_ssb_idx = mac->mib_ssb;
|
||||
|
||||
// Get any valid PRACH occasion in the current slot for the selected SSB index
|
||||
is_nr_prach_slot = get_nr_prach_info_from_ssb_index(selected_gnb_ssb_idx,
|
||||
@@ -2898,6 +2614,11 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(nfapi_nr_ue_pusch_pdu_t *p
|
||||
return -1;
|
||||
}
|
||||
|
||||
LOG_D(MAC,"riv = %i\n", riv);
|
||||
LOG_D(MAC,"n_RB_DLBWP = %i\n", n_RB_DLBWP);
|
||||
LOG_D(MAC,"number_rbs = %i\n", dlsch_config_pdu->number_rbs);
|
||||
LOG_D(MAC,"start_rb = %i\n", dlsch_config_pdu->start_rb);
|
||||
|
||||
}
|
||||
if(pusch_config_pdu != NULL){
|
||||
/*
|
||||
@@ -3069,6 +2790,11 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
|
||||
SLIV2SL(startSymbolAndLength,&S,&L);
|
||||
dlsch_config_pdu->start_symbol=S;
|
||||
dlsch_config_pdu->number_symbols=L;
|
||||
|
||||
LOG_D(MAC,"SLIV = %i\n", startSymbolAndLength);
|
||||
LOG_D(MAC,"start_symbol = %i\n", dlsch_config_pdu->start_symbol);
|
||||
LOG_D(MAC,"number_symbols = %i\n", dlsch_config_pdu->number_symbols);
|
||||
|
||||
}
|
||||
else {// Default configuration from tables
|
||||
// k_offset = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][0];
|
||||
@@ -3220,17 +2946,17 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
|
||||
/* MCS TABLE */
|
||||
if (mac->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL)
|
||||
pusch_config_pdu_0_0->transform_precoding = 1;
|
||||
pusch_config_pdu_0_0->transform_precoding = transform_precoder_disabled;
|
||||
else
|
||||
pusch_config_pdu_0_0->transform_precoding = 0;
|
||||
|
||||
if (pusch_config_pdu_0_0->transform_precoding == transform_precoder_disabled)
|
||||
pusch_config_pdu_0_0->transform_precoding = transform_precoder_enabled;
|
||||
|
||||
if (pusch_config_pdu_0_0->transform_precoding == transform_precoder_disabled)
|
||||
pusch_config_pdu_0_0->mcs_table = get_pusch_mcs_table(pusch_config->mcs_Table, 0,
|
||||
dci_format, NR_RNTI_TC, NR_SearchSpace__searchSpaceType_PR_common, false);
|
||||
else
|
||||
pusch_config_pdu_0_0->mcs_table = get_pusch_mcs_table(pusch_config->mcs_TableTransformPrecoder, 1,
|
||||
dci_format, NR_RNTI_TC, NR_SearchSpace__searchSpaceType_PR_common, false);
|
||||
|
||||
|
||||
pusch_config_pdu_0_0->target_code_rate = nr_get_code_rate_ul(pusch_config_pdu_0_0->mcs_index, pusch_config_pdu_0_0->mcs_table);
|
||||
pusch_config_pdu_0_0->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu_0_0->mcs_index, pusch_config_pdu_0_0->mcs_table);
|
||||
if (pusch_config_pdu_0_0->target_code_rate == 0 || pusch_config_pdu_0_0->qam_mod_order == 0) {
|
||||
@@ -3340,9 +3066,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
/* MCS TABLE */
|
||||
if (pusch_config->transformPrecoder == NULL) {
|
||||
if (mac->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL)
|
||||
pusch_config_pdu_0_1->transform_precoding = 1;
|
||||
pusch_config_pdu_0_1->transform_precoding = transform_precoder_disabled;
|
||||
else
|
||||
pusch_config_pdu_0_1->transform_precoding = 0;
|
||||
pusch_config_pdu_0_1->transform_precoding = transform_precoder_enabled;
|
||||
}
|
||||
else
|
||||
pusch_config_pdu_0_1->transform_precoding = *pusch_config->transformPrecoder;
|
||||
@@ -3456,14 +3182,58 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------- Changed to enable Transform precoding in RF SIM------------------------------------------------*/
|
||||
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = NULL;
|
||||
|
||||
if (pusch_config_pdu_0_1->transform_precoding == transform_precoder_enabled) {
|
||||
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder = transform_precoder_enabled;
|
||||
|
||||
if(pusch_config->dmrs_UplinkForPUSCH_MappingTypeA != NULL) {
|
||||
|
||||
NR_DMRS_ulconfig = pusch_config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup;
|
||||
|
||||
if (NR_DMRS_ulconfig->dmrs_Type == NULL)
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type = 1;
|
||||
if (NR_DMRS_ulconfig->maxLength == NULL)
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length = 1;
|
||||
|
||||
} else if(pusch_config->dmrs_UplinkForPUSCH_MappingTypeB != NULL) {
|
||||
|
||||
NR_DMRS_ulconfig = pusch_config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup;
|
||||
|
||||
if (NR_DMRS_ulconfig->dmrs_Type == NULL)
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_b.dmrs_type = 1;
|
||||
if (NR_DMRS_ulconfig->maxLength == NULL)
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_b.max_length = 1;
|
||||
|
||||
}
|
||||
} else
|
||||
mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder = transform_precoder_disabled;
|
||||
|
||||
// mapping type b configured from RRC. TBD: Mapping type b is not handled in this function.
|
||||
if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_b.dmrs_type == 1) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_b.max_length == 1)) { // tables 7.3.1.1.2-6
|
||||
pusch_config_pdu_0_1->num_dmrs_cdm_grps_no_data = 2;
|
||||
pusch_config_pdu_0_1->dmrs_ports = dci->antenna_ports.val;
|
||||
}
|
||||
|
||||
/*-------------------- ---------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* ANTENNA_PORTS */
|
||||
uint8_t rank=0; // We need to initialize rank FIXME!!!
|
||||
|
||||
if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-6
|
||||
pusch_config_pdu_0_1->num_dmrs_cdm_grps_no_data = 2; //TBC
|
||||
pusch_config_pdu_0_1->dmrs_ports = dci->antenna_ports.val; //TBC
|
||||
}
|
||||
|
||||
if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-7
|
||||
@@ -3678,14 +3448,31 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
*/
|
||||
|
||||
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti;
|
||||
//fapi_nr_dl_config_dlsch_pdu_rel15_t dlsch_config_pdu_1_0 = dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15;
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15;
|
||||
dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
uint16_t BWPSize = 0;
|
||||
|
||||
if(rnti == SI_RNTI) {
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH;
|
||||
dlsch_config_pdu_1_0->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
dlsch_config_pdu_1_0->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
|
||||
dlsch_config_pdu_1_0->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon;
|
||||
pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; // For PDSCH with mapping type A, the UE shall assume dmrs-AdditionalPosition='pos2'
|
||||
BWPSize = dlsch_config_pdu_1_0->BWPSize;
|
||||
} else {
|
||||
if (mac->RA_window_cnt >= 0 && rnti == mac->ra_rnti){
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH;
|
||||
} else {
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
|
||||
}
|
||||
dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
BWPSize = n_RB_DLBWP;
|
||||
}
|
||||
|
||||
/* IDENTIFIER_DCI_FORMATS */
|
||||
/* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */
|
||||
if (nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->frequency_domain_assignment.val) < 0)
|
||||
if (nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,BWPSize,dci->frequency_domain_assignment.val) < 0)
|
||||
return -1;
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_0,dci->time_domain_assignment.val) < 0)
|
||||
@@ -3693,7 +3480,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
mac->scc->dmrs_TypeA_Position,
|
||||
dlsch_config_pdu_1_0->number_symbols);
|
||||
dlsch_config_pdu_1_0->start_symbol+dlsch_config_pdu_1_0->number_symbols);
|
||||
dlsch_config_pdu_1_0->dmrsConfigType = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1;
|
||||
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
|
||||
if (dlsch_config_pdu_1_0->number_symbols == 2)
|
||||
@@ -3781,12 +3568,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
dlsch_config_pdu_1_0->pucch_resource_id,
|
||||
dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind);
|
||||
|
||||
if (mac->RA_window_cnt >= 0 && rnti == mac->ra_rnti){
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH;
|
||||
} else {
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
|
||||
}
|
||||
|
||||
// dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15.N_RB_BWP = n_RB_DLBWP;
|
||||
|
||||
LOG_D(MAC,"(nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type);
|
||||
@@ -4109,7 +3890,6 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){
|
||||
case NR_RNTI_RA:
|
||||
case NR_RNTI_TC:
|
||||
case NR_RNTI_P:
|
||||
case NR_RNTI_SI:
|
||||
if (mac->DLbwp[0]->bwp_Common->pdcch_ConfigCommon->choice.setup->controlResourceSetZero) {
|
||||
uint8_t bwp_id = 1;
|
||||
uint8_t coreset_id = 0; // assuming controlResourceSetId is 0 for controlResourceSetZero
|
||||
@@ -4119,8 +3899,11 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){
|
||||
N_RB = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, 275);
|
||||
}
|
||||
break;
|
||||
case NR_RNTI_SI:
|
||||
N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
break;
|
||||
case NR_RNTI_C:
|
||||
N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, 275);
|
||||
N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, 275);
|
||||
break;
|
||||
}
|
||||
return N_RB;
|
||||
@@ -4358,23 +4141,42 @@ int nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
|
||||
break;
|
||||
|
||||
case NR_RNTI_SI:
|
||||
/*
|
||||
// Freq domain assignment 0-16 bit
|
||||
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
for (int i=0; i<fsize; i++)
|
||||
*dci_pdu |= ((dci_pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<(dci_size-pos++);
|
||||
// Time domain assignment 4 bit
|
||||
for (int i=0; i<4; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->time_domain_assignment>>(3-i))&1)<<(dci_size-pos++);
|
||||
// VRB to PRB mapping 1 bit
|
||||
*dci_pdu |= ((uint64_t)dci_pdu_rel15->vrb_to_prb_mapping.val&1)<<(dci_size-pos++);
|
||||
// MCS 5bit //bit over 32, so dci_pdu ++
|
||||
for (int i=0; i<5; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->mcs>>(4-i))&1)<<(dci_size-pos++);
|
||||
// Redundancy version 2bit
|
||||
for (int i=0; i<2; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->rv>>(1-i))&1)<<(dci_size-pos++);
|
||||
*/
|
||||
|
||||
// Freq domain assignment 0-16 bit
|
||||
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
pos+=fsize;
|
||||
dci_pdu_rel15->frequency_domain_assignment.val = (*dci_pdu>>(dci_size-pos))&((1<<fsize)-1);
|
||||
|
||||
// Time domain assignment 4 bit
|
||||
pos+=4;
|
||||
dci_pdu_rel15->time_domain_assignment.val = (*dci_pdu>>(dci_size-pos))&0xf;
|
||||
|
||||
// VRB to PRB mapping 1 bit
|
||||
pos++;
|
||||
dci_pdu_rel15->vrb_to_prb_mapping.val = (*dci_pdu>>(dci_size-pos))&0x1;
|
||||
|
||||
// MCS 5bit //bit over 32, so dci_pdu ++
|
||||
pos+=5;
|
||||
dci_pdu_rel15->mcs = (*dci_pdu>>(dci_size-pos))&0x1f;
|
||||
|
||||
// Redundancy version 2 bit
|
||||
pos+=2;
|
||||
dci_pdu_rel15->rv = (*dci_pdu>>(dci_size-pos))&3;
|
||||
|
||||
// System information indicator 1 bit
|
||||
pos++;
|
||||
dci_pdu_rel15->system_info_indicator = (*dci_pdu>>(dci_size-pos))&0x1;
|
||||
|
||||
LOG_D(MAC,"N_RB = %i\n", N_RB);
|
||||
LOG_D(MAC,"dci_size = %i\n", dci_size);
|
||||
LOG_D(MAC,"fsize = %i\n", fsize);
|
||||
LOG_D(MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
|
||||
LOG_D(MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
|
||||
LOG_D(MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val);
|
||||
LOG_D(MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
|
||||
LOG_D(MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv);
|
||||
LOG_D(MAC,"dci_pdu_rel15->system_info_indicator = %i\n", dci_pdu_rel15->system_info_indicator);
|
||||
|
||||
break;
|
||||
|
||||
case NR_RNTI_TC:
|
||||
|
||||
@@ -116,6 +116,7 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
|
||||
mask = (1 << ((int) ceil(log2((ibwp_size*(ibwp_size+1))>>1)))) - 1;
|
||||
else
|
||||
mask = (1 << (28 - (int)(ceil(log2((ibwp_size*(ibwp_size+1))>>1))))) - 1;
|
||||
|
||||
f_alloc = Msg3_f_alloc & mask;
|
||||
nr_ue_process_dci_freq_dom_resource_assignment(pusch_config_pdu, NULL, ibwp_size, 0, f_alloc);
|
||||
|
||||
@@ -273,7 +274,8 @@ uint16_t nr_ue_process_rar(module_id_t mod_id,
|
||||
|
||||
if (ue_mac->RA_RAPID_found) {
|
||||
|
||||
uint8_t freq_hopping, mcs, Msg3_t_alloc, Msg3_f_alloc;
|
||||
uint8_t freq_hopping, mcs, Msg3_t_alloc;
|
||||
uint16_t Msg3_f_alloc;
|
||||
unsigned char tpc_command;
|
||||
#ifdef DEBUG_RAR
|
||||
unsigned char csi_req;
|
||||
|
||||
@@ -385,6 +385,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
|
||||
if (secondaryCellGroup) {
|
||||
|
||||
RC.nrmac[Mod_idP]->secondaryCellGroupCommon = secondaryCellGroup;
|
||||
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||
if (add_ue == 1 && get_softmodem_params()->phy_test) {
|
||||
const int UE_id = add_new_nr_ue(Mod_idP,rnti);
|
||||
|
||||
@@ -360,7 +360,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
nr_rrc_trigger(&ctxt, 0 /*CC_id*/, frame, slot >> *scc->ssbSubcarrierSpacing);
|
||||
}
|
||||
|
||||
const uint64_t dlsch_in_slot_bitmap = (1 << 1) | (1 << 2);
|
||||
const uint64_t dlsch_in_slot_bitmap = (1 << 1) | (1 << 3);
|
||||
const uint64_t ulsch_in_slot_bitmap = (1 << 8);
|
||||
|
||||
memset(RC.nrmac[module_idP]->cce_list[bwp_id][0],0,MAX_NUM_CCE*sizeof(int)); // coreset0
|
||||
@@ -388,6 +388,11 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
// This schedules MIB
|
||||
schedule_nr_mib(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing]);
|
||||
|
||||
// This schedules SIB1
|
||||
if ( get_softmodem_params()->sa == 1 )
|
||||
schedule_nr_sib1(module_idP, frame, slot);
|
||||
|
||||
|
||||
// This schedule PRACH if we are not in phy_test mode
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
/* we need to make sure that resources for PRACH are free. To avoid that
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "GNB_APP/RRC_nr_paramsvalues.h"
|
||||
#include "assertions.h"
|
||||
#include "NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "NR_MAC_gNB/mac_proto.h"
|
||||
@@ -38,21 +39,19 @@
|
||||
#include "common/utils/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 "common/utils/nr/nr_common.h"
|
||||
|
||||
|
||||
//#include "LAYER2/MAC/pre_processor.c"
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#define ENABLE_MAC_PAYLOAD_DEBUG
|
||||
#define DEBUG_eNB_SCHEDULER 1
|
||||
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern uint8_t SSB_Table[38];
|
||||
|
||||
@@ -153,6 +152,17 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
dl_config_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload = (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1);
|
||||
dl_req->nPDUs++;
|
||||
}
|
||||
|
||||
// Get type0_PDCCH_CSS_config parameters
|
||||
NR_DL_FRAME_PARMS *frame_parms = &RC.gNB[module_idP]->frame_parms;
|
||||
NR_MIB_t *mib = RC.nrrrc[module_idP]->carrier.mib.message.choice.mib;
|
||||
uint8_t gNB_xtra_byte = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
gNB_xtra_byte |= ((RC.gNB[module_idP]->pbch.pbch_a >> (31 - i)) & 1) << (7 - i);
|
||||
}
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config, mib, gNB_xtra_byte, frame_parms->Lmax,
|
||||
frame_parms->ssb_index, frame_parms->ssb_start_subcarrier/NR_NB_SC_PER_RB);
|
||||
|
||||
}
|
||||
|
||||
// checking if there is any SSB in slot
|
||||
@@ -214,3 +224,284 @@ void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, int CC_id) {
|
||||
for (int rb = 0; rb < 20; rb++)
|
||||
vrb_map[rbStart + rb] = 1;
|
||||
}
|
||||
|
||||
void schedule_control_sib1(module_id_t module_id,
|
||||
int CC_id,
|
||||
int time_domain_allocation,
|
||||
uint8_t mcsTableIdx,
|
||||
uint8_t mcs,
|
||||
int num_total_bytes) {
|
||||
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[module_id];
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
|
||||
|
||||
if (gNB_mac->sched_ctrlCommon == NULL){
|
||||
gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon));
|
||||
gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space));
|
||||
gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp));
|
||||
gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset));
|
||||
gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp));
|
||||
fill_default_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space);
|
||||
fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,servingcellconfigcommon);
|
||||
fill_default_initialDownlinkBWP(gNB_mac->sched_ctrlCommon->active_bwp,servingcellconfigcommon);
|
||||
}
|
||||
gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL;
|
||||
|
||||
gNB_mac->sched_ctrlCommon->time_domain_allocation = time_domain_allocation;
|
||||
gNB_mac->sched_ctrlCommon->mcsTableIdx = mcsTableIdx;
|
||||
gNB_mac->sched_ctrlCommon->mcs = mcs;
|
||||
gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
|
||||
|
||||
uint8_t nr_of_candidates;
|
||||
find_aggregation_candidates(&gNB_mac->sched_ctrlCommon->aggregation_level, &nr_of_candidates, gNB_mac->sched_ctrlCommon->search_space);
|
||||
|
||||
gNB_mac->sched_ctrlCommon->cce_index = allocate_nr_CCEs(RC.nrmac[module_id],
|
||||
gNB_mac->sched_ctrlCommon->active_bwp,
|
||||
gNB_mac->sched_ctrlCommon->coreset,
|
||||
gNB_mac->sched_ctrlCommon->aggregation_level,
|
||||
0,
|
||||
0,
|
||||
nr_of_candidates);
|
||||
|
||||
if (gNB_mac->sched_ctrlCommon->cce_index < 0) {
|
||||
LOG_E(MAC, "%s(): could not find CCE for coreset0\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
const uint16_t bwpSize = gNB_mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
int rbStart = gNB_mac->type0_PDCCH_CSS_config.cset_start_rb;
|
||||
|
||||
// Calculate number of symbols
|
||||
struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
|
||||
const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength;
|
||||
int startSymbolIndex, nrOfSymbols;
|
||||
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
||||
|
||||
if (nrOfSymbols == 2) {
|
||||
gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1;
|
||||
} else {
|
||||
gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 2;
|
||||
}
|
||||
|
||||
// Calculate number of PRB_DMRS
|
||||
uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6;
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols);
|
||||
uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
|
||||
|
||||
int rbSize = 0;
|
||||
uint32_t TBS = 0;
|
||||
do {
|
||||
rbSize++;
|
||||
TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
|
||||
nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
|
||||
rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3;
|
||||
|
||||
// FIXME: Something is not working in nr_modulation() for TBS = 84, so we need to skip it
|
||||
} while ( (rbStart + rbSize < bwpSize && !vrb_map[rbStart + rbSize] && TBS < gNB_mac->sched_ctrlCommon->num_total_bytes) || (TBS==84) );
|
||||
|
||||
gNB_mac->sched_ctrlCommon->rbSize = rbSize;
|
||||
gNB_mac->sched_ctrlCommon->rbStart = 0;
|
||||
|
||||
LOG_D(MAC,"SLIV = %i\n", startSymbolAndLength);
|
||||
LOG_D(MAC,"startSymbolIndex = %i\n", startSymbolIndex);
|
||||
LOG_D(MAC,"nrOfSymbols = %i\n", nrOfSymbols);
|
||||
LOG_D(MAC,"rbSize = %i\n", gNB_mac->sched_ctrlCommon->rbSize);
|
||||
LOG_D(MAC,"TBS = %i\n", TBS);
|
||||
|
||||
// Mark the corresponding RBs as used
|
||||
for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->rbSize; rb++) {
|
||||
vrb_map[rb + rbStart] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req,
|
||||
uint32_t TBS,
|
||||
int StartSymbolIndex,
|
||||
int NrOfSymbols) {
|
||||
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP];
|
||||
NR_COMMON_channels_t *cc = gNB_mac->common_channels;
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = gNB_mac->secondaryCellGroupCommon;
|
||||
NR_BWP_Downlink_t *bwp = gNB_mac->sched_ctrlCommon->active_bwp;
|
||||
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
|
||||
memset((void*)dl_tti_pdcch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
|
||||
dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE;
|
||||
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
|
||||
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs+1];
|
||||
memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
|
||||
dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE;
|
||||
dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu));
|
||||
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15;
|
||||
|
||||
pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
|
||||
|
||||
pdsch_pdu_rel15->pduBitmap = 0;
|
||||
pdsch_pdu_rel15->rnti = SI_RNTI;
|
||||
pdsch_pdu_rel15->pduIndex = gNB_mac->pdu_index[0]++;
|
||||
|
||||
pdsch_pdu_rel15->BWPSize = gNB_mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
pdsch_pdu_rel15->BWPStart = gNB_mac->type0_PDCCH_CSS_config.cset_start_rb;
|
||||
|
||||
pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
if (bwp->bwp_Common->genericParameters.cyclicPrefix) {
|
||||
pdsch_pdu_rel15->CyclicPrefix = *bwp->bwp_Common->genericParameters.cyclicPrefix;
|
||||
} else {
|
||||
pdsch_pdu_rel15->CyclicPrefix = 0;
|
||||
}
|
||||
|
||||
pdsch_pdu_rel15->NrOfCodewords = 1;
|
||||
pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs,0);
|
||||
pdsch_pdu_rel15->qamModOrder[0] = 2;
|
||||
pdsch_pdu_rel15->mcsIndex[0] = gNB_mac->sched_ctrlCommon->mcs;
|
||||
pdsch_pdu_rel15->mcsTable[0] = 0;
|
||||
pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[0];
|
||||
pdsch_pdu_rel15->dataScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->nrOfLayers = 1;
|
||||
pdsch_pdu_rel15->transmissionScheme = 0;
|
||||
pdsch_pdu_rel15->refPoint = 1;
|
||||
pdsch_pdu_rel15->dmrsConfigType = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1;
|
||||
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->SCID = 0;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu_rel15->dmrsPorts = 1;
|
||||
pdsch_pdu_rel15->resourceAlloc = 1;
|
||||
pdsch_pdu_rel15->rbStart = gNB_mac->sched_ctrlCommon->rbStart;
|
||||
pdsch_pdu_rel15->rbSize = gNB_mac->sched_ctrlCommon->rbSize;
|
||||
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
||||
pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx);
|
||||
pdsch_pdu_rel15->TBSize[0] = TBS;
|
||||
pdsch_pdu_rel15->mcsTable[0] = gNB_mac->sched_ctrlCommon->mcsTableIdx;
|
||||
pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols;
|
||||
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->StartSymbolIndex+pdsch_pdu_rel15->NrOfSymbols);
|
||||
|
||||
LOG_D(MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
|
||||
dci_pdu_rel15_t dci_pdu_rel15[MAX_DCI_CORESET];
|
||||
memset(dci_pdu_rel15, 0, sizeof(dci_pdu_rel15_t) * MAX_DCI_CORESET);
|
||||
|
||||
dci_pdu_rel15[0].bwp_indicator.val = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Id;
|
||||
|
||||
// frequency domain assignment
|
||||
dci_pdu_rel15[0].frequency_domain_assignment.val =
|
||||
PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize,
|
||||
pdsch_pdu_rel15->rbStart,
|
||||
gNB_mac->type0_PDCCH_CSS_config.num_rbs);
|
||||
|
||||
dci_pdu_rel15[0].time_domain_assignment.val = gNB_mac->sched_ctrlCommon->time_domain_allocation;
|
||||
dci_pdu_rel15[0].mcs = gNB_mac->sched_ctrlCommon->mcs;
|
||||
dci_pdu_rel15[0].rv = pdsch_pdu_rel15->rvIndex[0];
|
||||
dci_pdu_rel15[0].harq_pid = 0;
|
||||
dci_pdu_rel15[0].ndi = 0;
|
||||
dci_pdu_rel15[0].dai[0].val = 0;
|
||||
dci_pdu_rel15[0].tpc = 0; // table 7.2.1-1 in 38.213
|
||||
dci_pdu_rel15[0].pucch_resource_indicator = 0;
|
||||
dci_pdu_rel15[0].pdsch_to_harq_feedback_timing_indicator.val = 0;
|
||||
dci_pdu_rel15[0].antenna_ports.val = 0;
|
||||
dci_pdu_rel15[0].dmrs_sequence_initialization.val = pdsch_pdu_rel15->SCID;
|
||||
|
||||
nr_configure_pdcch(gNB_mac,
|
||||
pdcch_pdu_rel15,
|
||||
SI_RNTI,
|
||||
gNB_mac->sched_ctrlCommon->search_space,
|
||||
gNB_mac->sched_ctrlCommon->coreset,
|
||||
scc,
|
||||
bwp,
|
||||
gNB_mac->sched_ctrlCommon->aggregation_level,
|
||||
gNB_mac->sched_ctrlCommon->cce_index);
|
||||
|
||||
int dci_formats[2];
|
||||
int rnti_types[2];
|
||||
|
||||
dci_formats[0] = NR_DL_DCI_FORMAT_1_0;
|
||||
rnti_types[0] = NR_RNTI_SI;
|
||||
|
||||
fill_dci_pdu_rel15(scc,secondaryCellGroup,pdcch_pdu_rel15,dci_pdu_rel15,dci_formats,rnti_types,pdsch_pdu_rel15->BWPSize,gNB_mac->sched_ctrlCommon->active_bwp->bwp_Id);
|
||||
|
||||
dl_req->nPDUs += 2;
|
||||
|
||||
LOG_D(MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize);
|
||||
LOG_D(MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart);
|
||||
LOG_D(MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing);
|
||||
LOG_D(MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix);
|
||||
LOG_D(MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex);
|
||||
LOG_D(MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols);
|
||||
for(int n=0;n<6;n++) LOG_D(MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]);
|
||||
LOG_D(MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType);
|
||||
LOG_D(MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize);
|
||||
LOG_D(MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize);
|
||||
LOG_D(MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType);
|
||||
LOG_D(MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex);
|
||||
LOG_D(MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity);
|
||||
LOG_D(MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci);
|
||||
|
||||
}
|
||||
|
||||
void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) {
|
||||
|
||||
LOG_D(MAC,"Schedule_nr_sib1: frameP = %i, slotP = %i\n", frameP, slotP);
|
||||
|
||||
// TODO: Get these values from RRC
|
||||
const int CC_id = 0;
|
||||
int time_domain_allocation = 0;
|
||||
uint8_t mcsTableIdx = 0;
|
||||
uint8_t mcs = 6;
|
||||
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[module_idP];
|
||||
|
||||
if( (frameP%2 == gNB_mac->type0_PDCCH_CSS_config.sfn_c) && (slotP == gNB_mac->type0_PDCCH_CSS_config.n_0) && (gNB_mac->type0_PDCCH_CSS_config.num_rbs > 0) ) {
|
||||
|
||||
LOG_D(MAC,"> SIB1 transmission\n");
|
||||
|
||||
// Get SIB1
|
||||
uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8];
|
||||
uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, 1, sib1_payload);
|
||||
LOG_D(MAC,"sib1_sdu_length = %i\n", sib1_sdu_length);
|
||||
LOG_D(MAC,"SIB1: \n");
|
||||
for (int i=0;i<sib1_sdu_length;i++) LOG_D(MAC,"byte %d : %x\n",i,((uint8_t*)sib1_payload)[i]);
|
||||
|
||||
// Configure sched_ctrlCommon for SIB1
|
||||
schedule_control_sib1(module_idP, CC_id, time_domain_allocation, mcsTableIdx, mcs, sib1_sdu_length);
|
||||
|
||||
// Calculate number of symbols
|
||||
int startSymbolIndex, nrOfSymbols;
|
||||
struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
|
||||
const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
||||
|
||||
// Calculate number of PRB_DMRS
|
||||
uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6;
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols);
|
||||
uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
|
||||
|
||||
const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
|
||||
nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
|
||||
gNB_mac->sched_ctrlCommon->rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0 ,0 ,1 ) >> 3;
|
||||
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
|
||||
nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, TBS, startSymbolIndex, nrOfSymbols);
|
||||
|
||||
const int ntx_req = gNB_mac->TX_req[CC_id].Number_of_PDUs;
|
||||
nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[ntx_req];
|
||||
|
||||
// Data to be transmitted
|
||||
bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES);
|
||||
memcpy(tx_req->TLVs[0].value.direct, sib1_payload, sib1_sdu_length);
|
||||
|
||||
tx_req->PDU_length = TBS;
|
||||
tx_req->PDU_index = gNB_mac->pdu_index[0]++;
|
||||
tx_req->num_TLV = 1;
|
||||
tx_req->TLVs[0].length = TBS + 2;
|
||||
gNB_mac->TX_req[CC_id].Number_of_PDUs++;
|
||||
gNB_mac->TX_req[CC_id].SFN = frameP;
|
||||
gNB_mac->TX_req[CC_id].Slot = slotP;
|
||||
}
|
||||
}
|
||||
@@ -424,8 +424,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
|
||||
find_aggregation_candidates(&sched_ctrl->aggregation_level,
|
||||
&nr_of_candidates,
|
||||
sched_ctrl->search_space);
|
||||
sched_ctrl->coreset = get_coreset(
|
||||
sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
|
||||
sched_ctrl->coreset = get_coreset(sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /*dedicated*/);
|
||||
int cid = sched_ctrl->coreset->controlResourceSetId;
|
||||
const uint16_t Y = UE_info->Y[UE_id][cid][slot];
|
||||
const int m = UE_info->num_pdcch_cand[UE_id][cid];
|
||||
|
||||
@@ -395,8 +395,12 @@ void nr_ul_preprocessor_phytest(module_id_t module_id,
|
||||
if (!(is_xlsch_in_slot(ulsch_in_slot_bitmap, sched_slot) && sched_slot == 8))
|
||||
return;
|
||||
|
||||
const uint16_t rbStart = 0;
|
||||
const uint16_t rbSize = 50; /* due to OAI UE limitations */
|
||||
const int bw = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, 275);
|
||||
uint16_t rbStart = 0;
|
||||
uint16_t rbSize = 50; /* due to OAI UE limitations */
|
||||
if (rbSize>bw)
|
||||
rbSize = bw;
|
||||
|
||||
uint16_t *vrb_map_UL =
|
||||
&RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * 275];
|
||||
for (int i = rbStart; i < rbStart + rbSize; ++i) {
|
||||
|
||||
@@ -176,7 +176,13 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
|
||||
// NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
|
||||
int coreset_id = coreset->controlResourceSetId;
|
||||
int *cce_list = nr_mac->cce_list[bwp->bwp_Id][coreset_id];
|
||||
|
||||
int *cce_list;
|
||||
if(bwp->bwp_Id == 0) {
|
||||
cce_list = nr_mac->cce_list[1][0];
|
||||
} else {
|
||||
cce_list = nr_mac->cce_list[bwp->bwp_Id][coreset_id];
|
||||
}
|
||||
|
||||
int n_rb=0;
|
||||
for (int i=0;i<6;i++)
|
||||
@@ -191,12 +197,9 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
|
||||
const uint16_t N_cce = N_reg / NR_NB_REG_PER_CCE;
|
||||
const uint16_t M_s_max = nr_of_candidates;
|
||||
|
||||
AssertFatal(m < nr_of_candidates,
|
||||
"PDCCH candidate index %d in CORESET %d exceeds the maximum "
|
||||
"number of PDCCH candidates (%d)\n",
|
||||
m,
|
||||
coreset_id,
|
||||
nr_of_candidates);
|
||||
//PDCCH candidate index m in CORESET exceeds the maximum number of PDCCH candidates
|
||||
if(m >= nr_of_candidates)
|
||||
return -1;
|
||||
|
||||
int first_cce = aggregation * (( Y + CEILIDIV((m*N_cce),(aggregation*M_s_max)) + n_CI ) % CEILIDIV(N_cce,aggregation));
|
||||
|
||||
@@ -218,7 +221,6 @@ void nr_save_pusch_fields(const NR_ServingCellConfigCommon_t *scc,
|
||||
{
|
||||
ps->dci_format = dci_format;
|
||||
ps->time_domain_allocation = tda;
|
||||
ps->num_dmrs_cdm_grps_no_data = num_dmrs_cdm_grps_no_data;
|
||||
|
||||
const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList =
|
||||
ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
|
||||
@@ -240,13 +242,17 @@ void nr_save_pusch_fields(const NR_ServingCellConfigCommon_t *scc,
|
||||
NR_RNTI_C,
|
||||
target_ss,
|
||||
false);
|
||||
else
|
||||
else {
|
||||
ps->mcs_table = get_pusch_mcs_table(ps->pusch_Config->mcs_TableTransformPrecoder,
|
||||
1,
|
||||
ps->dci_format,
|
||||
NR_RNTI_C,
|
||||
target_ss,
|
||||
false);
|
||||
num_dmrs_cdm_grps_no_data = 2; // in case of transform precoding - no Data sent in DMRS symbol
|
||||
}
|
||||
|
||||
ps->num_dmrs_cdm_grps_no_data = num_dmrs_cdm_grps_no_data;
|
||||
|
||||
/* DMRS calculations */
|
||||
ps->mapping_type = tdaList->list.array[tda]->mappingType;
|
||||
@@ -833,8 +839,12 @@ void nr_configure_pdcch(gNB_MAC_INST *nr_mac,
|
||||
pdcch_pdu->ShiftIndex = 0;
|
||||
}
|
||||
|
||||
pdcch_pdu->CoreSetType = 1;
|
||||
|
||||
if(coreset->controlResourceSetId == 0) {
|
||||
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
|
||||
} else{
|
||||
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
|
||||
}
|
||||
|
||||
//precoderGranularity
|
||||
pdcch_pdu->precoderGranularity = coreset->precoderGranularity;
|
||||
|
||||
@@ -1329,22 +1339,42 @@ void fill_dci_pdu_rel15(NR_ServingCellConfigCommon_t *scc,
|
||||
break;
|
||||
|
||||
case NR_RNTI_SI:
|
||||
// Freq domain assignment 0-16 bit
|
||||
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
for (int i=0; i<fsize; i++)
|
||||
*dci_pdu |= ((dci_pdu_rel15->frequency_domain_assignment.val>>(fsize-i-1))&1)<<(dci_size-pos++);
|
||||
// Time domain assignment 4 bit
|
||||
for (int i=0; i<4; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->time_domain_assignment.val>>(3-i))&1)<<(dci_size-pos++);
|
||||
// VRB to PRB mapping 1 bit
|
||||
*dci_pdu |= ((uint64_t)dci_pdu_rel15->vrb_to_prb_mapping.val&1)<<(dci_size-pos++);
|
||||
// MCS 5bit //bit over 32, so dci_pdu ++
|
||||
for (int i=0; i<5; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->mcs>>(4-i))&1)<<(dci_size-pos++);
|
||||
// Redundancy version 2bit
|
||||
for (int i=0; i<2; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->rv>>(1-i))&1)<<(dci_size-pos++);
|
||||
|
||||
pos=1;
|
||||
|
||||
// Freq domain assignment 0-16 bit
|
||||
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
for (int i=0; i<fsize; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->frequency_domain_assignment.val>>(fsize-1-i))&1)<<(dci_size-pos++);
|
||||
|
||||
// Time domain assignment 4 bit
|
||||
for (int i=0; i<4; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->time_domain_assignment.val>>(3-i))&1)<<(dci_size-pos++);
|
||||
|
||||
// VRB to PRB mapping 1 bit
|
||||
*dci_pdu |= ((uint64_t)dci_pdu_rel15->vrb_to_prb_mapping.val&1)<<(dci_size-pos++);
|
||||
|
||||
// MCS 5bit //bit over 32, so dci_pdu ++
|
||||
for (int i=0; i<5; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->mcs>>(4-i))&1)<<(dci_size-pos++);
|
||||
|
||||
// Redundancy version 2 bit
|
||||
for (int i=0; i<2; i++)
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->rv>>(1-i))&1)<<(dci_size-pos++);
|
||||
|
||||
// System information indicator 1bit
|
||||
*dci_pdu |= ((uint64_t)dci_pdu_rel15->system_info_indicator&1)<<(dci_size-pos++);
|
||||
|
||||
// reserved 15 bits
|
||||
|
||||
LOG_D(PHY,"dci_size = %i\n", dci_size);
|
||||
LOG_D(PHY,"fsize = %i\n", fsize);
|
||||
LOG_D(PHY,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
|
||||
LOG_D(PHY,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
|
||||
LOG_D(PHY,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val);
|
||||
LOG_D(PHY,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
|
||||
LOG_D(PHY,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv);
|
||||
LOG_D(PHY,"dci_pdu_rel15->system_info_indicator = %i\n", dci_pdu_rel15->system_info_indicator);
|
||||
|
||||
break;
|
||||
|
||||
case NR_RNTI_TC:
|
||||
@@ -1994,32 +2024,6 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
|
||||
}
|
||||
|
||||
|
||||
void find_aggregation_candidates(uint8_t *aggregation_level,
|
||||
uint8_t *nr_of_candidates,
|
||||
NR_SearchSpace_t *ss) {
|
||||
|
||||
if (ss->nrofCandidates->aggregationLevel1 != NR_SearchSpace__nrofCandidates__aggregationLevel1_n0) {
|
||||
*aggregation_level = 1;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel1;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel2 != NR_SearchSpace__nrofCandidates__aggregationLevel2_n0) {
|
||||
*aggregation_level = 2;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel2;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel4 != NR_SearchSpace__nrofCandidates__aggregationLevel4_n0) {
|
||||
*aggregation_level = 4;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel4;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel8 != NR_SearchSpace__nrofCandidates__aggregationLevel8_n0) {
|
||||
*aggregation_level = 8;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel8;
|
||||
}
|
||||
if (ss->nrofCandidates->aggregationLevel16 != NR_SearchSpace__nrofCandidates__aggregationLevel16_n0) {
|
||||
*aggregation_level = 16;
|
||||
*nr_of_candidates = ss->nrofCandidates->aggregationLevel16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*void fill_nfapi_coresets_and_searchspaces(NR_CellGroupConfig_t *cg,
|
||||
nfapi_nr_coreset_t *coreset,
|
||||
|
||||
@@ -742,6 +742,25 @@ void nr_schedule_ulsch(module_id_t module_id,
|
||||
pusch_pdu->pusch_data.tb_size = sched_pusch->tb_size;
|
||||
pusch_pdu->pusch_data.num_cb = 0; //CBG not supported
|
||||
|
||||
/* TRANSFORM PRECODING --------------------------------------------------------*/
|
||||
|
||||
if (pusch_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled){
|
||||
|
||||
// U as specified in section 6.4.1.1.1.2 in 38.211, if sequence hopping and group hopping are disabled
|
||||
pusch_pdu->dfts_ofdm.low_papr_group_number = pusch_pdu->pusch_identity % 30;
|
||||
|
||||
// V as specified in section 6.4.1.1.1.2 in 38.211 V = 0 if sequence hopping and group hopping are disabled
|
||||
if ((ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) &&
|
||||
(ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping == NULL))
|
||||
pusch_pdu->dfts_ofdm.low_papr_sequence_number = 0;
|
||||
else
|
||||
AssertFatal(1==0,"SequenceGroupHopping or sequenceHopping are NOT Supported\n");
|
||||
|
||||
LOG_D(NR_MAC,"TRANSFORM PRECODING IS ENABLED. CDM groups: %d, U: %d MCS table: %d\n", pusch_pdu->num_dmrs_cdm_grps_no_data, pusch_pdu->dfts_ofdm.low_papr_group_number, ps->mcs_table);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
/* PUSCH PTRS */
|
||||
if (ps->NR_DMRS_UplinkConfig->phaseTrackingRS != NULL) {
|
||||
// TODO to be fixed from RRC config
|
||||
|
||||
@@ -80,6 +80,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
sub_frame_t slot,
|
||||
int num_slots_per_tdd);
|
||||
|
||||
void schedule_control_sib1(module_id_t module_id,
|
||||
int CC_id,
|
||||
int time_domain_allocation,
|
||||
uint8_t mcsTableIdx,
|
||||
uint8_t mcs,
|
||||
int num_total_bytes);
|
||||
|
||||
void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
|
||||
|
||||
/* \brief default preprocessor */
|
||||
void nr_simple_dlsch_preprocessor(module_id_t module_id,
|
||||
frame_t frame,
|
||||
@@ -296,9 +305,6 @@ NR_SearchSpace_t *get_searchspace(
|
||||
NR_BWP_Downlink_t *bwp,
|
||||
NR_SearchSpace__searchSpaceType_PR target_ss);
|
||||
|
||||
void find_aggregation_candidates(uint8_t *aggregation_level,
|
||||
uint8_t *nr_of_candidates,
|
||||
NR_SearchSpace_t *ss);
|
||||
|
||||
long get_K2(NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu);
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
/* MAC */
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "NR_TAG.h"
|
||||
@@ -552,6 +554,11 @@ typedef struct gNB_MAC_INST_s {
|
||||
nr_pp_impl_dl pre_processor_dl;
|
||||
/// UL preprocessor for differentiated scheduling
|
||||
nr_pp_impl_ul pre_processor_ul;
|
||||
|
||||
NR_UE_sched_ctrl_t *sched_ctrlCommon;
|
||||
NR_CellGroupConfig_t *secondaryCellGroupCommon;
|
||||
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config;
|
||||
|
||||
} gNB_MAC_INST;
|
||||
|
||||
#endif /*__LAYER2_NR_MAC_GNB_H__ */
|
||||
|
||||
@@ -394,7 +394,7 @@ boolean_t pdcp_data_req(
|
||||
// DL transfer
|
||||
MessageDef *message_p;
|
||||
// Note: the acyual task must be TASK_PDCP_ENB, but this task is not created
|
||||
message_p = itti_alloc_new_message (TASK_PDCP_ENB, F1AP_DL_RRC_MESSAGE);
|
||||
message_p = itti_alloc_new_message (TASK_PDCP_ENB, 0, F1AP_DL_RRC_MESSAGE);
|
||||
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = &pdcp_pdu_p->data[0] ;
|
||||
F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = pdcp_pdu_size;
|
||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
||||
@@ -930,7 +930,7 @@ pdcp_data_ind(
|
||||
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX);
|
||||
AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY");
|
||||
memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset);
|
||||
message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_ENB_TUNNEL_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_PDCP_ENB, 0, GTPV1U_ENB_TUNNEL_DATA_REQ);
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer = gtpu_buffer_p;
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).length = sdu_buffer_sizeP - payload_offset;
|
||||
@@ -1139,11 +1139,11 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).frame,
|
||||
0,
|
||||
RRC_DCCH_DATA_REQ (msg_p).eNB_index);
|
||||
LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %ld, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
ITTI_MSG_NAME (msg_p),
|
||||
ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
ITTI_MSG_INSTANCE (msg_p),
|
||||
ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
@@ -1265,7 +1265,7 @@ pdcp_mbms_run (
|
||||
// PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
// ITTI_MSG_NAME (msg_p),
|
||||
// ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
// ITTI_MSG_INSTANCE (msg_p),
|
||||
// ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
|
||||
@@ -237,9 +237,9 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %ld \n",
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
||||
ctxt.frame, ctxt.instance, len, rab_id);
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id);
|
||||
|
||||
@@ -258,7 +258,7 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
|
||||
);
|
||||
} else {
|
||||
LOG_D(PDCP,
|
||||
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] TUN NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] TUN NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id, key);
|
||||
}
|
||||
@@ -305,9 +305,9 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %ld \n",
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
||||
ctxt.frame, ctxt.instance, len, rab_id);
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id);
|
||||
MSC_LOG_RX_MESSAGE((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
|
||||
@@ -344,7 +344,7 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ctxt.instance, rab_id, rab_id, len);
|
||||
LOG_D(PDCP,
|
||||
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id, key);
|
||||
//if (!UE_NAS_USE_TUN) {
|
||||
|
||||
@@ -535,7 +535,7 @@ int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Proto
|
||||
// if (xid == 1)
|
||||
// pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
|
||||
// else if (xid == 0) // FIXME: USE a preprocessed definition
|
||||
LOG_D(PROTO_AGENT, "[inst %d] Received PDCP PDU with size %d for UE RNTI %x RB %ld, Calling pdcp_data_ind\n", ctxt_pP.instance, pdcp_pdu_size,ctxt_pP.rnti,rb_idP);
|
||||
LOG_D(PROTO_AGENT, "[inst %ld] Received PDCP PDU with size %d for UE RNTI %x RB %ld, Calling pdcp_data_ind\n", ctxt_pP.instance, pdcp_pdu_size,ctxt_pP.rnti,rb_idP);
|
||||
result = pdcp_data_ind(&ctxt_pP,
|
||||
srb_flagP,
|
||||
flag_MBMS,
|
||||
|
||||
@@ -432,7 +432,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
||||
size + GTPU_HEADER_OVERHEAD_MAX);
|
||||
AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY");
|
||||
memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf, size);
|
||||
message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_ENB_TUNNEL_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_PDCP_ENB, 0, GTPV1U_ENB_TUNNEL_DATA_REQ);
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer = gtpu_buffer_p;
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).length = size;
|
||||
|
||||
@@ -877,7 +877,7 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
|
||||
if (/*ctxt_pP->enb_flag != 1 ||*/ ctxt_pP->module_id != 0 /*||
|
||||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
|
||||
ctxt_pP->configured != 1 || ctxt_pP->brOption != 0 */) {
|
||||
LOG_E(RLC, "%s: ctxt_pP not handled (%d %d %d %d %d %d)\n", __FUNCTION__,
|
||||
LOG_E(RLC, "%s: ctxt_pP not handled (%d %d %ld %d %d %d)\n", __FUNCTION__,
|
||||
ctxt_pP->enb_flag , ctxt_pP->module_id, ctxt_pP->instance,
|
||||
ctxt_pP->eNB_index, ctxt_pP->configured, ctxt_pP->brOption);
|
||||
exit(1);
|
||||
|
||||
@@ -13,6 +13,3 @@ RLC AM
|
||||
- 36.322 5.1.3.2.3 Actions when a RLC data PDU is placed in the reception
|
||||
buffer
|
||||
[...] and in-sequence byte segments of the AMD PDU with SN = VR(R) [...]
|
||||
|
||||
- use SOstart/SOend in NACK reporting, do not NACK full PDU if
|
||||
parts of it have been received
|
||||
|
||||
@@ -898,6 +898,64 @@ static tx_pdu_size_t compute_new_pdu_size(rlc_entity_am_t *entity, int maxsize)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* return number of missing parts of a sn
|
||||
* if everything is missing (nothing received), return 0
|
||||
*/
|
||||
static int count_nack_missing_parts(rlc_entity_am_t *entity, int sn)
|
||||
{
|
||||
rlc_rx_pdu_segment_t *l = entity->rx_list;
|
||||
int last_byte;
|
||||
int new_last_byte;
|
||||
int count;
|
||||
|
||||
while (l != NULL) {
|
||||
if (l->sn == sn)
|
||||
break;
|
||||
l = l->next;
|
||||
}
|
||||
/* nothing received, everything is missing, return 0 */
|
||||
if (l == NULL)
|
||||
return 0;
|
||||
|
||||
last_byte = -1;
|
||||
count = 0;
|
||||
while (l != NULL && l->sn == sn) {
|
||||
if (l->so > last_byte + 1)
|
||||
/* missing part detected */
|
||||
count++;
|
||||
if (l->is_last)
|
||||
/* end of PDU reached - no more missing part to add */
|
||||
return count;
|
||||
new_last_byte = l->so + l->size - l->data_offset - 1;
|
||||
if (new_last_byte > last_byte)
|
||||
last_byte = new_last_byte;
|
||||
l = l->next;
|
||||
}
|
||||
/* at this point: end of PDU not received, one more missing part */
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/* return size of nack reporting for sn, in bits */
|
||||
static int segment_nack_size(rlc_entity_am_t *entity, int sn)
|
||||
{
|
||||
/* nack + e1 + e2 = 12 bits
|
||||
* SOstart + SOend = 30 bits
|
||||
*/
|
||||
int count;
|
||||
|
||||
count = count_nack_missing_parts(entity, sn);
|
||||
|
||||
/* count_nack_missing_parts returns 0 when everything is missing
|
||||
* in which case we don't have SOstart/SOend, so only 12 bits
|
||||
*/
|
||||
if (count == 0)
|
||||
return 12;
|
||||
|
||||
return count * (12 + 30);
|
||||
}
|
||||
|
||||
static int status_size(rlc_entity_am_t *entity, int maxsize)
|
||||
{
|
||||
/* let's count bits */
|
||||
@@ -912,11 +970,16 @@ static int status_size(rlc_entity_am_t *entity, int maxsize)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* each NACK adds 12 bits */
|
||||
/* add size of NACKs */
|
||||
sn = entity->vr_r;
|
||||
while (bits + 12 <= maxsize && sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
|
||||
if (!(rlc_am_segment_full(entity, sn)))
|
||||
bits += 12;
|
||||
while (sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
|
||||
if (!(rlc_am_segment_full(entity, sn))) {
|
||||
int nack_size = segment_nack_size(entity, sn);
|
||||
/* stop there if not enough room */
|
||||
if (bits + nack_size > maxsize)
|
||||
break;
|
||||
bits += nack_size;
|
||||
}
|
||||
sn = (sn + 1) % 1024;
|
||||
}
|
||||
|
||||
@@ -929,7 +992,8 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
|
||||
int bits = 15; /* minimum size is 15 (header+ack_sn+e1) */
|
||||
int sn;
|
||||
rlc_pdu_encoder_t encoder;
|
||||
int has_nack = 0;
|
||||
rlc_pdu_encoder_t encoder_ack;
|
||||
rlc_pdu_encoder_t previous_e1;
|
||||
int ack;
|
||||
|
||||
rlc_pdu_encoder_init(&encoder, buffer, size);
|
||||
@@ -947,24 +1011,68 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 3); /* CPT */
|
||||
|
||||
/* reserve room for ACK (it will be set after putting the NACKs) */
|
||||
encoder_ack = encoder;
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 10);
|
||||
/* put 0 for e1, will be set to 1 later in the code if needed */
|
||||
previous_e1 = encoder;
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 1);
|
||||
|
||||
/* at this point, ACK is VR(R) */
|
||||
ack = entity->vr_r;
|
||||
|
||||
/* each NACK adds 12 bits */
|
||||
sn = entity->vr_r;
|
||||
while (bits + 12 <= size && sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
|
||||
while (sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
|
||||
if (!(rlc_am_segment_full(entity, sn))) {
|
||||
/* put previous e1 (is 1) */
|
||||
rlc_pdu_encoder_put_bits(&encoder, 1, 1);
|
||||
/* if previous was NACK, put previous e2 (0, we don't do 'so' thing) */
|
||||
if (has_nack)
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 1);
|
||||
/* put NACKed sn */
|
||||
rlc_pdu_encoder_put_bits(&encoder, sn, 10);
|
||||
has_nack = 1;
|
||||
bits += 12;
|
||||
rlc_rx_pdu_segment_t *l;
|
||||
int i;
|
||||
int count = count_nack_missing_parts(entity, sn);
|
||||
int nack_bits = count == 0 ? 12 : count * (12 + 30);
|
||||
int last_byte;
|
||||
int new_last_byte;
|
||||
int so_start;
|
||||
int so_end;
|
||||
/* if not enough room, stop putting NACKs */
|
||||
if (bits + nack_bits > size)
|
||||
break;
|
||||
/* set previous e1 to 1 */
|
||||
rlc_pdu_encoder_put_bits(&previous_e1, 1, 1);
|
||||
|
||||
if (count == 0) {
|
||||
/* simply NACK, no SOstart/SOend */
|
||||
rlc_pdu_encoder_put_bits(&encoder, sn, 10); /* nack */
|
||||
previous_e1 = encoder;
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 2); /* e1, e2 */
|
||||
} else {
|
||||
/* count is not 0, so we have 'count' NACK+e1+e2+SOstart+SOend */
|
||||
l = entity->rx_list;
|
||||
last_byte = -1;
|
||||
while (l->sn != sn) l = l->next;
|
||||
for (i = 0; i < count; i++) {
|
||||
rlc_pdu_encoder_put_bits(&encoder, sn, 10); /* nack */
|
||||
previous_e1 = encoder;
|
||||
/* all NACKs but the last have a following NACK, set e1 for them */
|
||||
rlc_pdu_encoder_put_bits(&encoder, i != count - 1, 1); /* e1 */
|
||||
rlc_pdu_encoder_put_bits(&encoder, 1, 1); /* e2 */
|
||||
/* look for the next segment with missing data before it */
|
||||
while (l != NULL && l->sn == sn && !(l->so > last_byte + 1)) {
|
||||
new_last_byte = l->so + l->size - l->data_offset - 1;
|
||||
if (new_last_byte > last_byte)
|
||||
last_byte = new_last_byte;
|
||||
l = l->next;
|
||||
}
|
||||
so_start = last_byte + 1;
|
||||
if (l == NULL)
|
||||
so_end = 0x7fff;
|
||||
else
|
||||
so_end = l->so - 1;
|
||||
rlc_pdu_encoder_put_bits(&encoder, so_start, 15);
|
||||
rlc_pdu_encoder_put_bits(&encoder, so_end, 15);
|
||||
if (l != NULL)
|
||||
last_byte = l->so + l->size - l->data_offset - 1;
|
||||
}
|
||||
}
|
||||
|
||||
bits += nack_bits;
|
||||
} else {
|
||||
/* this sn is full and we put all NACKs before it, use it for ACK */
|
||||
ack = (sn + 1) % 1024;
|
||||
@@ -972,24 +1080,10 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
|
||||
sn = (sn + 1) % 1024;
|
||||
}
|
||||
|
||||
/* go to highest full sn+1 for ACK, VR(MS) is the limit */
|
||||
while (sn_compare_rx(entity, sn, entity->vr_ms) < 0 &&
|
||||
rlc_am_segment_full(entity, sn)) {
|
||||
ack = (sn + 1) % 1024;
|
||||
sn = (sn + 1) % 1024;
|
||||
}
|
||||
|
||||
/* at this point, if last put was NACK then put 2 bits else put 1 bit */
|
||||
if (has_nack)
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 2);
|
||||
else
|
||||
rlc_pdu_encoder_put_bits(&encoder, 0, 1);
|
||||
|
||||
rlc_pdu_encoder_align(&encoder);
|
||||
|
||||
/* let's put the ACK */
|
||||
buffer[0] |= ack >> 6;
|
||||
buffer[1] |= (ack & 0x3f) << 2;
|
||||
rlc_pdu_encoder_put_bits(&encoder_ack, ack, 10);
|
||||
|
||||
/* reset the trigger */
|
||||
entity->status_triggered = 0;
|
||||
|
||||
@@ -427,7 +427,7 @@ rb_found:
|
||||
"Can't be CU, bad node type %d\n", type);
|
||||
|
||||
if (NODE_IS_DU(type) && is_srb == 1) {
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, F1AP_UL_RRC_MESSAGE);
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, 0, F1AP_UL_RRC_MESSAGE);
|
||||
F1AP_UL_RRC_MESSAGE(msg).rnti = ue->rnti;
|
||||
F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_id;
|
||||
F1AP_UL_RRC_MESSAGE(msg).rrc_container = (unsigned char *)buf;
|
||||
@@ -490,7 +490,7 @@ rb_found:
|
||||
if (!is_enb)
|
||||
return;
|
||||
|
||||
msg = itti_alloc_new_message(TASK_RLC_ENB, RLC_SDU_INDICATION);
|
||||
msg = itti_alloc_new_message(TASK_RLC_ENB, 0, RLC_SDU_INDICATION);
|
||||
RLC_SDU_INDICATION(msg).rnti = ue->rnti;
|
||||
RLC_SDU_INDICATION(msg).is_successful = 1;
|
||||
RLC_SDU_INDICATION(msg).srb_id = rb_id;
|
||||
@@ -543,7 +543,7 @@ rb_found:
|
||||
if (!is_enb)
|
||||
return;
|
||||
|
||||
msg = itti_alloc_new_message(TASK_RLC_ENB, RLC_SDU_INDICATION);
|
||||
msg = itti_alloc_new_message(TASK_RLC_ENB, 0, RLC_SDU_INDICATION);
|
||||
RLC_SDU_INDICATION(msg).rnti = ue->rnti;
|
||||
RLC_SDU_INDICATION(msg).is_successful = 0;
|
||||
RLC_SDU_INDICATION(msg).srb_id = rb_id;
|
||||
@@ -834,7 +834,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
if (0 /*||
|
||||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
|
||||
ctxt_pP->configured != 1 || ctxt_pP->brOption != 0 */) {
|
||||
LOG_E(RLC, "%s: ctxt_pP not handled (%d %d %d %d %d %d)\n", __FUNCTION__,
|
||||
LOG_E(RLC, "%s: ctxt_pP not handled (%d %d %ld %d %d %d)\n", __FUNCTION__,
|
||||
ctxt_pP->enb_flag , ctxt_pP->module_id, ctxt_pP->instance,
|
||||
ctxt_pP->eNB_index, ctxt_pP->configured, ctxt_pP->brOption);
|
||||
exit(1);
|
||||
|
||||
@@ -233,9 +233,10 @@ static void put_bit(rlc_pdu_encoder_t *encoder, int bit)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
encoder->buffer[encoder->byte] <<= 1;
|
||||
if (bit)
|
||||
encoder->buffer[encoder->byte] |= 1;
|
||||
encoder->buffer[encoder->byte] |= 1 << (7 - encoder->bit);
|
||||
else
|
||||
encoder->buffer[encoder->byte] &= ~(1 << (7 - encoder->bit));
|
||||
|
||||
encoder->bit++;
|
||||
if (encoder->bit == 8) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_count=45
|
||||
test_count=49
|
||||
|
||||
for i in `seq $test_count`
|
||||
do
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* rlc am test ack/nack reporting with segmented SDUs
|
||||
* eNB sends SDU in big PDU, not received
|
||||
* eNB retx with smaller PDUs, not received except a few
|
||||
* after some time, RX works again, UE should NACK with SOstart/SOend
|
||||
*
|
||||
* this test was written because in the past we didn't generate NACKs with
|
||||
* SOstart/SOend, potentially leading to infinite retransmissions, even with
|
||||
* good radio conditions (well, there will be max ReTX reached at some point).
|
||||
* The scenario is as follows:
|
||||
* the eNB transmits many many PDUs segments and asks for status
|
||||
* report at some point (but before sending all the segments). The UE then
|
||||
* generates a (wrong) NACK without SOstart/SOend, and then the eNB has to
|
||||
* resend everything from start (all bytes of the PDU have been NACKed because
|
||||
* there is no SOstart/SOend). Then the eNB will again ask for status report
|
||||
* before sending everything and the process repeats all over again.
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
UE_RECV_FAILS, 1,
|
||||
ENB_RECV_FAILS, 1,
|
||||
ENB_SDU, 0, 300,
|
||||
ENB_PDU_SIZE, 500,
|
||||
UE_PDU_SIZE, 1000,
|
||||
TIME, 2,
|
||||
ENB_PDU_SIZE, 7,
|
||||
TIME, 50,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, 51,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 60,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, 61,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 70,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, 71,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 80,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, 81,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 140,
|
||||
UE_RECV_FAILS, 0,
|
||||
ENB_RECV_FAILS, 0,
|
||||
TIME, 150,
|
||||
ENB_PDU_SIZE, 200,
|
||||
TIME, -1
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* am: test function segment_nack_size, case "if (count == 0) return 12;"
|
||||
* The eNB sends 5 PDUs, only first and last received by the UE. Then we
|
||||
* ask for the UE's buffer status to trigger the case.
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
ENB_RECV_FAILS, 1,
|
||||
ENB_PDU_SIZE, 100,
|
||||
UE_PDU_SIZE, 100,
|
||||
TIME, 2,
|
||||
ENB_SDU, 0, 10,
|
||||
TIME, 3,
|
||||
UE_RECV_FAILS, 1,
|
||||
ENB_SDU, 1, 10,
|
||||
TIME, 4,
|
||||
ENB_SDU, 2, 10,
|
||||
TIME, 5,
|
||||
ENB_SDU, 3, 10,
|
||||
TIME, 6,
|
||||
UE_RECV_FAILS, 0,
|
||||
ENB_RECV_FAILS, 0,
|
||||
ENB_SDU, 4, 10,
|
||||
TIME, 42,
|
||||
UE_BUFFER_STATUS,
|
||||
TIME, -1
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* am: test case "if (bits + nack_size > maxsize)" in functions status_size
|
||||
* and generate_status.
|
||||
* The eNB sends 5 PDUs, only first and last received by the UE. Then we
|
||||
* ask for the UE's buffer status to trigger the case. UE PDU size is
|
||||
* limited to 6 to trigger the case.
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
ENB_RECV_FAILS, 1,
|
||||
ENB_PDU_SIZE, 100,
|
||||
UE_PDU_SIZE, 6,
|
||||
TIME, 2,
|
||||
ENB_SDU, 0, 10,
|
||||
TIME, 3,
|
||||
UE_RECV_FAILS, 1,
|
||||
ENB_SDU, 1, 10,
|
||||
TIME, 4,
|
||||
ENB_SDU, 2, 10,
|
||||
TIME, 5,
|
||||
ENB_SDU, 3, 10,
|
||||
TIME, 6,
|
||||
UE_RECV_FAILS, 0,
|
||||
ENB_RECV_FAILS, 0,
|
||||
ENB_SDU, 4, 10,
|
||||
TIME, 42,
|
||||
UE_BUFFER_STATUS,
|
||||
TIME, -1
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* rlc am test ack/nack reporting with segmented SDUs
|
||||
*
|
||||
* 5 SDUs put into 6 PDUs, all PDUs received expect the 3rd. Then
|
||||
* retransmission happens with smaller PDU size.
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
ENB_SDU, 0, 60,
|
||||
ENB_SDU, 1, 160,
|
||||
ENB_SDU, 2, 130,
|
||||
ENB_SDU, 3, 120,
|
||||
ENB_SDU, 4, 100,
|
||||
ENB_PDU_SIZE, 100,
|
||||
UE_PDU_SIZE, 1000,
|
||||
TIME, 3,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 4,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, 7,
|
||||
ENB_PDU_SIZE, 40,
|
||||
TIME, 42,
|
||||
UE_RECV_FAILS, 1,
|
||||
TIME, 80,
|
||||
UE_RECV_FAILS, 0,
|
||||
TIME, -1
|
||||
Binary file not shown.
@@ -5,9 +5,6 @@
|
||||
* [1..600] is received but ACK/NACK not
|
||||
* eNB retx with still smaller PDUs [1..400] [401..600] [601..900]
|
||||
* all is received, ACKs/NACKs go through
|
||||
*
|
||||
* this test will fail if NACK mechanism uses SOstart/SOend
|
||||
* (not implemented for the moment)
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
|
||||
Binary file not shown.
@@ -6,9 +6,6 @@
|
||||
* eNB retx with still smaller PDUs [1..400] [401..600] [601..900]
|
||||
* [401..600] received, ACK goes through
|
||||
* link clean, all goes through
|
||||
*
|
||||
* this test will fail if NACK mechanism uses SOstart/SOend
|
||||
* (not implemented for the moment)
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
|
||||
Binary file not shown.
@@ -11,9 +11,6 @@
|
||||
* In the current RLC implementation, this is impossible. If we send [12..21]
|
||||
* it means [1..21] has been split and so we won't sent it later on.
|
||||
* Maybe with HARQ retransmissions in PHY/MAC in bad radio conditions?
|
||||
*
|
||||
* this test will fail if NACK mechanism uses SOstart/SOend
|
||||
* (not implemented for the moment)
|
||||
*/
|
||||
TIME, 1,
|
||||
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
|
||||
|
||||
Binary file not shown.
+21
-21
@@ -105,7 +105,7 @@ void m2ap_MCE_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(M2AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
LOG_W(M2AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
@@ -233,7 +233,7 @@ int m2ap_MCE_init_sctp (m2ap_MCE_instance_t *instance_p,
|
||||
sctp_init_t *sctp_init = NULL;
|
||||
DevAssert(instance_p != NULL);
|
||||
DevAssert(local_ip_addr != NULL);
|
||||
message = itti_alloc_new_message (TASK_M2AP_MCE, SCTP_INIT_MSG_MULTI_REQ);
|
||||
message = itti_alloc_new_message (TASK_M2AP_MCE, 0, SCTP_INIT_MSG_MULTI_REQ);
|
||||
sctp_init = &message->ittiMsg.sctp_init_multi;
|
||||
sctp_init->port = mce_port_for_M2C;
|
||||
sctp_init->ppid = M2AP_SCTP_PPID;
|
||||
@@ -267,7 +267,7 @@ static void m2ap_MCE_register_MCE(m2ap_MCE_instance_t *instance_p,
|
||||
m2ap_MCE_data_t *m2ap_mce_data = NULL;
|
||||
DevAssert(instance_p != NULL);
|
||||
DevAssert(target_MCE_ip_address != NULL);
|
||||
message = itti_alloc_new_message(TASK_M2AP_MCE, SCTP_NEW_ASSOCIATION_REQ_MULTI);
|
||||
message = itti_alloc_new_message(TASK_M2AP_MCE, 0, SCTP_NEW_ASSOCIATION_REQ_MULTI);
|
||||
sctp_new_association_req = &message->ittiMsg.sctp_new_association_req_multi;
|
||||
sctp_new_association_req->port = mce_port_for_M2C;
|
||||
sctp_new_association_req->ppid = M2AP_SCTP_PPID;
|
||||
@@ -312,7 +312,7 @@ void m2ap_MCE_handle_register_MCE(instance_t instance,
|
||||
DevCheck(new_instance->tac == m2ap_register_MCE->tac, new_instance->tac, m2ap_register_MCE->tac, 0);
|
||||
DevCheck(new_instance->mcc == m2ap_register_MCE->mcc, new_instance->mcc, m2ap_register_MCE->mcc, 0);
|
||||
DevCheck(new_instance->mnc == m2ap_register_MCE->mnc, new_instance->mnc, m2ap_register_MCE->mnc, 0);
|
||||
M2AP_WARN("MCE[%d] already registered\n", instance);
|
||||
M2AP_WARN("MCE[%ld] already registered\n", instance);
|
||||
} else {
|
||||
new_instance = calloc(1, sizeof(m2ap_MCE_instance_t));
|
||||
DevAssert(new_instance != NULL);
|
||||
@@ -356,7 +356,7 @@ void m2ap_MCE_handle_register_MCE(instance_t instance,
|
||||
new_instance->mce_port_for_M2C = m2ap_register_MCE->mce_port_for_M2C;
|
||||
/* Add the new instance to the list of MCE (meaningfull in virtual mode) */
|
||||
m2ap_MCE_insert_new_instance(new_instance);
|
||||
M2AP_INFO("Registered new MCE[%d] and %s MCE id %u\n",
|
||||
M2AP_INFO("Registered new MCE[%ld] and %s MCE id %u\n",
|
||||
instance,
|
||||
m2ap_register_MCE->cell_type == CELL_MACRO_ENB ? "macro" : "home",
|
||||
m2ap_register_MCE->MCE_id);
|
||||
@@ -367,7 +367,7 @@ void m2ap_MCE_handle_register_MCE(instance_t instance,
|
||||
return;
|
||||
}
|
||||
|
||||
M2AP_INFO("MCE[%d] MCE id %u acting as a listner (server)\n",
|
||||
M2AP_INFO("MCE[%ld] MCE id %u acting as a listner (server)\n",
|
||||
instance, m2ap_register_MCE->MCE_id);
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ void m2ap_MCE_handle_sctp_init_msg_multi_cnf(
|
||||
/* Trying to connect to the provided list of MCE ip address */
|
||||
|
||||
for (index = 0; index < instance->nb_m2; index++) {
|
||||
M2AP_INFO("MCE[%d] MCE id %u acting as an initiator (client)\n",
|
||||
M2AP_INFO("MCE[%ld] MCE id %u acting as an initiator (client)\n",
|
||||
instance_id, instance->MCE_id);
|
||||
m2ap_MCE_register_MCE(instance,
|
||||
&instance->target_mce_m2_ip_address[index],
|
||||
@@ -507,7 +507,7 @@ void MCE_task_send_sctp_init_req(instance_t enb_id, m2ap_mce_sctp_req_t * m2ap_m
|
||||
LOG_I(M2AP, "M2AP_SCTP_REQ(create socket)\n");
|
||||
MessageDef *message_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, SCTP_INIT_MSG);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, 0, SCTP_INIT_MSG);
|
||||
|
||||
// if( m2ap_mce_sctp_req == NULL ){
|
||||
// message_p->ittiMsg.sctp_init.port = M2AP_PORT_NUMBER;
|
||||
@@ -558,7 +558,7 @@ void *m2ap_MCE_task(void *arg) {
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
case MESSAGE_TEST:
|
||||
LOG_W(M2AP,"MCE Received MESSAGE_TEST Message\n");
|
||||
//MessageDef * message_p = itti_alloc_new_message(TASK_M2AP_MCE, MESSAGE_TEST);
|
||||
//MessageDef * message_p = itti_alloc_new_message(TASK_M2AP_MCE, 0, MESSAGE_TEST);
|
||||
//itti_send_msg_to_task(TASK_M3AP, 1/*ctxt_pP->module_id*/, message_p);
|
||||
break;
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -567,29 +567,29 @@ void *m2ap_MCE_task(void *arg) {
|
||||
break;
|
||||
|
||||
case M2AP_MCE_SCTP_REQ:
|
||||
MCE_task_send_sctp_init_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
MCE_task_send_sctp_init_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MCE_SCTP_REQ(received_msg));
|
||||
break;
|
||||
|
||||
case M2AP_SUBFRAME_PROCESS:
|
||||
m2ap_check_timers(ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
m2ap_check_timers(ITTI_MSG_DESTINATION_INSTANCE(received_msg));
|
||||
break;
|
||||
|
||||
case M2AP_REGISTER_MCE_REQ:
|
||||
LOG_I(M2AP,"MCE Received M2AP_REGISTER_MCE_REQ Message\n");
|
||||
m2ap_MCE_handle_register_MCE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_MCE_handle_register_MCE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_REGISTER_MCE_REQ(received_msg));
|
||||
break;
|
||||
|
||||
case M2AP_SETUP_RESP:
|
||||
LOG_I(M2AP,"MCE Received M2AP_SETUP_RESP Message\n");
|
||||
MCE_send_M2_SETUP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
MCE_send_M2_SETUP_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_SETUP_RESP(received_msg));
|
||||
break;
|
||||
|
||||
case M2AP_SETUP_FAILURE:
|
||||
LOG_I(M2AP,"MCE Received M2AP_SETUP_FAILURE Message\n");
|
||||
MCE_send_M2_SETUP_FAILURE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
MCE_send_M2_SETUP_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_SETUP_FAILURE(received_msg));
|
||||
break;
|
||||
|
||||
@@ -644,41 +644,41 @@ void *m2ap_MCE_task(void *arg) {
|
||||
|
||||
|
||||
// case M2AP_HANDOVER_REQ:
|
||||
// m2ap_MCE_handle_handover_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// m2ap_MCE_handle_handover_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
// &M2AP_HANDOVER_REQ(received_msg));
|
||||
// break;
|
||||
//
|
||||
// case M2AP_HANDOVER_REQ_ACK:
|
||||
// m2ap_MCE_handle_handover_req_ack(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// m2ap_MCE_handle_handover_req_ack(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
// &M2AP_HANDOVER_REQ_ACK(received_msg));
|
||||
// break;
|
||||
//
|
||||
// case M2AP_UE_CONTEXT_RELEASE:
|
||||
// m2ap_MCE_ue_context_release(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// m2ap_MCE_ue_context_release(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
// &M2AP_UE_CONTEXT_RELEASE(received_msg));
|
||||
// break;
|
||||
//
|
||||
case SCTP_INIT_MSG_MULTI_CNF:
|
||||
LOG_D(M2AP,"MCE Received SCTP_INIT_MSG_MULTI_CNF Message\n");
|
||||
m2ap_MCE_handle_sctp_init_msg_multi_cnf(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_MCE_handle_sctp_init_msg_multi_cnf(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_init_msg_multi_cnf);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_D(M2AP,"MCE Received SCTP_NEW_ASSOCIATION_RESP Message\n");
|
||||
m2ap_MCE_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_MCE_handle_sctp_association_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_D(M2AP,"MCE Received SCTP_NEW_ASSOCIATION Message\n");
|
||||
m2ap_MCE_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_MCE_handle_sctp_association_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_D(M2AP,"MCE Received SCTP_DATA_IND Message\n");
|
||||
m2ap_MCE_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_MCE_handle_sctp_data_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ int m2ap_MCE_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
}
|
||||
|
||||
/* Calling the right handler */
|
||||
LOG_I(M2AP, "Calling handler with instance %d\n",instance);
|
||||
LOG_I(M2AP, "Calling handler with instance %ld\n",instance);
|
||||
ret = (*m2ap_MCE_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1])
|
||||
(instance, assoc_id, stream, &pdu);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_M2AP_M2AP_PDU, &pdu);
|
||||
|
||||
@@ -179,7 +179,7 @@ int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
|
||||
int ENB_MBMS_M2AP_ID=-1;
|
||||
|
||||
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE,M2AP_MBMS_SESSION_START_RESP); //TODO
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE, 0,M2AP_MBMS_SESSION_START_RESP); //TODO
|
||||
|
||||
LOG_D(M2AP, "M2AP: SessionStart-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -317,7 +317,7 @@ int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
|
||||
int ENB_MBMS_M2AP_ID=-1;
|
||||
|
||||
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE,M2AP_MBMS_SESSION_STOP_RESP); //TODO
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE, 0,M2AP_MBMS_SESSION_STOP_RESP); //TODO
|
||||
|
||||
LOG_D(M2AP, "M2AP: SessionStop-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -616,7 +616,7 @@ int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
|
||||
//int ENB_MBMS_M2AP_ID=-1;
|
||||
|
||||
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE,M2AP_MBMS_SCHEDULING_INFORMATION_RESP); //TODO
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE, 0,M2AP_MBMS_SCHEDULING_INFORMATION_RESP); //TODO
|
||||
|
||||
// LOG_D(M2AP, "M2AP: SessionStop-Resp: protocolIEs.list.count %d\n",
|
||||
// in->protocolIEs.list.count);
|
||||
@@ -720,7 +720,7 @@ int MCE_handle_M2_SETUP_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_MCE_APP, M2AP_SETUP_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_MCE_APP, 0, M2AP_SETUP_REQ);
|
||||
|
||||
/* assoc_id */
|
||||
M2AP_SETUP_REQ(message_p).assoc_id = assoc_id;
|
||||
@@ -1193,7 +1193,7 @@ int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
//M2AP_MCEConfigurationUpdateFailure_Ies_t *ie;
|
||||
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_MCE, M2AP_MCE_CONFIGURATION_UPDATE_FAILURE);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_MCE, 0, M2AP_MCE_CONFIGURATION_UPDATE_FAILURE);
|
||||
|
||||
LOG_D(M2AP, "M2AP: MCEConfigurationUpdate-Failure: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -1258,7 +1258,7 @@ int MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, M2AP_MCE_CONFIGURATION_UPDATE_ACK);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, 0, M2AP_MCE_CONFIGURATION_UPDATE_ACK);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -1295,7 +1295,7 @@ int MCE_handle_ENB_CONFIGURATION_UPDATE(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, M2AP_MCE_CONFIGURATION_UPDATE_ACK);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_MCE, 0, M2AP_MCE_CONFIGURATION_UPDATE_ACK);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -1399,7 +1399,7 @@ int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
|
||||
//int ENB_MBMS_M2AP_ID=-1;
|
||||
|
||||
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE,M2AP_MBMS_SERVICE_COUNTING_RESP); //TODO
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE, 0,M2AP_MBMS_SERVICE_COUNTING_RESP); //TODO
|
||||
|
||||
LOG_D(M2AP, "M2AP: MbmsServiceCounting-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
|
||||
+28
-28
@@ -136,7 +136,7 @@ void m2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
//dump_trees_m2();
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
M2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
M2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
@@ -233,7 +233,7 @@ int m2ap_eNB_init_sctp (m2ap_eNB_instance_t *instance_p,
|
||||
sctp_init_t *sctp_init = NULL;
|
||||
DevAssert(instance_p != NULL);
|
||||
DevAssert(local_ip_addr != NULL);
|
||||
message = itti_alloc_new_message (TASK_M2AP_ENB, SCTP_INIT_MSG_MULTI_REQ);
|
||||
message = itti_alloc_new_message (TASK_M2AP_ENB, 0, SCTP_INIT_MSG_MULTI_REQ);
|
||||
sctp_init = &message->ittiMsg.sctp_init_multi;
|
||||
sctp_init->port = enb_port_for_M2C;
|
||||
sctp_init->ppid = M2AP_SCTP_PPID;
|
||||
@@ -267,7 +267,7 @@ static void m2ap_eNB_register_eNB(m2ap_eNB_instance_t *instance_p,
|
||||
m2ap_eNB_data_t *m2ap_enb_data = NULL;
|
||||
DevAssert(instance_p != NULL);
|
||||
DevAssert(target_eNB_ip_address != NULL);
|
||||
message = itti_alloc_new_message(TASK_M2AP_ENB, SCTP_NEW_ASSOCIATION_REQ_MULTI);
|
||||
message = itti_alloc_new_message(TASK_M2AP_ENB, 0, SCTP_NEW_ASSOCIATION_REQ_MULTI);
|
||||
sctp_new_association_req = &message->ittiMsg.sctp_new_association_req_multi;
|
||||
sctp_new_association_req->port = enb_port_for_M2C;
|
||||
sctp_new_association_req->ppid = M2AP_SCTP_PPID;
|
||||
@@ -319,7 +319,7 @@ void m2ap_eNB_handle_register_eNB(instance_t instance,
|
||||
DevCheck(new_instance->tac == m2ap_register_eNB->tac, new_instance->tac, m2ap_register_eNB->tac, 0);
|
||||
DevCheck(new_instance->mcc == m2ap_register_eNB->mcc, new_instance->mcc, m2ap_register_eNB->mcc, 0);
|
||||
DevCheck(new_instance->mnc == m2ap_register_eNB->mnc, new_instance->mnc, m2ap_register_eNB->mnc, 0);
|
||||
M2AP_WARN("eNB[%d] already registered\n", instance);
|
||||
M2AP_WARN("eNB[%ld] already registered\n", instance);
|
||||
|
||||
|
||||
} else {
|
||||
@@ -376,7 +376,7 @@ void m2ap_eNB_handle_register_eNB(instance_t instance,
|
||||
|
||||
/* Add the new instance to the list of eNB (meaningfull in virtual mode) */
|
||||
m2ap_eNB_insert_new_instance(new_instance);
|
||||
M2AP_INFO("Registered new eNB[%d] and %s eNB id %u\n",
|
||||
M2AP_INFO("Registered new eNB[%ld] and %s eNB id %u\n",
|
||||
instance,
|
||||
m2ap_register_eNB->cell_type == CELL_MACRO_ENB ? "macro" : "home",
|
||||
m2ap_register_eNB->eNB_id);
|
||||
@@ -387,7 +387,7 @@ void m2ap_eNB_handle_register_eNB(instance_t instance,
|
||||
return;
|
||||
}
|
||||
|
||||
M2AP_INFO("eNB[%d] eNB id %u acting as a listner (server)\n",
|
||||
M2AP_INFO("eNB[%ld] eNB id %u acting as a listner (server)\n",
|
||||
instance, m2ap_register_eNB->eNB_id);
|
||||
}
|
||||
}
|
||||
@@ -414,7 +414,7 @@ void m2ap_eNB_handle_sctp_init_msg_multi_cnf(
|
||||
/* Trying to connect to the provided list of eNB ip address */
|
||||
|
||||
for (index = 0; index < instance->nb_m2; index++) {
|
||||
M2AP_INFO("eNB[%d] eNB id %u acting as an initiator (client)\n",
|
||||
M2AP_INFO("eNB[%ld] eNB id %u acting as an initiator (client)\n",
|
||||
instance_id, instance->eNB_id);
|
||||
m2ap_eNB_register_eNB(instance,
|
||||
&instance->target_mce_m2_ip_address[index],
|
||||
@@ -527,7 +527,7 @@ void m2ap_eNB_handle_sctp_init_msg_multi_cnf(
|
||||
// LOG_I(M2AP, "M2AP_SCTP_REQ(create socket)\n");
|
||||
// MessageDef *message_p = NULL;
|
||||
//
|
||||
// message_p = itti_alloc_new_message (M2AP, SCTP_INIT_MSG);
|
||||
// message_p = itti_alloc_new_message (M2AP, 0, SCTP_INIT_MSG);
|
||||
// message_p->ittiMsg.sctp_init.port = M2AP_PORT_NUMBER;
|
||||
// message_p->ittiMsg.sctp_init.ppid = M2AP_SCTP_PPID;
|
||||
// message_p->ittiMsg.sctp_init.ipv4 = 1;
|
||||
@@ -561,7 +561,7 @@ void *m2ap_eNB_task(void *arg) {
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
case MESSAGE_TEST:
|
||||
LOG_D(M2AP,"eNB Received MESSAGE_TEST Message %s\n",itti_get_task_name(ITTI_MSG_ORIGIN_ID(received_msg)));
|
||||
//MessageDef * message_p = itti_alloc_new_message(TASK_M2AP_ENB, MESSAGE_TEST);
|
||||
//MessageDef * message_p = itti_alloc_new_message(TASK_M2AP_ENB, 0, MESSAGE_TEST);
|
||||
//itti_send_msg_to_task(TASK_M3AP, 1/*ctxt_pP->module_id*/, message_p);
|
||||
break;
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -570,104 +570,104 @@ void *m2ap_eNB_task(void *arg) {
|
||||
break;
|
||||
|
||||
case M2AP_SUBFRAME_PROCESS:
|
||||
m2ap_check_timers(ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
m2ap_check_timers(ITTI_MSG_DESTINATION_INSTANCE(received_msg));
|
||||
break;
|
||||
|
||||
case M2AP_REGISTER_ENB_REQ:
|
||||
LOG_I(M2AP,"eNB Received M2AP_REGISTER_ENB_REQ Message\n");
|
||||
m2ap_eNB_handle_register_eNB(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_eNB_handle_register_eNB(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_REGISTER_ENB_REQ(received_msg));
|
||||
break;
|
||||
|
||||
|
||||
case M2AP_MBMS_SCHEDULING_INFORMATION_RESP:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SCHEDULING_INFORMATION_RESP Message\n");
|
||||
eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SCHEDULING_INFORMATION_RESP(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_START_RESP:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SESSION_START_RESP Message\n");
|
||||
eNB_send_MBMS_SESSION_START_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SESSION_START_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SESSION_START_RESP(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_START_FAILURE:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SESSION_START_FAILURE Message\n");
|
||||
eNB_send_MBMS_SESSION_START_FAILURE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SESSION_START_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SESSION_START_FAILURE(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_STOP_RESP:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SESSION_STOP_RESP Message\n");
|
||||
eNB_send_MBMS_SESSION_STOP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SESSION_STOP_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SESSION_STOP_RESP(received_msg));
|
||||
break;
|
||||
case M2AP_ENB_CONFIGURATION_UPDATE:
|
||||
LOG_I(M2AP,"eNB M2AP_ENB_CONFIGURATION_UPDATE Message\n");
|
||||
eNB_send_eNB_CONFIGURATION_UPDATE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_eNB_CONFIGURATION_UPDATE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_ENB_CONFIGURATION_UPDATE(received_msg));
|
||||
break;
|
||||
case M2AP_MCE_CONFIGURATION_UPDATE_ACK:
|
||||
LOG_I(M2AP,"eNB M2AP_MCE_CONFIGURATION_UPDATE_ACK Message\n");
|
||||
//eNB_send_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
//eNB_send_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
// &M2AP_MCE_CONFIGURATION_UPDATE_ACK(received_msg));
|
||||
break;
|
||||
case M2AP_MCE_CONFIGURATION_UPDATE_FAILURE:
|
||||
LOG_I(M2AP,"eNB M2AP_MCE_CONFIGURATION_UPDATE_FAILURE Message\n");
|
||||
//(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
//(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
//&M2AP_MCE_CONFIGURATION_UPDATE_FAILURE(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_UPDATE_RESP:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SESSION_UPDATE_RESP Message\n");
|
||||
eNB_send_MBMS_SESSION_UPDATE_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SESSION_UPDATE_RESPONSE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SESSION_UPDATE_RESP(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SESSION_UPDATE_FAILURE:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SESSION_UPDATE_FAILURE Message\n");
|
||||
eNB_send_MBMS_SESSION_UPDATE_FAILURE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SESSION_UPDATE_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SESSION_UPDATE_FAILURE(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SERVICE_COUNTING_REPORT:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SERVICE_COUNTING_REPORT Message\n");
|
||||
eNB_send_MBMS_SERVICE_COUNTING_REPORT(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SERVICE_COUNTING_REPORT(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SERVICE_COUNTING_REPORT(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_OVERLOAD_NOTIFICATION:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_OVERLOAD_NOTIFICATION Message\n");
|
||||
eNB_send_MBMS_OVERLOAD_NOTIFICATION(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_OVERLOAD_NOTIFICATION(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_OVERLOAD_NOTIFICATION(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SERVICE_COUNTING_RESP:
|
||||
LOG_I(M2AP,"eNB M2AP_MBMS_SERVICE_COUNTING_RESP Message\n");
|
||||
eNB_send_MBMS_SERVICE_COUNTING_RESP(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SERVICE_COUNTING_RESP(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SERVICE_COUNTING_RESP(received_msg));
|
||||
break;
|
||||
case M2AP_MBMS_SERVICE_COUNTING_FAILURE:
|
||||
LOG_I(M2AP,"eNB Message\n");
|
||||
eNB_send_MBMS_SERVICE_COUNTING_FAILURE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
eNB_send_MBMS_SERVICE_COUNTING_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&M2AP_MBMS_SERVICE_COUNTING_FAILURE(received_msg));
|
||||
break;
|
||||
|
||||
|
||||
case SCTP_INIT_MSG_MULTI_CNF:
|
||||
LOG_I(M2AP,"eNB Received SCTP_INIT_MSG_MULTI_CNF Message\n");
|
||||
m2ap_eNB_handle_sctp_init_msg_multi_cnf(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_eNB_handle_sctp_init_msg_multi_cnf(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_init_msg_multi_cnf);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_I(M2AP,"eNB Received SCTP_NEW_ASSOCIATION_RESP Message\n");
|
||||
m2ap_eNB_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_eNB_handle_sctp_association_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_I(M2AP,"eNB Received SCTP_NEW_ASSOCIATION Message\n");
|
||||
m2ap_eNB_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_eNB_handle_sctp_association_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_I(M2AP,"eNB Received SCTP_DATA_IND Message\n");
|
||||
m2ap_eNB_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
m2ap_eNB_handle_sctp_data_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ int m2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
}
|
||||
|
||||
/* Calling the right handler */
|
||||
LOG_I(M2AP, "Calling handler with instance %d\n",instance);
|
||||
LOG_I(M2AP, "Calling handler with instance %ld\n",instance);
|
||||
ret = (*m2ap_eNB_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1])
|
||||
(instance, assoc_id, stream, &pdu);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_M2AP_M2AP_PDU, &pdu);
|
||||
|
||||
@@ -85,8 +85,8 @@ int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
//message_p2 = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
//message_p2 = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ int eNB_handle_MBMS_SESSION_START_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SESSION_START_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SESSION_START_REQ);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -463,7 +463,7 @@ int eNB_handle_MBMS_SESSION_STOP_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SESSION_STOP_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SESSION_STOP_REQ);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -749,8 +749,8 @@ int eNB_handle_M2_SETUP_RESPONSE(instance_t instance,
|
||||
//M2AP_Cells_to_be_Activated_List_Item_t *cell;
|
||||
int i,j;
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_SETUP_RESP);
|
||||
//MessageDef *msg_p2 = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_SETUP_RESP);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_SETUP_RESP);
|
||||
//MessageDef *msg_p2 = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_SETUP_RESP);
|
||||
|
||||
LOG_D(M2AP, "M2AP: M2Setup-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -856,7 +856,7 @@ int eNB_handle_M2_SETUP_FAILURE(instance_t instance,
|
||||
M2AP_M2SetupFailure_Ies_t *ie;
|
||||
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_SETUP_FAILURE);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_SETUP_FAILURE);
|
||||
|
||||
LOG_D(M2AP, "M2AP: M2Setup-Failure: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -1062,7 +1062,7 @@ int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
//M2AP_ENBConfigurationUpdateFailure_Ies_t *ie;
|
||||
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_ENB_CONFIGURATION_UPDATE_FAILURE);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_ENB_CONFIGURATION_UPDATE_FAILURE);
|
||||
|
||||
LOG_D(M2AP, "M2AP: ENBConfigurationUpdate-Failure: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
@@ -1127,7 +1127,7 @@ int eNB_handle_eNB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_ENB_CONFIGURATION_UPDATE_ACK);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_ENB_CONFIGURATION_UPDATE_ACK);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -1162,7 +1162,7 @@ int eNB_handle_MCE_CONFIGURATION_UPDATE(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MCE_CONFIGURATION_UPDATE);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MCE_CONFIGURATION_UPDATE);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -1233,7 +1233,7 @@ int eNB_handle_MBMS_SESSION_UPDATE_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SESSION_UPDATE_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SESSION_UPDATE_REQ);
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -1321,7 +1321,7 @@ int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance,
|
||||
|
||||
|
||||
|
||||
//message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SERVICE_COUNTING_REQ);
|
||||
//message_p = itti_alloc_new_message (TASK_M2AP_ENB, 0, M2AP_MBMS_SERVICE_COUNTING_REQ);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -116,7 +116,7 @@ void dump_trees_m2(void)
|
||||
m2ap_eNB_instance_t *zz;
|
||||
STAILQ_FOREACH(zz, &m2ap_eNB_internal_data.m2ap_eNB_instances_head,
|
||||
m2ap_eNB_entries) {
|
||||
printf("here comes the tree (instance %d):\n---------------------------------------------\n", zz->instance);
|
||||
printf("here comes the tree (instance %ld):\n---------------------------------------------\n", zz->instance);
|
||||
dump_tree_m2(zz->m2ap_enb_head.rbh_root);
|
||||
printf("---------------------------------------------\n");
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void m2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_ENB, SCTP_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_ENB, 0, SCTP_DATA_REQ);
|
||||
|
||||
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
|
||||
|
||||
@@ -56,7 +56,7 @@ void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t asso
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_ENB, SCTP_CLOSE_ASSOCIATION);
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_ENB, 0, SCTP_CLOSE_ASSOCIATION);
|
||||
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
|
||||
sctp_close_association_p->assoc_id = assoc_id;
|
||||
|
||||
@@ -70,7 +70,7 @@ void m2ap_MCE_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_MCE, SCTP_DATA_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_MCE, 0, SCTP_DATA_REQ);
|
||||
|
||||
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
|
||||
|
||||
@@ -88,7 +88,7 @@ void m2ap_MCE_itti_send_sctp_close_association(instance_t instance, int32_t asso
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_MCE, SCTP_CLOSE_ASSOCIATION);
|
||||
message_p = itti_alloc_new_message(TASK_M2AP_MCE, 0, SCTP_CLOSE_ASSOCIATION);
|
||||
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
|
||||
sctp_close_association_p->assoc_id = assoc_id;
|
||||
|
||||
|
||||
+28
-28
@@ -78,7 +78,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
|
||||
{
|
||||
// M3AP registration
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_REGISTER_MCE_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_REGISTER_MCE_REQ);
|
||||
//RCconfig_S1(msg_p, mce_id);
|
||||
|
||||
//if (mce_id == 0)
|
||||
@@ -92,7 +92,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
|
||||
//if (NODE_IS_DU(node_type)) { // F1AP registration
|
||||
// // configure F1AP here for F1C
|
||||
// LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SETUP_REQ);
|
||||
// RCconfig_DU_F1(msg_p, enb_id);
|
||||
|
||||
// LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
@@ -101,7 +101,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
|
||||
//}
|
||||
//else { // S1AP registration
|
||||
// /* note: there is an implicit relationship between the data structure and the message name */
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
|
||||
// RCconfig_S1(msg_p, enb_id);
|
||||
|
||||
// if (enb_id == 0) RCconfig_gtpu();
|
||||
@@ -128,7 +128,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
|
||||
//
|
||||
// for (mce_id = mce_id_start; (mce_id < mce_id_end) ; mce_id++) {
|
||||
// {
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, X2AP_REGISTER_ENB_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, X2AP_REGISTER_ENB_REQ);
|
||||
// RCconfig_X2(msg_p, mce_id);
|
||||
// itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p);
|
||||
// register_mce_x2_pending++;
|
||||
@@ -148,7 +148,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
|
||||
// for (mce_id = mce_id_start; (mce_id < mce_id_end) ; mce_id++) {
|
||||
// {
|
||||
// // LOG_W(MCE_APP,"Register commes inside ...\n");
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_REGISTER_MCE_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_REGISTER_MCE_REQ);
|
||||
// //RCconfig_M2_MCE(msg_p, mce_id);
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p);
|
||||
// // LOG_W(MCE_APP,"Register sent ...\n");
|
||||
@@ -169,7 +169,7 @@ static uint32_t MCE_app_register_m3(uint32_t mce_id_start, uint32_t mce_id_end)
|
||||
for (mce_id = mce_id_start; (mce_id < mce_id_end) ; mce_id++) {
|
||||
{
|
||||
// LOG_W(MCE_APP,"Register commes inside ...\n");
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_REGISTER_MCE_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_REGISTER_MCE_REQ);
|
||||
RCconfig_M3(msg_p, mce_id);
|
||||
itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p);
|
||||
LOG_D(MCE_APP,"Register sent ...\n");
|
||||
@@ -184,7 +184,7 @@ static uint32_t MCE_app_register_m3(uint32_t mce_id_start, uint32_t mce_id_end)
|
||||
//static uint32_t MCE_app_handle_m3ap_mbms_session_start_req(instance_t instance){
|
||||
// //uint32_t mce_id=0;
|
||||
// // MessageDef *msg_p;
|
||||
// // msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_MBMS_SESSION_START_RESP);
|
||||
// // msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_MBMS_SESSION_START_RESP);
|
||||
// // itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
//
|
||||
@@ -194,7 +194,7 @@ static uint32_t MCE_app_register_m3(uint32_t mce_id_start, uint32_t mce_id_end)
|
||||
static uint32_t MCE_app_handle_m3ap_mbms_session_stop_req(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_MBMS_SESSION_STOP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_MBMS_SESSION_STOP_RESP);
|
||||
itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
|
||||
return 0;
|
||||
@@ -203,7 +203,7 @@ static uint32_t MCE_app_handle_m3ap_mbms_session_stop_req(instance_t instance){
|
||||
static uint32_t MCE_app_handle_m3ap_mbms_session_update_req(instance_t instance){
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_MBMS_SESSION_UPDATE_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_MBMS_SESSION_UPDATE_RESP);
|
||||
itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
|
||||
return 0;
|
||||
@@ -216,7 +216,7 @@ static uint32_t MCE_app_handle_m2ap_setup_req(instance_t instance){
|
||||
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_SETUP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_SETUP_RESP);
|
||||
if(m2ap_setup_resp_local)
|
||||
memcpy(&M2AP_SETUP_RESP(msg_p),m2ap_setup_resp_local,sizeof(m2ap_setup_resp_t));
|
||||
else
|
||||
@@ -230,7 +230,7 @@ static uint32_t MCE_app_handle_m2ap_setup_req(instance_t instance){
|
||||
|
||||
static uint32_t MCE_app_handle_m2ap_mbms_session_start_resp(instance_t instance){
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M3AP_MBMS_SESSION_START_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M3AP_MBMS_SESSION_START_RESP);
|
||||
itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ static uint32_t MCE_app_send_m2ap_mbms_scheduling_information(instance_t instanc
|
||||
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_MBMS_SCHEDULING_INFORMATION);
|
||||
if(m2ap_mbms_scheduling_information_local)
|
||||
memcpy(&M2AP_MBMS_SCHEDULING_INFORMATION(msg_p),m2ap_mbms_scheduling_information_local,sizeof(m2ap_mbms_scheduling_information_t));
|
||||
else
|
||||
@@ -257,7 +257,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
|
||||
//uint32_t mce_id=0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_MBMS_SESSION_START_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_MBMS_SESSION_START_REQ);
|
||||
itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
|
||||
return 0;
|
||||
@@ -266,7 +266,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_MBMS_SESSION_STOP_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_MBMS_SESSION_STOP_REQ);
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -275,7 +275,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_MCE_CONFIGURATION_UPDATE);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_MCE_CONFIGURATION_UPDATE);
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -284,7 +284,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_ENB_CONFIGURATION_UPDATE_ACK);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_ENB_CONFIGURATION_UPDATE_ACK);
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -293,7 +293,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, M2AP_ENB_CONFIGURATION_UPDATE_FAILURE);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, M2AP_ENB_CONFIGURATION_UPDATE_FAILURE);
|
||||
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -303,7 +303,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, MESSAGE_TEST);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, MESSAGE_TEST);
|
||||
// itti_send_msg_to_task (TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -313,7 +313,7 @@ static uint32_t MCE_app_send_m2ap_session_start_req(instance_t instance){
|
||||
//
|
||||
// //uint32_t mce_id=0;
|
||||
// MessageDef *msg_p;
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, MESSAGE_TEST);
|
||||
// msg_p = itti_alloc_new_message (TASK_MCE_APP, 0, MESSAGE_TEST);
|
||||
// itti_send_msg_to_task (TASK_M3AP_MCE, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
//
|
||||
// return 0;
|
||||
@@ -379,7 +379,7 @@ void *MCE_app_task(void *args_p) {
|
||||
do {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_MCE_APP, &msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
instance = ITTI_MSG_DESTINATION_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -397,7 +397,7 @@ void *MCE_app_task(void *args_p) {
|
||||
|
||||
case M3AP_REGISTER_MCE_CNF:
|
||||
//AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||
LOG_I(MCE_APP, "[MCE %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_I(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M3AP_REGISTER_MCE_CNF(msg_p).nb_mme);
|
||||
DevAssert(register_mce_pending > 0);
|
||||
register_mce_pending--;
|
||||
@@ -412,7 +412,7 @@ void *MCE_app_task(void *args_p) {
|
||||
if (registered_mce == mce_nb) {
|
||||
/* If all MCE are registered, start L2L1 task */
|
||||
// MessageDef *msg_init_p;
|
||||
// msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
// msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
// itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(MCE_APP, " %d MCE not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
@@ -434,7 +434,7 @@ void *MCE_app_task(void *args_p) {
|
||||
|
||||
case M3AP_MBMS_SESSION_START_REQ:
|
||||
LOG_I(MCE_APP, "Received M3AP_MBMS_SESSION_START_REQ message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
//MCE_app_handle_m3ap_mbms_session_start_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
//MCE_app_handle_m3ap_mbms_session_start_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
if(m2ap_setup_req_local)
|
||||
if (timer_setup (2, 0, TASK_MCE_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &mce_scheduling_info_timer_id) < 0) {
|
||||
@@ -445,12 +445,12 @@ void *MCE_app_task(void *args_p) {
|
||||
|
||||
case M3AP_MBMS_SESSION_STOP_REQ:
|
||||
LOG_I(MCE_APP, "Received M3AP_MBMS_SESSION_STOP_REQ message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
MCE_app_handle_m3ap_mbms_session_stop_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
MCE_app_handle_m3ap_mbms_session_stop_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
|
||||
case M3AP_MBMS_SESSION_UPDATE_REQ:
|
||||
LOG_I(MCE_APP, "Received M3AP_MBMS_SESSION_UPDATE_REQ message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
MCE_app_handle_m3ap_mbms_session_update_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
MCE_app_handle_m3ap_mbms_session_update_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
break;
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ void *MCE_app_task(void *args_p) {
|
||||
// /* If all MCE cells are registered, start L2L1 task */
|
||||
// MessageDef *msg_init_p;
|
||||
|
||||
// //msg_init_p = itti_alloc_new_message (TASK_MCE_APP, INITIALIZE_MESSAGE);
|
||||
// //msg_init_p = itti_alloc_new_message (TASK_MCE_APP, 0, INITIALIZE_MESSAGE);
|
||||
// //itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
// } else {
|
||||
@@ -503,7 +503,7 @@ void *MCE_app_task(void *args_p) {
|
||||
|
||||
case M3AP_DEREGISTERED_MCE_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(MCE_APP, "[MCE %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
LOG_W(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
@@ -621,7 +621,7 @@ void *MCE_app_task(void *args_p) {
|
||||
m2ap_setup_req_local = (m2ap_setup_req_t*)calloc(1,sizeof(m2ap_setup_req_t));
|
||||
if(m2ap_setup_req_local)
|
||||
memcpy(m2ap_setup_req_local,&M2AP_SETUP_REQ(msg_p),sizeof(m2ap_setup_req_t));
|
||||
MCE_app_handle_m2ap_setup_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
|
||||
MCE_app_handle_m2ap_setup_req(ITTI_MSG_DESTINATION_INSTANCE(msg_p));
|
||||
//MCE_app_send_m2ap_mbms_scheduling_information(0);
|
||||
//if (timer_setup (2, 0, TASK_MCE_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
// NULL, &mce_scheduling_info_timer_id) < 0) {
|
||||
|
||||
@@ -108,7 +108,7 @@ int RCconfig_MCE(void ) {
|
||||
|
||||
if (address) {
|
||||
MessageDef *message;
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_MCE_APP, M2AP_MCE_SCTP_REQ))!=NULL,"");
|
||||
AssertFatal((message = itti_alloc_new_message(TASK_MCE_APP, 0, M2AP_MCE_SCTP_REQ))!=NULL,"");
|
||||
//IPV4_STR_ADDR_TO_INT_NWBO ( address, M2AP_MCE_SCTP_REQ(message).mce_m2_ip_address, "BAD IP ADDRESS FORMAT FOR MCE M2_C !\n" );
|
||||
M2AP_MCE_SCTP_REQ (message).mce_m2_ip_address.ipv6 = 0;
|
||||
M2AP_MCE_SCTP_REQ (message).mce_m2_ip_address.ipv4 = 1;
|
||||
|
||||
@@ -60,9 +60,9 @@ int handle_bcch_bch(module_id_t module_id, int cc_id, unsigned int gNB_index, ui
|
||||
|
||||
// L2 Abstraction Layer
|
||||
int handle_bcch_dlsch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint32_t sibs_mask, uint8_t *pduP, uint32_t pdu_len){
|
||||
|
||||
return 0;
|
||||
return nr_ue_decode_sib1(module_id, cc_id, gNB_index, sibs_mask, pduP, pdu_len);
|
||||
}
|
||||
|
||||
// L2 Abstraction Layer
|
||||
int handle_dci(module_id_t module_id, int cc_id, unsigned int gNB_index, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci){
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ rrc_data_req(
|
||||
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
||||
sdu_sizeP);
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, RRC_DCCH_DATA_REQ);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, 0, RRC_DCCH_DATA_REQ);
|
||||
RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame;
|
||||
RRC_DCCH_DATA_REQ (message_p).enb_flag = ctxt_pP->enb_flag;
|
||||
RRC_DCCH_DATA_REQ (message_p).rb_id = rb_idP;
|
||||
@@ -139,7 +139,7 @@ rrc_data_ind(
|
||||
uint8_t *message_buffer;
|
||||
message_buffer = itti_malloc (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, sdu_sizeP);
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, RRC_DCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, 0, RRC_DCCH_DATA_IND);
|
||||
RRC_DCCH_DATA_IND (message_p).frame = ctxt_pP->frame;
|
||||
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
||||
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
||||
|
||||
@@ -94,7 +94,7 @@ mac_rrc_data_req_ue(
|
||||
ccch_size = sdu_size;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, RRC_MAC_CCCH_DATA_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_MAC_CCCH_DATA_REQ);
|
||||
RRC_MAC_CCCH_DATA_REQ (message_p).frame = frameP;
|
||||
RRC_MAC_CCCH_DATA_REQ (message_p).sdu_size = ccch_size;
|
||||
memset (RRC_MAC_CCCH_DATA_REQ (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
@@ -155,7 +155,7 @@ mac_rrc_data_ind_ue(
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_BCCH_MBMS_DATA_IND);
|
||||
memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame = frameP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
|
||||
@@ -181,7 +181,7 @@ mac_rrc_data_ind_ue(
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_BCCH_DATA_IND);
|
||||
memset (RRC_MAC_BCCH_DATA_IND (message_p).sdu, 0, BCCH_SDU_SIZE);
|
||||
RRC_MAC_BCCH_DATA_IND (message_p).frame = frameP;
|
||||
RRC_MAC_BCCH_DATA_IND (message_p).sub_frame = sub_frameP;
|
||||
@@ -213,7 +213,7 @@ mac_rrc_data_ind_ue(
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_CCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_CCCH_DATA_IND);
|
||||
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
|
||||
memcpy (RRC_MAC_CCCH_DATA_IND (message_p).sdu, sduP, sdu_size);
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).frame = frameP;
|
||||
@@ -239,7 +239,7 @@ mac_rrc_data_ind_ue(
|
||||
sdu_size = msg_sdu_size;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_MCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_MCCH_DATA_IND);
|
||||
RRC_MAC_MCCH_DATA_IND (message_p).frame = frameP;
|
||||
RRC_MAC_MCCH_DATA_IND (message_p).sub_frame = sub_frameP;
|
||||
RRC_MAC_MCCH_DATA_IND (message_p).sdu_size = sdu_lenP;
|
||||
@@ -293,7 +293,7 @@ rrc_data_req_ue(
|
||||
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
||||
sdu_sizeP);
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, RRC_DCCH_DATA_REQ);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, 0, RRC_DCCH_DATA_REQ);
|
||||
RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame;
|
||||
RRC_DCCH_DATA_REQ (message_p).enb_flag = ctxt_pP->enb_flag;
|
||||
RRC_DCCH_DATA_REQ (message_p).rb_id = rb_idP;
|
||||
@@ -332,7 +332,7 @@ rrc_data_ind_ue(
|
||||
uint8_t *message_buffer;
|
||||
message_buffer = itti_malloc (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, sdu_sizeP);
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, RRC_DCCH_DATA_IND);
|
||||
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, 0, RRC_DCCH_DATA_IND);
|
||||
RRC_DCCH_DATA_IND (message_p).frame = ctxt_pP->frame;
|
||||
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
||||
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
||||
@@ -350,7 +350,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) {
|
||||
{
|
||||
MessageDef *message_p;
|
||||
//LOG_I(RRC,"sending a message to task_mac_ue\n");
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_IN_SYNC_IND);
|
||||
RRC_MAC_IN_SYNC_IND (message_p).frame = frameP;
|
||||
RRC_MAC_IN_SYNC_IND (message_p).enb_index = eNB_index;
|
||||
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
|
||||
@@ -370,7 +370,7 @@ void rrc_out_of_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index
|
||||
|
||||
{
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_OUT_OF_SYNC_IND);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_OUT_OF_SYNC_IND);
|
||||
RRC_MAC_OUT_OF_SYNC_IND (message_p).frame = frameP;
|
||||
RRC_MAC_OUT_OF_SYNC_IND (message_p).enb_index = eNB_index;
|
||||
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
|
||||
@@ -396,7 +396,7 @@ int mac_ue_ccch_success_ind(module_id_t Mod_idP, uint8_t eNB_index) {
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
{
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_CCCH_DATA_CNF);
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 0, RRC_MAC_CCCH_DATA_CNF);
|
||||
RRC_MAC_CCCH_DATA_CNF (message_p).enb_index = eNB_index;
|
||||
itti_send_msg_to_task (TASK_RRC_UE, UE_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
|
||||
}
|
||||
|
||||
+17
-17
@@ -1796,7 +1796,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
|
||||
for (list_count = 0; list_count < rrcConnectionReconfiguration_r8->dedicatedInfoNASList->list.count; list_count++) {
|
||||
pdu_length = rrcConnectionReconfiguration_r8->dedicatedInfoNASList->list.array[list_count]->size;
|
||||
pdu_buffer = rrcConnectionReconfiguration_r8->dedicatedInfoNASList->list.array[list_count]->buf;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CONN_ESTABLI_CNF);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CONN_ESTABLI_CNF);
|
||||
NAS_CONN_ESTABLI_CNF(msg_p).errCode = AS_SUCCESS;
|
||||
NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.length = pdu_length;
|
||||
NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.data = pdu_buffer;
|
||||
@@ -1811,7 +1811,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
|
||||
MessageDef *message_ral_p = NULL;
|
||||
rrc_ral_connection_reestablishment_ind_t connection_reestablishment_ind;
|
||||
int i;
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, RRC_RAL_CONNECTION_REESTABLISHMENT_IND);
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_CONNECTION_REESTABLISHMENT_IND);
|
||||
memset(&connection_reestablishment_ind, 0, sizeof(rrc_ral_connection_reestablishment_ind_t));
|
||||
// TO DO ral_si_ind.plmn_id = 0;
|
||||
connection_reestablishment_ind.ue_id = ctxt_pP->rnti;
|
||||
@@ -2007,7 +2007,7 @@ rrc_ue_decode_dcch(
|
||||
MessageDef *msg_p;
|
||||
pdu_length = dedicatedInfoType->choice.dedicatedInfoNAS.size;
|
||||
pdu_buffer = dedicatedInfoType->choice.dedicatedInfoNAS.buf;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_DOWNLINK_DATA_IND);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_DOWNLINK_DATA_IND);
|
||||
NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ?
|
||||
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = pdu_length;
|
||||
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = pdu_buffer;
|
||||
@@ -2073,7 +2073,7 @@ rrc_ue_decode_dcch(
|
||||
MessageDef *message_ral_p = NULL;
|
||||
rrc_ral_connection_reconfiguration_ho_ind_t connection_reconfiguration_ho_ind;
|
||||
int i;
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND);
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND);
|
||||
memset(&connection_reconfiguration_ho_ind, 0, sizeof(rrc_ral_connection_reconfiguration_ho_ind_t));
|
||||
connection_reconfiguration_ho_ind.ue_id = ctxt_pP->module_id;
|
||||
|
||||
@@ -2127,7 +2127,7 @@ rrc_ue_decode_dcch(
|
||||
MessageDef *message_ral_p = NULL;
|
||||
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
|
||||
int i;
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, RRC_RAL_CONNECTION_RECONFIGURATION_IND);
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_CONNECTION_RECONFIGURATION_IND);
|
||||
memset(&connection_reconfiguration_ind, 0, sizeof(rrc_ral_connection_reconfiguration_ind_t));
|
||||
connection_reconfiguration_ind.ue_id = ctxt_pP->module_id;
|
||||
|
||||
@@ -2189,7 +2189,7 @@ rrc_ue_decode_dcch(
|
||||
break;
|
||||
|
||||
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CONN_RELEASE_IND);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CONN_RELEASE_IND);
|
||||
|
||||
if ((dl_dcch_msg->message.choice.c1.choice.rrcConnectionRelease.criticalExtensions.present
|
||||
== LTE_RRCConnectionRelease__criticalExtensions_PR_c1)
|
||||
@@ -2201,7 +2201,7 @@ rrc_ue_decode_dcch(
|
||||
|
||||
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
||||
#if ENABLE_RAL
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_CONNECTION_RELEASE_IND);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, RRC_RAL_CONNECTION_RELEASE_IND);
|
||||
RRC_RAL_CONNECTION_RELEASE_IND(msg_p).ue_id = ctxt_pP->module_id;
|
||||
itti_send_msg_to_task(TASK_RAL_UE, ctxt_pP->instance, msg_p);
|
||||
#endif
|
||||
@@ -2837,7 +2837,7 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
)
|
||||
) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CELL_SELECTION_CNF);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
|
||||
@@ -2853,7 +2853,7 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
|
||||
if (cell_valid == 0) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_NEXT_CELL_REQ);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_NEXT_CELL_REQ);
|
||||
itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
@@ -3036,7 +3036,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
) {
|
||||
/* PLMN match, send a confirmation to NAS */
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CELL_SELECTION_CNF);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
|
||||
@@ -3054,7 +3054,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
if (cell_valid == 0) {
|
||||
/* Cell can not be used, ask PHY to try the next one */
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_NEXT_CELL_REQ);
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_NEXT_CELL_REQ);
|
||||
itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
|
||||
LOG_E(RRC,
|
||||
"Synched with a cell, but PLMN doesn't match our SIM "
|
||||
@@ -3672,7 +3672,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
|
||||
{
|
||||
MessageDef *message_ral_p = NULL;
|
||||
rrc_ral_system_information_ind_t ral_si_ind;
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, RRC_RAL_SYSTEM_INFORMATION_IND);
|
||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_SYSTEM_INFORMATION_IND);
|
||||
memset(&ral_si_ind, 0, sizeof(rrc_ral_system_information_ind_t));
|
||||
ral_si_ind.plmn_id.MCCdigit2 = '0';
|
||||
ral_si_ind.plmn_id.MCCdigit1 = '2';
|
||||
@@ -4456,7 +4456,7 @@ void *rrc_ue_task( void *args_p ) {
|
||||
while(1) {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_RRC_UE, &msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
instance = ITTI_MSG_DESTINATION_INSTANCE (msg_p);
|
||||
ue_mod_id = UE_INSTANCE_TO_MODULE_ID(instance);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
@@ -4645,7 +4645,7 @@ void *rrc_ue_task( void *args_p ) {
|
||||
case RRC_STATE_IDLE: {
|
||||
/* Ask to layer 1 to find a cell matching the criterion */
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_CELL_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_CELL_REQ);
|
||||
PHY_FIND_CELL_REQ (message_p).earfcn_start = 1;
|
||||
PHY_FIND_CELL_REQ (message_p).earfcn_end = 1;
|
||||
itti_send_msg_to_task(TASK_PHY_UE, UE_MODULE_ID_TO_INSTANCE(ue_mod_id), message_p);
|
||||
@@ -4748,7 +4748,7 @@ void *rrc_ue_task( void *args_p ) {
|
||||
if (rrc_get_sub_state(ue_mod_id) != RRC_SUB_STATE_IDLE_SEARCHING) {
|
||||
/* Ask to layer 1 to find a cell matching the criterion */
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_CELL_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_CELL_REQ);
|
||||
rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_SEARCHING);
|
||||
PHY_FIND_CELL_REQ (message_p).transaction_id = RRC_RAL_SCAN_REQ (msg_p).transaction_id;
|
||||
PHY_FIND_CELL_REQ (message_p).earfcn_start = 1;
|
||||
@@ -4780,7 +4780,7 @@ void *rrc_ue_task( void *args_p ) {
|
||||
case RRC_SUB_STATE_IDLE_SEARCHING: {
|
||||
MessageDef *message_p;
|
||||
int i;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_SCAN_CONF);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, 0, RRC_RAL_SCAN_CONF);
|
||||
RRC_RAL_SCAN_CONF (message_p).transaction_id = PHY_FIND_CELL_IND(msg_p).transaction_id;
|
||||
RRC_RAL_SCAN_CONF (message_p).num_scan_resp = PHY_FIND_CELL_IND(msg_p).cell_nb;
|
||||
|
||||
@@ -4823,7 +4823,7 @@ void *rrc_ue_task( void *args_p ) {
|
||||
case PHY_MEAS_REPORT_IND: {
|
||||
LOG_D(RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_MEASUREMENT_REPORT_IND);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, 0, RRC_RAL_MEASUREMENT_REPORT_IND);
|
||||
memcpy(&RRC_RAL_MEASUREMENT_REPORT_IND (message_p).threshold,
|
||||
&PHY_MEAS_REPORT_IND(msg_p).threshold,
|
||||
sizeof(RRC_RAL_MEASUREMENT_REPORT_IND (message_p).threshold));
|
||||
|
||||
@@ -126,7 +126,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -147,7 +147,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -166,7 +166,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_PHY_UE, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_LTE_AVAILABLE_BW:
|
||||
@@ -176,7 +176,7 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
|
||||
message_p = itti_alloc_new_message (TASK_RRC_UE, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_MAC_UE, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_LTE_MOBILE_NODE_CAPABILITIES:
|
||||
|
||||
@@ -554,7 +554,7 @@ typedef struct eNB_RRC_UE_s {
|
||||
LTE_DRB_ToAddModList_t *DRB_configList;
|
||||
LTE_DRB_ToAddModList_t *DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
LTE_DRB_ToReleaseList_t *DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
uint8_t DRB_active[8];
|
||||
uint8_t DRB_active[NB_RB_MAX -2];
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
struct LTE_SPS_Config *sps_Config;
|
||||
LTE_MeasObjectToAddMod_t *MeasObj[MAX_MEAS_OBJ];
|
||||
|
||||
+43
-55
@@ -332,7 +332,7 @@ init_SI(
|
||||
if (carrier->MBMS_flag > 0) {
|
||||
for (i = 0; i < carrier->sib2->mbsfn_SubframeConfigList->list.count; i++) {
|
||||
// SIB 2
|
||||
// LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
|
||||
// LOG_D(RRC, "[eNB %ld] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
|
||||
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
i,
|
||||
@@ -1132,7 +1132,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
|
||||
rrc_rlc_remove_ue(&ctxt);
|
||||
pdcp_remove_UE(&ctxt);
|
||||
} else {
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = rnti;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
@@ -2173,7 +2173,7 @@ void rrc_generate_SgNBReleaseRequest(
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_ENDC_SGNB_RELEASE_REQ);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RELEASE_REQ);
|
||||
memset(&(X2AP_ENDC_SGNB_RELEASE_REQ(msg)), 0, sizeof(x2ap_ENDC_sgnb_release_req_t));
|
||||
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).MeNB_ue_x2_id = ;
|
||||
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).SgNB_ue_x2_id = ;
|
||||
@@ -2268,7 +2268,7 @@ rrc_eNB_generate_RRCConnectionRelease(
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
|
||||
if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
@@ -3110,7 +3110,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
|
||||
} else {
|
||||
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_MAC_DRX_CONFIG_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_MAC_DRX_CONFIG_REQ);
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti;
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
||||
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
|
||||
@@ -3883,7 +3883,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
|
||||
} else {
|
||||
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_MAC_DRX_CONFIG_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_MAC_DRX_CONFIG_REQ);
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti;
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
||||
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
|
||||
@@ -4670,7 +4670,7 @@ rrc_eNB_process_MeasurementReport(
|
||||
if(encode_CG_ConfigInfo(enc_buf,sizeof(enc_buf),ue_context_pP,&enc_size) == RRC_OK)
|
||||
LOG_I(RRC,"CG-ConfigInfo encoded successfully\n");
|
||||
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_ENDC_SGNB_ADDITION_REQ);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_ADDITION_REQ);
|
||||
memset(&(X2AP_ENDC_SGNB_ADDITION_REQ(msg)), 0, sizeof(x2ap_ENDC_sgnb_addition_req_t));
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).rnti = ctxt_pP->rnti;
|
||||
memcpy(X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer,enc_buf,enc_size);
|
||||
@@ -4766,7 +4766,7 @@ rrc_eNB_process_MeasurementReport(
|
||||
ue_context_pP->ue_context.Status = RRC_HO_EXECUTION;
|
||||
ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
|
||||
/* HO Preparation message */
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_HANDOVER_REQ);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ);
|
||||
rrc_eNB_generate_HandoverPreparationInformation(
|
||||
ue_context_pP,
|
||||
X2AP_HANDOVER_REQ(msg).rrc_buffer,
|
||||
@@ -5015,11 +5015,11 @@ void rrc_eNB_handover_ue_context_release(
|
||||
//MessageDef *msg_release_p = NULL;
|
||||
MessageDef *msg_delete_tunnels_p = NULL;
|
||||
uint32_t eNB_ue_s1ap_id = ue_context_p->ue_context.eNB_ue_s1ap_id;
|
||||
//msg_release_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE);
|
||||
//msg_release_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE);
|
||||
//itti_send_msg_to_task(TASK_S1AP, ctxt_pP->module_id, msg_release_p);
|
||||
s1ap_ue_context_release(ctxt_pP->instance, ue_context_p->ue_context.eNB_ue_s1ap_id);
|
||||
//MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL,0, "0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ", eNB_ue_s1ap_id);
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, 0, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).from_gnb = 0;
|
||||
@@ -5096,7 +5096,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
|
||||
ue_context_pP->ue_context.Status = RRC_HO_EXECUTION;
|
||||
ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
|
||||
/* HO Preparation message */
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_HANDOVER_REQ);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ);
|
||||
rrc_eNB_generate_HandoverPreparationInformation(
|
||||
ue_context_pP,
|
||||
X2AP_HANDOVER_REQ(msg).rrc_buffer,
|
||||
@@ -5183,7 +5183,7 @@ check_handovers(
|
||||
MessageDef *msg;
|
||||
// Configure target
|
||||
ue_context_p->ue_context.handover_info->state = HO_FORWARDING;
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_HANDOVER_REQ_ACK);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ_ACK);
|
||||
rrc_eNB_generate_HO_RRCConnectionReconfiguration(ctxt_pP, ue_context_p, X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer,
|
||||
&X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer_size);
|
||||
rrc_eNB_configure_rbs_handover(ue_context_p,ctxt_pP);
|
||||
@@ -5227,11 +5227,11 @@ check_handovers(
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).frame,
|
||||
0,
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).eNB_index);
|
||||
LOG_D(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
LOG_D(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %ld, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
ITTI_MSG_NAME (msg_p),
|
||||
ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
ITTI_MSG_INSTANCE (msg_p),
|
||||
ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
|
||||
@@ -5295,11 +5295,11 @@ check_handovers(
|
||||
GTPV1U_ENB_END_MARKER_IND (msg_p).frame,
|
||||
0,
|
||||
GTPV1U_ENB_END_MARKER_IND (msg_p).eNB_index);
|
||||
LOG_I(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
LOG_I(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %ld, rb_id %ld, muiP %d, confirmP %d, mode %d\n",
|
||||
PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
ITTI_MSG_NAME (msg_p),
|
||||
ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
ITTI_MSG_INSTANCE (msg_p),
|
||||
ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
|
||||
@@ -6711,22 +6711,10 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
);
|
||||
}
|
||||
} else { // remove LCHAN from MAC/PHY
|
||||
if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) {
|
||||
// DRB has just been removed so remove RLC + PDCP for DRB
|
||||
/* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE,
|
||||
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
|
||||
*/
|
||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
rrc_rlc_config_req(ctxt_pP,
|
||||
SRB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
CONFIG_ACTION_REMOVE,
|
||||
DRB2LCHAN[i],
|
||||
Rlc_info_um);
|
||||
}
|
||||
if (DRB_configList->list.array[i]->logicalChannelIdentity) {
|
||||
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
|
||||
}
|
||||
|
||||
ue_context_pP->ue_context.DRB_active[drb_id] = 0;
|
||||
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||
|
||||
@@ -6860,7 +6848,7 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
case ngran_gNB_CU :
|
||||
// create an ITTI message
|
||||
/* TODO: F1 IDs ar missing in RRC */
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_DL_RRC_MESSAGE);
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_DL_RRC_MESSAGE);
|
||||
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = (uint8_t *)ue_p->Srb0.Tx_buffer.Payload;
|
||||
F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
|
||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
||||
@@ -6972,7 +6960,7 @@ void rrc_eNB_process_reconfiguration_complete_endc(const protocol_ctxt_t *const
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, X2AP_ENDC_SGNB_RECONF_COMPLETE);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RECONF_COMPLETE);
|
||||
|
||||
/* MeNB_ue_x2_id is unknown, set to 0.
|
||||
* This is not correct but X2 id in the eNB is only 12 bits,
|
||||
@@ -7085,7 +7073,7 @@ char openair_rrc_eNB_configuration(
|
||||
LOG_W(RRC, "[inst %d] RRC->MCC/MSG->MCC %d/%d \n", ctxt.module_id, RC.rrc[ctxt.module_id]->mcc, rrc_configuration_req->mcc);
|
||||
*/
|
||||
if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type))
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SCTP_REQ);
|
||||
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SCTP_REQ);
|
||||
// RCconfig_CU_F1(msg_p, enb_id);
|
||||
setup_ngran_CU(RC.rrc[ctxt.module_id]);
|
||||
|
||||
@@ -7466,7 +7454,7 @@ rrc_eNB_decode_ccch(
|
||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
|
||||
} else {
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
@@ -7570,7 +7558,7 @@ rrc_eNB_decode_ccch(
|
||||
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type))
|
||||
rrc_mac_remove_ue(ctxt_pP->module_id,ctxt_pP->rnti);
|
||||
else if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||
@@ -7954,7 +7942,7 @@ rrc_eNB_decode_dcch(
|
||||
xid = ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier;
|
||||
ue_context_p->ue_context.e_rab_release_command_flag = 0;
|
||||
//gtp tunnel delete
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, 0, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).from_gnb = 0;
|
||||
@@ -8636,7 +8624,7 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
|
||||
// prepare F1_SETUP_RESPONSE
|
||||
|
||||
if (msg_p == NULL) {
|
||||
msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_CU_F1, 0,F1AP_SETUP_RESP);
|
||||
}
|
||||
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name = rrc->node_name;
|
||||
@@ -8672,7 +8660,7 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
|
||||
|
||||
if (found_cell==0) {
|
||||
AssertFatal(1==0,"No cell found\n");
|
||||
/*msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_FAILURE);
|
||||
/*msg_p = itti_alloc_new_message (TASK_CU_F1, 0,F1AP_SETUP_FAILURE);
|
||||
F1AP_SETUP_RESP (msg_p).cause = rrc->node_name;
|
||||
F1AP_SETUP_RESP (msg_p).time_to_wait = rrc->node_id;
|
||||
F1AP_SETUP_RESP (msg_p).criticality_diagnostics = rrc->node_name;*/
|
||||
@@ -8861,7 +8849,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
|
||||
if (RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2) {
|
||||
/* send a tick to x2ap */
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_SUBFRAME_PROCESS);
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_SUBFRAME_PROCESS);
|
||||
itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, msg);
|
||||
check_handovers(ctxt_pP); // counter, get the value and aggregate
|
||||
}
|
||||
@@ -9053,7 +9041,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
if (ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA ||
|
||||
ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA_RECONFIGURED) {
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, X2AP_ENDC_SGNB_RELEASE_REQUEST);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RELEASE_REQUEST);
|
||||
X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).rnti = ue_to_be_removed[cur_ue]->ue_context.gnb_rnti;
|
||||
X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).assoc_id = ue_to_be_removed[cur_ue]->ue_context.gnb_x2_assoc_id;
|
||||
X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).cause = X2AP_CAUSE_RADIO_CONNECTION_WITH_UE_LOST;
|
||||
@@ -9300,7 +9288,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
// Wait for a message
|
||||
itti_receive_msg(TASK_RRC_ENB, &msg_p);
|
||||
msg_name_p = ITTI_MSG_NAME(msg_p);
|
||||
instance = ITTI_MSG_INSTANCE(msg_p);
|
||||
instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p);
|
||||
|
||||
/* RRC_SUBFRAME_PROCESS is sent every subframe, do not log it */
|
||||
if (ITTI_MSG_ID(msg_p) != RRC_SUBFRAME_PROCESS)
|
||||
@@ -9313,7 +9301,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(RRC, "[eNB %d] Received %s\n", instance, msg_name_p);
|
||||
LOG_I(RRC, "[eNB %ld] Received %s\n", instance, msg_name_p);
|
||||
break;
|
||||
|
||||
/* Messages from MAC */
|
||||
@@ -9324,7 +9312,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).rnti,
|
||||
msg_p->ittiMsgHeader.lte_time.frame,
|
||||
msg_p->ittiMsgHeader.lte_time.slot);
|
||||
LOG_I(RRC,"Decoding CCCH : inst %d, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d\n",
|
||||
LOG_I(RRC,"Decoding CCCH : inst %ld, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d\n",
|
||||
instance,
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).CC_id,
|
||||
&ctxt,
|
||||
@@ -9382,13 +9370,13 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
break;
|
||||
|
||||
case S1AP_PAGING_IND:
|
||||
LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
|
||||
LOG_D(RRC, "[eNB %ld] Received Paging message from S1AP: %s\n", instance, msg_name_p);
|
||||
rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case S1AP_E_RAB_SETUP_REQ:
|
||||
rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
|
||||
LOG_D(RRC, "[eNB %ld] Received the message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
|
||||
case S1AP_E_RAB_MODIFY_REQ:
|
||||
@@ -9422,7 +9410,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
}
|
||||
|
||||
case S1AP_PATH_SWITCH_REQ_ACK:
|
||||
LOG_I(RRC, "[eNB %d] received path switch ack %s\n", instance, msg_name_p);
|
||||
LOG_I(RRC, "[eNB %ld] received path switch ack %s\n", instance, msg_name_p);
|
||||
rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
@@ -9435,7 +9423,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
break;
|
||||
|
||||
case X2AP_HANDOVER_REQ:
|
||||
LOG_I(RRC, "[eNB %d] target eNB Receives X2 HO Req %s\n", instance, msg_name_p);
|
||||
LOG_I(RRC, "[eNB %ld] target eNB Receives X2 HO Req %s\n", instance, msg_name_p);
|
||||
rrc_eNB_process_handoverPreparationInformation(instance, &X2AP_HANDOVER_REQ(msg_p));
|
||||
break;
|
||||
|
||||
@@ -9453,7 +9441,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
LOG_I(RRC, "[eNB %d] source eNB receives the X2 HO ACK %s\n", instance, msg_name_p);
|
||||
LOG_I(RRC, "[eNB %ld] source eNB receives the X2 HO ACK %s\n", instance, msg_name_p);
|
||||
DevAssert(ue_context_p != NULL);
|
||||
|
||||
if (ue_context_p->ue_context.handover_info->state != HO_REQUEST) abort();
|
||||
@@ -9504,7 +9492,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
case X2AP_UE_CONTEXT_RELEASE: {
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_UE_CONTEXT_RELEASE(msg_p).rnti);
|
||||
LOG_I(RRC, "[eNB %d] source eNB receives the X2 UE CONTEXT RELEASE %s\n", instance, msg_name_p);
|
||||
LOG_I(RRC, "[eNB %ld] source eNB receives the X2 UE CONTEXT RELEASE %s\n", instance, msg_name_p);
|
||||
DevAssert(ue_context_p != NULL);
|
||||
|
||||
if (ue_context_p->ue_context.handover_info->state != HO_COMPLETE) abort();
|
||||
@@ -9535,7 +9523,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
|
||||
if (ue_context_p != NULL &&
|
||||
ue_context_p->ue_context.handover_info != NULL) {
|
||||
LOG_I(RRC, "[eNB %d] eNB receives X2 HANDOVER CANCEL for rnti %x, cause %s [%s]\n",
|
||||
LOG_I(RRC, "[eNB %ld] eNB receives X2 HANDOVER CANCEL for rnti %x, cause %s [%s]\n",
|
||||
instance,
|
||||
X2AP_HANDOVER_CANCEL(msg_p).rnti,
|
||||
cause,
|
||||
@@ -9560,7 +9548,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
else
|
||||
failure_cause = "UE not in handover";
|
||||
|
||||
LOG_W(RRC, "[eNB %d] cannot process (%s) X2 HANDOVER CANCEL for rnti %x, cause %s, ignoring\n",
|
||||
LOG_W(RRC, "[eNB %ld] cannot process (%s) X2 HANDOVER CANCEL for rnti %x, cause %s, ignoring\n",
|
||||
instance, failure_cause, X2AP_HANDOVER_CANCEL(msg_p).rnti, cause);
|
||||
}
|
||||
|
||||
@@ -9588,7 +9576,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
|
||||
/* Messages from eNB app */
|
||||
case RRC_CONFIGURATION_REQ:
|
||||
LOG_I(RRC, "[eNB %d] Received %s : %p\n", instance, msg_name_p, &RRC_CONFIGURATION_REQ(msg_p));
|
||||
LOG_I(RRC, "[eNB %ld] Received %s : %p\n", instance, msg_name_p, &RRC_CONFIGURATION_REQ(msg_p));
|
||||
openair_rrc_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p));
|
||||
break;
|
||||
|
||||
@@ -9596,7 +9584,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
case F1AP_SETUP_REQ:
|
||||
AssertFatal(NODE_IS_CU(RC.rrc[instance]->node_type),
|
||||
"should not receive F1AP_SETUP_REQUEST, need call by CU!\n");
|
||||
LOG_I(RRC,"[eNB %d] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
|
||||
LOG_I(RRC,"[eNB %ld] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
|
||||
handle_f1_setup_req(&F1AP_SETUP_REQ(msg_p));
|
||||
break;
|
||||
|
||||
@@ -9649,7 +9637,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(RRC, "[eNB %d] Received unexpected message %s\n", instance, msg_name_p);
|
||||
LOG_E(RRC, "[eNB %ld] Received unexpected message %s\n", instance, msg_name_p);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10023,7 +10011,7 @@ rrc_rx_tx(
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_SUBFRAME_PROCESS);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_SUBFRAME_PROCESS);
|
||||
RRC_SUBFRAME_PROCESS(message_p).ctxt = *ctxt_pP;
|
||||
RRC_SUBFRAME_PROCESS(message_p).CC_id = CC_id;
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ctxt_pP->module_id, message_p);
|
||||
|
||||
@@ -126,7 +126,7 @@ gtpv_data_req(
|
||||
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_GTPV1_U, GTPV1U_ENB_DATA_FORWARDING_IND);
|
||||
message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_IND);
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).frame = ctxt_pP->frame;
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).enb_flag = ctxt_pP->enb_flag;
|
||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP;
|
||||
@@ -149,7 +149,7 @@ gtpv_data_req(
|
||||
|
||||
memcpy (message_buffer, buffer_pP, sdu_sizeP);
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_GTPV1_U, GTPV1U_ENB_END_MARKER_IND);
|
||||
message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_IND);
|
||||
GTPV1U_ENB_END_MARKER_IND (message_p).frame = ctxt_pP->frame;
|
||||
GTPV1U_ENB_END_MARKER_IND (message_p).enb_flag = ctxt_pP->enb_flag;
|
||||
GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP;
|
||||
@@ -186,7 +186,7 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(
|
||||
"0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ",
|
||||
ue_context_pP->ue_context.eNB_ue_s1ap_id);
|
||||
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, 0, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg)));
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).rnti = ue_context_pP->ue_context.rnti;
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).from_gnb = 0;
|
||||
|
||||
@@ -1520,7 +1520,7 @@ rrc_eNB_process_M2AP_MBMS_SCHEDULING_INFORMATION(
|
||||
rrc_M2AP_openair_rrc_top_init_MBMS(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag);
|
||||
}*/
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
|
||||
pthread_mutex_unlock(&RC.rrc[ctxt_pP->module_id]->cell_info_mutex);
|
||||
@@ -1560,7 +1560,7 @@ rrc_eNB_process_M2AP_MBMS_SESSION_START_REQ(
|
||||
pthread_mutex_unlock(&RC.rrc[ctxt_pP->module_id]->cell_info_mutex);
|
||||
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SESSION_START_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SESSION_START_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
|
||||
|
||||
return 0;
|
||||
@@ -1628,7 +1628,7 @@ void rrc_eNB_send_M2AP_MBMS_SCHEDULING_INFORMATION_RESP(
|
||||
)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->instance), msg_p);
|
||||
}
|
||||
|
||||
@@ -1638,7 +1638,7 @@ void rrc_eNB_send_M2AP_MBMS_SESSION_START_RESP(
|
||||
)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SESSION_START_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SESSION_START_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->instance), msg_p);
|
||||
}
|
||||
|
||||
@@ -1648,7 +1648,7 @@ void rrc_eNB_send_M2AP_MBMS_SESSION_STOP_RESP(
|
||||
)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SESSION_STOP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SESSION_STOP_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->instance), msg_p);
|
||||
}
|
||||
|
||||
@@ -1658,6 +1658,6 @@ void rrc_eNB_send_M2AP_MBMS_SESSION_UPDATE_RESP(
|
||||
)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, M2AP_MBMS_SESSION_UPDATE_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, M2AP_MBMS_SESSION_UPDATE_RESP);
|
||||
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->instance), msg_p);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ rrc_eNB_S1AP_get_ue_ids(
|
||||
if (s1ap_eNB_instance_p != NULL) {
|
||||
ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p, eNB_ue_s1ap_id); // get s1ap_eNB_ue_context
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB instance %d] Couldn't find the eNB S1AP context\n",
|
||||
LOG_E(S1AP, "[eNB instance %ld] Couldn't find the eNB S1AP context\n",
|
||||
instance);
|
||||
return NULL;
|
||||
}
|
||||
@@ -588,7 +588,7 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
|
||||
int e_rab;
|
||||
int e_rabs_done = 0;
|
||||
int e_rabs_failed = 0;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_INITIAL_CONTEXT_SETUP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_INITIAL_CONTEXT_SETUP_RESP);
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
for (e_rab = 0; e_rab < ue_context_pP->ue_context.nb_of_e_rabs; e_rab++) {
|
||||
@@ -648,7 +648,7 @@ rrc_eNB_send_S1AP_UPLINK_NAS(
|
||||
MessageDef *msg_p;
|
||||
pdu_length = dedicatedInfoType->choice.dedicatedInfoNAS.size;
|
||||
pdu_buffer = dedicatedInfoType->choice.dedicatedInfoNAS.buf;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_UPLINK_NAS);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_UPLINK_NAS);
|
||||
S1AP_UPLINK_NAS (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
S1AP_UPLINK_NAS (msg_p).nas_pdu.length = pdu_length;
|
||||
S1AP_UPLINK_NAS (msg_p).nas_pdu.buffer = pdu_buffer;
|
||||
@@ -700,7 +700,7 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
|
||||
if (ret.encoded == -1) abort();
|
||||
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_UE_CAPABILITIES_IND);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_UE_CAPABILITIES_IND);
|
||||
S1AP_UE_CAPABILITIES_IND (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.length = (ret.encoded+7)/8;
|
||||
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.buffer = buf2;
|
||||
@@ -724,7 +724,7 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
|
||||
MessageDef *message_p = NULL;
|
||||
rrc_ue_s1ap_ids_t *rrc_ue_s1ap_ids_p = NULL;
|
||||
hashtable_rc_t h_rc;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_NAS_FIRST_REQ);
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_NAS_FIRST_REQ);
|
||||
memset(&message_p->ittiMsg.s1ap_nas_first_req, 0, sizeof(s1ap_nas_first_req_t));
|
||||
ue_context_pP->ue_context.ue_initial_id = get_next_ue_initial_id(ctxt_pP->module_id);
|
||||
S1AP_NAS_FIRST_REQ(message_p).ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||
@@ -853,7 +853,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
ue_initial_id = S1AP_DOWNLINK_NAS (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_I(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d\n",
|
||||
LOG_I(RRC, "[eNB %ld] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d\n",
|
||||
instance,
|
||||
msg_name,
|
||||
ue_initial_id,
|
||||
@@ -871,8 +871,8 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
eNB_ue_s1ap_id);
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
MessageDef *msg_fail_p;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_DOWNLINK_NAS: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_NAS_NON_DELIVERY_IND);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_DOWNLINK_NAS: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_NAS_NON_DELIVERY_IND);
|
||||
S1AP_NAS_NON_DELIVERY_IND (msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
S1AP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.length = S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length;
|
||||
S1AP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.buffer = S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer;
|
||||
@@ -944,14 +944,14 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
ue_initial_id = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_I(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
LOG_I(RRC, "[eNB %ld] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
instance, msg_name, ue_initial_id, eNB_ue_s1ap_id, S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_e_rabs);
|
||||
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
MessageDef *msg_fail_p = NULL;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_INITIAL_CONTEXT_SETUP_FAIL);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_INITIAL_CONTEXT_SETUP_FAIL);
|
||||
S1AP_INITIAL_CONTEXT_SETUP_FAIL (msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
// TODO add failure cause when defined!
|
||||
itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
|
||||
@@ -1057,7 +1057,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container = ue_p->Srb0.Tx_buffer.Payload;
|
||||
|
||||
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
|
||||
@@ -1088,8 +1088,8 @@ int rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
MessageDef *msg_fail_p;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_UE_CTXT_MODIFICATION_REQ: unknown UE from eNB_ue_s1ap_id (%d)\n", instance, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_UE_CTXT_MODIFICATION_FAIL);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_UE_CTXT_MODIFICATION_REQ: unknown UE from eNB_ue_s1ap_id (%d)\n", instance, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_UE_CTXT_MODIFICATION_FAIL);
|
||||
S1AP_UE_CTXT_MODIFICATION_FAIL (msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
// TODO add failure cause when defined!
|
||||
itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
|
||||
@@ -1126,7 +1126,7 @@ int rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char
|
||||
/* Send the response */
|
||||
{
|
||||
MessageDef *msg_resp_p;
|
||||
msg_resp_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CTXT_MODIFICATION_RESP);
|
||||
msg_resp_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CTXT_MODIFICATION_RESP);
|
||||
S1AP_UE_CTXT_MODIFICATION_RESP(msg_resp_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
itti_send_msg_to_task(TASK_S1AP, instance, msg_resp_p);
|
||||
}
|
||||
@@ -1144,10 +1144,10 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ (MessageDef *msg_p, const char *
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
MessageDef *msg_fail_p;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_UE_CONTEXT_RELEASE_REQ: unknown UE from eNB_ue_s1ap_id (%d)\n",
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_UE_CONTEXT_RELEASE_REQ: unknown UE from eNB_ue_s1ap_id (%d)\n",
|
||||
instance,
|
||||
eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_RESP); /* TODO change message ID. */
|
||||
msg_fail_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_RESP); /* TODO change message ID. */
|
||||
S1AP_UE_CONTEXT_RELEASE_RESP(msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
// TODO add failure cause when defined!
|
||||
itti_send_msg_to_task(TASK_S1AP, instance, msg_fail_p);
|
||||
@@ -1157,7 +1157,7 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ (MessageDef *msg_p, const char *
|
||||
/* Send the response */
|
||||
{
|
||||
MessageDef *msg_resp_p;
|
||||
msg_resp_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_RESP);
|
||||
msg_resp_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_RESP);
|
||||
S1AP_UE_CONTEXT_RELEASE_RESP(msg_resp_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
itti_send_msg_to_task(TASK_S1AP, instance, msg_resp_p);
|
||||
}
|
||||
@@ -1187,7 +1187,7 @@ rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(
|
||||
"0 S1AP_UE_CONTEXT_RELEASE_REQ eNB_ue_s1ap_id 0x%06"PRIX32" ",
|
||||
ue_context_pP->ue_context.eNB_ue_s1ap_id);
|
||||
MessageDef *msg_context_release_req_p = NULL;
|
||||
msg_context_release_req_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_REQ);
|
||||
msg_context_release_req_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_REQ);
|
||||
S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause = causeP;
|
||||
S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause_value = cause_valueP;
|
||||
@@ -1202,7 +1202,7 @@ void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(
|
||||
MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_S1AP_ENB, NULL, 0,
|
||||
"0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
|
||||
eNB_ue_s1ap_id);
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
itti_send_msg_to_task(TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
|
||||
}
|
||||
@@ -1229,7 +1229,7 @@ rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index */
|
||||
MessageDef *msg_complete_p = NULL;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_UE_CONTEXT_RELEASE_COMMAND: unknown UE from eNB_ue_s1ap_id (%d)\n",
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_UE_CONTEXT_RELEASE_COMMAND: unknown UE from eNB_ue_s1ap_id (%d)\n",
|
||||
instance,
|
||||
eNB_ue_s1ap_id);
|
||||
MSC_LOG_EVENT(MSC_RRC_ENB, "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" context not found",
|
||||
@@ -1240,7 +1240,7 @@ rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(
|
||||
0,
|
||||
"0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
|
||||
eNB_ue_s1ap_id);
|
||||
msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
itti_send_msg_to_task(TASK_S1AP, instance, msg_complete_p);
|
||||
rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(RC.rrc[instance], UE_INITIAL_ID_INVALID, eNB_ue_s1ap_id);
|
||||
@@ -1271,14 +1271,14 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
|
||||
ue_initial_id = S1AP_E_RAB_SETUP_REQ (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_E_RAB_SETUP_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_I(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
LOG_I(RRC, "[eNB %ld] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
instance, msg_name, ue_initial_id, eNB_ue_s1ap_id, S1AP_E_RAB_SETUP_REQ (msg_p).nb_e_rabs_tosetup);
|
||||
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
MessageDef *msg_fail_p = NULL;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_E_RAB_SETUP_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_SETUP_REQUEST_FAIL);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_E_RAB_SETUP_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_SETUP_REQUEST_FAIL);
|
||||
S1AP_E_RAB_SETUP_REQ (msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
// TODO add failure cause when defined!
|
||||
itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
|
||||
@@ -1370,7 +1370,7 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t *const ctxt_pP,
|
||||
int e_rab;
|
||||
int e_rabs_done = 0;
|
||||
int e_rabs_failed = 0;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_SETUP_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_SETUP_RESP);
|
||||
S1AP_E_RAB_SETUP_RESP (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
for (e_rab = 0; e_rab < ue_context_pP->ue_context.setup_e_rabs ; e_rab++) {
|
||||
@@ -1446,15 +1446,15 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
|
||||
ue_initial_id = S1AP_E_RAB_MODIFY_REQ (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_E_RAB_MODIFY_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_D(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
LOG_D(RRC, "[eNB %ld] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
instance, msg_name, ue_initial_id, eNB_ue_s1ap_id, S1AP_E_RAB_MODIFY_REQ (msg_p).nb_e_rabs_tomodify);
|
||||
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_E_RAB_MODIFY_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_E_RAB_MODIFY_REQ: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
int nb_of_e_rabs_failed = 0;
|
||||
MessageDef *msg_fail_p = NULL;
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_MODIFY_RESP);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_MODIFY_RESP);
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_fail_p).eNB_ue_s1ap_id = S1AP_E_RAB_MODIFY_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_fail_p).nb_of_e_rabs = 0;
|
||||
|
||||
@@ -1567,7 +1567,7 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
|
||||
{
|
||||
int nb_of_e_rabs_failed = 0;
|
||||
MessageDef *msg_fail_p = NULL;
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_MODIFY_RESP);
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_MODIFY_RESP);
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_fail_p).eNB_ue_s1ap_id = S1AP_E_RAB_MODIFY_REQ (msg_p).eNB_ue_s1ap_id;
|
||||
// S1AP_E_RAB_MODIFY_RESP (msg_fail_p).e_rabs[S1AP_MAX_E_RAB];
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_fail_p).nb_of_e_rabs = 0;
|
||||
@@ -1597,7 +1597,7 @@ int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t *const ctxt_pP,
|
||||
int e_rab;
|
||||
int e_rabs_done = 0;
|
||||
int e_rabs_failed = 0;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_MODIFY_RESP);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_MODIFY_RESP);
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
for (e_rab = 0; e_rab < ue_context_pP->ue_context.nb_of_modify_e_rabs; e_rab++) {
|
||||
@@ -1748,7 +1748,7 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms
|
||||
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(&ctxt, ue_context_p, xid, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.length, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.buffer);
|
||||
} else {
|
||||
//gtp tunnel delete
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, 0, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||
memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
|
||||
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).from_gnb = 0;
|
||||
@@ -1779,7 +1779,7 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms
|
||||
int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid) {
|
||||
int e_rabs_released = 0;
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_RELEASE_RESPONSE);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_RELEASE_RESPONSE);
|
||||
S1AP_E_RAB_RELEASE_RESPONSE (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
for (int i = 0; i < NB_RB_MAX; i++) {
|
||||
@@ -1822,7 +1822,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
uint32_t T; /* DRX cycle */
|
||||
|
||||
for (uint16_t tai_size = 0; tai_size < S1AP_PAGING_IND(msg_p).tai_size; tai_size++) {
|
||||
LOG_D(RRC,"[eNB %d] In S1AP_PAGING_IND: MCC %d, MNC %d, TAC %d\n", instance, S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc,
|
||||
LOG_D(RRC,"[eNB %ld] In S1AP_PAGING_IND: MCC %d, MNC %d, TAC %d\n", instance, S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc,
|
||||
S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mnc, S1AP_PAGING_IND(msg_p).tac[tai_size]);
|
||||
|
||||
for (uint8_t j = 0; j < RC.rrc[instance]->configuration.num_plmn; j++) {
|
||||
@@ -1884,7 +1884,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
|
||||
default:
|
||||
/* pcch_nB error */
|
||||
LOG_E(RRC, "[eNB %d] In S1AP_PAGING_IND: pcch_nB error (pcch_nB %d) \n",
|
||||
LOG_E(RRC, "[eNB %ld] In S1AP_PAGING_IND: pcch_nB error (pcch_nB %d) \n",
|
||||
instance, pcch_nB);
|
||||
return (-1);
|
||||
}
|
||||
@@ -1920,12 +1920,12 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
|
||||
if (UE_PF_PO[CC_id][i].enable_flag == TRUE) {
|
||||
//paging exist UE log
|
||||
LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
|
||||
LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
|
||||
} else {
|
||||
/* set enable_flag */
|
||||
UE_PF_PO[CC_id][i].enable_flag = TRUE;
|
||||
//paging new UE log
|
||||
LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
|
||||
LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1938,7 +1938,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
uint8_t *message_buffer;
|
||||
/* Transfer data to PDCP */
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, RRC_PCCH_DATA_REQ);
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, RRC_PCCH_DATA_REQ);
|
||||
/* Create message for PDCP (DLInformationTransfer_t) */
|
||||
length = do_Paging (instance,
|
||||
buffer,
|
||||
@@ -1959,7 +1959,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
|
||||
RRC_PCCH_DATA_REQ (message_p).rnti = P_RNTI;
|
||||
RRC_PCCH_DATA_REQ (message_p).ue_index = i;
|
||||
RRC_PCCH_DATA_REQ (message_p).CC_id = CC_id;
|
||||
LOG_D(RRC, "[eNB %d] CC_id %d In S1AP_PAGING_IND: send encdoed buffer to PDCP buffer_size %d\n", instance, CC_id, length);
|
||||
LOG_D(RRC, "[eNB %ld] CC_id %d In S1AP_PAGING_IND: send encdoed buffer to PDCP buffer_size %d\n", instance, CC_id, length);
|
||||
itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p);
|
||||
}
|
||||
}
|
||||
@@ -1981,7 +1981,7 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
||||
gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp;
|
||||
uint8_t inde_list[ue_context_pP->ue_context.nb_of_e_rabs];
|
||||
memset(inde_list, 0, ue_context_pP->ue_context.nb_of_e_rabs*sizeof(uint8_t));
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_PATH_SWITCH_REQ);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_PATH_SWITCH_REQ);
|
||||
ue_context_pP->ue_context.ue_initial_id = get_next_ue_initial_id (ctxt_pP->module_id);
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||
rrc_ue_s1ap_ids_p = malloc(sizeof(*rrc_ue_s1ap_ids_p));
|
||||
@@ -2084,7 +2084,7 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
|
||||
} else {
|
||||
/* Save e RAB information for later */
|
||||
{
|
||||
LOG_I(RRC, "[eNB %d] rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ: rnti %u nb_of_e_rabs %d\n",
|
||||
LOG_I(RRC, "[eNB %ld] rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ: rnti %u nb_of_e_rabs %d\n",
|
||||
instance, ue_context_target_p->ue_context.rnti, ue_context_target_p->ue_context.nb_of_e_rabs);
|
||||
int i;
|
||||
memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
|
||||
@@ -2144,14 +2144,14 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
ue_initial_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
LOG_I(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
LOG_I(RRC, "[eNB %ld] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d, nb_of_e_rabs %d\n",
|
||||
instance, msg_name, ue_initial_id, eNB_ue_s1ap_id, S1AP_E_RAB_SETUP_REQ (msg_p).nb_e_rabs_tosetup);
|
||||
|
||||
if (ue_context_p == NULL) {
|
||||
/* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
|
||||
//MessageDef *msg_fail_p = NULL;
|
||||
LOG_W(RRC, "[eNB %d] In S1AP_PATH_SWITCH_REQ_ACK: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
//msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_PATH_SWITCH_REQ_ACK_FAIL);
|
||||
LOG_W(RRC, "[eNB %ld] In S1AP_PATH_SWITCH_REQ_ACK: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
//msg_fail_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_PATH_SWITCH_REQ_ACK_FAIL);
|
||||
//S1AP_PATH_SWITCH_REQ_ACK (msg_fail_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
// TODO add failure cause when defined!
|
||||
//itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
|
||||
@@ -2242,7 +2242,7 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
|
||||
int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP) {
|
||||
MessageDef *msg_p = NULL;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, X2AP_UE_CONTEXT_RELEASE);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, X2AP_UE_CONTEXT_RELEASE);
|
||||
X2AP_UE_CONTEXT_RELEASE (msg_p).rnti = ue_context_pP->ue_context.rnti;
|
||||
X2AP_UE_CONTEXT_RELEASE (msg_p).source_assoc_id = ue_context_pP->ue_context.handover_info->assoc_id;
|
||||
itti_send_msg_to_task (TASK_X2AP, ctxt_pP->instance, msg_p);
|
||||
@@ -2295,7 +2295,7 @@ int rrc_eNB_send_E_RAB_Modification_Indication(const protocol_ctxt_t *const ctxt
|
||||
uint8_t inde_list[ue_context_pP->ue_context.nb_of_e_rabs];
|
||||
memset(inde_list, 0, ue_context_pP->ue_context.nb_of_e_rabs*sizeof(uint8_t));
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_E_RAB_MODIFICATION_IND);
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, S1AP_E_RAB_MODIFICATION_IND);
|
||||
|
||||
|
||||
S1AP_E_RAB_MODIFICATION_IND (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
@@ -126,7 +126,7 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -147,7 +147,7 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_MAC_ENB, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_MAC_ENB, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -166,7 +166,7 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_LTE_AVAILABLE_BW:
|
||||
@@ -176,7 +176,7 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
|
||||
message_p = itti_alloc_new_message (TASK_RRC_ENB, PHY_MEAS_THRESHOLD_REQ);
|
||||
PHY_MEAS_THRESHOLD_REQ(message_p).transaction_id = transaction_id;
|
||||
memcpy (&PHY_MEAS_THRESHOLD_REQ(message_p).cfg_param, (void *) link_cfg_param_p, sizeof(ral_link_cfg_param_t));
|
||||
itti_send_msg_to_task (TASK_MAC_ENB, ITTI_MSG_INSTANCE(msg_pP), message_p);
|
||||
itti_send_msg_to_task (TASK_MAC_ENB, ITTI_MSG_DESTINATION_INSTANCE(msg_pP), message_p);
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_LTE_MOBILE_NODE_CAPABILITIES:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user