mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 20:50:28 +00:00
Compare commits
9 Commits
fix-tutori
...
fix_reesta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
387821d2b6 | ||
|
|
f3d8f56590 | ||
|
|
da870143f6 | ||
|
|
3a1252a8f6 | ||
|
|
a72e6ed627 | ||
|
|
71c0544eda | ||
|
|
093e194bf3 | ||
|
|
c90699c7d8 | ||
|
|
3123d951be |
@@ -1459,6 +1459,310 @@ pdcp_remove_UE(
|
||||
return 1;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
boolean_t rrc_pdcp_reestablishment_asn1_req (
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
|
||||
LTE_DRB_ToAddModList_t *const drb2add_list_pP
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
long int lc_id = 0;
|
||||
LTE_DRB_Identity_t srb_id = 0;
|
||||
long int mch_id = 0;
|
||||
rlc_mode_t rlc_type = RLC_MODE_NONE;
|
||||
LTE_DRB_Identity_t drb_id = 0;
|
||||
uint8_t drb_sn = 12;
|
||||
uint8_t srb_sn = 5; // fixed sn for SRBs
|
||||
uint8_t drb_report = 0;
|
||||
long int cnt = 0;
|
||||
uint16_t header_compression_profile = 0;
|
||||
config_action_t action = CONFIG_ACTION_ADD;
|
||||
LTE_SRB_ToAddMod_t *srb_toaddmod_p = NULL;
|
||||
LTE_DRB_ToAddMod_t *drb_toaddmod_p = NULL;
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
pdcp_t *pdcp_p_old = NULL;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hash_key_t old_key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
|
||||
|
||||
if (srb2add_list_pP != NULL) {
|
||||
for (cnt=0; cnt<srb2add_list_pP->list.count; cnt++) {
|
||||
srb_toaddmod_p = srb2add_list_pP->list.array[cnt];
|
||||
srb_id = srb_toaddmod_p->srb_Identity;
|
||||
rlc_type = RLC_MODE_AM;
|
||||
lc_id = srb_id;
|
||||
old_key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, previous_rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
||||
h_rc = hashtable_get(pdcp_coll_p, old_key, (void **)&pdcp_p_old);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" ignore exist SRB %ld key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
srb_id,
|
||||
key);
|
||||
continue;
|
||||
}
|
||||
if(pdcp_p_old!=NULL) {
|
||||
// Reestablishment case
|
||||
// When upper layers request a PDCP re-establishment, the UE shall:
|
||||
// - set Next_PDCP_TX_SN, and TX_HFN to 0;
|
||||
// - set Next_PDCP_RX_SN, and RX_HFN to 0;
|
||||
// - discard all stored PDCP SDUs and PDCP PDUs;
|
||||
// - apply the ciphering and integrity protection algorithms and keys provided by upper layers during the re-establishment procedure.
|
||||
pdcp_p = calloc(1, sizeof(pdcp_t));
|
||||
memcpy(pdcp_p,pdcp_p_old,sizeof(pdcp_t));
|
||||
h_rc = hashtable_insert(pdcp_coll_p, key, pdcp_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64" FAILED\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
free(pdcp_p);
|
||||
return TRUE;
|
||||
} else {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
}
|
||||
|
||||
pdcp_p->is_ue = FALSE;
|
||||
pdcp_add_UE(ctxt_pP);
|
||||
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
||||
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI) {
|
||||
break;
|
||||
}
|
||||
|
||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||
}
|
||||
|
||||
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
|
||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" reestablishment SRB %ld key 0x%"PRIx64" old rnti %x old key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
srb_id,key,previous_rnti,old_key);
|
||||
pdcp_p->next_pdcp_tx_sn = 0;
|
||||
pdcp_p->next_pdcp_rx_sn = 0;
|
||||
pdcp_p->tx_hfn = 0;
|
||||
pdcp_p->rx_hfn = 0;
|
||||
pdcp_p->last_submitted_pdcp_rx_sn = 4095;
|
||||
pdcp_p->first_missing_pdu = -1;
|
||||
continue;
|
||||
}
|
||||
rlc_type = RLC_MODE_AM;
|
||||
lc_id = srb_id;
|
||||
action = CONFIG_ACTION_ADD;
|
||||
pdcp_p = calloc(1, sizeof(pdcp_t));
|
||||
h_rc = hashtable_insert(pdcp_coll_p, key, pdcp_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64" FAILED\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
free(pdcp_p);
|
||||
return TRUE;
|
||||
} else {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
}
|
||||
pdcp_config_req_asn1 (
|
||||
ctxt_pP,
|
||||
pdcp_p,
|
||||
SRB_FLAG_YES,
|
||||
rlc_type,
|
||||
action,
|
||||
lc_id,
|
||||
mch_id,
|
||||
srb_id,
|
||||
srb_sn,
|
||||
0, // drb_report
|
||||
0, // header compression
|
||||
0xFF,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// reset the action
|
||||
if (drb2add_list_pP != NULL) {
|
||||
for (cnt=0; cnt<drb2add_list_pP->list.count; cnt++) {
|
||||
drb_toaddmod_p = drb2add_list_pP->list.array[cnt];
|
||||
drb_id = drb_toaddmod_p->drb_Identity;// + drb_id_offset;
|
||||
|
||||
if (drb_toaddmod_p->logicalChannelIdentity) {
|
||||
lc_id = *(drb_toaddmod_p->logicalChannelIdentity);
|
||||
} else {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" logicalChannelIdentity is missing in DRB-ToAddMod information element!\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lc_id == 1 || lc_id == 2) {
|
||||
LOG_E(RLC, PROTOCOL_CTXT_FMT" logicalChannelIdentity = %ld is invalid in RRC message when adding DRB!\n", PROTOCOL_CTXT_ARGS(ctxt_pP), lc_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
old_key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, previous_rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, old_key, (void **)&pdcp_p_old);
|
||||
|
||||
DevCheck4(drb_id < LTE_maxDRB, drb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" ignore exist DRB %ld key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
drb_id,
|
||||
key);
|
||||
continue;
|
||||
}
|
||||
if(pdcp_p_old!=NULL) {
|
||||
// Reestablishment case
|
||||
// Copy old PDCP data and insert as new hash
|
||||
pdcp_p = calloc(1, sizeof(pdcp_t));
|
||||
memcpy(pdcp_p,pdcp_p_old,sizeof(pdcp_t));
|
||||
h_rc = hashtable_insert(pdcp_coll_p, key, pdcp_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64" FAILED\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
free(pdcp_p);
|
||||
return TRUE;
|
||||
} else {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
}
|
||||
|
||||
pdcp_p->is_ue = FALSE;
|
||||
pdcp_add_UE(ctxt_pP);
|
||||
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
||||
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI) {
|
||||
break;
|
||||
}
|
||||
|
||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||
}
|
||||
|
||||
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
|
||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" reestablishment DRB %ld key 0x%"PRIx64" old rnti %x old key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
drb_id,key,previous_rnti,old_key);
|
||||
if (drb_toaddmod_p->pdcp_Config->rlc_AM) {
|
||||
//??
|
||||
}
|
||||
if (drb_toaddmod_p->pdcp_Config->rlc_UM) {
|
||||
// - set Next_PDCP_RX_SN, and RX_HFN to 0;
|
||||
// - set Next_PDCP_RX_SN, and RX_HFN to 0;
|
||||
pdcp_p->next_pdcp_tx_sn = 0;
|
||||
pdcp_p->next_pdcp_rx_sn = 0;
|
||||
pdcp_p->tx_hfn = 0;
|
||||
pdcp_p->rx_hfn = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// Add new bearer case
|
||||
action = CONFIG_ACTION_ADD;
|
||||
pdcp_p = calloc(1, sizeof(pdcp_t));
|
||||
h_rc = hashtable_insert(pdcp_coll_p, key, pdcp_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64" FAILED\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
free(pdcp_p);
|
||||
return TRUE;
|
||||
} else {
|
||||
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64"\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
key);
|
||||
}
|
||||
|
||||
if (drb_toaddmod_p->pdcp_Config) {
|
||||
if (drb_toaddmod_p->pdcp_Config->discardTimer) {
|
||||
// set the value of the timer
|
||||
}
|
||||
|
||||
if (drb_toaddmod_p->pdcp_Config->rlc_AM) {
|
||||
drb_report = drb_toaddmod_p->pdcp_Config->rlc_AM->statusReportRequired;
|
||||
drb_sn = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits; // default SN size
|
||||
rlc_type = RLC_MODE_AM;
|
||||
}
|
||||
|
||||
if (drb_toaddmod_p->pdcp_Config->rlc_UM) {
|
||||
drb_sn = drb_toaddmod_p->pdcp_Config->rlc_UM->pdcp_SN_Size;
|
||||
rlc_type =RLC_MODE_UM;
|
||||
}
|
||||
|
||||
switch (drb_toaddmod_p->pdcp_Config->headerCompression.present) {
|
||||
case LTE_PDCP_Config__headerCompression_PR_NOTHING:
|
||||
case LTE_PDCP_Config__headerCompression_PR_notUsed:
|
||||
header_compression_profile=0x0;
|
||||
break;
|
||||
|
||||
case LTE_PDCP_Config__headerCompression_PR_rohc:
|
||||
|
||||
// parse the struc and get the rohc profile
|
||||
if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0001) {
|
||||
header_compression_profile=0x0001;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0002) {
|
||||
header_compression_profile=0x0002;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0003) {
|
||||
header_compression_profile=0x0003;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0004) {
|
||||
header_compression_profile=0x0004;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0006) {
|
||||
header_compression_profile=0x0006;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0101) {
|
||||
header_compression_profile=0x0101;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0102) {
|
||||
header_compression_profile=0x0102;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0103) {
|
||||
header_compression_profile=0x0103;
|
||||
} else if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0104) {
|
||||
header_compression_profile=0x0104;
|
||||
} else {
|
||||
header_compression_profile=0x0;
|
||||
LOG_W(PDCP,"unknown header compresion profile\n");
|
||||
}
|
||||
|
||||
// set the applicable profile
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_W(PDCP,PROTOCOL_PDCP_CTXT_FMT"[RB %ld] unknown drb_toaddmod->PDCP_Config->headerCompression->present \n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p), drb_id);
|
||||
break;
|
||||
}
|
||||
|
||||
pdcp_config_req_asn1 (
|
||||
ctxt_pP,
|
||||
pdcp_p,
|
||||
SRB_FLAG_NO,
|
||||
rlc_type,
|
||||
action,
|
||||
lc_id,
|
||||
mch_id,
|
||||
drb_id,
|
||||
drb_sn,
|
||||
drb_report,
|
||||
header_compression_profile,
|
||||
0xFF,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
boolean_t
|
||||
|
||||
@@ -320,6 +320,21 @@ boolean_t rrc_pdcp_config_asn1_req (
|
||||
rb_id_t *const defaultDRB
|
||||
);
|
||||
|
||||
/*! \fn bool rrc_pdcp_reestablishment_asn1_req const protocol_ctxt_t *const ctxt_pP, const rnti_t previous_rnti, LTE_SRB_ToAddModList_t *const srb2add_list_pP, LTE_DRB_ToAddModList_t *const drb2add_list_pP)
|
||||
* \brief Function for RRC to reestablish a Radio Bearer.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] previous_rnti privious rnti
|
||||
* \param[in] srb2add_list SRB configuration list to be created.
|
||||
* \param[in] drb2add_list DRB configuration list to be created.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
boolean_t rrc_pdcp_reestablishment_asn1_req (
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
|
||||
LTE_DRB_ToAddModList_t *const drb2add_list_pP
|
||||
);
|
||||
|
||||
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
|
||||
@@ -619,6 +619,23 @@ rlc_op_status_t rlc_stat_req (
|
||||
unsigned int *const stat_timer_poll_retransmit_timed_out,
|
||||
unsigned int *const stat_timer_status_prohibit_timed_out);
|
||||
|
||||
/*! \fn rlc_op_status_t rrc_rlc_reestablishment_asn1_req (
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
const LTE_SRB_ToAddModList_t *const srb2add_listP,
|
||||
const LTE_DRB_ToAddModList_t *const drb2add_listP)
|
||||
* \brief Function for RRC to reestablish a Radio Bearer.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] previous_rnti Previous RNTI.
|
||||
* \param[in] srb2add_listP SRB configuration list to be created.
|
||||
* \param[in] drb2add_listP DRB configuration list to be created.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_reestablishment_asn1_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
const LTE_SRB_ToAddModList_t *const srb2add_listP,
|
||||
const LTE_DRB_ToAddModList_t *const drb2add_listP);
|
||||
|
||||
/*! \fn int rlc_module_init(int enb_flag)
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (mem_block_t structures mainly used in RLC module).
|
||||
*/
|
||||
|
||||
@@ -754,6 +754,17 @@ boolean_t rrc_pdcp_config_asn1_req(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Dummy function due to dependency from LTE libraries */
|
||||
boolean_t rrc_pdcp_reestablishment_asn1_req (
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
|
||||
LTE_DRB_ToAddModList_t *const drb2add_list_pP
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_DRB_preconfiguration(uint16_t crnti)
|
||||
{
|
||||
|
||||
|
||||
@@ -864,6 +864,15 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Dummy function due to dependency from LTE libraries */
|
||||
rlc_op_status_t rrc_rlc_reestablishment_asn1_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
const LTE_SRB_ToAddModList_t *const srb2add_listP,
|
||||
const LTE_DRB_ToAddModList_t *const drb2add_listP)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP,
|
||||
const LTE_SRB_ToAddModList_t * const srb2add_listP,
|
||||
const NR_DRB_ToAddModList_t * const drb2add_listP,
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
#include "asn1_utils.h"
|
||||
#include "rlc_ue_manager.h"
|
||||
#include "rlc_entity.h"
|
||||
|
||||
#include "rlc_entity_am.h"
|
||||
#include "rlc_entity_um.h"
|
||||
#include <stdint.h>
|
||||
|
||||
static rlc_ue_manager_t *rlc_ue_manager;
|
||||
@@ -1032,3 +1033,103 @@ void rlc_tick(int frame, int subframe)
|
||||
rlc_current_time_last_subframe = subframe;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_op_status_t rrc_rlc_reestablishment_asn1_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const rnti_t previous_rnti,
|
||||
const LTE_SRB_ToAddModList_t *const srb2add_listP,
|
||||
const LTE_DRB_ToAddModList_t *const drb2add_listP
|
||||
) {
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_ue_t *ue;
|
||||
rlc_ue_t *old_ue;
|
||||
int rnti = ctxt_pP->rnti;
|
||||
int module_id = ctxt_pP->module_id;
|
||||
int cnt;
|
||||
int srb_id=0;
|
||||
int drb_id=0;
|
||||
|
||||
if (srb2add_listP != NULL) {
|
||||
for (cnt=0; cnt<srb2add_listP->list.count; cnt++) {
|
||||
rlc_manager_lock(rlc_ue_manager);
|
||||
ue = rlc_manager_get_ue(rlc_ue_manager, rnti);
|
||||
old_ue = rlc_manager_get_ue(rlc_ue_manager, previous_rnti);
|
||||
srb_id=srb2add_listP->list.array[cnt]->srb_Identity;
|
||||
|
||||
//ignore already exist
|
||||
if (ue->srb[srb_id-1] != NULL) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning SRB %d already exist for ue %d, do nothing\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (old_ue->srb[srb_id-1] != NULL) {
|
||||
// TS36 322 5.4 Re-establishment procedure
|
||||
// discard the remaining AMD PDUs and byte segments of AMD PDUs in the receiving side
|
||||
// discard all RLC SDUs and AMD PDUs in the transmitting side
|
||||
// discard all RLC control PDUs.
|
||||
ue->srb[srb_id-1]=old_ue->srb[srb_id-1];
|
||||
rlc_entity_am_reestablishment(ue->srb[srb_id-1]);
|
||||
old_ue->srb[srb_id-1]=NULL;
|
||||
LOG_D(RLC, "%s:%d:%s: reestablishment SRB %d from %d to ue %d\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, srb_id, previous_rnti, rnti);
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
continue;
|
||||
}
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
|
||||
// create new
|
||||
add_srb(rnti, module_id, srb2add_listP->list.array[cnt]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (drb2add_listP != NULL) {
|
||||
for (cnt=0; cnt<drb2add_listP->list.count; cnt++) {
|
||||
rlc_manager_lock(rlc_ue_manager);
|
||||
ue = rlc_manager_get_ue(rlc_ue_manager, rnti);
|
||||
old_ue = rlc_manager_get_ue(rlc_ue_manager, previous_rnti);
|
||||
drb_id=drb2add_listP->list.array[cnt]->drb_Identity;
|
||||
|
||||
//ignore already exist
|
||||
if (ue->drb[drb_id-1] != NULL) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((old_ue->drb[drb_id-1] != NULL)) {
|
||||
// TS36 322 5.4 Re-establishment procedure
|
||||
// discard the remaining AMD PDUs and byte segments of AMD PDUs in the receiving side
|
||||
// discard all RLC SDUs and AMD PDUs in the transmitting side
|
||||
// discard all RLC control PDUs.
|
||||
ue->drb[drb_id-1]=old_ue->drb[drb_id-1];
|
||||
switch (drb2add_listP->list.array[cnt]->rlc_Config->present) {
|
||||
case LTE_RLC_Config_PR_am:
|
||||
rlc_entity_am_reestablishment(ue->drb[drb_id-1]);
|
||||
break;
|
||||
case LTE_RLC_Config_PR_um_Bi_Directional:
|
||||
rlc_entity_um_reestablishment(ue->drb[drb_id-1]);
|
||||
break;
|
||||
default:
|
||||
LOG_E(RLC, "%s:%d:%s: fatal: unhandled DRB type\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
old_ue->drb[drb_id-1]=NULL;
|
||||
LOG_D(RLC, "%s:%d:%s: reestablishment DRB %d from %d to ue %d\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, drb_id, previous_rnti, rnti);
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
continue;
|
||||
}
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
|
||||
// create new
|
||||
add_drb(rnti, module_id, drb2add_listP->list.array[cnt]);
|
||||
|
||||
}
|
||||
}
|
||||
return RLC_OP_STATUS_OK;
|
||||
}
|
||||
@@ -191,13 +191,39 @@ mac_rrc_data_req(
|
||||
|
||||
if( (Srb_id & RAB_OFFSET ) == CCCH) {
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
|
||||
rnti_t old_rnti = 0;
|
||||
uint8_t flag= 0;
|
||||
if (ue_context_p == NULL) {
|
||||
for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (reestablish_rnti_map[i][0] == rnti) {
|
||||
old_rnti = reestablish_rnti_map[i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (old_rnti != 0) {
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],old_rnti);
|
||||
if (ue_context_p == NULL) {
|
||||
return(0);
|
||||
}
|
||||
} else {
|
||||
if(RC.rrc[Mod_idP]->carrier[CC_id].Srb0.Active==0) {
|
||||
LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP);
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (ue_context_p == NULL) return(0);
|
||||
|
||||
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
|
||||
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %ld, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
|
||||
Srb_info=&ue_p->Srb0;
|
||||
Srb_info=&RC.rrc[Mod_idP]->carrier[CC_id].Srb0;
|
||||
if(Srb_info->Tx_buffer.payload_size <= 0){
|
||||
return(0);
|
||||
}
|
||||
flag = 1;
|
||||
}
|
||||
}
|
||||
if(flag == 0){
|
||||
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
|
||||
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %ld, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
|
||||
|
||||
Srb_info=&ue_p->Srb0;
|
||||
}
|
||||
// check if data is there for MAC
|
||||
if(Srb_info->Tx_buffer.payload_size>0) { //Fill buffer
|
||||
LOG_D(RRC,"[eNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)\n",Mod_idP,Srb_info,Srb_info->Tx_buffer.payload_size,buffer_pP,Srb_info->Tx_buffer.Payload);
|
||||
@@ -205,7 +231,10 @@ mac_rrc_data_req(
|
||||
Sdu_size = Srb_info->Tx_buffer.payload_size;
|
||||
Srb_info->Tx_buffer.payload_size=0;
|
||||
}
|
||||
|
||||
if(flag == 1){
|
||||
Srb_info->Tx_buffer.payload_size = 0;
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].Srb0.Active = 0;
|
||||
}
|
||||
return (Sdu_size);
|
||||
}
|
||||
|
||||
|
||||
@@ -760,6 +760,7 @@ typedef struct {
|
||||
LTE_SystemInformationBlockType21_r14_t *sib21;
|
||||
// End - TTN
|
||||
SRB_INFO SI;
|
||||
SRB_INFO Srb0;
|
||||
uint8_t *paging[MAX_MOBILES_PER_ENB];
|
||||
uint32_t sizeof_paging[MAX_MOBILES_PER_ENB];
|
||||
} rrc_eNB_carrier_data_t;
|
||||
|
||||
@@ -1559,11 +1559,14 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
uint16_t size;
|
||||
LTE_MeasObjectToAddModList_t *MeasObj_list = NULL;
|
||||
LTE_MeasObjectToAddMod_t *MeasObj = NULL;
|
||||
LTE_MeasObjectToAddMod_t *MeasObj2 = NULL;
|
||||
LTE_ReportConfigToAddModList_t *ReportConfig_list = NULL;
|
||||
LTE_ReportConfigToAddMod_t *ReportConfig_per, *ReportConfig_A1,
|
||||
*ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
|
||||
LTE_ReportConfigToAddMod_t *ReportConfig_NR = NULL;
|
||||
LTE_MeasIdToAddModList_t *MeasId_list = NULL;
|
||||
LTE_MeasIdToAddMod_t *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
|
||||
LTE_MeasIdToAddMod_t *MeasId6;
|
||||
LTE_RSRP_Range_t *rsrp = NULL;
|
||||
struct LTE_MeasConfig__speedStatePars *Sparams = NULL;
|
||||
LTE_QuantityConfig_t *quantityConfig = NULL;
|
||||
@@ -1765,6 +1768,19 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
MeasId5->measObjectId = 1;
|
||||
MeasId5->reportConfigId = 6;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId5);
|
||||
|
||||
|
||||
if (ue_context_pP->ue_context.does_nr) {
|
||||
MeasId6 = calloc(1, sizeof(LTE_MeasIdToAddMod_t));
|
||||
|
||||
if (MeasId6 == NULL) exit(1);
|
||||
|
||||
MeasId6->measId = 7;
|
||||
MeasId6->measObjectId = 2;
|
||||
MeasId6->reportConfigId = 7;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId6);
|
||||
}
|
||||
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list;
|
||||
// Add one EUTRA Measurement Object
|
||||
MeasObj_list = CALLOC(1, sizeof(*MeasObj_list));
|
||||
@@ -1774,8 +1790,10 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
memset((void *)MeasObj, 0, sizeof(*MeasObj));
|
||||
MeasObj->measObjectId = 1;
|
||||
MeasObj->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 3350; //band 7, 2.68GHz
|
||||
//MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 36090; //band 33, 1.909GHz
|
||||
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq =
|
||||
to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
|
||||
RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
|
||||
RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
|
||||
MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = LTE_AllowedMeasBandwidth_mbw25;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
|
||||
@@ -1783,21 +1801,59 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.size = 1;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.bits_unused = 6;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = NULL; // Default is 15 or 0dB
|
||||
MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
|
||||
(LTE_CellsToAddModList_t *) CALLOC(1, sizeof(*CellsToAddModList));
|
||||
CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
|
||||
|
||||
// Add adjacent cell lists (6 per eNB)
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (RC.rrc[ctxt_pP->module_id]->num_neigh_cells > 0) {
|
||||
MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
|
||||
(LTE_CellsToAddModList_t *) CALLOC(1, sizeof(*CellsToAddModList));
|
||||
CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
|
||||
}
|
||||
|
||||
/* TODO: Extend to multiple carriers */
|
||||
// Add adjacent cell lists (max 6 per eNB)
|
||||
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->num_neigh_cells; i++) {
|
||||
CellToAdd = (LTE_CellsToAddMod_t *) CALLOC(1, sizeof(*CellToAdd));
|
||||
CellToAdd->cellIndex = i + 1;
|
||||
CellToAdd->physCellId = get_adjacent_cell_id(ctxt_pP->module_id, i);
|
||||
CellToAdd->physCellId = RC.rrc[ctxt_pP->module_id]->neigh_cells_id[i][0];//get_adjacent_cell_id(ctxt_pP->module_id, i);
|
||||
CellToAdd->cellIndividualOffset = LTE_Q_OffsetRange_dB0;
|
||||
ue_context_pP->ue_context.measurement_info->cellIndividualOffset[i+1] = CellToAdd->cellIndividualOffset;
|
||||
ASN_SEQUENCE_ADD(&CellsToAddModList->list, CellToAdd);
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj);
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
|
||||
if (ue_context_pP->ue_context.does_nr) {
|
||||
MeasObj2 = calloc(1, sizeof(LTE_MeasObjectToAddMod_t));
|
||||
|
||||
if (MeasObj2 == NULL) exit(1);
|
||||
|
||||
MeasObj2->measObjectId = 2;
|
||||
MeasObj2->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectNR_r15;
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.carrierFreq_r15 = RC.rrc[ctxt_pP->module_id]->nr_scg_ssb_freq; //641272; //634000; //(634000 = 3.51GHz) (640000 = 3.6GHz) (641272 = 3619.08MHz = 3600 + 30/1000*106*12/2) (642256 is for 3.6GHz and absoluteFrequencySSB = 642016)
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.rs_ConfigSSB_r15.measTimingConfig_r15.periodicityAndOffset_r15.present = LTE_MTC_SSB_NR_r15__periodicityAndOffset_r15_PR_sf20_r15;
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.rs_ConfigSSB_r15.measTimingConfig_r15.periodicityAndOffset_r15.choice.sf20_r15 = 0;
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.rs_ConfigSSB_r15.measTimingConfig_r15.ssb_Duration_r15 = LTE_MTC_SSB_NR_r15__ssb_Duration_r15_sf4;
|
||||
if (RC.rrc[ctxt_pP->module_id]->nr_scg_ssb_freq > 2016666) //FR2
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.rs_ConfigSSB_r15.subcarrierSpacingSSB_r15 = LTE_RS_ConfigSSB_NR_r15__subcarrierSpacingSSB_r15_kHz120;
|
||||
else
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.rs_ConfigSSB_r15.subcarrierSpacingSSB_r15 = LTE_RS_ConfigSSB_NR_r15__subcarrierSpacingSSB_r15_kHz30;
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.quantityConfigSet_r15 = 1;
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.ext1 = calloc(1, sizeof(struct LTE_MeasObjectNR_r15__ext1));
|
||||
|
||||
if (MeasObj2->measObject.choice.measObjectNR_r15.ext1 == NULL) exit(1);
|
||||
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.ext1->bandNR_r15 = calloc(1, sizeof(struct LTE_MeasObjectNR_r15__ext1__bandNR_r15));
|
||||
|
||||
if (MeasObj2->measObject.choice.measObjectNR_r15.ext1->bandNR_r15 == NULL) exit(1);
|
||||
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.ext1->bandNR_r15->present = LTE_MeasObjectNR_r15__ext1__bandNR_r15_PR_setup;
|
||||
if (RC.rrc[ctxt_pP->module_id]->nr_scg_ssb_freq > 2016666) //FR2
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.ext1->bandNR_r15->choice.setup = 261;
|
||||
else
|
||||
MeasObj2->measObject.choice.measObjectNR_r15.ext1->bandNR_r15->choice.setup = 78;
|
||||
|
||||
ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj2);
|
||||
}
|
||||
|
||||
// Report Configurations for periodical, A1-A5 events
|
||||
ReportConfig_list = CALLOC(1, sizeof(*ReportConfig_list));
|
||||
ReportConfig_per = CALLOC(1, sizeof(*ReportConfig_per));
|
||||
@@ -1806,6 +1862,11 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
ReportConfig_A3 = CALLOC(1, sizeof(*ReportConfig_A3));
|
||||
ReportConfig_A4 = CALLOC(1, sizeof(*ReportConfig_A4));
|
||||
ReportConfig_A5 = CALLOC(1, sizeof(*ReportConfig_A5));
|
||||
|
||||
if (ue_context_pP->ue_context.does_nr) {
|
||||
ReportConfig_NR = CALLOC(1, sizeof(*ReportConfig_NR));
|
||||
}
|
||||
|
||||
ReportConfig_per->reportConfigId = 1;
|
||||
ReportConfig_per->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
@@ -1835,136 +1896,132 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A1);
|
||||
|
||||
if (RC.rrc[ctxt_pP->module_id]->HO_flag == 1 /*HO_MEASUREMENT */ ) {
|
||||
LOG_I(RRC, "[eNB %d] frame %d: requesting A2, A3, A4, A5, and A6 event reporting\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame);
|
||||
ReportConfig_A2->reportConfigId = 3;
|
||||
ReportConfig_A2->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A2);
|
||||
ReportConfig_A3->reportConfigId = 4;
|
||||
ReportConfig_A3->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA3;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset = 1; //10;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA3.reportOnLeave = 1;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 0.5; // FIXME ...hysteresis is of type long!
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
|
||||
LTE_TimeToTrigger_ms40;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3);
|
||||
ReportConfig_A4->reportConfigId = 5;
|
||||
ReportConfig_A4->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA4;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A4);
|
||||
ReportConfig_A5->reportConfigId = 6;
|
||||
ReportConfig_A5->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA5;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A5);
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
|
||||
#if 0
|
||||
/* TODO: set a proper value.
|
||||
* 20 means: UE does not report if RSRP of serving cell is higher
|
||||
* than -120 dB (see 36.331 5.5.3.1).
|
||||
* This is too low for the X2 handover experiment.
|
||||
*/
|
||||
rsrp = CALLOC(1, sizeof(LTE_RSRP_Range_t));
|
||||
*rsrp = 20;
|
||||
#endif
|
||||
Sparams = CALLOC(1, sizeof(*Sparams));
|
||||
Sparams->present = LTE_MeasConfig__speedStatePars_PR_setup;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_High = LTE_SpeedStateScaleFactors__sf_Medium_oDot75;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_Medium = LTE_SpeedStateScaleFactors__sf_High_oDot5;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeHigh = 10;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeMedium = 5;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_Evaluation = LTE_MobilityStateParameters__t_Evaluation_s60;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_HystNormal = LTE_MobilityStateParameters__t_HystNormal_s120;
|
||||
quantityConfig = CALLOC(1, sizeof(*quantityConfig));
|
||||
memset((void *)quantityConfig, 0, sizeof(*quantityConfig));
|
||||
quantityConfig->quantityConfigEUTRA = CALLOC(1, sizeof(struct LTE_QuantityConfigEUTRA));
|
||||
memset((void *)quantityConfig->quantityConfigEUTRA, 0, sizeof(*quantityConfig->quantityConfigEUTRA));
|
||||
quantityConfig->quantityConfigCDMA2000 = NULL;
|
||||
quantityConfig->quantityConfigGERAN = NULL;
|
||||
quantityConfig->quantityConfigUTRA = NULL;
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP)));
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = LTE_FilterCoefficient_fc4;
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = LTE_FilterCoefficient_fc4;
|
||||
LOG_I(RRC,
|
||||
"[eNB %d] Frame %d: potential handover preparation: store the information in an intermediate structure in case of failure\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame);
|
||||
// store the information in an intermediate structure for Hanodver management
|
||||
//rrc_inst->handover_info.as_config.sourceRadioResourceConfig.srb_ToAddModList = CALLOC(1,sizeof());
|
||||
ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
|
||||
//memcpy((void *)rrc_inst->handover_info[ue_mod_idP]->as_config.sourceRadioResourceConfig.srb_ToAddModList,(void *)SRB_list,sizeof(LTE_SRB_ToAddModList_t));
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.srb_ToAddModList = *SRB_configList2;
|
||||
//memcpy((void *)rrc_inst->handover_info[ue_mod_idP]->as_config.sourceRadioResourceConfig.drb_ToAddModList,(void *)DRB_list,sizeof(LTE_DRB_ToAddModList_t));
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.drb_ToAddModList = DRB_configList;
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.drb_ToReleaseList = NULL;
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.mac_MainConfig =
|
||||
CALLOC(1, sizeof(*ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.mac_MainConfig));
|
||||
memcpy((void *)ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.mac_MainConfig,
|
||||
(void *)ue_context_pP->ue_context.mac_MainConfig, sizeof(LTE_MAC_MainConfig_t));
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.physicalConfigDedicated =
|
||||
CALLOC(1, sizeof(LTE_PhysicalConfigDedicated_t));
|
||||
memcpy((void *)ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.physicalConfigDedicated,
|
||||
(void *)ue_context_pP->ue_context.physicalConfigDedicated, sizeof(LTE_PhysicalConfigDedicated_t));
|
||||
ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.sps_Config = NULL;
|
||||
//memcpy((void *)rrc_inst->handover_info[ue_mod_idP]->as_config.sourceRadioResourceConfig.sps_Config,(void *)rrc_inst->sps_Config[ue_mod_idP],sizeof(SPS_Config_t));
|
||||
LOG_I(RRC, "[eNB %d] frame %d: requesting A2, A3, A4, A5, and A6 event reporting\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame);
|
||||
ReportConfig_A2->reportConfigId = 3;
|
||||
ReportConfig_A2->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A2);
|
||||
ReportConfig_A3->reportConfigId = 4;
|
||||
ReportConfig_A3->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA3;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset = 0; //10;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA3.reportOnLeave = 1;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 0; // FIXME ...hysteresis is of type long!
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
|
||||
LTE_TimeToTrigger_ms40;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3);
|
||||
ReportConfig_A4->reportConfigId = 5;
|
||||
ReportConfig_A4->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA4;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A4);
|
||||
ReportConfig_A5->reportConfigId = 6;
|
||||
ReportConfig_A5->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA5;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A5);
|
||||
|
||||
if (ue_context_pP->ue_context.does_nr) {
|
||||
ReportConfig_NR->reportConfigId = 7;
|
||||
ReportConfig_NR->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigInterRAT;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.present = LTE_ReportConfigInterRAT__triggerType_PR_event;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.present = LTE_ReportConfigInterRAT__triggerType__event__eventId_PR_eventB1_NR_r15;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.present = LTE_ThresholdNR_r15_PR_nr_RSRP_r15;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.choice.nr_RSRP_r15 = 0;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.reportOnLeave_r15 = FALSE;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.hysteresis = 2;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms80;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.maxReportCells = 4;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportAmount = LTE_ReportConfigInterRAT__reportAmount_infinity;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7 = calloc(1, sizeof(struct LTE_ReportConfigInterRAT__ext7));
|
||||
|
||||
if (ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7 == NULL) exit(1);
|
||||
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15 = calloc(1, sizeof(struct LTE_ReportQuantityNR_r15));
|
||||
|
||||
if (ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15 == NULL) exit(1);
|
||||
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrp = TRUE;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrq = TRUE;
|
||||
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_sinr = TRUE;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_NR);
|
||||
}
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
|
||||
|
||||
Sparams = CALLOC(1, sizeof(*Sparams));
|
||||
Sparams->present = LTE_MeasConfig__speedStatePars_PR_setup;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_High = LTE_SpeedStateScaleFactors__sf_Medium_oDot75;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_Medium = LTE_SpeedStateScaleFactors__sf_High_oDot5;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeHigh = 10;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeMedium = 5;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_Evaluation = LTE_MobilityStateParameters__t_Evaluation_s60;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_HystNormal = LTE_MobilityStateParameters__t_HystNormal_s120;
|
||||
quantityConfig = CALLOC(1, sizeof(*quantityConfig));
|
||||
memset((void *)quantityConfig, 0, sizeof(*quantityConfig));
|
||||
quantityConfig->quantityConfigEUTRA = CALLOC(1, sizeof(struct LTE_QuantityConfigEUTRA));
|
||||
memset((void *)quantityConfig->quantityConfigEUTRA, 0, sizeof(*quantityConfig->quantityConfigEUTRA));
|
||||
quantityConfig->quantityConfigCDMA2000 = NULL;
|
||||
quantityConfig->quantityConfigGERAN = NULL;
|
||||
quantityConfig->quantityConfigUTRA = NULL;
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP)));
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = LTE_FilterCoefficient_fc4;
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = LTE_FilterCoefficient_fc4;
|
||||
|
||||
/* Initialize NAS list */
|
||||
dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
|
||||
@@ -2018,7 +2075,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
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,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
//#endif
|
||||
(LTE_MAC_MainConfig_t *)ue_context_pP->ue_context.mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *)NULL,
|
||||
@@ -2115,6 +2172,20 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
// rrc_rlc_remove_ue(&ctxt_prior);
|
||||
// pdcp_remove_UE(&ctxt_prior);
|
||||
// add UE info to freeList for RU_thread to remove the UE instead of remove it here
|
||||
/* Refresh SRBs/DRBs */
|
||||
rrc_pdcp_reestablishment_asn1_req(ctxt_pP,
|
||||
reestablish_rnti,
|
||||
*SRB_configList2, // NULL,
|
||||
DRB_configList);
|
||||
|
||||
/* Refresh SRBs/DRBs */
|
||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
rrc_rlc_reestablishment_asn1_req(ctxt_pP,
|
||||
reestablish_rnti,
|
||||
*SRB_configList2, // NULL,
|
||||
DRB_configList
|
||||
);
|
||||
}
|
||||
LOG_I(RRC, "[RRCConnectionReestablishment]put UE %x into freeList\n", reestablish_rnti);
|
||||
put_UE_in_freelist(ctxt_pP->module_id, reestablish_rnti, 0);
|
||||
}
|
||||
@@ -2143,27 +2214,36 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
|
||||
|
||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||
ue_p->Srb0.Tx_buffer.payload_size =
|
||||
do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
|
||||
(uint8_t *) ue_p->Srb0.Tx_buffer.Payload);
|
||||
SRB_INFO *Srb_info;
|
||||
if(ue_context_pP == NULL){
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Active = 1;
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size = 0;
|
||||
Srb_info = &RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0;
|
||||
}else{
|
||||
//eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||
Srb_info = &ue_context_pP->ue_context.Srb0;
|
||||
}
|
||||
Srb_info->Tx_buffer.payload_size =
|
||||
do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
|
||||
(uint8_t*) Srb_info->Tx_buffer.Payload);
|
||||
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,
|
||||
(char *)(ue_p->Srb0.Tx_buffer.Payload),
|
||||
ue_p->Srb0.Tx_buffer.payload_size,
|
||||
(char *)(Srb_info->Tx_buffer.Payload),
|
||||
Srb_info->Tx_buffer.payload_size,
|
||||
"[MSG] RRCConnectionReestablishmentReject\n");
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
MSC_RRC_UE,
|
||||
ue_p->Srb0.Tx_buffer.Header,
|
||||
ue_p->Srb0.Tx_buffer.payload_size,
|
||||
Srb_info->Tx_buffer.Header,
|
||||
Srb_info->Tx_buffer.payload_size,
|
||||
MSC_AS_TIME_FMT" LTE_RRCConnectionReestablishmentReject UE %x size %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti,
|
||||
ue_p->Srb0.Tx_buffer.payload_size);
|
||||
Srb_info->Tx_buffer.payload_size);
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishmentReject (bytes %d)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
ue_p->Srb0.Tx_buffer.payload_size);
|
||||
Srb_info->Tx_buffer.payload_size);
|
||||
}
|
||||
#if 0
|
||||
void rrc_generate_SgNBReleaseRequest(
|
||||
@@ -7296,24 +7376,16 @@ rrc_eNB_decode_ccch(
|
||||
MSC_AS_TIME_FMT" CONFIG_REQ UE %x SRB",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ue_context_p->ue_context.rnti);
|
||||
rrc_pdcp_config_asn1_req(ctxt_pP,
|
||||
rrc_pdcp_reestablishment_asn1_req(ctxt_pP,
|
||||
c_rnti,
|
||||
ue_context_p->ue_context.SRB_configList,
|
||||
(LTE_DRB_ToAddModList_t *) NULL,
|
||||
(LTE_DRB_ToReleaseList_t *) NULL,
|
||||
0xff,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
,NULL);
|
||||
(LTE_DRB_ToAddModList_t *) NULL);
|
||||
|
||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
rrc_rlc_config_asn1_req(ctxt_pP,
|
||||
rrc_rlc_reestablishment_asn1_req(ctxt_pP,
|
||||
c_rnti,
|
||||
ue_context_p->ue_context.SRB_configList,
|
||||
(LTE_DRB_ToAddModList_t *) NULL,
|
||||
(LTE_DRB_ToReleaseList_t *) NULL
|
||||
, (LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
0,0
|
||||
(LTE_DRB_ToAddModList_t *) NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user