Move RETURN_IF_INVALID_ASSOC_ID() to header for use elsewhere

RETURN_IF_INVALID_ASSOC_ID() checks if an assoc_id (of a DU) is valid.
It will be also used in the mobility RRC module later. Move it to the DU
header (where it logically belongs) to move it from there.
This commit is contained in:
Robert Schmidt
2024-10-25 20:10:26 +02:00
parent 6cd76ff862
commit 35995c8a10
2 changed files with 10 additions and 10 deletions
-10
View File
@@ -112,16 +112,6 @@ extern RAN_CONTEXT_t RC;
mui_t rrc_gNB_mui = 0;
// the assoc_id might be 0 (if the DU goes offline). Below helper macro to
// print an error and return from the function in that case
#define RETURN_IF_INVALID_ASSOC_ID(assoc_id) \
{ \
if (assoc_id == 0) { \
LOG_E(NR_RRC, "cannot send data: invalid assoc_id 0, DU offline\n"); \
return; \
} \
}
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
+10
View File
@@ -48,4 +48,14 @@ int get_dl_band(const struct f1ap_served_cell_info_t *cell_info);
int get_ssb_scs(const struct f1ap_served_cell_info_t *cell_info);
int get_ssb_arfcn(const struct nr_rrc_du_container_t *du);
// the assoc_id might be 0 (if the DU goes offline). Below helper macro to
// print an error and return from the function in that case
#define RETURN_IF_INVALID_ASSOC_ID(assoc_id) \
{ \
if (assoc_id == 0) { \
LOG_E(NR_RRC, "cannot send data: invalid assoc_id 0, DU offline\n"); \
return; \
} \
}
#endif /* RRC_GNB_DU_H_ */