Commit ed28505d authored by Cedric Roux's avatar Cedric Roux

- Use nas_error_code_t instead of uint8_t for error code

- Use explicit error code from S1AP to NAS

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4564 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 21bd01cd
......@@ -1652,6 +1652,7 @@ static int _emm_attach_release(void *args)
emm_sap_t emm_sap;
emm_sap.primitive = EMMREG_PROC_ABORT;
emm_sap.u.emm_reg.ueid = ueid;
emm_sap.u.emm_reg.ctx = emm_ctx;
rc = emm_sap_send(&emm_sap);
}
......
......@@ -59,13 +59,15 @@ int s1ap_mme_itti_nas_uplink_ind(const uint32_t ue_id, uint8_t * const buffer,
return itti_send_msg_to_task(TASK_NAS, INSTANCE_DEFAULT, message_p);
}
int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id)
int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id,
nas_error_code_t error_code)
{
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_S1AP, NAS_DOWNLINK_DATA_CNF);
NAS_DL_DATA_CNF(message_p).UEid = ue_id;
NAS_DL_DATA_CNF(message_p).errCode = error_code;
return itti_send_msg_to_task(TASK_NAS, INSTANCE_DEFAULT, message_p);
}
......@@ -41,6 +41,7 @@ int s1ap_mme_itti_send_sctp_request(uint8_t *buffer, uint32_t length,
int s1ap_mme_itti_nas_uplink_ind(const uint32_t ue_id, uint8_t * const buffer,
const uint32_t length);
int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id);
int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id,
nas_error_code_t error_code);
#endif /* S1AP_MME_ITTI_MESSAGING_H_ */
......@@ -256,7 +256,7 @@ int s1ap_generate_downlink_nas_transport(const uint32_t ue_id, void * const data
s1ap_mme_itti_send_sctp_request(buffer_p, length,
ue_ref->eNB->sctp_assoc_id,
ue_ref->sctp_stream_send);
s1ap_mme_itti_nas_downlink_cnf(ue_ref->mme_ue_s1ap_id);
s1ap_mme_itti_nas_downlink_cnf(ue_ref->mme_ue_s1ap_id, AS_SUCCESS);
}
return 0;
}
......
......@@ -242,7 +242,7 @@ typedef struct paging_req_s {
* AS reports to the NAS that appropriate procedure has to be initiated.
*/
typedef struct paging_ind_s {
UInt8_t cause; /* Paging cause */
paging_cause_t cause; /* Paging cause */
} paging_ind_t;
/*
......@@ -252,20 +252,23 @@ typedef struct paging_ind_s {
*/
/* Cause of RRC connection establishment */
#define AS_CAUSE_EMERGENCY (NET_ESTABLISH_CAUSE_EMERGENCY)
#define AS_CAUSE_HIGH_PRIO (NET_ESTABLISH_CAUSE_HIGH_PRIO)
#define AS_CAUSE_MT_ACCESS (NET_ESTABLISH_CAUSE_MT_ACCESS)
#define AS_CAUSE_MO_SIGNAL (NET_ESTABLISH_CAUSE_MO_SIGNAL)
#define AS_CAUSE_MO_DATA (NET_ESTABLISH_CAUSE_MO_DATA)
#define AS_CAUSE_V1020 (NET_ESTABLISH_CAUSE_V1020)
typedef enum as_cause_s {
AS_CAUSE_EMERGENCY = NET_ESTABLISH_CAUSE_EMERGENCY,
AS_CAUSE_HIGH_PRIO = NET_ESTABLISH_CAUSE_HIGH_PRIO,
AS_CAUSE_MT_ACCESS = NET_ESTABLISH_CAUSE_MT_ACCESS,
AS_CAUSE_MO_SIGNAL = NET_ESTABLISH_CAUSE_MO_SIGNAL,
AS_CAUSE_MO_DATA = NET_ESTABLISH_CAUSE_MO_DATA,
AS_CAUSE_V1020 = NET_ESTABLISH_CAUSE_V1020
} as_cause_t;
/* Type of the call associated to the RRC connection establishment */
#define AS_TYPE_ORIGINATING_SIGNAL (NET_ESTABLISH_TYPE_ORIGINATING_SIGNAL)
#define AS_TYPE_EMERGENCY_CALLS (NET_ESTABLISH_TYPE_EMERGENCY_CALLS)
#define AS_TYPE_ORIGINATING_CALLS (NET_ESTABLISH_TYPE_ORIGINATING_CALLS)
#define AS_TYPE_TERMINATING_CALLS (NET_ESTABLISH_TYPE_TERMINATING_CALLS)
#define AS_TYPE_MO_CS_FALLBACK (NET_ESTABLISH_TYPE_MO_CS_FALLBACK)
typedef enum as_call_type_s {
AS_TYPE_ORIGINATING_SIGNAL = NET_ESTABLISH_TYPE_ORIGINATING_SIGNAL,
AS_TYPE_EMERGENCY_CALLS = NET_ESTABLISH_TYPE_EMERGENCY_CALLS,
AS_TYPE_ORIGINATING_CALLS = NET_ESTABLISH_TYPE_ORIGINATING_CALLS,
AS_TYPE_TERMINATING_CALLS = NET_ESTABLISH_TYPE_TERMINATING_CALLS,
AS_TYPE_MO_CS_FALLBACK = NET_ESTABLISH_TYPE_MO_CS_FALLBACK
} as_call_type_t;
/*
* NAS->AS - NAS signalling connection establishment request
......@@ -273,8 +276,8 @@ typedef struct paging_ind_s {
* to transfer initial NAS message to the network while UE is in IDLE mode.
*/
typedef struct nas_establish_req_s {
UInt8_t cause; /* RRC connection establishment cause */
UInt8_t type; /* RRC associated call type */
as_cause_t cause; /* RRC connection establishment cause */
as_call_type_t type; /* RRC associated call type */
as_stmsi_t s_tmsi; /* UE identity */
plmn_t plmnID; /* Selected PLMN identity */
as_nas_info_t initialNasMsg; /* Initial NAS message to transfer */
......@@ -299,7 +302,7 @@ typedef struct nas_establish_ind_s {
typedef struct nas_establish_rsp_s {
UInt32_t UEid; /* UE lower layer identifier */
as_stmsi_t s_tmsi; /* UE identity */
UInt8_t errCode; /* Transaction status */
nas_error_code_t errCode; /* Transaction status */
as_nas_info_t nasMsg; /* NAS message to transfer */
} nas_establish_rsp_t;
......@@ -308,7 +311,7 @@ typedef struct nas_establish_rsp_s {
* AS transfers the initial answer message to the NAS.
*/
typedef struct nas_establish_cnf_s {
UInt8_t errCode; /* Transaction status */
nas_error_code_t errCode; /* Transaction status */
as_nas_info_t nasMsg; /* NAS message to transfer */
} nas_establish_cnf_t;
......@@ -331,7 +334,7 @@ typedef enum release_cause_s {
typedef struct nas_release_req_s {
UInt32_t UEid; /* UE lower layer identifier */
as_stmsi_t s_tmsi; /* UE identity */
UInt8_t cause; /* Release cause */
release_cause_t cause; /* Release cause */
} nas_release_req_t;
/*
......@@ -339,7 +342,7 @@ typedef struct nas_release_req_s {
* AS reports that connection has been terminated by the network.
*/
typedef struct nas_release_ind_s {
UInt8_t cause; /* Release cause */
release_cause_t cause; /* Release cause */
} nas_release_ind_t;
/*
......@@ -366,7 +369,7 @@ typedef struct ul_info_transfer_req_s {
*/
typedef struct ul_info_transfer_cnf_s {
UInt32_t UEid; /* UE lower layer identifier */
UInt8_t errCode; /* Transaction status */
nas_error_code_t errCode; /* Transaction status */
} ul_info_transfer_cnf_t;
/*
......@@ -436,7 +439,7 @@ typedef struct rab_establish_ind_s {
typedef struct rab_establish_rsp_s {
as_stmsi_t s_tmsi; /* UE identity */
as_rab_id_t rabID; /* Radio access bearer identity */
UInt8_t errCode; /* Transaction status */
nas_error_code_t errCode; /* Transaction status */
} rab_establish_rsp_t;
/*
......@@ -446,7 +449,7 @@ typedef struct rab_establish_rsp_s {
*/
typedef struct rab_establish_cnf_s {
as_rab_id_t rabID; /* Radio access bearer identity */
UInt8_t errCode; /* Transaction status */
nas_error_code_t errCode; /* Transaction status */
} rab_establish_cnf_t;
/*
......
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