Commit 2033357e authored by Navid Nikaein's avatar Navid Nikaein

Few fixes for dedicated DRBs

parent c975f8f7
...@@ -53,7 +53,7 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id) ...@@ -53,7 +53,7 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id)
if (rssi>0) rx_power_fil_dB = rssi; if (rssi>0) rx_power_fil_dB = rssi;
else rx_power_fil_dB = phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id]; else rx_power_fil_dB = phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id];
printf("Gain control: rssi %d (%d,%d)\n", LOG_D(PHY,"Gain control: rssi %d (%d,%d)\n",
rssi, rssi,
phy_vars_ue->PHY_measurements.rssi, phy_vars_ue->PHY_measurements.rssi,
phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id] phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id]
......
...@@ -906,7 +906,7 @@ pdcp_run ( ...@@ -906,7 +906,7 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).frame, RRC_DCCH_DATA_REQ (msg_p).frame,
0, 0,
RRC_DCCH_DATA_REQ (msg_p).eNB_index); RRC_DCCH_DATA_REQ (msg_p).eNB_index);
LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n", LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
PROTOCOL_CTXT_ARGS(&ctxt), PROTOCOL_CTXT_ARGS(&ctxt),
msg_name, msg_name,
ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p),
...@@ -1427,7 +1427,7 @@ pdcp_config_req_asn1 ( ...@@ -1427,7 +1427,7 @@ pdcp_config_req_asn1 (
pdcp_pP->first_missing_pdu = -1; pdcp_pP->first_missing_pdu = -1;
pdcp_pP->rx_hfn_offset = 0; pdcp_pP->rx_hfn_offset = 0;
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (rb id %d) " LOG_I(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (rb id %d) "
"configured with SN size %d bits and RLC %s\n", "configured with SN size %d bits and RLC %s\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP), PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
lc_idP, lc_idP,
......
...@@ -229,7 +229,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP ...@@ -229,7 +229,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
drb_id = drb_toaddmod_p->drb_Identity; drb_id = drb_toaddmod_p->drb_Identity;
lc_id = drb_id + 2; lc_id = drb_id + 2;
LOG_D(RLC, "Adding DRB %d, lc_id %d\n",drb_id,lc_id); LOG_I(RLC, "Adding DRB %d, lc_id %d\n",drb_id,lc_id);
if (drb_toaddmod_p->rlc_Config) { if (drb_toaddmod_p->rlc_Config) {
......
...@@ -2015,7 +2015,7 @@ do_RRCConnectionReconfiguration( ...@@ -2015,7 +2015,7 @@ do_RRCConnectionReconfiguration(
(void*)&dl_dcch_msg, (void*)&dl_dcch_msg,
buffer, buffer,
RRC_BUF_SIZE); RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %l)!\n",
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
#ifdef XER_PRINT #ifdef XER_PRINT
......
...@@ -1078,7 +1078,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co ...@@ -1078,7 +1078,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
struct LogicalChannelConfig *DRB_lchan_config = NULL; struct LogicalChannelConfig *DRB_lchan_config = NULL;
struct LogicalChannelConfig__ul_SpecificParameters struct LogicalChannelConfig__ul_SpecificParameters
*DRB_ul_SpecificParameters = NULL; *DRB_ul_SpecificParameters = NULL;
DRB_ToAddModList_t** DRB_configList; DRB_ToAddModList_t** DRB_configList=&ue_context_pP->ue_context.DRB_configList;
//DRB_ToAddModList_t** RRC_DRB_configList=&ue_context_pP->ue_context.DRB_configList; //DRB_ToAddModList_t** RRC_DRB_configList=&ue_context_pP->ue_context.DRB_configList;
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL; struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL;
...@@ -1109,6 +1109,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co ...@@ -1109,6 +1109,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long)); DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(DRB_config->logicalChannelIdentity) = (long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2 *(DRB_config->logicalChannelIdentity) = (long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config)); DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config; DRB_config->rlc_Config = DRB_rlc_config;
...@@ -1129,6 +1130,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co ...@@ -1129,6 +1130,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
DRB_rlc_config->present = RLC_Config_PR_um_Bi_Directional; DRB_rlc_config->present = RLC_Config_PR_um_Bi_Directional;
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = SN_FieldLength_size10; DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = SN_FieldLength_size10; DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = T_Reordering_ms35;
// PDCP // PDCP
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM)); PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM; DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
...@@ -1171,9 +1173,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co ...@@ -1171,9 +1173,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
DRB_ul_SpecificParameters->bucketSizeDuration = DRB_ul_SpecificParameters->bucketSizeDuration =
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50; 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 = CALLOC(1, sizeof(long));
*logicalchannelgroup_drb = 1; *logicalchannelgroup_drb = (i+1) % 3;
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb; DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config); ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
...@@ -1801,6 +1802,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons ...@@ -1801,6 +1802,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
/* TODO should test if e RAB are Ok before! */ /* TODO should test if e RAB are Ok before! */
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE; ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
LOG_D(RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
i, ue_context_pP->ue_context.e_rab[i].status, "E_RAB_STATUS_DONE");
} }
/* If list is empty free the list and reset the address */ /* If list is empty free the list and reset the address */
...@@ -4188,6 +4191,7 @@ rrc_eNB_decode_dcch( ...@@ -4188,6 +4191,7 @@ rrc_eNB_decode_dcch(
} }
#else // establish a dedicated bearer #else // establish a dedicated bearer
if (dedicated_DRB == 0 ) { if (dedicated_DRB == 0 ) {
// ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED;
rrc_eNB_reconfigure_DRBs(ctxt_pP,ue_context_p); rrc_eNB_reconfigure_DRBs(ctxt_pP,ue_context_p);
} }
...@@ -4402,7 +4406,14 @@ rrc_eNB_decode_dcch( ...@@ -4402,7 +4406,14 @@ rrc_eNB_decode_dcch(
ue_context_p, ue_context_p,
ul_dcch_msg); ul_dcch_msg);
} }
#else
ue_context_p->ue_context.nb_of_e_rabs = 1;
for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++){
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_NEW;
ue_context_p->ue_context.e_rab[i].param.e_rab_id = 1+i;
ue_context_p->ue_context.e_rab[i].param.qos.qci=9;
}
ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs;
#endif #endif
rrc_eNB_generate_defaultRRCConnectionReconfiguration(ctxt_pP, rrc_eNB_generate_defaultRRCConnectionReconfiguration(ctxt_pP,
...@@ -4491,14 +4502,12 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t* const ctxt_pP, ...@@ -4491,14 +4502,12 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t* const ctxt_pP,
int i; int i;
for (i = 0; for (i = 0;
i < NB_RB_MAX; // S1AP_MAX_E_RAB i < NB_RB_MAX - 3; // S1AP_MAX_E_RAB
i++) { i++) {
if ( (ue_context_pP->ue_context.e_rab[i].status != E_RAB_STATUS_ESTABLISHED) || if ( ue_context_pP->ue_context.e_rab[i].status < E_RAB_STATUS_DONE){
(ue_context_pP->ue_context.e_rab[i].status != E_RAB_STATUS_DONE) ){
LOG_I(RRC,"setting up the dedicated DRBs %d \n", i);
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_NEW; ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_NEW;
ue_context_pP->ue_context.e_rab[i].param.e_rab_id = i; ue_context_pP->ue_context.e_rab[i].param.e_rab_id = i + 1;
ue_context_pP->ue_context.e_rab[i].param.qos.qci = i % 9; ue_context_pP->ue_context.e_rab[i].param.qos.qci = i % 9;
ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.priority_level= i % PRIORITY_LEVEL_LOWEST; ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.priority_level= i % PRIORITY_LEVEL_LOWEST;
ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.pre_emp_capability= PRE_EMPTION_CAPABILITY_DISABLED; ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.pre_emp_capability= PRE_EMPTION_CAPABILITY_DISABLED;
...@@ -4510,10 +4519,12 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t* const ctxt_pP, ...@@ -4510,10 +4519,12 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t* const ctxt_pP,
ue_context_pP->ue_context.e_rab[i].param.gtp_teid=0; ue_context_pP->ue_context.e_rab[i].param.gtp_teid=0;
ue_context_pP->ue_context.nb_of_e_rabs++; ue_context_pP->ue_context.nb_of_e_rabs++;
LOG_I(RRC,"setting up the dedicated DRBs %d (index %d) status %d \n",
ue_context_pP->ue_context.e_rab[i].param.e_rab_id, i, ue_context_pP->ue_context.e_rab[i].status);
} }
ue_context_pP->ue_context.setup_e_rabs+=ue_context_pP->ue_context.nb_of_e_rabs; ue_context_pP->ue_context.setup_e_rabs+=ue_context_pP->ue_context.nb_of_e_rabs;
} }
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(ctxt_pP, ue_context_pP, 0); rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(ctxt_pP, ue_context_pP, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment