Save UeRadioCapability into mme_ue.
The saved information will be used when transmitting InitialContextSetupReq
This commit is contained in:
parent
d3cdbac70d
commit
7243966cc4
|
@ -74,6 +74,7 @@ status_t mme_context_final()
|
||||||
|
|
||||||
mme_sgw_remove_all();
|
mme_sgw_remove_all();
|
||||||
mme_enb_remove_all();
|
mme_enb_remove_all();
|
||||||
|
mme_ue_remove_all();
|
||||||
|
|
||||||
d_assert(self.mme_ue_s1ap_id_hash, , "Null param");
|
d_assert(self.mme_ue_s1ap_id_hash, , "Null param");
|
||||||
hash_destroy(self.mme_ue_s1ap_id_hash);
|
hash_destroy(self.mme_ue_s1ap_id_hash);
|
||||||
|
@ -1202,9 +1203,27 @@ status_t mme_ue_remove(mme_ue_t *mme_ue)
|
||||||
if (mme_ue->last_paging_msg)
|
if (mme_ue->last_paging_msg)
|
||||||
pkbuf_free(mme_ue->last_paging_msg);
|
pkbuf_free(mme_ue->last_paging_msg);
|
||||||
|
|
||||||
|
/* Free UeRadioCapability */
|
||||||
|
if (mme_ue->radio_capa)
|
||||||
|
{
|
||||||
|
S1ap_UERadioCapability_t *radio_capa =
|
||||||
|
(S1ap_UERadioCapability_t *)mme_ue->radio_capa;
|
||||||
|
|
||||||
|
core_free(radio_capa->buf);
|
||||||
|
core_free(mme_ue->radio_capa);
|
||||||
|
}
|
||||||
|
|
||||||
mme_sess_remove_all(mme_ue);
|
mme_sess_remove_all(mme_ue);
|
||||||
mme_pdn_remove_all(mme_ue);
|
mme_pdn_remove_all(mme_ue);
|
||||||
|
|
||||||
|
if (mme_ue->enb_ue)
|
||||||
|
{
|
||||||
|
if (mme_ue->enb_ue->mme_ue != mme_ue)
|
||||||
|
d_warn("Invalid mme_ue assigend to enb_ue");
|
||||||
|
else
|
||||||
|
mme_ue->enb_ue->mme_ue = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
index_free(&mme_ue_pool, mme_ue);
|
index_free(&mme_ue_pool, mme_ue);
|
||||||
|
|
||||||
return CORE_OK;
|
return CORE_OK;
|
||||||
|
|
|
@ -236,6 +236,9 @@ struct _mme_ue_t {
|
||||||
tm_block_id t3413;
|
tm_block_id t3413;
|
||||||
#define MAX_NUM_OF_PAGING 2
|
#define MAX_NUM_OF_PAGING 2
|
||||||
c_uint32_t max_paging_retry;
|
c_uint32_t max_paging_retry;
|
||||||
|
|
||||||
|
/* UE Radio Capability */
|
||||||
|
void *radio_capa;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _mme_sess_t {
|
typedef struct _mme_sess_t {
|
||||||
|
|
|
@ -244,6 +244,21 @@ status_t s1ap_build_initial_context_setup_request(
|
||||||
ies->securityKey.bits_unused = 0;
|
ies->securityKey.bits_unused = 0;
|
||||||
memcpy(ies->securityKey.buf, mme_ue->kenb, ies->securityKey.size);
|
memcpy(ies->securityKey.buf, mme_ue->kenb, ies->securityKey.size);
|
||||||
|
|
||||||
|
/* Set UeRadioCapability if exists */
|
||||||
|
if (mme_ue->radio_capa)
|
||||||
|
{
|
||||||
|
S1ap_UERadioCapability_t *radio_capa =
|
||||||
|
(S1ap_UERadioCapability_t *)mme_ue->radio_capa;
|
||||||
|
|
||||||
|
ies->presenceMask |=
|
||||||
|
S1AP_INITIALCONTEXTSETUPREQUESTIES_UERADIOCAPABILITY_PRESENT;
|
||||||
|
|
||||||
|
ies->ueRadioCapability.size = radio_capa->size;
|
||||||
|
ies->ueRadioCapability.buf =
|
||||||
|
core_calloc(ies->ueRadioCapability.size, sizeof(c_uint8_t));
|
||||||
|
memcpy(ies->ueRadioCapability.buf, radio_capa->buf, radio_capa->size);
|
||||||
|
}
|
||||||
|
|
||||||
message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup;
|
message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup;
|
||||||
message.direction = S1AP_PDU_PR_initiatingMessage;
|
message.direction = S1AP_PDU_PR_initiatingMessage;
|
||||||
|
|
||||||
|
|
|
@ -332,6 +332,26 @@ void s1ap_handle_ue_capability_info_indication(
|
||||||
enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, ies->eNB_UE_S1AP_ID);
|
enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, ies->eNB_UE_S1AP_ID);
|
||||||
d_assert(enb_ue, return, "No UE Context[%d]", ies->eNB_UE_S1AP_ID);
|
d_assert(enb_ue, return, "No UE Context[%d]", ies->eNB_UE_S1AP_ID);
|
||||||
|
|
||||||
|
if (enb_ue->mme_ue)
|
||||||
|
{
|
||||||
|
S1ap_UERadioCapability_t *ue_radio_capa = NULL;
|
||||||
|
S1ap_UERadioCapability_t *radio_capa = NULL;
|
||||||
|
mme_ue_t *mme_ue = enb_ue->mme_ue;
|
||||||
|
|
||||||
|
/* Save UE radio capability */
|
||||||
|
ue_radio_capa = &ies->ueRadioCapability;
|
||||||
|
mme_ue->radio_capa = core_calloc(1, sizeof(S1ap_UERadioCapability_t));
|
||||||
|
d_assert(mme_ue->radio_capa,return,"core_calloc Error");
|
||||||
|
|
||||||
|
radio_capa = (S1ap_UERadioCapability_t *)mme_ue->radio_capa;
|
||||||
|
radio_capa->size = ue_radio_capa->size;
|
||||||
|
radio_capa->buf =
|
||||||
|
core_calloc(radio_capa->size, sizeof(c_uint8_t));
|
||||||
|
d_assert(radio_capa->buf,return,"core_calloc Error(size=%d)",
|
||||||
|
radio_capa->size);
|
||||||
|
memcpy(radio_capa->buf, ue_radio_capa->buf, radio_capa->size);
|
||||||
|
}
|
||||||
|
|
||||||
d_trace(3, "[S1AP] UE Capability Info Indication : "
|
d_trace(3, "[S1AP] UE Capability Info Indication : "
|
||||||
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
|
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
|
||||||
enb_ue->enb_ue_s1ap_id,
|
enb_ue->enb_ue_s1ap_id,
|
||||||
|
|
Loading…
Reference in New Issue