Cleanup unused and/or long time commented out code in RRC/NGAP
* Remove drb_is_active: function is unused and the logic will be later added to another function to add DRBs if necessary * Remove unused NGAP structs and empty TODO functions * Remove unused pdusession_setup_req_t struct definition
This commit is contained in:
@@ -71,9 +71,6 @@ MESSAGE_DEF(NGAP_UE_CTXT_MODIFICATION_FAIL , MESSAGE_PRIORITY_MED, ngap_ue_ctxt_
|
||||
MESSAGE_DEF(NGAP_PDUSESSION_SETUP_RESP , MESSAGE_PRIORITY_MED, ngap_pdusession_setup_resp_t , ngap_pdusession_setup_resp)
|
||||
MESSAGE_DEF(NGAP_PDUSESSION_MODIFY_RESP , MESSAGE_PRIORITY_MED, ngap_pdusession_modify_resp_t , ngap_pdusession_modify_resp)
|
||||
MESSAGE_DEF(NGAP_PDUSESSION_RELEASE_RESPONSE , MESSAGE_PRIORITY_MED, ngap_pdusession_release_resp_t , ngap_pdusession_release_resp)
|
||||
MESSAGE_DEF(NGAP_PATH_SWITCH_REQ , MESSAGE_PRIORITY_MED, ngap_path_switch_req_t , ngap_path_switch_req)
|
||||
MESSAGE_DEF(NGAP_PATH_SWITCH_REQ_ACK , MESSAGE_PRIORITY_MED, ngap_path_switch_req_ack_t , ngap_path_switch_req_ack)
|
||||
MESSAGE_DEF(NGAP_PDUSESSION_MODIFICATION_IND , MESSAGE_PRIORITY_MED, ngap_pdusession_modification_ind_t , ngap_pdusession_modification_ind)
|
||||
|
||||
/* NGAP -> RRC messages */
|
||||
MESSAGE_DEF(NGAP_DOWNLINK_NAS , MESSAGE_PRIORITY_MED, ngap_downlink_nas_t , ngap_downlink_nas )
|
||||
|
||||
@@ -290,18 +290,6 @@ typedef struct pdusession_setup_s {
|
||||
pdusession_associate_qosflow_t associated_qos_flows[QOSFLOW_MAX_VALUE];
|
||||
} pdusession_setup_t;
|
||||
|
||||
typedef struct pdusession_tobeswitched_s {
|
||||
/* Unique pdusession_id for the UE. */
|
||||
uint8_t pdusession_id;
|
||||
|
||||
/* The transport layer address for the IP packets */
|
||||
uint8_t pdu_session_type;
|
||||
transport_layer_addr_t upf_addr;
|
||||
|
||||
/* S-GW Tunnel endpoint identifier */
|
||||
uint32_t gtp_teid;
|
||||
} pdusession_tobeswitched_t;
|
||||
|
||||
typedef struct qos_flow_tobe_modified_s {
|
||||
uint8_t qfi; // 0~63
|
||||
} qos_flow_tobe_modified_t;
|
||||
@@ -640,13 +628,6 @@ typedef struct ngap_paging_ind_s {
|
||||
ngap_paging_priority_t paging_priority;
|
||||
} ngap_paging_ind_t;
|
||||
|
||||
typedef struct {
|
||||
/* Unique pdusession_id for the UE. */
|
||||
int pdusession_id;
|
||||
byte_array_t nas_pdu;
|
||||
byte_array_t pdusessionTransfer;
|
||||
} pdusession_setup_req_t;
|
||||
|
||||
typedef struct ngap_pdusession_setup_req_s {
|
||||
/* UE id for initial connection to NGAP */
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
@@ -682,78 +663,6 @@ typedef struct ngap_pdusession_setup_resp_s {
|
||||
pdusession_failed_t pdusessions_failed[NGAP_MAX_PDU_SESSION];
|
||||
} ngap_pdusession_setup_resp_t;
|
||||
|
||||
typedef struct ngap_path_switch_req_s {
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
|
||||
/* Number of pdusession setup-ed in the list */
|
||||
uint8_t nb_of_pdusessions;
|
||||
|
||||
/* list of pdusession setup-ed by RRC layers */
|
||||
pdusession_setup_t pdusessions_tobeswitched[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
/* AMF UE id */
|
||||
uint64_t amf_ue_ngap_id;
|
||||
|
||||
nr_guami_t ue_guami;
|
||||
|
||||
uint16_t ue_initial_id;
|
||||
/* Security algorithms */
|
||||
ngap_security_capabilities_t security_capabilities;
|
||||
|
||||
} ngap_path_switch_req_t;
|
||||
|
||||
typedef struct ngap_path_switch_req_ack_s {
|
||||
|
||||
/* UE id for initial connection to NGAP */
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
|
||||
/* AMF UE id */
|
||||
uint64_t amf_ue_ngap_id;
|
||||
|
||||
/* UE aggregate maximum bitrate */
|
||||
ngap_ambr_t ue_ambr;
|
||||
|
||||
/* Number of pdusession setup-ed in the list */
|
||||
uint8_t nb_pdusessions_tobeswitched;
|
||||
|
||||
/* list of pdusession to be switched by RRC layers */
|
||||
pdusession_tobeswitched_t pdusessions_tobeswitched[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
/* Number of pdusessions to be released by RRC */
|
||||
uint8_t nb_pdusessions_tobereleased;
|
||||
|
||||
/* list of pdusessions to be released */
|
||||
pdusession_failed_t pdusessions_tobereleased[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
/* Security key */
|
||||
int next_hop_chain_count;
|
||||
uint8_t next_security_key[SECURITY_KEY_LENGTH];
|
||||
|
||||
} ngap_path_switch_req_ack_t;
|
||||
|
||||
typedef struct ngap_pdusession_modification_ind_s {
|
||||
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
|
||||
/* AMF UE id */
|
||||
uint64_t amf_ue_ngap_id;
|
||||
|
||||
/* Number of pdusession setup-ed in the list */
|
||||
uint8_t nb_of_pdusessions_tobemodified;
|
||||
|
||||
uint8_t nb_of_pdusessions_nottobemodified;
|
||||
|
||||
/* list of pdusession setup-ed by RRC layers */
|
||||
pdusession_setup_t pdusessions_tobemodified[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
pdusession_setup_t pdusessions_nottobemodified[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
} ngap_pdusession_modification_ind_t;
|
||||
|
||||
// NGAP --> RRC messages
|
||||
typedef struct ngap_ue_release_command_s {
|
||||
|
||||
|
||||
@@ -807,10 +807,6 @@ void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE
|
||||
}
|
||||
resp->nb_of_pdusessions = pdu_sessions_done;
|
||||
resp->nb_of_pdusessions_failed = pdu_sessions_failed;
|
||||
// } else {
|
||||
// LOG_D(NR_RRC,"xid does not corresponds (context pdu_sessions index %d, status %d, xid %d/%d) \n ",
|
||||
// pdusession, UE->pdusession[pdusession].status, xid, UE->pdusession[pdusession].xid);
|
||||
// }
|
||||
}
|
||||
|
||||
if ((pdu_sessions_done > 0 || pdu_sessions_failed)) {
|
||||
@@ -1457,16 +1453,6 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(MessageDef *msg_p, instance_
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_rrc_rx_tx(void) {
|
||||
// check timers
|
||||
|
||||
// check if UEs are lost, to remove them from upper layers
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, instance_t instance)
|
||||
{
|
||||
for (uint16_t tai_size = 0; tai_size < NGAP_PAGING_IND(msg_p).tai_size; tai_size++) {
|
||||
|
||||
@@ -208,11 +208,3 @@ int get_number_active_drbs(gNB_RRC_UE_t *ue)
|
||||
n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id)
|
||||
{
|
||||
drb_t *drb = get_drb(ue, drb_id);
|
||||
if (drb == NULL)
|
||||
return DRB_INACTIVE;
|
||||
return drb->status != DRB_INACTIVE;
|
||||
}
|
||||
|
||||
@@ -65,9 +65,6 @@ uint8_t get_next_available_drb_id(gNB_RRC_UE_t *ue);
|
||||
/// @brief returns the number of active DRBs for this UE
|
||||
int get_number_active_drbs(gNB_RRC_UE_t *ue);
|
||||
|
||||
/// @brief check if DRB with ID drb_id of UE ue is active
|
||||
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id);
|
||||
|
||||
/// @brief retrieve PDU session of UE ue with ID id, optionally creating it if
|
||||
/// create is true
|
||||
rrc_pdu_session_param_t *find_pduSession(gNB_RRC_UE_t *ue, int id, bool create);
|
||||
|
||||
@@ -344,14 +344,6 @@ void *ngap_gNB_process_itti_msg(void *notUsed) {
|
||||
ngap_gNB_nas_non_delivery_ind(instance, &NGAP_NAS_NON_DELIVERY_IND(received_msg));
|
||||
break;
|
||||
|
||||
case NGAP_PATH_SWITCH_REQ:
|
||||
ngap_gNB_path_switch_req(instance, &NGAP_PATH_SWITCH_REQ(received_msg));
|
||||
break;
|
||||
|
||||
case NGAP_PDUSESSION_MODIFICATION_IND:
|
||||
ngap_gNB_generate_PDUSESSION_Modification_Indication(instance, &NGAP_PDUSESSION_MODIFICATION_IND(received_msg));
|
||||
break;
|
||||
|
||||
case NGAP_UE_CONTEXT_RELEASE_COMPLETE:
|
||||
ngap_ue_context_release_complete(instance, &NGAP_UE_CONTEXT_RELEASE_COMPLETE(received_msg));
|
||||
break;
|
||||
|
||||
@@ -1225,17 +1225,3 @@ int ngap_gNB_pdusession_release_resp(instance_t instance, ngap_pdusession_releas
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ngap_gNB_path_switch_req(instance_t instance, ngap_path_switch_req_t *path_switch_req_p)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
//TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ngap_gNB_generate_PDUSESSION_Modification_Indication(instance_t instance, ngap_pdusession_modification_ind_t *pdusession_modification_ind)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
//TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -63,10 +63,4 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance,
|
||||
int ngap_gNB_pdusession_release_resp(instance_t instance,
|
||||
ngap_pdusession_release_resp_t *pdusession_release_resp_p);
|
||||
|
||||
int ngap_gNB_path_switch_req(instance_t instance,
|
||||
ngap_path_switch_req_t *path_switch_req_p);
|
||||
|
||||
int ngap_gNB_generate_PDUSESSION_Modification_Indication(
|
||||
instance_t instance, ngap_pdusession_modification_ind_t *pdusession_modification_ind);
|
||||
|
||||
#endif /* NGAP_GNB_NAS_PROCEDURES_H_ */
|
||||
|
||||
Reference in New Issue
Block a user