Commit d3acdac8 authored by winckel's avatar winckel

Changed UE id for first S1AP message.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4461 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4556cd17
...@@ -123,7 +123,7 @@ int s1ap_eNB_handle_nas_first_req( ...@@ -123,7 +123,7 @@ int s1ap_eNB_handle_nas_first_req(
/* Keep a reference to the selected MME */ /* Keep a reference to the selected MME */
ue_desc_p->mme_ref = mme_desc_p; ue_desc_p->mme_ref = mme_desc_p;
ue_desc_p->rnti = s1ap_nas_first_req_p->rnti; ue_desc_p->ue_initial_id = s1ap_nas_first_req_p->ue_initial_id;
ue_desc_p->eNB_instance = instance_p; ue_desc_p->eNB_instance = instance_p;
do { do {
......
...@@ -60,8 +60,8 @@ typedef struct s1ap_eNB_ue_context_s { ...@@ -60,8 +60,8 @@ typedef struct s1ap_eNB_ue_context_s {
*/ */
unsigned eNB_ue_s1ap_id:24; unsigned eNB_ue_s1ap_id:24;
/* RNTI of the UE as used on LTE-Uu interface */ /* UE id for initial connection to S1AP */
uint16_t rnti; uint16_t ue_initial_id;
/* Uniquely identifies the UE within MME. Encoded on 32 bits. */ /* Uniquely identifies the UE within MME. Encoded on 32 bits. */
uint32_t mme_ue_s1ap_id; uint32_t mme_ue_s1ap_id;
......
...@@ -222,8 +222,8 @@ typedef struct s1ap_register_eNB_s { ...@@ -222,8 +222,8 @@ typedef struct s1ap_register_eNB_s {
* will be the unique identifier used between RRC and S1AP. * will be the unique identifier used between RRC and S1AP.
*/ */
typedef struct s1ap_nas_first_req_s { typedef struct s1ap_nas_first_req_s {
/* RNTI of the mobile */ /* UE id for initial connection to S1AP */
uint16_t rnti; uint16_t ue_initial_id;
/* Establishment cause as sent by UE */ /* Establishment cause as sent by UE */
rrc_establishment_cause_t establishment_cause; rrc_establishment_cause_t establishment_cause;
......
...@@ -167,6 +167,9 @@ typedef struct{ ...@@ -167,6 +167,9 @@ typedef struct{
UE_S_TMSI Initialue_identity_s_TMSI; UE_S_TMSI Initialue_identity_s_TMSI;
EstablishmentCause_t establishment_cause; EstablishmentCause_t establishment_cause;
/* UE id for initial connection to S1AP */
uint16_t ue_initial_id;
/* Information from S1AP initial_context_setup_req */ /* Information from S1AP initial_context_setup_req */
unsigned eNB_ue_s1ap_id :24; unsigned eNB_ue_s1ap_id :24;
/* Number of e_rab to be setup in the list */ /* Number of e_rab to be setup in the list */
......
...@@ -450,6 +450,16 @@ static uint8_t get_next_rrc_transaction_identifier(u8 Mod_id) ...@@ -450,6 +450,16 @@ static uint8_t get_next_rrc_transaction_identifier(u8 Mod_id)
return rrc_transaction_identifier[Mod_id]; return rrc_transaction_identifier[Mod_id];
} }
static uint16_t get_next_ue_initial_id(u8 Mod_id)
{
static uint16_t ue_initial_id[NUMBER_OF_eNB_MAX];
ue_initial_id[Mod_id] = ue_initial_id[Mod_id] + 1;
return ue_initial_id[Mod_id];
}
static u8 get_next_UE_index (u8 Mod_id, u8 *UE_identity) static u8 get_next_UE_index (u8 Mod_id, u8 *UE_identity)
{ {
u8 i, first_index = 255, reg = 0; u8 i, first_index = 255, reg = 0;
...@@ -1218,7 +1228,8 @@ void rrc_eNB_process_RRCConnectionSetupComplete (u8 Mod_id, ...@@ -1218,7 +1228,8 @@ void rrc_eNB_process_RRCConnectionSetupComplete (u8 Mod_id,
MessageDef *message_p; MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_NAS_FIRST_REQ); message_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_NAS_FIRST_REQ);
S1AP_NAS_FIRST_REQ (message_p).rnti = eNB_mac_inst[Mod_id].UE_template[UE_index].rnti; // TODO check if this is the correct id to use eNB_rrc_inst[Mod_id].Info.UE[UE_index].ue_initial_id = get_next_ue_initial_id(Mod_id);
S1AP_NAS_FIRST_REQ (message_p).ue_initial_id = eNB_rrc_inst[Mod_id].Info.UE[UE_index].ue_initial_id;
/* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */ /* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */
DevCheck(eNB_rrc_inst[Mod_id].Info.UE[UE_index].establishment_cause < RRC_CAUSE_LAST, eNB_rrc_inst[Mod_id].Info.UE[UE_index].establishment_cause, RRC_CAUSE_LAST, Mod_id); DevCheck(eNB_rrc_inst[Mod_id].Info.UE[UE_index].establishment_cause < RRC_CAUSE_LAST, eNB_rrc_inst[Mod_id].Info.UE[UE_index].establishment_cause, RRC_CAUSE_LAST, Mod_id);
......
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