Merge branch 'OAI_develop' into oai_develop_nfapi
This commit is contained in:
@@ -34,6 +34,9 @@ MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSy
|
||||
MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req)
|
||||
MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind)
|
||||
|
||||
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataReq, rrc_mac_bcch_mbms_data_req)
|
||||
MESSAGE_DEF(RRC_MAC_BCCH_MBMS_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchMbmsDataInd, rrc_mac_bcch_mbms_data_ind)
|
||||
|
||||
MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataReq, rrc_mac_ccch_data_req)
|
||||
MESSAGE_DEF(RRC_MAC_CCCH_DATA_CNF, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataCnf, rrc_mac_ccch_data_cnf)
|
||||
MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDataInd, rrc_mac_ccch_data_ind)
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
|
||||
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
|
||||
|
||||
#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req
|
||||
#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind
|
||||
|
||||
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req
|
||||
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
|
||||
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
|
||||
@@ -47,6 +50,7 @@
|
||||
|
||||
// Some constants from "LAYER2/MAC/defs.h"
|
||||
#define BCCH_SDU_SIZE (512)
|
||||
#define BCCH_SDU_MBMS_SIZE (512)
|
||||
#define CCCH_SDU_SIZE (512)
|
||||
#define MCCH_SDU_SIZE (512)
|
||||
#define PCCH_SDU_SIZE (512)
|
||||
@@ -78,6 +82,25 @@ typedef struct RrcMacBcchDataInd_s {
|
||||
uint8_t rsrp;
|
||||
} RrcMacBcchDataInd;
|
||||
|
||||
|
||||
typedef struct RrcMacBcchMbmsDataReq_s {
|
||||
uint32_t frame;
|
||||
uint32_t sdu_size;
|
||||
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
|
||||
uint8_t enb_index;
|
||||
} RrcMacBcchMbmsDataReq;
|
||||
|
||||
typedef struct RrcMacBcchMbmsDataInd_s {
|
||||
uint32_t frame;
|
||||
uint8_t sub_frame;
|
||||
uint32_t sdu_size;
|
||||
uint8_t sdu[BCCH_SDU_MBMS_SIZE];
|
||||
uint8_t enb_index;
|
||||
uint8_t rsrq;
|
||||
uint8_t rsrp;
|
||||
} RrcMacBcchMbmsDataInd;
|
||||
|
||||
|
||||
typedef struct RrcMacCcchDataReq_s {
|
||||
uint32_t frame;
|
||||
uint32_t sdu_size;
|
||||
|
||||
@@ -166,6 +166,7 @@ typedef struct RadioResourceConfig_s {
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long* prach_HoppingOffset_r13;
|
||||
#endif
|
||||
BOOLEAN_t mbms_dedicated_serving_cell;
|
||||
} RadioResourceConfig;
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
@@ -180,6 +181,9 @@ typedef struct RrcConfigurationReq_s {
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
int enable_measurement_reports;
|
||||
int enable_x2;
|
||||
|
||||
uint32_t rrc_inactivity_timer_thres; // for testing, maybe change later
|
||||
|
||||
paging_drx_t default_drx;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef S1AP_MESSAGES_TYPES_H_
|
||||
#define S1AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
|
||||
@@ -62,7 +63,7 @@
|
||||
/* Maximum number of e-rabs to be setup/deleted in a single message.
|
||||
* Even if only one bearer will be modified by message.
|
||||
*/
|
||||
#define S1AP_MAX_E_RAB 11
|
||||
#define S1AP_MAX_E_RAB (LTE_maxDRB + 3)
|
||||
|
||||
/* Length of the transport layer address string
|
||||
* 160 bits / 8 bits by char.
|
||||
|
||||
@@ -122,8 +122,13 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
for (j = 0; j < ue_report[i]->n_rlc_report; j++) {
|
||||
|
||||
rlc_reports[j] = malloc(sizeof(Protocol__FlexRlcBsr));
|
||||
if (rlc_reports[j] == NULL)
|
||||
if (rlc_reports[j] == NULL){
|
||||
for (k = 0; k < j; k++){
|
||||
free(rlc_reports[k]);
|
||||
}
|
||||
free(rlc_reports);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_rlc_bsr__init(rlc_reports[j]);
|
||||
rlc_reports[j]->lc_id = j+1;
|
||||
rlc_reports[j]->has_lc_id = 1;
|
||||
@@ -180,13 +185,21 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
//Create the actual CSI reports.
|
||||
Protocol__FlexDlCsi **csi_reports;
|
||||
csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report);
|
||||
if (csi_reports == NULL)
|
||||
if (csi_reports == NULL) {
|
||||
free(dl_report);
|
||||
goto error;
|
||||
}
|
||||
for (j = 0; j < dl_report->n_csi_report; j++) {
|
||||
|
||||
csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi));
|
||||
if (csi_reports[j] == NULL)
|
||||
if (csi_reports[j] == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(csi_reports[k]);
|
||||
}
|
||||
free(csi_reports);
|
||||
csi_reports = NULL;
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_dl_csi__init(csi_reports[j]);
|
||||
//The servCellIndex for this report
|
||||
csi_reports[j]->serv_cell_index = j;
|
||||
@@ -206,8 +219,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
Protocol__FlexCsiP10 *csi10;
|
||||
csi10 = malloc(sizeof(Protocol__FlexCsiP10));
|
||||
if (csi10 == NULL)
|
||||
goto error;
|
||||
if (csi10 == NULL) {
|
||||
for (k = 0; k <= j; k++) {
|
||||
free(csi_reports[k]);
|
||||
}
|
||||
free(csi_reports);
|
||||
csi_reports = NULL;
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_csi_p10__init(csi10);
|
||||
//TODO: set the wideband value
|
||||
// NN: this is also depends on cc_id
|
||||
@@ -222,8 +241,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
Protocol__FlexCsiP11 *csi11;
|
||||
csi11 = malloc(sizeof(Protocol__FlexCsiP11));
|
||||
if (csi11 == NULL)
|
||||
goto error;
|
||||
if (csi11 == NULL) {
|
||||
for (k = 0; k <= j; k++) {
|
||||
free(csi_reports[k]);
|
||||
}
|
||||
free(csi_reports);
|
||||
csi_reports = NULL;
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_csi_p11__init(csi11);
|
||||
|
||||
csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi));
|
||||
@@ -267,8 +292,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
Protocol__FlexCsiP20 *csi20;
|
||||
csi20 = malloc(sizeof(Protocol__FlexCsiP20));
|
||||
if (csi20 == NULL)
|
||||
goto error;
|
||||
if (csi20 == NULL) {
|
||||
for (k = 0; k <= j; k++) {
|
||||
free(csi_reports[k]);
|
||||
}
|
||||
free(csi_reports);
|
||||
csi_reports = NULL;
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_csi_p20__init(csi20);
|
||||
|
||||
csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id);
|
||||
@@ -402,14 +433,23 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
//Provide a report for each pending paging message
|
||||
Protocol__FlexPagingInfo **p_info;
|
||||
p_info = malloc(sizeof(Protocol__FlexPagingInfo *) * paging_report->n_paging_info);
|
||||
if (p_info == NULL)
|
||||
if (p_info == NULL){
|
||||
free(paging_report);
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (j = 0; j < paging_report->n_paging_info; j++) {
|
||||
|
||||
p_info[j] = malloc(sizeof(Protocol__FlexPagingInfo));
|
||||
if(p_info[j] == NULL)
|
||||
if (p_info[j] == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(p_info[k]);
|
||||
}
|
||||
free(p_info);
|
||||
p_info = NULL;
|
||||
free(paging_report);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_paging_info__init(p_info[j]);
|
||||
//TODO: Set paging index. This index is the same that will be used for the scheduling of the
|
||||
//paging message by the controller
|
||||
@@ -450,14 +490,22 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
full_ul_report->n_cqi_meas = 1;
|
||||
Protocol__FlexUlCqi **ul_report;
|
||||
ul_report = malloc(sizeof(Protocol__FlexUlCqi *) * full_ul_report->n_cqi_meas);
|
||||
if(ul_report == NULL)
|
||||
if(ul_report == NULL) {
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
//Fill each UL report of the UE for each of the configured report types
|
||||
for(j = 0; j < full_ul_report->n_cqi_meas; j++) {
|
||||
|
||||
ul_report[j] = malloc(sizeof(Protocol__FlexUlCqi));
|
||||
if(ul_report[j] == NULL)
|
||||
goto error;
|
||||
if(ul_report[j] == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(ul_report[k]);
|
||||
}
|
||||
free(ul_report);
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_ul_cqi__init(ul_report[j]);
|
||||
//TODO: Set the type of the UL report. As an example set it to SRS UL report
|
||||
// See enum flex_ul_cqi_type in FlexRAN specification for more details
|
||||
@@ -468,8 +516,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
ul_report[j]->n_sinr = 0;
|
||||
uint32_t *sinr_meas;
|
||||
sinr_meas = (uint32_t *) malloc(sizeof(uint32_t) * ul_report[j]->n_sinr);
|
||||
if (sinr_meas == NULL)
|
||||
if (sinr_meas == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(ul_report[k]);
|
||||
}
|
||||
free(ul_report);
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
//TODO:Set the SINR measurements for the specified type
|
||||
for (k = 0; k < ul_report[j]->n_sinr; k++) {
|
||||
sinr_meas[k] = 10;
|
||||
@@ -573,8 +627,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
Protocol__FlexMacSdusDl ** mac_sdus;
|
||||
mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id));
|
||||
if (mac_sdus == NULL)
|
||||
if (mac_sdus == NULL) {
|
||||
free(macstats);
|
||||
goto error;
|
||||
}
|
||||
|
||||
macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id);
|
||||
|
||||
@@ -653,10 +709,125 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
error:
|
||||
|
||||
if (cell_report != NULL)
|
||||
free(cell_report);
|
||||
if (ue_report != NULL)
|
||||
free(ue_report);
|
||||
if (cell_report != NULL) {
|
||||
if (report_config->nr_cc > 0) {
|
||||
for (i = 0; i < report_config->nr_cc; i++) {
|
||||
if (cell_report[i]->noise_inter_report != NULL) {
|
||||
free(cell_report[i]->noise_inter_report);
|
||||
cell_report[i]->noise_inter_report = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(cell_report);
|
||||
cell_report = NULL;
|
||||
}
|
||||
|
||||
if (ue_report != NULL) {
|
||||
if (report_config->nr_ue > 0) {
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
if (ue_report[i]->bsr != NULL) {
|
||||
free(ue_report[i]->bsr);
|
||||
ue_report[i]->bsr = NULL;
|
||||
}
|
||||
if (ue_report[i]->rlc_report != NULL) {
|
||||
for (j = 0; j < ue_report[i]->n_rlc_report; j++) {
|
||||
if (ue_report[i]->rlc_report[j] != NULL) {
|
||||
free(ue_report[i]->rlc_report[j]);
|
||||
ue_report[i]->rlc_report[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->rlc_report);
|
||||
ue_report[i]->rlc_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report != NULL) {
|
||||
for (j = 0; j < ue_report[i]->dl_cqi_report->n_csi_report; j++) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j] != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p10csi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p10csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p10csi = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p11csi != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p11csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p11csi = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p20csi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p20csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p20csi = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report);
|
||||
ue_report[i]->dl_cqi_report->csi_report = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report);
|
||||
ue_report[i]->dl_cqi_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->pbr != NULL) {
|
||||
if (ue_report[i]->pbr->paging_info != NULL) {
|
||||
for (j = 0; j < ue_report[i]->pbr->n_paging_info; j++) {
|
||||
free(ue_report[i]->pbr->paging_info[j]);
|
||||
ue_report[i]->pbr->paging_info[j] = NULL;
|
||||
}
|
||||
free(ue_report[i]->pbr->paging_info);
|
||||
ue_report[i]->pbr->paging_info = NULL;
|
||||
}
|
||||
free(ue_report[i]->pbr);
|
||||
ue_report[i]->pbr = NULL;
|
||||
}
|
||||
if (ue_report[i]->ul_cqi_report != NULL) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas != NULL) {
|
||||
for (j = 0; j < ue_report[i]->ul_cqi_report->n_cqi_meas; j++) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas[j] != NULL) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr != NULL) {
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr = NULL;
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas[j]);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas = NULL;
|
||||
}
|
||||
if (ue_report[i]->ul_cqi_report->pucch_dbm != NULL) {
|
||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||
if (ue_report[i]->ul_cqi_report->pucch_dbm[j] != NULL) {
|
||||
free(ue_report[i]->ul_cqi_report->pucch_dbm[j]);
|
||||
ue_report[i]->ul_cqi_report->pucch_dbm[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->pucch_dbm);
|
||||
ue_report[i]->ul_cqi_report->pucch_dbm = NULL;
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report);
|
||||
ue_report[i]->ul_cqi_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->mac_stats != NULL) {
|
||||
if (ue_report[i]->mac_stats->mac_sdus_dl != NULL) {
|
||||
for (j = 0; j < ue_report[i]->mac_stats->n_mac_sdus_dl; j++) {
|
||||
if (ue_report[i]->mac_stats->mac_sdus_dl[j] != NULL) {
|
||||
free(ue_report[i]->mac_stats->mac_sdus_dl[j]);
|
||||
ue_report[i]->mac_stats->mac_sdus_dl[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->mac_stats->mac_sdus_dl);
|
||||
ue_report[i]->mac_stats->mac_sdus_dl = NULL;
|
||||
}
|
||||
free(ue_report[i]->mac_stats);
|
||||
ue_report[i]->mac_stats = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(ue_report);
|
||||
ue_report = NULL;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -1014,11 +1185,28 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
if (header != NULL)
|
||||
free(header);
|
||||
if (sf_trigger_msg != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
|
||||
free(sf_trigger_msg->dl_info[i]->harq_status);
|
||||
if (sf_trigger_msg->dl_info != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
|
||||
if (sf_trigger_msg->dl_info[i] != NULL) {
|
||||
if (sf_trigger_msg->dl_info[i]->harq_status != NULL) {
|
||||
free(sf_trigger_msg->dl_info[i]->harq_status);
|
||||
}
|
||||
free(sf_trigger_msg->dl_info[i]);
|
||||
}
|
||||
}
|
||||
free(sf_trigger_msg->dl_info);
|
||||
}
|
||||
if (sf_trigger_msg->ul_info != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_ul_info; i++) {
|
||||
if (sf_trigger_msg->ul_info[i] != NULL) {
|
||||
if (sf_trigger_msg->ul_info[i]->ul_reception != NULL) {
|
||||
free(sf_trigger_msg->ul_info[i]->ul_reception);
|
||||
}
|
||||
free(sf_trigger_msg->ul_info[i]);
|
||||
}
|
||||
}
|
||||
free(sf_trigger_msg->ul_info);
|
||||
}
|
||||
free(sf_trigger_msg->dl_info);
|
||||
free(sf_trigger_msg->ul_info);
|
||||
free(sf_trigger_msg);
|
||||
}
|
||||
if(*msg != NULL)
|
||||
@@ -1063,6 +1251,7 @@ int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMess
|
||||
Protocol__FlexDlMacConfig *dl_mac_config_msg;
|
||||
dl_mac_config_msg = malloc(sizeof(Protocol__FlexDlMacConfig));
|
||||
if (dl_mac_config_msg == NULL) {
|
||||
free(header);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_dl_mac_config__init(dl_mac_config_msg);
|
||||
@@ -1072,8 +1261,11 @@ int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMess
|
||||
dl_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
free(dl_mac_config_msg);
|
||||
free(header);
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE;
|
||||
@@ -1167,8 +1359,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
|
||||
ul_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
free(ul_mac_config_msg);
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE;
|
||||
@@ -1177,6 +1371,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
|
||||
return 0;
|
||||
|
||||
error:
|
||||
if(header){
|
||||
free(header);
|
||||
header = NULL;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1292,7 +1490,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
|
||||
|
||||
void flexran_agent_send_sr_info(mid_t mod_id) {
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code;
|
||||
@@ -1322,7 +1520,7 @@ void flexran_agent_send_sr_info(mid_t mod_id) {
|
||||
|
||||
void flexran_agent_send_sf_trigger(mid_t mod_id) {
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code;
|
||||
|
||||
@@ -151,6 +151,15 @@ Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol
|
||||
return msg;
|
||||
|
||||
error:
|
||||
if (stats_reply_msg) {
|
||||
if (stats_reply_msg->ue_report) {
|
||||
free(stats_reply_msg->ue_report);
|
||||
}
|
||||
if (stats_reply_msg->cell_report) {
|
||||
free(stats_reply_msg->cell_report);
|
||||
}
|
||||
free(stats_reply_msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -233,6 +242,12 @@ Protocol__FlexUeStatsReport * copy_ue_stats_report(Protocol__FlexUeStatsReport *
|
||||
return copy;
|
||||
|
||||
error:
|
||||
if (copy){
|
||||
if (copy->bsr){
|
||||
free(copy->bsr);
|
||||
}
|
||||
free(copy);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -303,6 +318,20 @@ Protocol__FlexUlCqiReport * copy_ul_cqi_report(Protocol__FlexUlCqiReport * origi
|
||||
return full_ul_report;
|
||||
|
||||
error:
|
||||
if (full_ul_report){
|
||||
if (ul_report){
|
||||
for (i = 0; i < full_ul_report->n_cqi_meas; i++){
|
||||
if (ul_report[i]){
|
||||
if ( ul_report[i]->sinr ){
|
||||
free(ul_report[i]->sinr);
|
||||
}
|
||||
free(ul_report[i]);
|
||||
}
|
||||
}
|
||||
free(ul_report);
|
||||
}
|
||||
free(full_ul_report);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -332,6 +361,14 @@ Protocol__FlexDlCqiReport * copy_dl_cqi_report(Protocol__FlexDlCqiReport * origi
|
||||
|
||||
error:
|
||||
/*TODO: Must free memory properly*/
|
||||
if (dl_report != NULL) {
|
||||
if (csi_reports != NULL) {
|
||||
free(csi_reports);
|
||||
csi_reports = NULL;
|
||||
}
|
||||
free(dl_report);
|
||||
dl_report = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -369,6 +406,18 @@ Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagin
|
||||
|
||||
error:
|
||||
/*TODO: free memory properly*/
|
||||
if (copy){
|
||||
if (p_info){
|
||||
for (i = 0; i < copy->n_paging_info; i++){
|
||||
if (p_info[i]){
|
||||
free(p_info[i]);
|
||||
}
|
||||
}
|
||||
free(p_info);
|
||||
}
|
||||
free(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -514,6 +563,74 @@ Protocol__FlexDlCsi * copy_csi_report(Protocol__FlexDlCsi * original) {
|
||||
return copy;
|
||||
|
||||
error:
|
||||
if (copy != NULL) {
|
||||
if ((copy->p11csi != NULL) && (copy->p11csi->wb_cqi != NULL)) {
|
||||
free(copy->p11csi->wb_cqi);
|
||||
copy->p11csi->wb_cqi = NULL;
|
||||
}
|
||||
if (copy->p21csi != NULL) {
|
||||
if (copy->p21csi->wb_cqi != NULL) {
|
||||
free(copy->p21csi->wb_cqi);
|
||||
copy->p21csi->wb_cqi = NULL;
|
||||
}
|
||||
if (copy->p21csi->sb_cqi != NULL) {
|
||||
free(copy->p21csi->sb_cqi);
|
||||
copy->p21csi->sb_cqi = NULL;
|
||||
}
|
||||
}
|
||||
if (copy->a12csi != NULL) {
|
||||
if (copy->a12csi->wb_cqi != NULL) {
|
||||
free(copy->a12csi->wb_cqi);
|
||||
copy->a12csi->wb_cqi = NULL;
|
||||
}
|
||||
if (copy->a12csi->sb_pmi != NULL) {
|
||||
free(copy->a12csi->sb_pmi);
|
||||
copy->a12csi->sb_pmi = NULL;
|
||||
}
|
||||
}
|
||||
if (copy->a22csi != NULL) {
|
||||
if (copy->a22csi->wb_cqi != NULL) {
|
||||
free(copy->a22csi->wb_cqi);
|
||||
copy->a22csi->wb_cqi = NULL;
|
||||
}
|
||||
if (copy->a22csi->sb_cqi != NULL) {
|
||||
free(copy->a22csi->sb_cqi);
|
||||
copy->a22csi->sb_cqi = NULL;
|
||||
}
|
||||
if (copy->a22csi->sb_list != NULL) {
|
||||
free(copy->a22csi->sb_list);
|
||||
copy->a22csi->sb_list = NULL;
|
||||
}
|
||||
}
|
||||
if ((copy->a20csi != NULL) && (copy->a20csi->sb_list != NULL)) {
|
||||
free(copy->a20csi->sb_list);
|
||||
copy->a20csi->sb_list = NULL;
|
||||
}
|
||||
if ((copy->a30csi != NULL) && (copy->a30csi->sb_cqi != NULL)) {
|
||||
free(copy->a30csi->sb_cqi);
|
||||
copy->a30csi->sb_cqi = NULL;
|
||||
}
|
||||
if (copy->a31csi != NULL) {
|
||||
if (copy->a31csi->wb_cqi != NULL) {
|
||||
free(copy->a31csi->wb_cqi);
|
||||
copy->a31csi->wb_cqi = NULL;
|
||||
}
|
||||
if (copy->a31csi->sb_cqi != NULL) {
|
||||
for (i = 0; i < copy->a31csi->n_sb_cqi; i++) {
|
||||
if (copy->a31csi->sb_cqi[i] != NULL) {
|
||||
if (copy->a31csi->sb_cqi[i]->sb_cqi != NULL) {
|
||||
free(copy->a31csi->sb_cqi[i]->sb_cqi);
|
||||
}
|
||||
free(copy->a31csi->sb_cqi[i]);
|
||||
}
|
||||
}
|
||||
free(copy->a31csi->sb_cqi);
|
||||
copy->a31csi->sb_cqi = NULL;
|
||||
}
|
||||
}
|
||||
free(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -902,6 +1019,13 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
|
||||
LOG_I(FLEXRAN_AGENT, "Scheduler could not be loaded\n");
|
||||
}
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib != lib) {
|
||||
dlclose(lib);
|
||||
}
|
||||
} else {
|
||||
dlclose(lib);
|
||||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
@@ -1602,6 +1726,10 @@ int apply_ue_slice_assoc_update(mid_t mod_id)
|
||||
int changes = 0;
|
||||
for (i = 0; i < n_ue_slice_assoc_updates; i++) {
|
||||
int ue_id = find_UE_id(mod_id, ue_slice_assoc_update[i]->rnti);
|
||||
if (ue_id < 0 || ue_id > MAX_MOBILES_PER_ENB){
|
||||
LOG_E(FLEXRAN_AGENT,"UE_id %d is wrong!!\n",ue_id);
|
||||
continue;
|
||||
}
|
||||
if (ue_slice_assoc_update[i]->has_dl_slice_id) {
|
||||
int slice_idx = flexran_find_dl_slice(mod_id, ue_slice_assoc_update[i]->dl_slice_id);
|
||||
if (flexran_dl_slice_exists(mod_id, slice_idx)) {
|
||||
|
||||
@@ -44,6 +44,8 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
Protocol__FlexUeStateChange *ue_state_change_msg = NULL;
|
||||
Protocol__FlexUeConfig *config = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code=0;
|
||||
@@ -53,7 +55,6 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_UE_STATE_CHANGE, &header) != 0)
|
||||
goto error;
|
||||
|
||||
Protocol__FlexUeStateChange *ue_state_change_msg;
|
||||
ue_state_change_msg = malloc(sizeof(Protocol__FlexUeStateChange));
|
||||
if(ue_state_change_msg == NULL) {
|
||||
goto error;
|
||||
@@ -62,7 +63,6 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
ue_state_change_msg->has_type = 1;
|
||||
ue_state_change_msg->type = state_change;
|
||||
|
||||
Protocol__FlexUeConfig *config;
|
||||
config = malloc(sizeof(Protocol__FlexUeConfig));
|
||||
if (config == NULL) {
|
||||
goto error;
|
||||
@@ -103,11 +103,24 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
}
|
||||
|
||||
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
|
||||
free(header);
|
||||
return;
|
||||
error:
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
|
||||
err_code, rnti);
|
||||
if (header){
|
||||
free(header);
|
||||
}
|
||||
if (ue_state_change_msg) {
|
||||
free(ue_state_change_msg);
|
||||
}
|
||||
if (config) {
|
||||
free(config);
|
||||
}
|
||||
if (msg) {
|
||||
free(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -387,8 +400,11 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
/* Target Cell, Neghibouring*/
|
||||
Protocol__FlexNeighCellsMeasurements *neigh_meas;
|
||||
neigh_meas = malloc(sizeof(Protocol__FlexNeighCellsMeasurements));
|
||||
if (neigh_meas == NULL)
|
||||
if (neigh_meas == NULL) {
|
||||
free(rrc_measurements);
|
||||
rrc_measurements = NULL;
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_neigh_cells_measurements__init(neigh_meas);
|
||||
|
||||
|
||||
@@ -399,14 +415,26 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
if (neigh_meas->n_eutra_meas > 0){
|
||||
|
||||
eutra_meas = malloc(sizeof(Protocol__FlexEutraMeasurements) * neigh_meas->n_eutra_meas);
|
||||
if (eutra_meas == NULL)
|
||||
if (eutra_meas == NULL) {
|
||||
free(neigh_meas);
|
||||
free(rrc_measurements);
|
||||
rrc_measurements = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (int j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
||||
|
||||
eutra_meas[j] = malloc(sizeof(Protocol__FlexEutraMeasurements));
|
||||
if (eutra_meas[j] == NULL)
|
||||
if (eutra_meas[j] == NULL) {
|
||||
for (int k = 0 ; k < j ; k++) {
|
||||
free(eutra_meas[k]);
|
||||
}
|
||||
free(eutra_meas);
|
||||
free(neigh_meas);
|
||||
free(rrc_measurements);
|
||||
rrc_measurements = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_eutra_measurements__init(eutra_meas[j]);
|
||||
|
||||
@@ -435,6 +463,8 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
|
||||
rrc_measurements->neigh_meas = neigh_meas;
|
||||
|
||||
} else {
|
||||
free(neigh_meas);
|
||||
}
|
||||
|
||||
ue_report[i]->rrc_measurements = rrc_measurements;
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include "RRC_config_tools.h"
|
||||
#include "enb_paramdef.h"
|
||||
#include "proto_agent.h"
|
||||
#define RRC_INACTIVITY_THRESH 0
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
extern void set_parallel_conf(char *parallel_conf);
|
||||
@@ -124,6 +123,7 @@ void RCconfig_L1(void) {
|
||||
for (j = 0; j < RC.nb_L1_inst; j++) {
|
||||
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 *));
|
||||
LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
|
||||
@@ -387,7 +387,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
|
||||
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
|
||||
//RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
|
||||
// In the configuration file it is in seconds. For RRC it has to be in milliseconds
|
||||
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = (*ENBParamList.paramarray[i][ENB_RRC_INACTIVITY_THRES_IDX].uptr) * 1000;
|
||||
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
|
||||
RRC_CONFIGURATION_REQ (msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr;
|
||||
AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
|
||||
@@ -417,6 +419,22 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).mnc[l]);
|
||||
}
|
||||
|
||||
/* measurement reports enabled? */
|
||||
if (ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr != NULL &&
|
||||
*(ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr) != NULL &&
|
||||
!strcmp(*(ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr), "yes"))
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_measurement_reports = 1;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_measurement_reports = 0;
|
||||
|
||||
/* x2 enabled? */
|
||||
if (ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr != NULL &&
|
||||
*(ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr) != NULL &&
|
||||
!strcmp(*(ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr), "yes"))
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_x2 = 1;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_x2 = 0;
|
||||
|
||||
// Parse optional physical parameters
|
||||
config_getlist( &CCsParamList,NULL,0,enbpath);
|
||||
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
|
||||
@@ -431,7 +449,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
//printf("Component carrier %d\n",component_carrier);
|
||||
nb_cc++;
|
||||
|
||||
if (!NODE_IS_CU(rrc->node_type)) {
|
||||
if (1 || !NODE_IS_CU(rrc->node_type)) {
|
||||
// Cell params, MIB/SIB1 in DU
|
||||
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = ccparams_lte.tdd_config;
|
||||
AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
|
||||
@@ -1292,6 +1310,62 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
break;
|
||||
}
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
switch (ccparams_lte.N_RB_DL) {
|
||||
case 25:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
|
||||
@@ -2555,6 +2629,8 @@ int RCconfig_parallel(void) {
|
||||
set_worker_conf(worker_conf);
|
||||
}
|
||||
|
||||
free(worker_conf);
|
||||
free(parallel_conf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2805,6 +2881,15 @@ void configure_du_mac(int inst) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -933,8 +933,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
}
|
||||
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13;
|
||||
|
||||
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 0 || eMTCconfig->rar_HoppingConfig_r13 == 1,
|
||||
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
|
||||
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 1 ,
|
||||
"illegal rar_HoppingConfig_r13 %d (should be 1 only for now, can be 0 when RAR frequency hopping is supported\n",eMTCconfig->rar_HoppingConfig_r13);
|
||||
} // end for loop (rach ce level info)
|
||||
|
||||
char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2];
|
||||
|
||||
@@ -98,6 +98,7 @@ typedef enum {
|
||||
#define CONFIG_STRING_RU_MAX_RS_EPRE "max_pdschReferenceSignalPower"
|
||||
#define CONFIG_STRING_RU_MAX_RXGAIN "max_rxgain"
|
||||
#define CONFIG_STRING_RU_IF_COMPRESSION "if_compression"
|
||||
#define CONFIG_STRING_RU_IS_SLAVE "is_slave"
|
||||
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
|
||||
#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs"
|
||||
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
|
||||
@@ -121,11 +122,12 @@ typedef enum {
|
||||
#define RU_ENB_LIST_IDX 14
|
||||
#define RU_ATT_TX_IDX 15
|
||||
#define RU_ATT_RX_IDX 16
|
||||
#define RU_NBIOTRRC_LIST_IDX 17
|
||||
#define RU_SDR_ADDRS 18
|
||||
#define RU_SDR_CLK_SRC 19
|
||||
#define RU_SF_EXTENSION_IDX 20
|
||||
#define RU_END_OF_BURST_DELAY_IDX 21
|
||||
#define RU_IS_SLAVE_IDX 17
|
||||
#define RU_NBIOTRRC_LIST_IDX 18
|
||||
#define RU_SDR_ADDRS 19
|
||||
#define RU_SDR_CLK_SRC 20
|
||||
#define RU_SF_EXTENSION_IDX 21
|
||||
#define RU_END_OF_BURST_DELAY_IDX 22
|
||||
|
||||
|
||||
|
||||
@@ -151,6 +153,7 @@ typedef enum {
|
||||
{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
@@ -204,6 +207,9 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||
#define ENB_CONFIG_STRING_NR_CELLID "nr_cellid"
|
||||
#define ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD "rrc_inactivity_threshold"
|
||||
#define ENB_CONFIG_STRING_MEASUREMENT_REPORTS "enable_measurement_reports"
|
||||
#define ENB_CONFIG_STRING_X2 "enable_x2"
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -223,7 +229,10 @@ typedef enum {
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
#define ENB_ENB_ID_IDX 0
|
||||
#define ENB_CELL_TYPE_IDX 1
|
||||
@@ -240,6 +249,9 @@ typedef enum {
|
||||
#define ENB_LOCAL_S_PORTD_IDX 12
|
||||
#define ENB_REMOTE_S_PORTD_IDX 13
|
||||
#define ENB_NRCELLID_IDX 14
|
||||
#define ENB_RRC_INACTIVITY_THRES_IDX 15
|
||||
#define ENB_ENABLE_MEASUREMENT_REPORTS 16
|
||||
#define ENB_ENABLE_X2 17
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
@@ -257,6 +269,8 @@ typedef enum {
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -380,6 +394,10 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
|
||||
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
|
||||
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
|
||||
//SIB1-MBMS
|
||||
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
|
||||
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
|
||||
@@ -433,7 +451,6 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_size"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -520,6 +537,7 @@ typedef struct ccparams_lte_s {
|
||||
int32_t ue_TimersAndConstants_n311;
|
||||
int32_t ue_TransmissionMode;
|
||||
int32_t ue_multiple_max;
|
||||
char *mbms_dedicated_serving_cell;
|
||||
int32_t srb1_timer_poll_retransmit;
|
||||
int32_t srb1_timer_reordering;
|
||||
int32_t srb1_timer_status_prohibit;
|
||||
@@ -643,6 +661,7 @@ typedef struct ccparams_lte_s {
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} \
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -727,7 +746,8 @@ typedef struct ccparams_lte_s {
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0} \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
@@ -808,6 +828,7 @@ typedef struct ccparams_lte_s {
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 73
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 74
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* SRB1 configuration parameters section name */
|
||||
|
||||
@@ -364,7 +364,7 @@ typedef struct ccparams_eMTC_s {
|
||||
{ENB_CONFIG_STRING_LAST_PREAMBLE_R13, NULL, 0, iptr:&eMTCconfig->lastPreamble_r13, defintval:63, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13, NULL, 0, iptr:&eMTCconfig->ra_ResponseWindowSize_r13, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13, NULL, 0, iptr:&eMTCconfig->mac_ContentionResolutionTimer_r13, defintval:80, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13, NULL, 0, iptr:&eMTCconfig->rar_HoppingConfig_r13, defintval:0, TYPE_UINT, 0}\
|
||||
{ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13, NULL, 0, iptr:&eMTCconfig->rar_HoppingConfig_r13, defintval:1, TYPE_UINT, 0}\
|
||||
}
|
||||
|
||||
#define PRACH_PARAMS_CE_R13_DESC(eMTCconfig) { \
|
||||
|
||||
@@ -84,6 +84,9 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
||||
|
||||
error:
|
||||
LOG_I(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||
if (channel){
|
||||
free(channel);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ int flexran_agent_hello(mid_t mod_id, const void *params, Protocol__FlexranMessa
|
||||
hello_msg->bs_id = flexran_get_bs_id(mod_id);
|
||||
hello_msg->has_bs_id = 1;
|
||||
hello_msg->n_capabilities = flexran_get_capabilities(mod_id, &hello_msg->capabilities);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
@@ -296,8 +295,10 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
for (int i = 0; i < reply->n_cell_config; i++) {
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_rfoffset)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfoffset);
|
||||
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_rfperiod)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfperiod);
|
||||
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_sfalloc)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_sfalloc);
|
||||
|
||||
@@ -305,6 +306,7 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
for(int j = 0; j < reply->cell_config[i]->si_config->n_si_message; j++) {
|
||||
free(reply->cell_config[i]->si_config->si_message[j]);
|
||||
}
|
||||
|
||||
free(reply->cell_config[i]->si_config->si_message);
|
||||
free(reply->cell_config[i]->si_config);
|
||||
}
|
||||
@@ -319,6 +321,7 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
}
|
||||
|
||||
free(reply->cell_config[i]->slice_config->dl);
|
||||
|
||||
for (int j = 0; j < reply->cell_config[i]->slice_config->n_ul; ++j) {
|
||||
if (reply->cell_config[i]->slice_config->ul[j]->n_sorting > 0)
|
||||
free(reply->cell_config[i]->slice_config->ul[j]->sorting);
|
||||
@@ -492,16 +495,15 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
goto error;
|
||||
|
||||
lc_config_reply_msg->header = header;
|
||||
|
||||
/* the lc_config_reply entirely depends on MAC except for the
|
||||
* mac_eNB_get_rrc_status() function (which in the current OAI implementation
|
||||
* is reachable if F1 is present). Therefore we check here wether MAC CM is
|
||||
* present and the message gets properly filled if it is or remains empty if
|
||||
* not */
|
||||
lc_config_reply_msg->n_lc_ue_config =
|
||||
flexran_agent_get_mac_xface(mod_id) ? flexran_get_mac_num_ues(mod_id) : 0;
|
||||
|
||||
flexran_agent_get_mac_xface(mod_id) ? flexran_get_mac_num_ues(mod_id) : 0;
|
||||
Protocol__FlexLcUeConfig **lc_ue_config = NULL;
|
||||
|
||||
if (lc_config_reply_msg->n_lc_ue_config > 0) {
|
||||
lc_ue_config = malloc(sizeof(Protocol__FlexLcUeConfig *) * lc_config_reply_msg->n_lc_ue_config);
|
||||
|
||||
@@ -512,7 +514,13 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
// Fill the config for each UE
|
||||
for (int i = 0; i < lc_config_reply_msg->n_lc_ue_config; i++) {
|
||||
lc_ue_config[i] = malloc(sizeof(Protocol__FlexLcUeConfig));
|
||||
if (!lc_ue_config[i]) goto error;
|
||||
if (!lc_ue_config[i]){
|
||||
for (int j = 0; j < i; j++){
|
||||
free(lc_ue_config[j]);
|
||||
}
|
||||
free(lc_ue_config);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_lc_ue_config__init(lc_ue_config[i]);
|
||||
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
@@ -524,8 +532,13 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if (*msg == NULL)
|
||||
if (*msg == NULL){
|
||||
for (int k = 0; k < lc_config_reply_msg->n_lc_ue_config; k++){
|
||||
free(lc_ue_config[k]);
|
||||
}
|
||||
free(lc_ue_config);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG;
|
||||
@@ -554,8 +567,7 @@ error:
|
||||
* ************************************
|
||||
*/
|
||||
|
||||
int sort_ue_config(const void *a, const void *b)
|
||||
{
|
||||
int sort_ue_config(const void *a, const void *b) {
|
||||
const Protocol__FlexUeConfig *fa = a;
|
||||
const Protocol__FlexUeConfig *fb = b;
|
||||
|
||||
@@ -563,6 +575,7 @@ int sort_ue_config(const void *a, const void *b)
|
||||
return -1;
|
||||
else if (fa->rnti < fb->rnti)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -584,8 +597,8 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
goto error;
|
||||
|
||||
ue_config_reply_msg->header = header;
|
||||
|
||||
ue_config_reply_msg->n_ue_config = 0;
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
ue_config_reply_msg->n_ue_config = flexran_get_rrc_num_ues(mod_id);
|
||||
else if (flexran_agent_get_mac_xface(mod_id))
|
||||
@@ -597,7 +610,7 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
const int nmac = flexran_get_mac_num_ues(mod_id);
|
||||
ue_config_reply_msg->n_ue_config = nrrc < nmac ? nrrc : nmac;
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %lu UEs\n",
|
||||
__func__, nrrc, nmac, ue_config_reply_msg->n_ue_config);
|
||||
__func__, nrrc, nmac, ue_config_reply_msg->n_ue_config);
|
||||
}
|
||||
|
||||
Protocol__FlexUeConfig **ue_config;
|
||||
@@ -608,8 +621,10 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
if (ue_config == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
rnti_t rntis[ue_config_reply_msg->n_ue_config];
|
||||
flexran_get_rrc_rnti_list(mod_id, rntis, ue_config_reply_msg->n_ue_config);
|
||||
|
||||
for (int i = 0; i < ue_config_reply_msg->n_ue_config; i++) {
|
||||
const rnti_t rnti = rntis[i];
|
||||
ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig));
|
||||
@@ -617,11 +632,13 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
flexran_agent_fill_rrc_ue_config(mod_id, rnti, ue_config[i]);
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
const int UE_id = flexran_get_mac_ue_id_rnti(mod_id, rnti);
|
||||
flexran_agent_fill_mac_ue_config(mod_id, UE_id, ue_config[i]);
|
||||
}
|
||||
}
|
||||
|
||||
ue_config_reply_msg->ue_config = ue_config;
|
||||
}
|
||||
|
||||
@@ -725,14 +742,26 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
||||
|
||||
if(cell_conf == NULL)
|
||||
goto error;
|
||||
for(int i = 0; i < enb_config_reply_msg->n_cell_config; i++){
|
||||
|
||||
for(int i = 0; i < enb_config_reply_msg->n_cell_config; i++) {
|
||||
cell_conf[i] = malloc(sizeof(Protocol__FlexCellConfig));
|
||||
if (!cell_conf[i]) goto error;
|
||||
|
||||
if (!cell_conf[i]) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
free(cell_conf[j]);
|
||||
}
|
||||
free(cell_conf);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_cell_config__init(cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_phy_xface(mod_id))
|
||||
flexran_agent_fill_phy_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
flexran_agent_fill_rrc_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id))
|
||||
flexran_agent_fill_mac_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
@@ -745,8 +774,13 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
for (int k = 0; k < enb_config_reply_msg->n_cell_config; k++) {
|
||||
free(cell_conf[k]);
|
||||
}
|
||||
free(cell_conf);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG;
|
||||
@@ -776,12 +810,16 @@ int flexran_agent_rrc_measurement(mid_t mod_id, const void *params, Protocol__Fl
|
||||
Protocol__FlexRrcTriggering *triggering = input->rrc_triggering;
|
||||
agent_reconf_rrc *reconf_param = malloc(sizeof(agent_reconf_rrc));
|
||||
reconf_param->trigger_policy = triggering->rrc_trigger;
|
||||
reconf_param->report_interval = 0;
|
||||
reconf_param->report_amount = 0;
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[mod_id]->rrc_ue_head)) {
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, ue_context_p->ue_context.rnti, flexran_get_current_frame(mod_id), flexran_get_current_subframe (mod_id), mod_id);
|
||||
flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt, ue_context_p, 0, reconf_param);
|
||||
}
|
||||
*msg = NULL;
|
||||
free(reconf_param);
|
||||
reconf_param = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -804,10 +842,11 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot
|
||||
|
||||
if (enb_config->n_cell_config > 1)
|
||||
LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n");
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id) && enb_config->cell_config[0]->slice_config) {
|
||||
prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config);
|
||||
//} else {
|
||||
// initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
||||
//} else {
|
||||
// initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
||||
}
|
||||
|
||||
*msg = NULL;
|
||||
|
||||
@@ -293,7 +293,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
/* Check if request was periodical */
|
||||
if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_PERIODICAL) {
|
||||
/* Create a one off flexran message as an argument for the periodical task */
|
||||
Protocol__FlexranMessage *timer_msg;
|
||||
Protocol__FlexranMessage *timer_msg = NULL;
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
@@ -311,7 +311,10 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
||||
if (flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg) == -1) {
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
/* Create a timer */
|
||||
long timer_id = 0;
|
||||
flexran_agent_timer_args_t *timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
||||
@@ -420,19 +423,21 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg){
|
||||
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
err_code_t err_code;
|
||||
int i;
|
||||
Protocol__FlexUeStatsReport **ue_report = NULL;
|
||||
Protocol__FlexCellStatsReport **cell_report = NULL;
|
||||
Protocol__FlexStatsReply *stats_reply_msg = NULL;
|
||||
err_code_t err_code = PROTOCOL__FLEXRAN_ERR__UNEXPECTED;
|
||||
int i,j;
|
||||
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_STATS_REPLY, &header) != 0)
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_STATS_REPLY, &header) != 0) {
|
||||
goto error;
|
||||
|
||||
|
||||
Protocol__FlexStatsReply *stats_reply_msg;
|
||||
}
|
||||
|
||||
stats_reply_msg = malloc(sizeof(Protocol__FlexStatsReply));
|
||||
|
||||
if (stats_reply_msg == NULL)
|
||||
if (stats_reply_msg == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_stats_reply__init(stats_reply_msg);
|
||||
stats_reply_msg->header = header;
|
||||
@@ -442,16 +447,18 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
|
||||
// UE report
|
||||
|
||||
Protocol__FlexUeStatsReport **ue_report;
|
||||
|
||||
|
||||
ue_report = malloc(sizeof(Protocol__FlexUeStatsReport *) * report_config->nr_ue);
|
||||
if (ue_report == NULL)
|
||||
goto error;
|
||||
|
||||
if (ue_report == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
|
||||
ue_report[i] = malloc(sizeof(Protocol__FlexUeStatsReport));
|
||||
if (ue_report[i] == NULL) {
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_ue_stats_report__init(ue_report[i]);
|
||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||
ue_report[i]->has_rnti = 1;
|
||||
@@ -460,19 +467,18 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
}
|
||||
|
||||
// cell rpoert
|
||||
|
||||
Protocol__FlexCellStatsReport **cell_report;
|
||||
|
||||
|
||||
cell_report = malloc(sizeof(Protocol__FlexCellStatsReport *) * report_config->nr_cc);
|
||||
if (cell_report == NULL)
|
||||
if (cell_report == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < report_config->nr_cc; i++) {
|
||||
|
||||
cell_report[i] = malloc(sizeof(Protocol__FlexCellStatsReport));
|
||||
if(cell_report[i] == NULL)
|
||||
if(cell_report[i] == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_cell_stats_report__init(cell_report[i]);
|
||||
cell_report[i]->carrier_index = report_config->cc_report_type[i].cc_id;
|
||||
@@ -507,8 +513,9 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
stats_reply_msg->ue_report = ue_report;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__SUCCESSFUL_OUTCOME;
|
||||
@@ -518,8 +525,38 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
|
||||
error :
|
||||
LOG_E(FLEXRAN_AGENT, "errno %d occured\n", err_code);
|
||||
return err_code;
|
||||
|
||||
if (header != NULL) {
|
||||
free(header);
|
||||
header = NULL;
|
||||
}
|
||||
|
||||
if (stats_reply_msg != NULL) {
|
||||
free(stats_reply_msg);
|
||||
stats_reply_msg = NULL;
|
||||
}
|
||||
|
||||
if (ue_report != NULL) {
|
||||
for (j = 0; j < report_config->nr_ue; j++) {
|
||||
if (ue_report[j] != NULL) {
|
||||
free(ue_report[j]);
|
||||
}
|
||||
}
|
||||
free(ue_report);
|
||||
ue_report = NULL;
|
||||
}
|
||||
|
||||
if (cell_report != NULL) {
|
||||
for (j = 0; j < report_config->nr_cc; j++) {
|
||||
if (cell_report[j] != NULL) {
|
||||
free(cell_report[j]);
|
||||
}
|
||||
}
|
||||
free(cell_report);
|
||||
cell_report = NULL;
|
||||
}
|
||||
|
||||
return err_code;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -705,14 +742,17 @@ err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id,
|
||||
goto error;
|
||||
}
|
||||
|
||||
Protocol__FlexranMessage *req_msg;
|
||||
Protocol__FlexranMessage *req_msg = NULL;
|
||||
|
||||
flexran_agent_stats_request(mod_id, xid, stats_req, &req_msg);
|
||||
stats_context[mod_id].stats_req = req_msg;
|
||||
stats_context[mod_id].prev_stats_reply = NULL;
|
||||
|
||||
stats_context[mod_id].cont_update = 1;
|
||||
stats_context[mod_id].xid = xid;
|
||||
if (req_msg != NULL) {
|
||||
stats_context[mod_id].stats_req = req_msg;
|
||||
stats_context[mod_id].prev_stats_reply = NULL;
|
||||
|
||||
stats_context[mod_id].cont_update = 1;
|
||||
stats_context[mod_id].xid = xid;
|
||||
}
|
||||
|
||||
if (pthread_mutex_unlock(stats_context[mod_id].mutex)) {
|
||||
goto error;
|
||||
|
||||
@@ -77,6 +77,7 @@ flexran_agent_task_queue_t *flexran_agent_task_queue_init(mid_t mod_id, size_t c
|
||||
if (queue == NULL)
|
||||
goto error;
|
||||
|
||||
queue->mutex = NULL;
|
||||
/* If no comparator was given, use the default one */
|
||||
if (cmp == NULL)
|
||||
queue->cmp = _flexran_agent_task_queue_cmp;
|
||||
|
||||
@@ -177,7 +177,7 @@ int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id,
|
||||
module_id_t cu_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_du_uid(f1_inst,du_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding cu_ue_f1ap_id %d for UE with RNTI %x\n", cu_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
@@ -187,7 +187,7 @@ int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id,
|
||||
module_id_t du_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_cu_uid(f1_inst,cu_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding du_ue_f1ap_id %d for UE with RNTI %x\n", du_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
|
||||
@@ -248,6 +248,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
} else {
|
||||
CU_send_F1_SETUP_FAILURE(instance);
|
||||
itti_free(TASK_RRC_ENB,message_p);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -327,6 +328,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_resp->mcc[i], f1ap_setup_resp->mnc[i], f1ap_setup_resp->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_resp->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
@@ -369,6 +371,8 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
cells_to_be_activated_list_itemExtIEs);
|
||||
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_160P9_t;
|
||||
|
||||
free(gNB_CUSystemInformation);
|
||||
gNB_CUSystemInformation = NULL;
|
||||
}
|
||||
/* ADD */
|
||||
cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item;
|
||||
@@ -562,6 +566,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -611,6 +616,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -787,6 +793,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI,0,sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -143,6 +143,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti);
|
||||
if (f1ap_uid < 0 ) {
|
||||
LOG_E(F1AP, "Failed to add UE \n");
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p);
|
||||
return -1;
|
||||
}
|
||||
f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
|
||||
@@ -95,6 +95,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_NRCGI;
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_ue_context_setup_req->mcc,
|
||||
f1ap_ue_context_setup_req->mnc,
|
||||
f1ap_ue_context_setup_req->mnc_digit_length,
|
||||
@@ -1183,6 +1184,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
|
||||
|
||||
// /* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -1222,6 +1224,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
|
||||
|
||||
/* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -169,6 +169,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
LOG_D(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
|
||||
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
|
||||
@@ -619,6 +620,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
memset((void *)&served_cell_information, 0, sizeof(F1AP_Served_Cell_Information_t));
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
nRCGI.nRCellIdentity.buf[0],
|
||||
@@ -778,6 +780,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t oldNRCGI;
|
||||
memset(&oldNRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&oldNRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &oldNRCGI.nRCellIdentity);
|
||||
@@ -790,6 +793,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
@@ -944,6 +948,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t oldNRCGI;
|
||||
memset(&oldNRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&oldNRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &oldNRCGI.nRCellIdentity);
|
||||
@@ -980,6 +985,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -311,6 +311,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
break;
|
||||
@@ -389,6 +398,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
LTE_SRB_ToAddModList_t *SRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
|
||||
LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
|
||||
for (i = 0; i< 8; i++){
|
||||
DRB2LCHAN[i] = 0;
|
||||
}
|
||||
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig)
|
||||
mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
|
||||
LTE_MeasGapConfig_t *measGapConfig = NULL;
|
||||
@@ -470,6 +482,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@@ -799,6 +820,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
|
||||
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[0], f1ap_du_data->mnc[0], f1ap_du_data->mnc_digit_length[0],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -470,6 +470,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
|
||||
|
||||
/* sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI; // issue here
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
|
||||
@@ -1155,6 +1156,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
|
||||
|
||||
/* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
}
|
||||
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.initiatingMessage->procedureCode > sizeof(f1ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.initiatingMessage->procedureCode >= sizeof(f1ap_messages_callback) / (3 * sizeof(
|
||||
f1ap_message_decoded_callback))
|
||||
|| (pdu.present > F1AP_F1AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
LOG_E(F1AP, "[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
|
||||
|
||||
@@ -144,6 +144,8 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) {
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min,
|
||||
"Band %d, bw %u : DL carrier frequency %u Hz < %u\n",
|
||||
eutra_bandP, bw, dl_CarrierFreq,
|
||||
@@ -165,6 +167,7 @@ uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i = %d , it will trigger out-of-bounds read.\n",i);
|
||||
AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min,
|
||||
"Band %d, bw %u : DL carrier frequency %lld Hz < %u\n",
|
||||
eutra_bandP, bw, dl_CarrierFreq,
|
||||
@@ -186,6 +189,7 @@ uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i = %d , it will trigger out-of-bounds read.\n",i);
|
||||
AssertFatal(ul_CarrierFreq_by_100k >= eutra_bandtable[i].ul_min,
|
||||
"Band %d, bw %u : UL carrier frequency %lld Hz < %u\n",
|
||||
eutra_bandP, bw, ul_CarrierFreq,
|
||||
@@ -205,6 +209,8 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min +
|
||||
(dl_earfcn - (eutra_bandtable[i].N_OFFs_DL / 10))) * 100000;
|
||||
}
|
||||
@@ -215,6 +221,8 @@ int32_t get_uldl_offset(int eutra_bandP) {
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min - eutra_bandtable[i].ul_min);
|
||||
}
|
||||
|
||||
@@ -685,7 +693,17 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_v13ext
|
||||
#endif
|
||||
) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
) {
|
||||
|
||||
int i;
|
||||
int UE_id = -1;
|
||||
eNB_MAC_INST *eNB = RC.mac[Mod_idP];
|
||||
@@ -736,6 +754,13 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
config_sib1(Mod_idP,CC_idP,tdd_Config);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
|
||||
/*if (schedulingInfoList_MBMS!=NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
|
||||
config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
|
||||
}*/
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (sib1_v13ext != NULL) {
|
||||
@@ -855,6 +880,39 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (nonMBSFN_SubframeConfig != NULL){
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n",
|
||||
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
|
||||
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
|
||||
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
|
||||
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
@@ -1283,4 +1341,4 @@ void eNB_Config_Local_DRX(
|
||||
LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file config.c
|
||||
* \brief UE and eNB configuration performed by RRC or as a consequence of RRC procedures
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
|
||||
/*! \file config_ue.c
|
||||
* \brief UE configuration performed by RRC or as a consequence of RRC procedures / This includes FeMBMS UE procedures
|
||||
* \author Navid Nikaein, Raymond Knopp and Javier Morgade
|
||||
* \date 2010 - 2014 / 2019
|
||||
* \version 0.1
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \email: navid.nikaein@eurecom.fr, javier.morgade@ieee.org
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
@@ -130,7 +132,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
int i;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
@@ -560,6 +570,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(nonMBSFN_SubframeConfig!=NULL) {
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
if (cba_rnti) {
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
/*!\brief DTCH DRB1 logical channel */
|
||||
#define DTCH 3 // LCID
|
||||
/*!\brief MCCH logical channel */
|
||||
#define MCCH 4
|
||||
//#define MCCH 4
|
||||
#define MCCH 62
|
||||
/*!\brief MTCH logical channel */
|
||||
#define MTCH 1
|
||||
// DLSCH LCHAN ID
|
||||
|
||||
@@ -956,7 +956,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* This schedules MIB */
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
|
||||
@@ -1288,8 +1288,6 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
for (i = 0; i < NB_RA_PROC_MAX; i++) {
|
||||
ra = (RA_t *) & cc[CC_id].ra[i];
|
||||
|
||||
//LOG_D(MAC,"RA[state:%d]\n",ra->state);
|
||||
|
||||
if (ra->state == MSG2)
|
||||
generate_Msg2(module_idP, CC_id, frameP, subframeP, ra);
|
||||
else if (ra->state == MSG4 && ra->Msg4_frame == frameP && ra->Msg4_subframe == subframeP )
|
||||
|
||||
@@ -75,6 +75,235 @@ int Sj100[size_Sj100] = { 0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15 };
|
||||
|
||||
int SIB1_BR_TBS_table[6] = { 208, 256, 328, 504, 712, 936 };
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
schedule_SIB1_MBMS(module_id_t module_idP,
|
||||
frame_t frameP, sub_frame_t subframeP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef SCHEDULE_SIB1_MBMS
|
||||
int8_t bcch_sdu_length;
|
||||
int CC_id;
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc;
|
||||
uint8_t *vrb_map;
|
||||
int first_rb = -1;
|
||||
int N_RB_DL;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
nfapi_tx_request_pdu_t *TX_req;
|
||||
nfapi_dl_config_request_body_t *dl_req;
|
||||
int m, i, N_S_NB;
|
||||
int *Sj;
|
||||
int n_NB = 0;
|
||||
int TBS;
|
||||
int k = 0, rvidx;
|
||||
uint16_t sfn_sf = frameP<<4|subframeP;
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
vrb_map = (void *) &cc->vrb_map;
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
|
||||
|
||||
int foffset = cc->physCellId & 1;
|
||||
int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
|
||||
|
||||
// Time-domain scheduling
|
||||
if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
|
||||
continue;
|
||||
else
|
||||
switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
|
||||
case 0: // repetition 4
|
||||
k = (frameP >> 1) & 3;
|
||||
if ((subframeP != (4 + sfoffset))
|
||||
|| ((frameP & 1) != foffset))
|
||||
continue;
|
||||
break;
|
||||
case 1: // repetition 8
|
||||
k = frameP & 3;
|
||||
AssertFatal(N_RB_DL > 15,
|
||||
"SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
|
||||
N_RB_DL);
|
||||
if ((foffset == 0) && (subframeP != (4 + sfoffset)))
|
||||
continue;
|
||||
else if ((foffset == 1)
|
||||
&& (subframeP != ((9 + sfoffset) % 10)))
|
||||
continue;
|
||||
break;
|
||||
case 2: // repetition 16
|
||||
k = ((10 * frameP) + subframeP) & 3;
|
||||
AssertFatal(N_RB_DL > 15,
|
||||
"SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
|
||||
N_RB_DL);
|
||||
if ((sfoffset == 1)
|
||||
&& ((subframeP != 0) || (subframeP != 5)))
|
||||
continue;
|
||||
else if ((sfoffset == 0) && (foffset == 0)
|
||||
&& (subframeP != 4) && (subframeP != 9))
|
||||
continue;
|
||||
else if ((sfoffset == 0) && (foffset == 1)
|
||||
&& (subframeP != 0) && (subframeP != 9))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
// if we get here we have to schedule SIB1_BR in this frame/subframe
|
||||
|
||||
// keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
|
||||
if ((frameP & 7) == 0)
|
||||
cc->SIB1_BR_cnt = 0;
|
||||
else
|
||||
cc->SIB1_BR_cnt++;
|
||||
|
||||
// Frequency-domain scheduling
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
case 15:
|
||||
default:
|
||||
m = 1;
|
||||
n_NB = 0;
|
||||
N_S_NB = 0;
|
||||
Sj = NULL;
|
||||
break;
|
||||
case 25:
|
||||
m = 2;
|
||||
N_S_NB = 2;
|
||||
Sj = Sj25;
|
||||
break;
|
||||
case 50:
|
||||
m = 2;
|
||||
N_S_NB = 6;
|
||||
Sj = Sj50;
|
||||
break;
|
||||
case 75:
|
||||
m = 4;
|
||||
N_S_NB = 10;
|
||||
Sj = Sj75;
|
||||
break;
|
||||
case 100:
|
||||
m = 4;
|
||||
N_S_NB = 14;
|
||||
Sj = Sj100;
|
||||
break;
|
||||
}
|
||||
// Note: definition of k above and rvidx from 36.321 section 5.3.1
|
||||
rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
|
||||
|
||||
i = cc->SIB1_BR_cnt & (m - 1);
|
||||
|
||||
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
|
||||
|
||||
|
||||
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case
|
||||
|
||||
AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
|
||||
"schedulingInfoSIB1_BR_r13 %d > 18\n",
|
||||
(int) cc->mib->message.schedulingInfoSIB1_BR_r13);
|
||||
|
||||
AssertFatal(bcch_sdu_length > 0,
|
||||
"RRC returned 0 bytes for SIB1-BR\n");
|
||||
|
||||
TBS =
|
||||
SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
|
||||
1) / 3] >> 3;
|
||||
|
||||
AssertFatal(bcch_sdu_length <= TBS,
|
||||
"length returned by RRC %d is not compatible with the TBS %d from MIB\n",
|
||||
bcch_sdu_length, TBS);
|
||||
|
||||
if ((frameP & 1023) < 200)
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d) rvidx %d\n",
|
||||
module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
|
||||
n_NB, i, m, N_S_NB, rvidx);
|
||||
|
||||
// allocate all 6 PRBs in narrowband for SIB1_BR
|
||||
|
||||
first_rb = narrowband_to_first_rb(cc, n_NB);
|
||||
|
||||
vrb_map[first_rb] = 1;
|
||||
vrb_map[first_rb + 1] = 1;
|
||||
vrb_map[first_rb + 2] = 1;
|
||||
vrb_map[first_rb + 3] = 1;
|
||||
vrb_map[first_rb + 4] = 1;
|
||||
vrb_map[first_rb + 5] = 1;
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *) dl_config_pdu, 0,
|
||||
sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||
// Rel10 fields
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
// Rel13 fields
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0; // SIB1-BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SFx
|
||||
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||
dl_req->number_pdu++;
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
// Program TX Request
|
||||
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
TX_req->pdu_length = bcch_sdu_length;
|
||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||
TX_req->num_segments = 1;
|
||||
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
|
||||
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[0].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
||||
}
|
||||
if (cc->tdd_Config != NULL) { //TDD
|
||||
LOG_D(MAC,
|
||||
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
|
||||
frameP, CC_id, bcch_sdu_length);
|
||||
} else {
|
||||
LOG_D(MAC,
|
||||
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
|
||||
frameP, CC_id, bcch_sdu_length);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
schedule_SIB1_BR(module_id_t module_idP,
|
||||
@@ -304,6 +533,8 @@ schedule_SIB1_BR(module_id_t module_idP,
|
||||
int si_WindowLength_BR_r13tab[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
|
||||
int si_TBS_r13tab[LTE_SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
|
||||
|
||||
int si_WindowLength_MBMS_r14tab[8] = { 1, 2, 5, 10, 15, 20, 40, 80 };
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
@@ -503,6 +734,231 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
} // CC_id
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int8_t bcch_sdu_length;
|
||||
int mcs = -1;
|
||||
int CC_id;
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc;
|
||||
uint8_t *vrb_map;
|
||||
int first_rb = -1;
|
||||
int N_RB_DL;
|
||||
nfapi_dl_config_request_t *dl_config_request;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
nfapi_tx_request_pdu_t *TX_req;
|
||||
nfapi_dl_config_request_body_t *dl_req;
|
||||
uint16_t sfn_sf = frameP << 4 | subframeP;
|
||||
|
||||
start_meas(&eNB->schedule_si_mbms);
|
||||
|
||||
// Only schedule LTE System Information in subframe 0
|
||||
if (subframeP == 0) {
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
vrb_map = (void *) &cc->vrb_map;
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
dl_config_request = &eNB->DL_req[CC_id];
|
||||
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
|
||||
|
||||
|
||||
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_MBMS,0xFFFF, 1, &cc->BCCH_MBMS_pdu.payload[0], 0); // not used in this case
|
||||
|
||||
if (bcch_sdu_length > 0) {
|
||||
LOG_D(MAC, "[eNB %d] Frame %d : BCCH-MBMS->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
|
||||
|
||||
// Allocate 4 PRBs in a random location
|
||||
/*
|
||||
while (1) {
|
||||
first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
|
||||
if ((vrb_map[first_rb] != 1) &&
|
||||
(vrb_map[first_rb+1] != 1) &&
|
||||
(vrb_map[first_rb+2] != 1) &&
|
||||
(vrb_map[first_rb+3] != 1))
|
||||
break;
|
||||
}
|
||||
*/
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
first_rb = 0;
|
||||
break;
|
||||
case 15:
|
||||
first_rb = 6;
|
||||
break;
|
||||
case 25:
|
||||
first_rb = 11;
|
||||
break;
|
||||
case 50:
|
||||
first_rb = 23;
|
||||
break;
|
||||
case 100:
|
||||
first_rb = 48;
|
||||
break;
|
||||
}
|
||||
|
||||
vrb_map[first_rb] = 1;
|
||||
vrb_map[first_rb + 1] = 1;
|
||||
vrb_map[first_rb + 2] = 1;
|
||||
vrb_map[first_rb + 3] = 1;
|
||||
|
||||
// Get MCS for length of SI, 3 PRBs
|
||||
if (bcch_sdu_length <= 7) {
|
||||
mcs = 0;
|
||||
} else if (bcch_sdu_length <= 11) {
|
||||
mcs = 1;
|
||||
} else if (bcch_sdu_length <= 18) {
|
||||
mcs = 2;
|
||||
} else if (bcch_sdu_length <= 22) {
|
||||
mcs = 3;
|
||||
} else if (bcch_sdu_length <= 26) {
|
||||
mcs = 4;
|
||||
} else if (bcch_sdu_length <= 28) {
|
||||
mcs = 5;
|
||||
} else if (bcch_sdu_length <= 32) {
|
||||
mcs = 6;
|
||||
} else if (bcch_sdu_length <= 41) {
|
||||
mcs = 7;
|
||||
} else if (bcch_sdu_length <= 49) {
|
||||
mcs = 8;
|
||||
}
|
||||
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *) dl_config_pdu, 0,
|
||||
sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
|
||||
dl_config_request->sfn_sf = sfn_sf;
|
||||
|
||||
if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
|
||||
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI MBMS\n", frameP, subframeP);
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *) dl_config_pdu, 0,
|
||||
sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||
dl_req->number_pdu++;
|
||||
|
||||
// Rel10 fields
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
// Rel13 fields
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SF
|
||||
|
||||
dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
dl_config_request->sfn_sf = sfn_sf;
|
||||
|
||||
// Program TX Request
|
||||
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
TX_req->pdu_length = bcch_sdu_length;
|
||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||
TX_req->num_segments = 1;
|
||||
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||
TX_req->segments[0].segment_data = cc->BCCH_MBMS_pdu.payload;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
|
||||
} else {
|
||||
LOG_E(MAC,
|
||||
"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI MBMS\n",
|
||||
module_idP, CC_id, frameP, subframeP);
|
||||
}
|
||||
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_MBMS_pdu.payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff,
|
||||
bcch_sdu_length);
|
||||
}
|
||||
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
|
||||
LOG_D(MAC,
|
||||
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
|
||||
frameP, CC_id, bcch_sdu_length, mcs);
|
||||
} else {
|
||||
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-MBMS->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
|
||||
}
|
||||
|
||||
|
||||
eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
|
||||
eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
|
||||
eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
|
||||
eNB->eNB_stats[CC_id].bcch_mcs = mcs;
|
||||
//printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
|
||||
} else {
|
||||
|
||||
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//schedule_SIB1_BR(module_idP, frameP, subframeP);
|
||||
//schedule_SI_BR(module_idP, frameP, subframeP);
|
||||
#endif
|
||||
|
||||
stop_meas(&eNB->schedule_si_mbms);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
|
||||
@@ -3017,8 +3017,9 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_list->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)
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
|
||||
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],rb_table[rb_table_index],rb_table_index,UE_template->TBS_UL[harq_pid],harq_pid);
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n",
|
||||
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid);
|
||||
|
||||
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
|
||||
@@ -65,7 +65,7 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
||||
uint8_t mbsfn_sync_area)
|
||||
{
|
||||
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
||||
if (mbsfn_sync_area > MAX_MBSFN_AREA) {
|
||||
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
|
||||
LOG_W(MAC,
|
||||
"[eNB %d] CC_id %d MBSFN synchronization area %d out of range\n ",
|
||||
module_idP, CC_id, mbsfn_sync_area);
|
||||
|
||||
@@ -2535,7 +2535,7 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
|
||||
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
|
||||
UE_template->ul_SR > 0 || // uplink scheduling request
|
||||
(UE_sched_ctl->ul_inactivity_timer > 20 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
|
||||
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
|
||||
(UE_sched_ctl->ul_inactivity_timer > 10 &&
|
||||
UE_sched_ctl->ul_scheduled == 0 &&
|
||||
mac_eNB_get_rrc_status(module_idP,
|
||||
@@ -4056,7 +4056,6 @@ extract_harq(module_id_t mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1: // Channel Selection
|
||||
@@ -5140,8 +5139,8 @@ nack_or_dtx_reported(COMMON_channels_t *cc,
|
||||
if (cc->tdd_Config) {
|
||||
nfapi_harq_indication_tdd_rel13_t *hi = &harq_pdu->harq_indication_tdd_rel13;
|
||||
|
||||
for (i = 0; i < hi->number_of_ack_nack; hi++) {
|
||||
if (hi->harq_data[0].bundling.value_0 != 1) //only bundling is used for tdd for now
|
||||
for (i = 0; i < hi->number_of_ack_nack; i++) {
|
||||
if (hi->harq_data[i].bundling.value_0 != 1) //only bundling is used for tdd for now
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5150,7 +5149,7 @@ nack_or_dtx_reported(COMMON_channels_t *cc,
|
||||
|
||||
nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13;
|
||||
|
||||
for (i = 0; i < hi->number_of_ack_nack; hi++) {
|
||||
for (i = 0; i < hi->number_of_ack_nack; i++) {
|
||||
if (hi->harq_tb_n[i] != 1)
|
||||
return 1;
|
||||
}
|
||||
@@ -5182,13 +5181,6 @@ harq_indication(module_id_t mod_idP,
|
||||
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
|
||||
// extract HARQ Information
|
||||
LOG_D(MAC, "Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n",
|
||||
frameP,
|
||||
subframeP,
|
||||
channel,
|
||||
UE_id,
|
||||
rnti,
|
||||
ul_cqi);
|
||||
|
||||
if (cc->tdd_Config) {
|
||||
extract_harq(mod_idP,
|
||||
|
||||
@@ -920,6 +920,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
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];
|
||||
@@ -1514,7 +1515,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
/* Handle the aperiodic CQI report */
|
||||
cqi_req = 0;
|
||||
|
||||
LOG_D(MAC,"RRC Conenction status %d, cqi_timer %d\n",status,UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
if (status >= RRC_CONNECTED && UE_sched_ctrl_ptr->cqi_req_timer > 30) {
|
||||
if (UE_sched_ctrl_ptr->cqi_received == 0) {
|
||||
if (NFAPI_MODE != NFAPI_MONOLITHIC) {
|
||||
@@ -1522,6 +1523,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
} else {
|
||||
cqi_req = 1;
|
||||
|
||||
LOG_D(MAC,"Setting CQI_REQ (timer %d)\n",UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
/* TDD: to be safe, do not ask CQI in special Subframes:36.213/7.2.3 CQI definition */
|
||||
if (cc[CC_id].tdd_Config) {
|
||||
switch (cc[CC_id].tdd_Config->subframeAssignment) {
|
||||
@@ -1548,6 +1550,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_D(MAC,"Clearing CQI request timer\n");
|
||||
UE_sched_ctrl_ptr->cqi_req_flag = 0;
|
||||
UE_sched_ctrl_ptr->cqi_received = 0;
|
||||
UE_sched_ctrl_ptr->cqi_req_timer = 0;
|
||||
|
||||
@@ -66,6 +66,12 @@
|
||||
#include "LTE_SystemInformationBlockType1-v1310-IEs.h"
|
||||
#include "LTE_SystemInformationBlockType18-r12.h"
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "LTE_BCCH-BCH-Message-MBMS.h"
|
||||
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
|
||||
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
|
||||
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
|
||||
#endif
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
@@ -416,6 +422,11 @@ typedef struct {
|
||||
#define BCCH_SIB1_BR 6 // SIB1_BR
|
||||
/*!\brief Values of BCCH SIB_BR logical channel (fake) */
|
||||
#define BCCH_SI_BR 7 // SI-BR
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/*!\brief Values of BCCH SIB1_BR logical channel (fake) */
|
||||
#define BCCH_SIB1_MBMS 60 // SIB1_MBMS //TODO better armonize index
|
||||
#define BCCH_SI_MBMS 61 // SIB_MBMS //TODO better armonize index
|
||||
#endif
|
||||
/*!\brief Value of CCCH / SRB0 logical channel */
|
||||
#define CCCH 0 // srb0
|
||||
/*!\brief DCCH / SRB1 logical channel */
|
||||
@@ -425,7 +436,8 @@ typedef struct {
|
||||
/*!\brief DTCH DRB1 logical channel */
|
||||
#define DTCH 3 // LCID
|
||||
/*!\brief MCCH logical channel */
|
||||
#define MCCH 4
|
||||
//#define MCCH 4
|
||||
#define MCCH 62
|
||||
/*!\brief MTCH logical channel */
|
||||
#define MTCH 1
|
||||
// DLSCH LCHAN ID
|
||||
@@ -1311,6 +1323,7 @@ typedef struct {
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
|
||||
#endif
|
||||
LTE_TDD_Config_t *tdd_Config;
|
||||
LTE_SchedulingInfoList_t *schedulingInfoList;
|
||||
@@ -1338,6 +1351,9 @@ typedef struct {
|
||||
uint8_t vrb_map_UL[100];
|
||||
/// MBSFN SubframeConfig
|
||||
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
|
||||
#endif
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
@@ -1370,6 +1386,11 @@ typedef struct {
|
||||
/// Outgoing BCCH-BR pdu for PHY
|
||||
BCCH_PDU BCCH_BR_pdu[20];
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
BCCH_PDU BCCH_MBMS_pdu;
|
||||
uint8_t FeMBMS_flag;
|
||||
#endif
|
||||
|
||||
} COMMON_channels_t;
|
||||
/*! \brief top level eNB MAC structure */
|
||||
typedef struct eNB_MAC_INST_s {
|
||||
@@ -1439,6 +1460,9 @@ typedef struct eNB_MAC_INST_s {
|
||||
time_stats_t eNB_scheduler;
|
||||
/// processing time of eNB scheduler for SI
|
||||
time_stats_t schedule_si;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
time_stats_t schedule_si_mbms;
|
||||
#endif
|
||||
/// processing time of eNB scheduler for Random access
|
||||
time_stats_t schedule_ra;
|
||||
/// processing time of eNB ULSCH scheduler
|
||||
@@ -1678,6 +1702,9 @@ typedef struct {
|
||||
|
||||
/// MBSFN_Subframe Configuration
|
||||
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
|
||||
#endif
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
|
||||
@@ -67,6 +67,17 @@ void schedule_RA(module_id_t module_idP, frame_t frameP,
|
||||
void schedule_SI(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/** \brief First stage of SI Scheduling. Gets a SI SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param frame Frame index
|
||||
@param subframe Subframe number on which to act
|
||||
*/
|
||||
void schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
#endif
|
||||
|
||||
|
||||
/** \brief MBMS scheduling: Checking the position for MBSFN subframes. Create MSI, transfer MCCH from RRC to MAC, transfer MTCHs from RLC to MAC. Multiplexing MSI,MCCH&MTCHs. Return 1 if there are MBSFN data being allocated, otherwise return 0;
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param frame Frame index
|
||||
@@ -539,6 +550,11 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
|
||||
void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
|
||||
uint8_t CH_index, void *pdu, uint16_t len);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frame,
|
||||
uint8_t CH_index, void *pdu, uint16_t len);
|
||||
#endif
|
||||
|
||||
void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
|
||||
uint8_t CH_index, void *pdu, uint16_t len);
|
||||
|
||||
@@ -954,6 +970,12 @@ int generate_dlsch_header(unsigned char *mac_header,
|
||||
@param mbsfn_AreaInfoList pointer to MBSFN Area Info list from SIB13
|
||||
@param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message)
|
||||
@param sib1_ext_r13 SI Scheduling information for SI-BR UEs
|
||||
@param mib_fembms pointer to FeMBMS MIB
|
||||
@param FeMBMS_Flag indicates FeMBMS transmission
|
||||
@param schedulingInfo_fembms pointer to FeMBMS SI Scheduling Information
|
||||
@param non_MBSFN_SubframeConfig pointer to FeMBMS Non MBSFN Subframe Config
|
||||
@param sib1_mbms_r14_fembms pointer SI Scheduling infomration for SI-MBMS
|
||||
@param mbsfn_AreaInfoList_fembms pointer to FeMBMS MBSFN Area Info list from SIB1-MBMS
|
||||
*/
|
||||
|
||||
int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
@@ -1003,6 +1025,15 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_ext_r13
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -1066,6 +1097,12 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
|
||||
,config_action_t config_action
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -1115,6 +1152,7 @@ uint8_t getQm(uint8_t mcs);
|
||||
uint8_t subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
|
||||
sub_frame_t subframe);
|
||||
|
||||
|
||||
void get_srs_pos(COMMON_channels_t * cc, uint16_t isrs,
|
||||
uint16_t * psrsPeriodicity, uint16_t * psrsOffset);
|
||||
|
||||
|
||||
@@ -280,6 +280,8 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame,subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid];
|
||||
|
||||
@@ -302,6 +304,8 @@ maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
harq_pid = subframe2harqpid(cc, sched_frame, sched_subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid];
|
||||
|
||||
@@ -1399,7 +1403,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
|
||||
|
||||
//
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
|
||||
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id)));
|
||||
// initialize harq_pid and round
|
||||
cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file ue_procedures.c
|
||||
* \brief procedures related to UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
/*! \file asn1_msg.c
|
||||
* \brief primitives to build the asn1 messages / primitives to build FeMBMS asn1 messages
|
||||
* \author Raymond Knopp, Navid Nikaein and Javier Morgade
|
||||
* \date 2011 / 2019
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: raymond.knopp@eurecom.fr, navid.nikaein@eurecom.fr javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#ifdef EXMIMO
|
||||
@@ -594,6 +594,45 @@ ue_send_sdu(module_id_t module_idP,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void
|
||||
ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len)
|
||||
{
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
|
||||
module_idP, frameP, BCCH, len);
|
||||
|
||||
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
|
||||
SI_RNTI,
|
||||
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len) {
|
||||
@@ -3329,7 +3368,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
|
||||
|
||||
|
||||
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
|
||||
mac_rlc_status_resp_t rlc_status; //, rlc_status_data;
|
||||
mac_rlc_status_resp_t rlc_status = {0,0,0,0,0}; //, rlc_status_data;
|
||||
uint32_t absSF = (frameP*10)+subframeP;
|
||||
UE_MAC_INST *ue = &UE_mac_inst[module_idP];
|
||||
int rvtab[4] = {0,2,3,1};
|
||||
@@ -3370,10 +3409,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
|
||||
(ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC
|
||||
// 10 PRBs, mcs 19
|
||||
int TBS = 4584/8;
|
||||
int req;
|
||||
|
||||
if (TBS <= rlc_status.bytes_in_buffer) req = TBS;
|
||||
else req = rlc_status.bytes_in_buffer;
|
||||
int req = (TBS <= rlc_status.bytes_in_buffer) ? TBS : rlc_status.bytes_in_buffer;
|
||||
|
||||
if (req>0) {
|
||||
sdu_length = mac_rlc_data_req(module_idP,
|
||||
|
||||
@@ -972,8 +972,10 @@ pdcp_data_ind(
|
||||
dest_addr.sin_family = AF_INET;
|
||||
dest_addr.sin_port = udp_header->dest;
|
||||
dest_addr.sin_addr.s_addr = ip_header->daddr;
|
||||
sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
|
||||
packet_forwarded = TRUE;
|
||||
|
||||
sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
|
||||
//packet_forwarded = TRUE;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -499,12 +499,12 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
||||
(void)data_p;
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
//TTN for D2D (PC5S)
|
||||
int prose_addr_len;
|
||||
int prose_addr_len = sizeof(prose_pdcp_addr);
|
||||
char send_buf[BUFSIZE], receive_buf[BUFSIZE];
|
||||
//int optval;
|
||||
int bytes_received;
|
||||
sidelink_pc5s_element *sl_pc5s_msg_send = NULL;
|
||||
pc5s_header_t *pc5s_header;
|
||||
pc5s_header_t *pc5s_header = NULL;
|
||||
rb_id_t rab_id = 0;
|
||||
//TTN for D2D (PC5S)
|
||||
// receive a message from ProSe App
|
||||
@@ -680,6 +680,10 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
||||
break;
|
||||
} /* end of switch */
|
||||
}/* end of bytes_received > 0 */
|
||||
if (pc5s_header != NULL) {
|
||||
free(pc5s_header);
|
||||
pc5s_header = NULL;
|
||||
}
|
||||
} /* pdcp_fifo_read_input_sdus_frompc5s */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -811,6 +811,7 @@ rlc_am_mac_data_request (
|
||||
tb_p = tb_p->next;
|
||||
} /* while */
|
||||
} /* MESSAGE_CHART_GENERATOR && data_req.data.nb_elements > 0 */
|
||||
data_req.buffer_occupancy_in_pdus = 0;
|
||||
|
||||
return data_req;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ rlc_tm_mac_status_indication (
|
||||
status_resp.buffer_occupancy_in_bytes = ((rlc_tm_entity_t *) rlc_pP)->buffer_occupancy;
|
||||
status_resp.buffer_occupancy_in_pdus = status_resp.buffer_occupancy_in_bytes / ((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size;
|
||||
status_resp.rlc_info.rlc_protocol_state = ((rlc_tm_entity_t *) rlc_pP)->protocol_state;
|
||||
status_resp.head_sdu_creation_time = 0;
|
||||
return status_resp;
|
||||
}
|
||||
|
||||
@@ -185,6 +186,7 @@ rlc_tm_mac_data_request (
|
||||
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_p),
|
||||
data_req.data.nb_elements);
|
||||
}
|
||||
data_req.ue_id_type_indicator = 0;
|
||||
|
||||
return data_req;
|
||||
}
|
||||
|
||||
@@ -582,6 +582,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP,cons
|
||||
} /* while (tb_p != NULL) */
|
||||
} /* if (data_req.data.nb_elements > 0) */
|
||||
|
||||
data_req.buffer_occupancy_in_pdus = 0;
|
||||
return data_req;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ void config_req_rlc_um_asn1 (
|
||||
}
|
||||
|
||||
rlc_p = &rlc_union_p->rlc.um;
|
||||
}
|
||||
}else
|
||||
if ((sourceL2Id >0 ) && (destinationL2Id >0)){
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
|
||||
} else
|
||||
|
||||
@@ -112,7 +112,7 @@ signed int rlc_um_get_pdu_infos(
|
||||
// PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO] SN %04d TOO MANY LIs ",
|
||||
// PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||
// pdu_info_pP->sn);
|
||||
if(pdu_info_pP->num_li > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
|
||||
if(pdu_info_pP->num_li >= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
|
||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO] SN %04d TOO MANY LIs \n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||
pdu_info_pP->sn);
|
||||
@@ -1038,6 +1038,8 @@ rlc_um_receive_process_dar (
|
||||
sn = pdu_pP->b1 & 0x1F;
|
||||
} else {
|
||||
free_mem_block(pdu_mem_pP, __func__);
|
||||
pdu_mem_pP = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
RLC_UM_MUTEX_LOCK(&rlc_pP->lock_dar_buffer, ctxt_pP, rlc_pP);
|
||||
|
||||
@@ -398,7 +398,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||
}
|
||||
}else
|
||||
|
||||
if (sourceL2Id && destinationL2Id) {
|
||||
LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
|
||||
|
||||
@@ -77,6 +77,26 @@ mac_rrc_data_req(
|
||||
carrier = &rrc->carrier[0];
|
||||
mib = &carrier->mib;
|
||||
|
||||
if(Srb_id == BCCH_SI_MBMS){
|
||||
if (frameP%4 == 0){
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1 MBMS\n",Mod_idP,frameP);
|
||||
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
|
||||
LOG_T(RRC,"\n");
|
||||
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
|
||||
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
|
||||
}
|
||||
}
|
||||
|
||||
if((Srb_id & RAB_OFFSET) == BCCH) {
|
||||
if(RC.rrc[Mod_idP]->carrier[CC_id].SI.Active==0) {
|
||||
return 0;
|
||||
|
||||
@@ -138,6 +138,40 @@ mac_rrc_data_ind_ue(
|
||||
*/
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(srb_idP == BCCH_SI_MBMS) {
|
||||
LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
|
||||
|
||||
if (sdu_lenP > msg_sdu_size) {
|
||||
LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
|
||||
sdu_size = msg_sdu_size;
|
||||
} else {
|
||||
sdu_size = sdu_lenP;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_MAC_UE, 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;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size = sdu_size;
|
||||
memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq = 30 /* TODO change phy to report rspq */;
|
||||
RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp = 45 /* TODO change phy to report rspp */;
|
||||
|
||||
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
|
||||
}
|
||||
#else
|
||||
decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if(srb_idP == BCCH) {
|
||||
LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -78,6 +78,13 @@
|
||||
#include "LTE_SBCCH-SL-BCH-MessageType.h"
|
||||
#include "LTE_SBCCH-SL-BCH-Message.h"
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "LTE_BCCH-BCH-Message-MBMS.h"
|
||||
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
|
||||
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
|
||||
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
|
||||
#endif
|
||||
|
||||
//#include "PHY/defs.h"
|
||||
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
@@ -177,6 +184,88 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
|
||||
return 0xFF; //error!
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) {
|
||||
asn_enc_rval_t enc_rval;
|
||||
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
|
||||
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
|
||||
uint16_t *spare = calloc(1,sizeof(uint16_t));
|
||||
uint16_t *additionalNonMBSFNSubframes = calloc(1,sizeof(uint16_t));
|
||||
|
||||
if( spare == NULL || additionalNonMBSFNSubframes == NULL ) abort();
|
||||
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n6;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n15;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n25;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n50;
|
||||
break;
|
||||
|
||||
case 75:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n75;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
mib_fembms->message.dl_Bandwidth_MBMS_r14 = LTE_MasterInformationBlock_MBMS_r14__dl_Bandwidth_MBMS_r14_n100;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
|
||||
}
|
||||
LOG_I(RRC,"[MIB] systemBandwidth %x, additional non MBMS subframes %x, sfn %x\n",
|
||||
(uint32_t)mib_fembms->message.dl_Bandwidth_MBMS_r14,
|
||||
(uint32_t)additionalNonMBSFN,
|
||||
(uint32_t)sfn);
|
||||
|
||||
|
||||
mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
|
||||
mib_fembms->message.systemFrameNumber_r14.size = 1;
|
||||
mib_fembms->message.systemFrameNumber_r14.bits_unused=0;
|
||||
mib_fembms->message.spare.buf = (uint8_t *)spare;
|
||||
//#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
mib_fembms->message.spare.size = 2;
|
||||
mib_fembms->message.spare.bits_unused = 6; // This makes a spare of 10 bits
|
||||
//#else
|
||||
//mib->message.spare.size = 1;
|
||||
//mib->message.spare.bits_unused = 3; // This makes a spare of 5 bits
|
||||
//mib->message.schedulingInfoSIB1_BR_r13 = 0; // turn off eMTC
|
||||
//#endif
|
||||
|
||||
//TODO additionalNonBMSFNSubframes-r14 INTEGER (0..3) ?
|
||||
|
||||
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
|
||||
NULL,
|
||||
(void *)mib_fembms,
|
||||
carrier->MIB_FeMBMS,
|
||||
24);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
@@ -317,6 +406,221 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
int Mod_id,int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, RrcConfigurationReq *configuration
|
||||
#endif
|
||||
) {
|
||||
// SystemInformation_t systemInformation;
|
||||
#if defined(ENABLE_ITTI)
|
||||
int num_plmn = configuration->num_plmn;
|
||||
#else
|
||||
int num_plmn = 1;
|
||||
#endif
|
||||
LTE_PLMN_IdentityInfo_t PLMN_identity_info[num_plmn];
|
||||
LTE_MCC_MNC_Digit_t dummy_mcc[num_plmn][3], dummy_mnc[num_plmn][3];
|
||||
asn_enc_rval_t enc_rval;
|
||||
LTE_SchedulingInfo_MBMS_r14_t schedulingInfo;
|
||||
LTE_SIB_Type_t sib_type;
|
||||
uint8_t *buffer = carrier->SIB1_MBMS;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = &carrier->siblock1_MBMS;
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t **sib1_MBMS = &carrier->sib1_MBMS;
|
||||
|
||||
int i;
|
||||
//LTE_NonMBSFN_SubframeConfig_r14 nonMBSFN_SubframeConfig_r14;
|
||||
|
||||
struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1/*, *MBSFN_Area2*/;
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 nonMBSFN_SubframeConfig_r14;
|
||||
|
||||
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_MBMS_t));
|
||||
bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14_PR_c1;
|
||||
bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14__c1_PR_systemInformationBlockType1_MBMS_r14;
|
||||
// memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
|
||||
*sib1_MBMS = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
|
||||
memset(PLMN_identity_info,0,num_plmn * sizeof(LTE_PLMN_IdentityInfo_t));
|
||||
memset(&schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
|
||||
memset(&sib_type,0,sizeof(LTE_SIB_Type_t));
|
||||
memset(&nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
|
||||
|
||||
/* as per TS 36.311, up to 6 PLMN_identity_info are allowed in list -> add one by one */
|
||||
for (i = 0; i < configuration->num_plmn; ++i) {
|
||||
PLMN_identity_info[i].plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc));
|
||||
memset(PLMN_identity_info[i].plmn_Identity.mcc,0,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc));
|
||||
asn_set_empty(&PLMN_identity_info[i].plmn_Identity.mcc->list);//.size=0;
|
||||
#if defined(ENABLE_ITTI)
|
||||
dummy_mcc[i][0] = (configuration->mcc[i] / 100) % 10;
|
||||
dummy_mcc[i][1] = (configuration->mcc[i] / 10) % 10;
|
||||
dummy_mcc[i][2] = (configuration->mcc[i] / 1) % 10;
|
||||
#else
|
||||
dummy_mcc[i][0] = 0;
|
||||
dummy_mcc[i][1] = 0;
|
||||
dummy_mcc[i][2] = 1;
|
||||
#endif
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][0]);
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][1]);
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][2]);
|
||||
PLMN_identity_info[i].plmn_Identity.mnc.list.size=0;
|
||||
PLMN_identity_info[i].plmn_Identity.mnc.list.count=0;
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
if (configuration->mnc[i] >= 100) {
|
||||
dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 10;
|
||||
dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10;
|
||||
dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10;
|
||||
} else {
|
||||
if (configuration->mnc_digit_length[i] == 2) {
|
||||
dummy_mnc[i][0] = (configuration->mnc[i] / 10) % 10;
|
||||
dummy_mnc[i][1] = (configuration->mnc[i] / 1) % 10;
|
||||
dummy_mnc[i][2] = 0xf;
|
||||
} else {
|
||||
dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 100;
|
||||
dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10;
|
||||
dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
dummy_mnc[i][0] = 0;
|
||||
dummy_mnc[i][1] = 1;
|
||||
dummy_mnc[i][2] = 0xf;
|
||||
#endif
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][0]);
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][1]);
|
||||
|
||||
if (dummy_mnc[i][2] != 0xf) {
|
||||
ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][2]);
|
||||
}
|
||||
|
||||
//assign_enum(&PLMN_identity_info.cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved);
|
||||
PLMN_identity_info[i].cellReservedForOperatorUse=LTE_PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
|
||||
ASN_SEQUENCE_ADD(&(*sib1_MBMS)->cellAccessRelatedInfo_r14.plmn_IdentityList_r14.list,&PLMN_identity_info[i]);
|
||||
}
|
||||
|
||||
// 16 bits
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf = MALLOC(2);
|
||||
#if defined(ENABLE_ITTI)
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = (configuration->tac >> 8) & 0xff;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = (configuration->tac >> 0) & 0xff;
|
||||
#else
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[0] = 0x00;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.buf[1] = 0x01;
|
||||
#endif
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.size=2;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.trackingAreaCode_r14.bits_unused=0;
|
||||
// 28 bits
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf = MALLOC(8);
|
||||
#if defined(ENABLE_ITTI)
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = (configuration->cell_identity >> 20) & 0xff;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = (configuration->cell_identity >> 12) & 0xff;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = (configuration->cell_identity >> 4) & 0xff;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = (configuration->cell_identity << 4) & 0xf0;
|
||||
#else
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0] = 0x00;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[1] = 0x00;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[2] = 0x00;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[3] = 0x10;
|
||||
#endif
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.size=4;
|
||||
(*sib1_MBMS)->cellAccessRelatedInfo_r14.cellIdentity_r14.bits_unused=4;
|
||||
(*sib1_MBMS)->freqBandIndicator_r14 =
|
||||
#if defined(ENABLE_ITTI)
|
||||
configuration->eutra_band[CC_id];
|
||||
#else
|
||||
7;
|
||||
#endif
|
||||
schedulingInfo.si_Periodicity_r14=LTE_SchedulingInfo__si_Periodicity_rf16;
|
||||
sib_type=LTE_SIB_Type_MBMS_r14_sibType13_v920;
|
||||
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo_r14.list,&sib_type);
|
||||
ASN_SEQUENCE_ADD(&(*sib1_MBMS)->schedulingInfoList_MBMS_r14.list,&schedulingInfo);
|
||||
|
||||
(*sib1_MBMS)->si_WindowLength_r14=LTE_SystemInformationBlockType1_MBMS_r14__si_WindowLength_r14_ms20;
|
||||
(*sib1_MBMS)->systemInfoValueTag_r14=0;
|
||||
// (*sib1).nonCriticalExtension = calloc(1,sizeof(*(*sib1).nonCriticalExtension));
|
||||
|
||||
|
||||
//sib13 optional
|
||||
if (1)
|
||||
{
|
||||
(*sib1_MBMS)->systemInformationBlockType13_r14 = CALLOC(1,sizeof(struct LTE_SystemInformationBlockType13_r9));
|
||||
memset((*sib1_MBMS)->systemInformationBlockType13_r14,0,sizeof(struct LTE_SystemInformationBlockType13_r9));
|
||||
|
||||
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationRepetitionCoeff_r9= LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
|
||||
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationOffset_r9= 0;
|
||||
((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationSF_Index_r9= 1;
|
||||
|
||||
//((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9= CALLOC(1,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
|
||||
//memset(((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9,0,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
|
||||
LTE_MBSFN_AreaInfoList_r9_t * MBSFNArea_list= &((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9;
|
||||
// MBSFN-AreaInfoList
|
||||
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
|
||||
// MBSFN Area 1
|
||||
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
|
||||
MBSFN_Area1->mbsfn_AreaId_r9= 1;
|
||||
MBSFN_Area1->non_MBSFNregionLength= LTE_MBSFN_AreaInfo_r9__non_MBSFNregionLength_s2;
|
||||
MBSFN_Area1->notificationIndicator_r9= 0;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= 1; // in accordance with mbsfn subframe configuration in sib2
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_ModificationPeriod_r9_rf512;
|
||||
// Subframe Allocation Info
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=0x20<<2; // FDD: SF1
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
|
||||
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n7;
|
||||
|
||||
|
||||
(MBSFN_Area1)->ext1 = CALLOC (1, sizeof(*(MBSFN_Area1)->ext1));
|
||||
|
||||
memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
|
||||
|
||||
MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14 = CALLOC(1,sizeof(*( MBSFN_Area1->ext1)->subcarrierSpacingMBMS_r14));
|
||||
|
||||
memset(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14,0,sizeof(*((MBSFN_Area1)->ext1)->subcarrierSpacingMBMS_r14));
|
||||
|
||||
|
||||
*(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14) = LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25;
|
||||
|
||||
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
|
||||
}
|
||||
|
||||
//nonMBSFN_SubframeConfig_r14 optional
|
||||
if(1){
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14 = CALLOC(1,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
|
||||
memset((*sib1_MBMS)->nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf8;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14 = 0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2);
|
||||
//100000001 byte(0)=10000000 byte(1)=xxxxxxx1
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x80<<0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0x1<<7;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
|
||||
//}
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
|
||||
NULL,
|
||||
(void *)bcch_message,
|
||||
buffer,
|
||||
100);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
LOG_D(RRC,"[eNB] SystemInformationBlockType1_MBMS Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* Generate the configuration structure for CDRX feature
|
||||
@@ -4213,6 +4517,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
||||
meas2.rsrpResult=&(rsrp_t);
|
||||
//&rsrp_va;
|
||||
meas2.rsrqResult=&(rsrq_t);
|
||||
meas2.ext1 = NULL;
|
||||
measresulteutra2->measResult=meas2;
|
||||
ASN_SEQUENCE_ADD(&measResultListEUTRA2->list,measresulteutra2);
|
||||
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2);
|
||||
@@ -4230,9 +4535,14 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
||||
if(enc_rval.encoded == -1) {
|
||||
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
free(measResultListEUTRA2);
|
||||
measResultListEUTRA2 = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
free(measResultListEUTRA2);
|
||||
measResultListEUTRA2 = NULL;
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
|
||||
#endif
|
||||
);
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
\brief Generate configuration for MIB (eNB).
|
||||
@param carrier pointer to Carrier information
|
||||
@param N_RB_DL Number of downlink PRBs
|
||||
@param additional Non MBSFN Subframes parameter
|
||||
@param frame radio frame number
|
||||
@return size of encoded bit stream in bytes*/
|
||||
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame);
|
||||
/**
|
||||
\brief Generate configuration structure for DRX_Config
|
||||
@param Mod_id Instance of eNB
|
||||
@@ -97,6 +106,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
|
||||
#endif
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate configuration for SIB1 MBMS (eNB).
|
||||
@param carrier pointer to Carrier information
|
||||
@param Mod_id Instance of eNB
|
||||
@param Component carrier Component carrier to configure
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@return size of encoded bit stream in bytes*/
|
||||
uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB).
|
||||
|
||||
+876
-11
File diff suppressed because it is too large
Load Diff
@@ -404,13 +404,25 @@ typedef struct UE_RRC_INFO_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t SIB1systemInfoValueTag_MBMS;
|
||||
uint32_t SIStatus_MBMS;
|
||||
uint32_t SIcnt_MBMS;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
|
||||
#endif
|
||||
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t SIwindowsize_MBMS; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
#endif
|
||||
|
||||
uint8_t handoverTarget;
|
||||
HO_STATE_t ho_state;
|
||||
uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint16_t SIperiod_MBMS; //!< Corresponds to the SIB1-MBMS si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120 TODO
|
||||
#endif
|
||||
unsigned short UE_index;
|
||||
uint32_t T300_active;
|
||||
uint32_t T300_cnt;
|
||||
@@ -656,6 +668,10 @@ typedef struct {
|
||||
uint8_t sizeof_SIB1_BR;
|
||||
uint8_t *SIB23_BR;
|
||||
uint8_t sizeof_SIB23_BR;
|
||||
uint8_t *MIB_FeMBMS;
|
||||
uint8_t sizeof_MIB_FeMBMS;
|
||||
uint8_t *SIB1_MBMS;
|
||||
uint8_t sizeof_SIB1_MBMS;
|
||||
#endif
|
||||
int physCellId;
|
||||
int Ncp;
|
||||
@@ -673,12 +689,20 @@ typedef struct {
|
||||
LTE_BCCH_DL_SCH_Message_t systemInformation;
|
||||
LTE_BCCH_DL_SCH_Message_t systemInformation_BR;
|
||||
// SystemInformation_t systemInformation;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
|
||||
#endif
|
||||
LTE_SystemInformationBlockType1_t *sib1;
|
||||
LTE_SystemInformationBlockType2_t *sib2;
|
||||
LTE_SystemInformationBlockType3_t *sib3;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType1_t *sib1_BR;
|
||||
LTE_SystemInformationBlockType2_t *sib2_BR;
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
|
||||
uint8_t FeMBMS_flag;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13;
|
||||
@@ -774,8 +798,22 @@ typedef struct UE_RRC_INST_s {
|
||||
uint8_t sizeof_SI[NB_CNX_UE];
|
||||
uint8_t SIB1Status[NB_CNX_UE];
|
||||
uint8_t SIStatus[NB_CNX_UE];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t *SIB1_MBMS[NB_CNX_UE];
|
||||
uint8_t sizeof_SIB1_MBMS[NB_CNX_UE];
|
||||
uint8_t *SI_MBMS[NB_CNX_UE];
|
||||
uint8_t sizeof_SI_MBMS[NB_CNX_UE];
|
||||
uint8_t SIB1Status_MBMS[NB_CNX_UE];
|
||||
uint8_t SIStatus_MBMS[NB_CNX_UE];
|
||||
#endif
|
||||
LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS[NB_CNX_UE];
|
||||
#endif
|
||||
LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformation_MBMS_r14_t *si_MBMS[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
#endif
|
||||
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE];
|
||||
@@ -817,6 +855,10 @@ typedef struct UE_RRC_INST_s {
|
||||
LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_SystemInformationBlockType13_r9_t *sib13_MBMS[NB_CNX_UE];
|
||||
uint8_t FeMBMS_flag;
|
||||
#endif
|
||||
#ifdef CBA
|
||||
uint8_t num_active_cba_groups;
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
|
||||
+475
-67
@@ -62,6 +62,12 @@
|
||||
#include "LTE_SL-CommConfig-r12.h"
|
||||
#include "LTE_PeriodicBSR-Timer-r12.h"
|
||||
#include "LTE_RetxBSR-Timer-r12.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "LTE_BCCH-BCH-Message-MBMS.h"
|
||||
#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
|
||||
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
|
||||
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
|
||||
#endif
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "x2ap_eNB.h"
|
||||
|
||||
@@ -142,6 +148,100 @@ init_SI(
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL;
|
||||
#endif
|
||||
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE){
|
||||
LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
|
||||
(int)configuration->N_RB_DL[CC_id]);
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
|
||||
do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
|
||||
#ifdef ENABLE_ITTI
|
||||
configuration->N_RB_DL[CC_id],
|
||||
0 //additionalNonMBSFN
|
||||
#else
|
||||
50,0
|
||||
#endif
|
||||
,0);
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, configuration
|
||||
#endif
|
||||
);
|
||||
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB1-MBMS\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
|
||||
);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS freqBandIndicator_r14 %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->freqBandIndicator_r14
|
||||
);
|
||||
|
||||
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count; i++) {
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS contents for Scheduling Info List %d/%d(partial)\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
i,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count);
|
||||
}
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN subframe allocation (partial)\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
|
||||
);
|
||||
|
||||
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count; i++) {
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN sync area %d/%d (partial)\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
i,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Repetition Period: %ld (just index number, not real value)\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Offset: %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Modification Period: %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_ModificationPeriod_r9);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Signalling MCS: %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.signallingMCS_r9);
|
||||
//LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13 sf_AllocInfo is = %x\n",
|
||||
// PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
// RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.sf_AllocInfo_r9.buf);
|
||||
|
||||
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1) {
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS Subcarrier Spacing MBMS: %s\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
(*RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1->subcarrierSpacingMBMS_r14 == LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25 ? "khz_1dot25": "khz_7dot5"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14) {
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationPeriod-r14 %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14
|
||||
);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationOffset-r14 %ld\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14
|
||||
);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config subframeAllocation-r14 is = %s\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
|
||||
}
|
||||
#endif
|
||||
|
||||
eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
|
||||
rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
|
||||
|
||||
@@ -496,9 +596,17 @@ init_SI(
|
||||
,
|
||||
sib1_v13ext
|
||||
#endif
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
/* set flag to indicate that cell information is configured. This is required
|
||||
* in DU to trigger F1AP_SETUP procedure */
|
||||
pthread_mutex_lock(&rrc->cell_info_mutex);
|
||||
@@ -587,7 +695,16 @@ init_MCCH(
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
//LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9);
|
||||
}
|
||||
@@ -1384,6 +1501,15 @@ rrc_eNB_generate_RRCConnectionReestablishment(
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
break;
|
||||
@@ -1466,7 +1592,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
|
||||
ue_context_pP->ue_context.Status = RRC_CONNECTED;
|
||||
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
|
||||
@@ -1878,7 +2004,8 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
// send LTE_RRCConnectionReconfiguration
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
@@ -1893,9 +2020,9 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
//#ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
//#else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
|
||||
(LTE_MeasIdToAddModList_t *)NULL,
|
||||
//#endif
|
||||
(LTE_MAC_MainConfig_t *)ue_context_pP->ue_context.mac_MainConfig,
|
||||
@@ -2260,6 +2387,12 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *co
|
||||
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_FAILED;
|
||||
ue_context_pP->ue_context.e_rab[i].xid = xid;
|
||||
e_rab_done++;
|
||||
free(DRB_pdcp_config->discardTimer);
|
||||
free(DRB_pdcp_config);
|
||||
free(DRB_rlc_config);
|
||||
free(DRB_config->logicalChannelIdentity);
|
||||
free(DRB_config->eps_BearerIdentity);
|
||||
free(DRB_config);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2804,7 +2937,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
/* For no gcc warnings */
|
||||
(void) dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
|
||||
@@ -3346,7 +3479,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
|
||||
@@ -3358,10 +3492,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
(LTE_DRB_ToReleaseList_t *) NULL, // DRB2_list,
|
||||
(struct LTE_SPS_Config *) NULL, // *sps_Config,
|
||||
(struct LTE_PhysicalConfigDedicated *) *physicalConfigDedicated,
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *) MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *) ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *) quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *) MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *) MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *) ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *) quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *) MeasId_list : NULL,
|
||||
(LTE_MAC_MainConfig_t *) mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *) NULL,
|
||||
(LTE_MobilityControlInfo_t *) NULL,
|
||||
@@ -3420,6 +3554,21 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
|
||||
free(Sparams);
|
||||
Sparams = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA);
|
||||
quantityConfig->quantityConfigEUTRA = NULL;
|
||||
|
||||
free(quantityConfig);
|
||||
quantityConfig = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3479,7 +3628,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
#ifdef CBA
|
||||
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
|
||||
@@ -3849,7 +3998,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
size = do_RRCConnectionReconfiguration(ctxt_pP,
|
||||
@@ -3863,10 +4013,10 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
// #ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
// #else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
// #endif
|
||||
(LTE_MAC_MainConfig_t *)mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *)NULL,
|
||||
@@ -3918,6 +4068,27 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA);
|
||||
quantityConfig->quantityConfigEUTRA = NULL;
|
||||
|
||||
free(quantityConfig);
|
||||
quantityConfig = NULL;
|
||||
|
||||
free(mac_MainConfig->ul_SCH_Config);
|
||||
mac_MainConfig->ul_SCH_Config = NULL;
|
||||
|
||||
free(mac_MainConfig->phr_Config);
|
||||
mac_MainConfig->phr_Config = NULL;
|
||||
|
||||
free(mac_MainConfig);
|
||||
mac_MainConfig = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4114,7 +4285,7 @@ rrc_eNB_process_MeasurementReport(
|
||||
return;
|
||||
|
||||
/* if X2AP is disabled, do nothing */
|
||||
if (!is_x2ap_enabled())
|
||||
if (!RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2)
|
||||
return;
|
||||
|
||||
LOG_D(RRC, "A3 event is triggered...\n");
|
||||
@@ -4504,7 +4675,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
#ifdef CBA
|
||||
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
|
||||
@@ -4913,10 +5084,149 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
// assign_enum(&physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4;
|
||||
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax =
|
||||
LTE_SchedulingRequestConfig__setup__dsr_TransMax_n4;
|
||||
//}
|
||||
//else {
|
||||
//LOG_E(RRC,"physical_config_dedicated not present in RRCConnectionReconfiguration. Not reconfiguring!\n");
|
||||
//}
|
||||
LOG_D(RRC,
|
||||
"handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 UE %x) --->][MAC_eNB][MOD %02d][]\n",
|
||||
ctxt_pP->frame, ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ctxt_pP->module_id);
|
||||
rrc_mac_config_req_eNB(
|
||||
ctxt_pP->module_id,
|
||||
ue_context_pP->ue_context.primaryCC_id,
|
||||
0,0,0,0,0,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
0,
|
||||
#endif
|
||||
ue_context_pP->ue_context.rnti,
|
||||
(LTE_BCCH_BCH_Message_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
#endif
|
||||
ue_context_pP->ue_context.physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
ue_context_pP->ue_context.mac_MainConfig,
|
||||
1,
|
||||
NULL,//SRB1_logicalChannelConfig,
|
||||
ue_context_pP->ue_context.measGapConfig,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
(LTE_MobilityControlInfo_t *) NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) NULL
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
// Configure target eNB SRB2
|
||||
/// SRB2
|
||||
SRB2_config = CALLOC(1, sizeof(*SRB2_config));
|
||||
SRB_configList2 = CALLOC(1, sizeof(*SRB_configList2));
|
||||
memset(SRB_configList2, 0, sizeof(*SRB_configList2));
|
||||
SRB2_config->srb_Identity = 2;
|
||||
SRB2_rlc_config = CALLOC(1, sizeof(*SRB2_rlc_config));
|
||||
SRB2_config->rlc_Config = SRB2_rlc_config;
|
||||
SRB2_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
SRB2_rlc_config->choice.explicitValue.present = LTE_RLC_Config_PR_am;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms15;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p8;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kB1000;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t32;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms10;
|
||||
SRB2_lchan_config = CALLOC(1, sizeof(*SRB2_lchan_config));
|
||||
SRB2_config->logicalChannelConfig = SRB2_lchan_config;
|
||||
SRB2_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
SRB2_ul_SpecificParameters = CALLOC(1, sizeof(*SRB2_ul_SpecificParameters));
|
||||
SRB2_ul_SpecificParameters->priority = 1;
|
||||
SRB2_ul_SpecificParameters->prioritisedBitRate =
|
||||
LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
SRB2_ul_SpecificParameters->bucketSizeDuration =
|
||||
LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
// LCG for CCCH and DCCH is 0 as defined in 36331
|
||||
logicalchannelgroup = CALLOC(1, sizeof(long));
|
||||
*logicalchannelgroup = 0;
|
||||
SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
|
||||
SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
|
||||
ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config);
|
||||
ASN_SEQUENCE_ADD(&(*SRB_configList2)->list, SRB2_config);
|
||||
// Configure target eNB DRB
|
||||
DRB_configList2 = CALLOC(1, sizeof(*DRB_configList2));
|
||||
/// DRB
|
||||
DRB_config = CALLOC(1, sizeof(*DRB_config));
|
||||
//DRB_config->drb_Identity = (LTE_DRB_Identity_t) 1; //allowed values 1..32
|
||||
// NN: this is the 1st DRB for this ue, so set it to 1
|
||||
DRB_config->drb_Identity = (LTE_DRB_Identity_t) 1; // (ue_mod_idP+1); //allowed values 1..32
|
||||
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
|
||||
*(DRB_config->logicalChannelIdentity) = (long)3;
|
||||
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
|
||||
DRB_config->rlc_Config = DRB_rlc_config;
|
||||
DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
|
||||
DRB_config->pdcp_Config = DRB_pdcp_config;
|
||||
DRB_pdcp_config->discardTimer = NULL;
|
||||
DRB_pdcp_config->rlc_AM = NULL;
|
||||
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
|
||||
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
|
||||
PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
|
||||
DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
|
||||
DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
|
||||
DRB_config->logicalChannelConfig = DRB_lchan_config;
|
||||
DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters));
|
||||
DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
|
||||
DRB_ul_SpecificParameters->priority = 2; // lower priority than srb1, srb2
|
||||
DRB_ul_SpecificParameters->prioritisedBitRate =
|
||||
LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
DRB_ul_SpecificParameters->bucketSizeDuration =
|
||||
LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
// LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
|
||||
logicalchannelgroup_drb = CALLOC(1, sizeof(long));
|
||||
*logicalchannelgroup_drb = 1;
|
||||
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
|
||||
mac_MainConfig = CALLOC(1, sizeof(*mac_MainConfig));
|
||||
ue_context_pP->ue_context.mac_MainConfig = mac_MainConfig;
|
||||
mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
|
||||
maxHARQ_Tx = CALLOC(1, sizeof(long));
|
||||
*maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
|
||||
periodicBSR_Timer = CALLOC(1, sizeof(long));
|
||||
*periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64;
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
|
||||
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
|
||||
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
|
||||
mac_MainConfig->drx_Config = NULL;
|
||||
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
|
||||
mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
|
||||
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
|
||||
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
|
||||
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
|
||||
*sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
|
||||
mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
|
||||
mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
|
||||
//sps_RA_ConfigList_rlola = NULL;
|
||||
#endif
|
||||
// Measurement ID list
|
||||
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
|
||||
memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
|
||||
@@ -5266,7 +5576,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
|
||||
#endif
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
char rrc_buf[1000 /* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */];
|
||||
@@ -5282,10 +5593,10 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
//#ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
//#else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
//#endif
|
||||
(LTE_MAC_MainConfig_t *)mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *)NULL,
|
||||
@@ -5344,6 +5655,24 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
ue_context_pP->ue_context.rnti,
|
||||
rrc_eNB_mui,
|
||||
size);
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA);
|
||||
quantityConfig->quantityConfigEUTRA = NULL;
|
||||
|
||||
free(quantityConfig);
|
||||
quantityConfig = NULL;
|
||||
|
||||
free(securityConfigHO);
|
||||
securityConfigHO = NULL;
|
||||
|
||||
free(Sparams);
|
||||
Sparams = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -5442,6 +5771,15 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
//#if 0
|
||||
@@ -5478,6 +5816,10 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
/* CDRX: activated if ack was expected */
|
||||
int UE_id_mac = find_UE_id(ctxt_pP->module_id, ue_context_pP->ue_context.rnti);
|
||||
if (UE_id_mac == -1){
|
||||
LOG_E(RRC,PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_RRCConnectionReconfigurationComplete without UE_id(MAC) rnti %x, let's return\n",PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ue_context_pP->ue_context.rnti);
|
||||
return;
|
||||
}
|
||||
UE_sched_ctrl *UE_scheduling_control = &(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id_mac]);
|
||||
|
||||
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
|
||||
@@ -5669,9 +6011,18 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
} else { // end if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) // remove LCHAN from MAC/PHY
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
} 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,
|
||||
@@ -5733,6 +6084,15 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@@ -5901,8 +6261,18 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
#endif
|
||||
);
|
||||
}
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6256,12 +6626,12 @@ rrc_eNB_decode_ccch(
|
||||
if (reestablish_rnti_map[i][0] == 0) {
|
||||
reestablish_rnti_map[i][0] = ctxt_pP->rnti;
|
||||
reestablish_rnti_map[i][1] = c_rnti;
|
||||
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||
ue_context_p->ue_context.reestablishment_cause = rrcConnectionReestablishmentRequest->reestablishmentCause;
|
||||
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Accept connection reestablishment request from UE physCellId %ld cause %ld\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
@@ -6900,13 +7270,12 @@ rrc_eNB_decode_dcch(
|
||||
// clear currentC-RNTI from map
|
||||
reestablish_rnti_map[i][0] = 0;
|
||||
reestablish_rnti_map[i][1] = 0;
|
||||
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||
|
||||
if (!ue_context_p) {
|
||||
LOG_E(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentComplete without UE context, falt\n",
|
||||
@@ -7448,6 +7817,29 @@ void rrc_enb_init(void) {
|
||||
memset(&rrc_release_info,0,sizeof(RRC_release_list_t));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int add_ue_to_remove(struct rrc_eNB_ue_context_s **ue_to_be_removed,
|
||||
int removed_ue_count,
|
||||
struct rrc_eNB_ue_context_s *ue_context_p)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* is it already here? */
|
||||
for (i = 0; i < removed_ue_count; i++)
|
||||
if (ue_to_be_removed[i] == ue_context_p)
|
||||
return removed_ue_count;
|
||||
|
||||
if (removed_ue_count == NUMBER_OF_UE_MAX) {
|
||||
LOG_E(RRC, "fatal: ue_to_be_removed is full\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ue_to_be_removed[removed_ue_count] = ue_context_p;
|
||||
removed_ue_count++;
|
||||
|
||||
return removed_ue_count;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
{
|
||||
@@ -7455,7 +7847,9 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
int32_t ref_timestamp_ms = 0;
|
||||
struct timeval ts;
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
struct rrc_eNB_ue_context_s *ue_to_be_removed = NULL;
|
||||
struct rrc_eNB_ue_context_s *ue_to_be_removed[NUMBER_OF_UE_MAX];
|
||||
int removed_ue_count = 0;
|
||||
int cur_ue;
|
||||
#ifdef LOCALIZATION
|
||||
double estimated_distance = 0;
|
||||
protocol_ctxt_t ctxt;
|
||||
@@ -7464,7 +7858,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX, VCD_FUNCTION_IN);
|
||||
|
||||
if (is_x2ap_enabled()) {
|
||||
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);
|
||||
itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, msg);
|
||||
@@ -7496,7 +7890,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
// remove UE after 20 seconds after MAC (or else) has indicated UL failure
|
||||
LOG_I(RRC, "Removing UE %x instance, because of uplink failure timer timeout\n",
|
||||
ue_context_p->ue_context.rnti);
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
break; // break RB_FOREACH
|
||||
}
|
||||
}
|
||||
@@ -7512,7 +7906,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
if (EPC_MODE_ENABLED && !NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type))
|
||||
rrc_eNB_generate_RRCConnectionRelease(ctxt_pP, ue_context_p);
|
||||
else
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
|
||||
ue_context_p->ue_context.ue_release_timer_s1 = 0;
|
||||
break; // break RB_FOREACH
|
||||
@@ -7526,14 +7920,14 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
LOG_I(RRC, "Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)\n",
|
||||
ue_context_p->ue_context.rnti);
|
||||
ue_context_p->ue_context.ue_release_timer_rrc = 0;
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
break; // break RB_FOREACH
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_context_p->ue_context.handover_info != NULL) {
|
||||
if (ue_context_p->ue_context.handover_info->state == HO_RELEASE) {
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
rrc_eNB_handover_ue_context_release(ctxt_pP, ue_context_p);
|
||||
break; //break RB_FOREACH (why to break ?)
|
||||
}
|
||||
@@ -7606,7 +8000,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
if (ue_context_p->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) {
|
||||
LOG_I(RRC, "Removing UE %x instance because of rrc_inactivity_timer timeout\n",
|
||||
ue_context_p->ue_context.rnti);
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
break; // break RB_FOREACH
|
||||
}
|
||||
}
|
||||
@@ -7618,7 +8012,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
LOG_I(RRC, "Removing UE %x instance because of reestablishment_timer timeout\n",
|
||||
ue_context_p->ue_context.rnti);
|
||||
ue_context_p->ue_context.ul_failure_timer = 20000; // lead to send S1 UE_CONTEXT_RELEASE_REQ
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
ue_context_p->ue_context.ue_reestablishment_timer = 0;
|
||||
break; // break RB_FOREACH
|
||||
}
|
||||
@@ -7635,32 +8029,32 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
* It is no more the case.
|
||||
* The timer should be renamed.
|
||||
*/
|
||||
ue_to_be_removed = ue_context_p;
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
ue_context_p->ue_context.ue_release_timer = 0;
|
||||
break; // break RB_FOREACH
|
||||
}
|
||||
}
|
||||
} // end RB_FOREACH
|
||||
|
||||
if (ue_to_be_removed) {
|
||||
if ((ue_to_be_removed->ue_context.ul_failure_timer >= 20000) ||
|
||||
((ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) &&
|
||||
for (cur_ue = 0; cur_ue < removed_ue_count; cur_ue++) {
|
||||
if ((ue_to_be_removed[cur_ue]->ue_context.ul_failure_timer >= 20000) ||
|
||||
((ue_to_be_removed[cur_ue]->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) &&
|
||||
(RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres > 0))) {
|
||||
ue_to_be_removed->ue_context.ue_release_timer_s1 = 1;
|
||||
ue_to_be_removed->ue_context.ue_release_timer_thres_s1 = 100;
|
||||
ue_to_be_removed->ue_context.ue_release_timer = 0;
|
||||
ue_to_be_removed->ue_context.ue_reestablishment_timer = 0;
|
||||
ue_to_be_removed[cur_ue]->ue_context.ue_release_timer_s1 = 1;
|
||||
ue_to_be_removed[cur_ue]->ue_context.ue_release_timer_thres_s1 = 100;
|
||||
ue_to_be_removed[cur_ue]->ue_context.ue_release_timer = 0;
|
||||
ue_to_be_removed[cur_ue]->ue_context.ue_reestablishment_timer = 0;
|
||||
}
|
||||
|
||||
rrc_eNB_free_UE(ctxt_pP->module_id, ue_to_be_removed);
|
||||
rrc_eNB_free_UE(ctxt_pP->module_id, ue_to_be_removed[cur_ue]);
|
||||
|
||||
if (ue_to_be_removed->ue_context.ul_failure_timer >= 20000) {
|
||||
ue_to_be_removed->ue_context.ul_failure_timer = 0;
|
||||
if (ue_to_be_removed[cur_ue]->ue_context.ul_failure_timer >= 20000) {
|
||||
ue_to_be_removed[cur_ue]->ue_context.ul_failure_timer = 0;
|
||||
}
|
||||
|
||||
if ((ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) &&
|
||||
if ((ue_to_be_removed[cur_ue]->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) &&
|
||||
(RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres > 0)) {
|
||||
ue_to_be_removed->ue_context.ue_rrc_inactivity_timer = 0; //reset timer after S1 command UE context release request is sent
|
||||
ue_to_be_removed[cur_ue]->ue_context.ue_rrc_inactivity_timer = 0; //reset timer after S1 command UE context release request is sent
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7738,9 +8132,9 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
&ctxt,
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size);
|
||||
|
||||
if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= RRC_BUFFER_SIZE_MAX) {
|
||||
if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= CCCH_SDU_SIZE) {
|
||||
LOG_I(RRC, "CCCH message has size %d > %d\n",
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,RRC_BUFFER_SIZE_MAX);
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,CCCH_SDU_SIZE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -8055,6 +8449,9 @@ rrc_eNB_process_SidelinkUEInformation(
|
||||
|
||||
//generate RRC Reconfiguration
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
|
||||
|
||||
free(destinationInfoList);
|
||||
destinationInfoList = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8073,6 +8470,9 @@ rrc_eNB_process_SidelinkUEInformation(
|
||||
|
||||
//generate RRC Reconfiguration
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
|
||||
|
||||
free(destinationInfoList);
|
||||
destinationInfoList = NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -8094,6 +8494,9 @@ rrc_eNB_process_SidelinkUEInformation(
|
||||
|
||||
//generate RRC Reconfiguration
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
|
||||
|
||||
free(destinationInfoList);
|
||||
destinationInfoList = NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -8115,6 +8518,9 @@ rrc_eNB_process_SidelinkUEInformation(
|
||||
|
||||
//generate RRC Reconfiguration
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
|
||||
|
||||
free(destinationInfoList);
|
||||
destinationInfoList = NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -8156,7 +8562,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
uint8_t buffer[RRC_BUF_SIZE];
|
||||
uint16_t size = -1;
|
||||
uint16_t size = 0;
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
|
||||
// allocate dedicated pools for UE -sl-CommConfig/sl-DiscConfig (sl-V2X-ConfigDedicated)
|
||||
@@ -8226,9 +8632,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
|
||||
|
||||
LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, LTE_SL_DestinationInfoList_r12_t *destinationInfoList ) {
|
||||
// for the moment, use scheduled resource allocation
|
||||
LTE_SL_CommConfig_r12_t *sl_CommConfig;
|
||||
LTE_SL_CommConfig_r12_t sl_CommConfig_r12;
|
||||
LTE_SL_CommConfig_r12_t *sl_CommConfig = &sl_CommConfig_r12;
|
||||
LTE_SL_CommResourcePool_r12_t *sc_CommTxConfig;
|
||||
sl_CommConfig = CALLOC(1, sizeof(struct LTE_SL_CommConfig_r12));
|
||||
memset(sl_CommConfig,0,sizeof(LTE_SL_CommConfig_r12_t));
|
||||
sl_CommConfig->commTxResources_r12 = CALLOC(1, sizeof(*sl_CommConfig->commTxResources_r12));
|
||||
sl_CommConfig->commTxResources_r12->present = LTE_SL_CommConfig_r12__commTxResources_r12_PR_setup;
|
||||
sl_CommConfig->commTxResources_r12->choice.setup.present = LTE_SL_CommConfig_r12__commTxResources_r12__setup_PR_scheduled_r12;
|
||||
@@ -8293,6 +8700,7 @@ LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *
|
||||
LTE_SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool( const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, int n_discoveryMessages ) {
|
||||
//TODO
|
||||
LTE_SL_DiscConfig_r12_t sl_DiscConfig;
|
||||
memset(&sl_DiscConfig,0,sizeof(LTE_SL_DiscConfig_r12_t));
|
||||
sl_DiscConfig.discTxResources_r12 = CALLOC(1,sizeof(*sl_DiscConfig.discTxResources_r12));
|
||||
sl_DiscConfig.discTxResources_r12->present = LTE_SL_DiscConfig_r12__discTxResources_r12_PR_setup;
|
||||
sl_DiscConfig.discTxResources_r12->choice.setup.present = LTE_SL_DiscConfig_r12__discTxResources_r12__setup_PR_scheduled_r12;
|
||||
|
||||
@@ -266,22 +266,28 @@ rrc_eNB_S1AP_get_ue_ids(
|
||||
}
|
||||
return NULL; //skip the operation below to avoid loop
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
if (ue_desc_p->ue_initial_id != UE_INITIAL_ID_INVALID) {
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
|
||||
if (result != NULL) {
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ENB_INSTANCE_TO_MODULE_ID(instance)], result->ue_rnti);
|
||||
if (result != NULL) {
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ENB_INSTANCE_TO_MODULE_ID(instance)], result->ue_rnti);
|
||||
|
||||
if ((ue_context_p != NULL) && (ue_context_p->ue_context.eNB_ue_s1ap_id == 0)) {
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
} else {
|
||||
LOG_E(RRC, "[eNB %ld] Incoherence between RRC context and S1AP context (%d != %d) for UE RNTI %d or UE RRC context doesn't exist\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
(ue_context_p==NULL)?99999:ue_context_p->ue_context.eNB_ue_s1ap_id,
|
||||
eNB_ue_s1ap_id,
|
||||
result->ue_rnti);
|
||||
if ((ue_context_p != NULL) && (ue_context_p->ue_context.eNB_ue_s1ap_id == 0)) {
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
} else {
|
||||
LOG_E(RRC, "[eNB %ld] Incoherence between RRC context and S1AP context (%d != %d) for UE RNTI %d or UE RRC context doesn't exist\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
(ue_context_p==NULL)?99999:ue_context_p->ue_context.eNB_ue_s1ap_id,
|
||||
eNB_ue_s1ap_id,
|
||||
result->ue_rnti);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB %ld] S1AP context found but ue_initial_id is invalid (0)\n", rrc_instance_pP - RC.rrc[0]);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB %ld] In hashtable_get, couldn't find in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %"PRIu32", even when looking at S1AP context\n",
|
||||
LOG_E(S1AP, "[eNB %ld] In hashtable_get, couldn't find in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %"PRIu32", because ue_initial_id is invalid in S1AP context\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
eNB_ue_s1ap_id);
|
||||
return NULL;
|
||||
@@ -849,6 +855,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
uint8_t srb_id;
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
protocol_ctxt_t ctxt;
|
||||
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
|
||||
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);
|
||||
@@ -920,7 +927,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
rrc_data_req (
|
||||
&ctxt,
|
||||
srb_id,
|
||||
*rrc_eNB_mui++,
|
||||
(*rrc_eNB_mui)++,
|
||||
SDU_CONFIRM_NO,
|
||||
length,
|
||||
buffer,
|
||||
@@ -1636,6 +1643,8 @@ int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t *const ctxt_pP,
|
||||
S1AP_E_RAB_MODIFY_RESP (msg_p).eNB_ue_s1ap_id,
|
||||
e_rabs_done, e_rabs_failed);
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
} else {
|
||||
itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2033,6 +2042,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
||||
S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
|
||||
e_rabs_done);
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
} else {
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -542,6 +542,16 @@ int decode_BCCH_DLSCH_Message(
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp );
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int decode_BCCH_MBMS_DLSCH_Message(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const uint8_t eNB_index,
|
||||
uint8_t* const Sdu,
|
||||
const uint8_t Sdu_len,
|
||||
const uint8_t rsrq,
|
||||
const uint8_t rsrp );
|
||||
#endif
|
||||
|
||||
int decode_PCCH_DLSCH_Message(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t eNB_index,
|
||||
|
||||
@@ -218,6 +218,7 @@ error:
|
||||
|
||||
socket_link_t *new_link_udp_client(const char *server, int port){
|
||||
|
||||
int s = -1;
|
||||
socket_link_t *ret = NULL;
|
||||
ret = calloc(1, sizeof(socket_link_t));
|
||||
if (ret == NULL) {
|
||||
@@ -227,8 +228,7 @@ socket_link_t *new_link_udp_client(const char *server, int port){
|
||||
ret->socket_fd = -1;
|
||||
|
||||
struct sockaddr_in si_other;
|
||||
int s;
|
||||
socklen_t slen;
|
||||
socklen_t slen = sizeof(si_other);
|
||||
|
||||
if ( (s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1){
|
||||
goto error;
|
||||
@@ -254,8 +254,12 @@ socket_link_t *new_link_udp_client(const char *server, int port){
|
||||
return ret;
|
||||
error:
|
||||
if (ret != NULL) {
|
||||
close(ret->socket_fd);
|
||||
free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
if (s != -1) {
|
||||
close(s);
|
||||
s = -1;
|
||||
}
|
||||
LOG_E(MAC, "ERROR in new_link_udp_client (see above), returning NULL\n");
|
||||
return NULL;
|
||||
@@ -402,7 +406,7 @@ static int socket_udp_receive(int socket_fd, void *buf, int size)
|
||||
LOG_D(PROTO_AGENT,"UDP RECEIVE\n");
|
||||
|
||||
struct sockaddr_in client;
|
||||
socklen_t slen;
|
||||
socklen_t slen = sizeof(client);
|
||||
int l;
|
||||
|
||||
l = recvfrom(socket_fd, buf, size, 0, (struct sockaddr *) &client, &slen);
|
||||
|
||||
@@ -192,7 +192,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_initiatingMessage:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.initiatingMessage.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.initiatingMessage.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
@@ -218,7 +218,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_successfulOutcome:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.successfulOutcome.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.successfulOutcome.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
@@ -244,7 +244,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_unsuccessfulOutcome:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.unsuccessfulOutcome.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.unsuccessfulOutcome.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
@@ -785,6 +785,7 @@ int x2ap_eNB_handle_handover_response (instance_t instance,
|
||||
if (ue_id != x2ap_find_id_from_id_source(&instance_p->id_manager, id_source)) {
|
||||
X2AP_WARN("incorrect/unknown X2AP IDs for UE (old ID %d new ID %d), ignoring handover response\n",
|
||||
id_source, id_target);
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg), msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -873,6 +874,7 @@ int x2ap_eNB_handle_ue_context_release (instance_t instance,
|
||||
if (ue_id != x2ap_find_id_from_id_source(&instance_p->id_manager, id_source)) {
|
||||
X2AP_WARN("incorrect/unknown X2AP IDs for UE (old ID %d new ID %d), ignoring UE context release\n",
|
||||
id_source, id_target);
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg), msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -882,6 +884,7 @@ int x2ap_eNB_handle_ue_context_release (instance_t instance,
|
||||
id_source,
|
||||
x2ap_id_get_id_target(&instance_p->id_manager, ue_id),
|
||||
id_target);
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(msg), msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user