diff --git a/common/config/config_common.c b/common/config/config_common.c index 6646402a39..fef37ccd87 100644 --- a/common/config/config_common.c +++ b/common/config/config_common.c @@ -133,7 +133,7 @@ int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoption return status; } -int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix) +int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions) { int status = 0; @@ -193,7 +193,7 @@ int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgo return status; } -int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix) +int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions) { int status = 0; config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1); @@ -229,7 +229,7 @@ int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions return 0; } -int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix) +int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions) { int status = 0; @@ -333,13 +333,13 @@ int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoptio case TYPE_UINTARRAY: case TYPE_INTARRAY: - return config_setdefault_intlist(cfg, cfgoption, prefix); + return config_setdefault_intlist(cfg, cfgoption); case TYPE_DOUBLE: - return config_setdefault_double(cfg, cfgoption, prefix); + return config_setdefault_double(cfg, cfgoption); case TYPE_IPV4ADDR: - return config_setdefault_ipv4addr(cfg, cfgoption, prefix); + return config_setdefault_ipv4addr(cfg, cfgoption); case TYPE_LIST: // No default value for list type diff --git a/common/config/config_common.h b/common/config/config_common.h index db36f8bc6e..9e4e30794c 100644 --- a/common/config/config_common.h +++ b/common/config/config_common.h @@ -20,11 +20,11 @@ void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, /* functions to set a parameter to its default value */ int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); -int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); +int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions); int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); -int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); -int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix); +int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions); +int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions); void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree); void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val); int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, const char *prefix); diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index c8b1245c87..087c8f622d 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -123,6 +123,10 @@ int config_cmdlineonly_getlist(configmodule_interface_t *cfg, int numparams, const char *prefix) { + UNUSED(cfg); + UNUSED(params); + UNUSED(numparams); + UNUSED(prefix); ParamList->numelt = 0; return 0; } @@ -162,15 +166,15 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions case TYPE_UINTARRAY: case TYPE_INTARRAY: - defval = config_setdefault_intlist(cfg, &cfgoptions[i], prefix); + defval = config_setdefault_intlist(cfg, &cfgoptions[i]); break; case TYPE_DOUBLE: - defval = config_setdefault_double(cfg, &cfgoptions[i], prefix); + defval = config_setdefault_double(cfg, &cfgoptions[i]); break; case TYPE_IPV4ADDR: - defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i], prefix); + defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i]); break; default: diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c index 6a7ad07b0f..76f9722d0a 100644 --- a/common/config/config_userapi.c +++ b/common/config/config_userapi.c @@ -177,6 +177,7 @@ void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokva int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param) { + UNUSED(cfg); if ( param == NULL ) { fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n"); return -1; @@ -212,6 +213,7 @@ int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param int config_check_intrange(configmodule_interface_t *cfg, paramdef_t *param) { + UNUSED(cfg); if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) { return 0; } @@ -234,6 +236,7 @@ void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numok int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param) { + UNUSED(cfg); if ( param == NULL ) { fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n"); return -1; diff --git a/common/config/yaml/config_yaml.cpp b/common/config/yaml/config_yaml.cpp index 35a1ee00da..227548366d 100644 --- a/common/config/yaml/config_yaml.cpp +++ b/common/config/yaml/config_yaml.cpp @@ -158,6 +158,7 @@ extern "C" int config_yaml_init(configmodule_interface_t *cfg) extern "C" void config_yaml_end(configmodule_interface_t *cfg) { + UNUSED(cfg); delete config_yaml::config; } diff --git a/common/platform_types.h b/common/platform_types.h index 179a6d4df9..26c4bafa75 100644 --- a/common/platform_types.h +++ b/common/platform_types.h @@ -241,6 +241,9 @@ typedef struct protocol_ctxt_s { bool brOption; } protocol_ctxt_t; +/// suppress compiler warning for unused arguments +#define UNUSED(x) (void)x; + #define UE_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD + RC.nb_inst #define ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD #define UE_INSTANCE_TO_MODULE_ID(iNSTANCE) iNSTANCE - RC.nb_inst diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 8385ce6d8f..b8dbdef194 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -519,13 +519,7 @@ void logTerm(void) } #include -static inline int log_header(log_component_t *c, - char *log_buffer, - int buffsize, - const char *file, - const char *func, - int line, - int level) +static inline int log_header(log_component_t *c, char *log_buffer, int buffsize, const char *func, int line, int level) { int flag = g_log->flag; @@ -666,7 +660,7 @@ void log_dump(int component, if (wbuf != NULL) { va_start(args, format); - int pos=log_header(c, wbuf,MAX_LOG_TOTAL,"noFile","noFunc",0, OAILOG_INFO); + int pos = log_header(c, wbuf, MAX_LOG_TOTAL, "noFunc", 0, OAILOG_INFO); pos+=vsprintf(wbuf+pos,format, args); va_end(args); @@ -875,6 +869,8 @@ void flush_mem_to_file(void) static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args) { + UNUSED(comp); + UNUSED(file); //logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args) int len = 0; /* The main difference with the version above is the use of this local log_buffer. @@ -887,7 +883,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char * // make sure that for log trace the extra info is only printed once, reset when the level changes if (level < OAILOG_TRACE) { - int n = log_header(c, log_buffer+len, sizeof(log_buffer), file, func, line, level); + int n = log_header(c, log_buffer+len, sizeof(log_buffer), func, line, level); if (n > 0) { len += n; if (len > sizeof(log_buffer)) { diff --git a/common/utils/T/T.c b/common/utils/T/T.c index eba8d39b84..6285f7c10d 100644 --- a/common/utils/T/T.c +++ b/common/utils/T/T.c @@ -89,6 +89,7 @@ static int get_message(int s) static void *T_receive_thread(void *_) { + UNUSED(_); int err = 0; while (!err) err = get_message(T_socket); diff --git a/common/utils/T/check_vcd.c b/common/utils/T/check_vcd.c index ec90d368b0..c29a56a534 100644 --- a/common/utils/T/check_vcd.c +++ b/common/utils/T/check_vcd.c @@ -27,6 +27,10 @@ */ void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(file); + UNUSED(function); + UNUSED(line); + UNUSED(s); if (assert) { abort(); } else { diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index d7dd58f4ee..edbb726665 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -428,7 +428,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, for (i = 0; i < 8; i++) timeline_set_subline_background_color(g, timeline_plot, i, new_color(g, i==0 || i==4 ? "#aaf" : "#eee")); - timeview = new_view_time(3600, 10, g, timeline_plot); + timeview = new_view_time(10, g, timeline_plot); /* DL tick logging */ timelog = new_timelog(h, database, "ENB_PHY_DL_TICK"); subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000); diff --git a/common/utils/T/tracer/event.h b/common/utils/T/tracer/event.h index 4e2e766f11..e488c0c703 100644 --- a/common/utils/T/tracer/event.h +++ b/common/utils/T/tracer/event.h @@ -7,6 +7,7 @@ #include "utils.h" #include "../T_defs.h" +#include "common/platform_types.h" #ifdef T_SEND_TIME #include #endif diff --git a/common/utils/T/tracer/filter/filter.c b/common/utils/T/tracer/filter/filter.c index 314e0e4e82..25d6abd320 100644 --- a/common/utils/T/tracer/filter/filter.c +++ b/common/utils/T/tracer/filter/filter.c @@ -41,6 +41,7 @@ int eval_eq(struct filter *f, event e) int eval_int(struct filter *f, event e) { + UNUSED(e); return f->v.v; } @@ -152,9 +153,9 @@ filter *filter_evarg(void *database, char *event_name, char *varname) return ret; } -filter *filter_evfun(void *database, int (*fun)(void *priv, int v), - void *priv, filter *x) +filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x) { + UNUSED(database); struct filter *ret = calloc(1, sizeof(struct filter)); if (ret == NULL) abort(); ret->eval = eval_evfun; diff --git a/common/utils/T/tracer/filter/filter.h b/common/utils/T/tracer/filter/filter.h index 6af523d130..4b8990dab6 100644 --- a/common/utils/T/tracer/filter/filter.h +++ b/common/utils/T/tracer/filter/filter.h @@ -13,11 +13,8 @@ filter *filter_and(filter *a, filter *b); filter *filter_eq(filter *a, filter *b); filter *filter_int(int v); filter *filter_evarg(void *database, char *event_name, char *varname); -filter *filter_evfun(void *database, int (*fun)(void *priv, int v), - void *priv, filter *x); - +filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x); int filter_eval(filter *f, event e); - void free_filter(filter *f); #endif /* _FILTER_H_ */ diff --git a/common/utils/T/tracer/handler.c b/common/utils/T/tracer/handler.c index 3321a21c52..e9d6f0e56d 100644 --- a/common/utils/T/tracer/handler.c +++ b/common/utils/T/tracer/handler.c @@ -52,8 +52,7 @@ event_handler *new_handler(void *database) return ret; } -unsigned long register_handler_function(event_handler *_h, int event_id, - void (*f)(void *, event), void *p) +unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p) { struct _event_handler *h = _h; unsigned long ret = h->next_id; @@ -78,9 +77,11 @@ unsigned long register_handler_function(event_handler *_h, int event_id, return ret; } -void remove_handler_function(event_handler *h, int event_id, - unsigned long handler_id) +void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id) { + UNUSED(h); + UNUSED(event_id); + UNUSED(handler_id); printf("%s:%d: TODO\n", __FILE__, __LINE__); abort(); } diff --git a/common/utils/T/tracer/handler.h b/common/utils/T/tracer/handler.h index 1a064da16f..7ccb64b1b6 100644 --- a/common/utils/T/tracer/handler.h +++ b/common/utils/T/tracer/handler.h @@ -11,10 +11,7 @@ typedef void event_handler; event_handler *new_handler(void *database); void handle_event(event_handler *h, event e); - -unsigned long register_handler_function(event_handler *_h, int event_id, - void (*f)(void *, event), void *p); -void remove_handler_function(event_handler *h, int event_id, - unsigned long handler_id); +unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p); +void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id); #endif /* _HANDLER_H_ */ diff --git a/common/utils/T/tracer/macpdu2wireshark.c b/common/utils/T/tracer/macpdu2wireshark.c index eaf9b03baa..9a931e2690 100644 --- a/common/utils/T/tracer/macpdu2wireshark.c +++ b/common/utils/T/tracer/macpdu2wireshark.c @@ -323,7 +323,7 @@ void dl(void *_d, event e) } trace_lte(e.sending_time, d, DIRECTION_DOWNLINK, - e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i, + e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI_T, e.e[d->dl_rnti].i, e.e[d->dl_frame].i, e.e[d->dl_subframe].i, e.e[d->dl_data].b, e.e[d->dl_data].bsize, NO_PREAMBLE, NO_SR_RNTI); @@ -406,7 +406,7 @@ void sr(void *_d, event e) void trace_nr(struct timespec sending_time, ev_data *d, int direction, int rnti_type, int rnti, int frame, int slot, int harq_pid, void *buf, - int bufsize, int preamble) + int bufsize) { ssize_t ret; int i; @@ -475,7 +475,7 @@ void nr_ul(void *_d, event e) NR_C_RNTI, e.e[d->nr_ul_rnti].i, e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i, e.e[d->nr_ul_harq_pid].i, e.e[d->nr_ul_data].b, - e.e[d->nr_ul_data].bsize, NO_PREAMBLE); + e.e[d->nr_ul_data].bsize); } void nr_dl(void *_d, event e) @@ -494,7 +494,7 @@ void nr_dl(void *_d, event e) e.e[d->nr_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI, e.e[d->nr_dl_rnti].i, e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i, e.e[d->nr_dl_harq_pid].i, e.e[d->nr_dl_data].b, - e.e[d->nr_dl_data].bsize, NO_PREAMBLE); + e.e[d->nr_dl_data].bsize); } void nr_dl_retx(void *_d, event e) @@ -505,7 +505,7 @@ void nr_dl_retx(void *_d, event e) NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i, e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i, e.e[d->nr_dl_retx_harq_pid].i, e.e[d->nr_dl_retx_data].b, - e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE); + e.e[d->nr_dl_retx_data].bsize); } void nr_mib(void *_d, event e) @@ -520,7 +520,7 @@ void nr_mib(void *_d, event e) trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0, e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, 0 /* harq pid */, - e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE); + e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize); } void nr_ue_mib(void *_d, event e) @@ -535,7 +535,7 @@ void nr_ue_mib(void *_d, event e) trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0, e.e[d->nr_ue_mib_frame].i, e.e[d->nr_ue_mib_slot].i, 0 /* harq pid */, - e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize, NO_PREAMBLE); + e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize); } void nr_rar(void *_d, event e) @@ -545,7 +545,7 @@ void nr_rar(void *_d, event e) trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_RA_RNTI, e.e[d->nr_rar_rnti].i, e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, 0 /* harq pid */, - e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE); + e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize); } void nr_ue_ul(void *_d, event e) @@ -556,7 +556,7 @@ void nr_ue_ul(void *_d, event e) NR_C_RNTI, e.e[d->nr_ue_ul_rnti].i, e.e[d->nr_ue_ul_frame].i, e.e[d->nr_ue_ul_slot].i, e.e[d->nr_ue_ul_harq_pid].i, e.e[d->nr_ue_ul_data].b, - e.e[d->nr_ue_ul_data].bsize, NO_PREAMBLE); + e.e[d->nr_ue_ul_data].bsize); } void nr_ue_dl(void *_d, event e) @@ -575,7 +575,7 @@ void nr_ue_dl(void *_d, event e) e.e[d->nr_ue_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI, e.e[d->nr_ue_dl_rnti].i, e.e[d->nr_ue_dl_frame].i, e.e[d->nr_ue_dl_slot].i, e.e[d->nr_ue_dl_harq_pid].i, - e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize, NO_PREAMBLE); + e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize); } void nr_ue_rar(void *_d, event e) @@ -584,8 +584,7 @@ void nr_ue_rar(void *_d, event e) trace_nr(e.sending_time, d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->nr_ue_rar_rnti].i, e.e[d->nr_ue_rar_frame].i, e.e[d->nr_ue_rar_slot].i, 0, - e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize, - NO_PREAMBLE); + e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize); } /****************************************************************************/ @@ -961,7 +960,7 @@ static int sock = -1; void force_stop(int x) { - printf("\ngently quit...\n"); + printf("\ngently quit(%d)...\n", x); close(sock); sock = -1; run = 0; diff --git a/common/utils/T/tracer/packet-mac-lte.h b/common/utils/T/tracer/packet-mac-lte.h index 715bbb68d9..3df8d66314 100644 --- a/common/utils/T/tracer/packet-mac-lte.h +++ b/common/utils/T/tracer/packet-mac-lte.h @@ -27,12 +27,12 @@ /* rntiType */ #define NO_RNTI 0 -#define P_RNTI 1 +#define P_RNTI_T 1 #define RA_RNTI 2 #define C_RNTI 3 -#define SI_RNTI 4 +#define SI_RNTI_T 4 #define SPS_RNTI 5 -#define M_RNTI 6 +#define M_RNTI_T 6 #define SL_BCH_RNTI 7 #define SL_RNTI 8 #define SC_RNTI 9 diff --git a/common/utils/T/tracer/record.c b/common/utils/T/tracer/record.c index 8e222a660f..c636ba3457 100644 --- a/common/utils/T/tracer/record.c +++ b/common/utils/T/tracer/record.c @@ -11,6 +11,7 @@ #include "utils.h" #include "../T_defs.h" #include "configuration.h" +#include "common/platform_types.h" void usage(void) { @@ -39,7 +40,7 @@ static int socket = -1; void force_stop(int x) { - printf("\ngently quit...\n"); + printf("\ngently quit (%d)...\n", x); close(socket); socket = -1; run = 0; diff --git a/common/utils/T/tracer/record_db.cpp b/common/utils/T/tracer/record_db.cpp index de35d84375..0dc304e35a 100644 --- a/common/utils/T/tracer/record_db.cpp +++ b/common/utils/T/tracer/record_db.cpp @@ -249,7 +249,7 @@ static int socket_fd = -1; void force_stop(int x) { - logi("gently quit..."); + logi("gently quit %d", x); close(socket_fd); socket_fd = -1; run = 0; @@ -785,12 +785,7 @@ uint8_t should_insert(EventBuffer &buf) return 0; } -int insert_event(clickhouse_config_t *ch, - void *database, - int event_id, - const char *event_data, - int data_length, - std::chrono::high_resolution_clock::time_point t_start) +int insert_event(clickhouse_config_t *ch, int event_id, const char *event_data, int data_length) { auto t_fn_start = std::chrono::high_resolution_clock::now(); @@ -1270,14 +1265,12 @@ int main(int n, char **v) if (fullread(socket_fd, v + vpos, length) == -1) goto read_error; - auto t_start = std::chrono::high_resolution_clock::now(); - if (type == -1) { append_received_config_chunk(v + vpos, length); } else if (type == -2) { verify_config(); } else if (type >= 0 && type < number_of_events && is_on[type]) { - if (insert_event(&ch_config, database, type, v + vpos, length, t_start) != 0) { + if (insert_event(&ch_config, type, v + vpos, length) != 0) { loge("Failed to insert event type {}", type); } } diff --git a/common/utils/T/tracer/ue.c b/common/utils/T/tracer/ue.c index 336fb22ada..4c1221cafb 100644 --- a/common/utils/T/tracer/ue.c +++ b/common/utils/T/tracer/ue.c @@ -417,7 +417,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database, for (i = 0; i < 8; i++) timeline_set_subline_background_color(g, timeline_plot, i, new_color(g, i==0 || i==4 ? "#aaf" : "#eee")); - timeview = new_view_time(3600, 10, g, timeline_plot); + timeview = new_view_time(10, g, timeline_plot); /* DL tick logging */ timelog = new_timelog(h, database, "UE_PHY_DL_TICK"); subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000); diff --git a/common/utils/T/tracer/vcd.c b/common/utils/T/tracer/vcd.c index aca867661e..8e16a21878 100644 --- a/common/utils/T/tracer/vcd.c +++ b/common/utils/T/tracer/vcd.c @@ -100,7 +100,7 @@ static void vcd_main_gui(gui *g, event_handler *h, void *database) for (i = 0; i < nb_functions; i++) timeline_set_subline_background_color(g, w, i, new_color(g, i & 1 ? "#ddd" : "#eee")); - timeview = new_view_time(3600, 10, g, w); + timeview = new_view_time(10, g, w); i = 0; for (j = 0; j < n; j++) { if (strncmp(ids[j], "VCD_FUNCTION_", 13) != 0) continue; diff --git a/common/utils/T/tracer/view/scrolltti.c b/common/utils/T/tracer/view/scrolltti.c index 8847d123cd..975d4084f6 100644 --- a/common/utils/T/tracer/view/scrolltti.c +++ b/common/utils/T/tracer/view/scrolltti.c @@ -70,6 +70,7 @@ static void *scrolltti_thread(void *_this) static void clear(view *this) { /* TODO */ + UNUSED(this); } static void insert(struct scrolltti *this, double value) diff --git a/common/utils/T/tracer/view/stdout.c b/common/utils/T/tracer/view/stdout.c index bff093ef10..7f039cc3d7 100644 --- a/common/utils/T/tracer/view/stdout.c +++ b/common/utils/T/tracer/view/stdout.c @@ -15,6 +15,7 @@ struct stdout { static void clear(view *this) { /* do nothing */ + UNUSED(this); } static void append(view *_this, char *s) diff --git a/common/utils/T/tracer/view/textlist.c b/common/utils/T/tracer/view/textlist.c index d98d5db2d7..ff73c8b0f0 100644 --- a/common/utils/T/tracer/view/textlist.c +++ b/common/utils/T/tracer/view/textlist.c @@ -71,6 +71,7 @@ static void *textlist_thread(void *_this) static void clear(view *this) { /* TODO */ + UNUSED(this); } static void append(view *_this, char *s) @@ -120,9 +121,11 @@ static void scroll(void *private, gui *g, if (pthread_mutex_unlock(&this->lock)) abort(); } -static void click(void *private, gui *g, - char *notification, widget *w, void *notification_data) +static void click(void *private, gui *g, char *notification, widget *w, void *notification_data) { + UNUSED(notification); + UNUSED(g); + UNUSED(w); struct textlist *this = private; int *d = notification_data; int button = d[1]; diff --git a/common/utils/T/tracer/view/ticktime.c b/common/utils/T/tracer/view/ticktime.c index 9c79e3982f..a92348108d 100644 --- a/common/utils/T/tracer/view/ticktime.c +++ b/common/utils/T/tracer/view/ticktime.c @@ -164,9 +164,10 @@ static void *ticktime_thread(void *_this) return 0; } -static void scroll(void *private, gui *g, - char *notification, widget *w, void *notification_data) +static void scroll(void *private, gui *g, char *notification, widget *w, void *notification_data) { + UNUSED(g); + UNUSED(w); struct ticktime *this = private; int *d = notification_data; int x = d[0]; @@ -225,9 +226,11 @@ end: if (pthread_mutex_unlock(&this->lock)) abort(); } -static void click(void *private, gui *g, - char *notification, widget *w, void *notification_data) +static void click(void *private, gui *g, char *notification, widget *w, void *notification_data) { + UNUSED(g); + UNUSED(w); + UNUSED(notification); struct ticktime *this = private; int *d = notification_data; int button = *d; @@ -365,9 +368,9 @@ struct clock_ticktime { struct ticktime *parent; }; -static void clock_append(view *_this, struct timespec t, - int frame, int subframe) +static void clock_append(view *_this, struct timespec t, int frame, int subframe) { + UNUSED(t); struct clock_ticktime *this = (struct clock_ticktime *)_this; struct ticktime *tt = this->parent; int64_t diff; diff --git a/common/utils/T/tracer/view/time.c b/common/utils/T/tracer/view/time.c index 041d0d3a46..d3f52dfc83 100644 --- a/common/utils/T/tracer/view/time.c +++ b/common/utils/T/tracer/view/time.c @@ -156,9 +156,10 @@ static void *time_thread(void *_this) return 0; } -static void scroll(void *private, gui *g, - char *notification, widget *w, void *notification_data) +static void scroll(void *private, gui *g, char *notification, widget *w, void *notification_data) { + UNUSED(g); + UNUSED(w); struct time *this = private; int *d = notification_data; int x = d[0]; @@ -217,9 +218,11 @@ end: if (pthread_mutex_unlock(&this->lock)) abort(); } -static void click(void *private, gui *g, - char *notification, widget *w, void *notification_data) +static void click(void *private, gui *g, char *notification, widget *w, void *notification_data) { + UNUSED(g); + UNUSED(w); + UNUSED(notification); struct time *this = private; int *d = notification_data; int button = *d; @@ -228,8 +231,7 @@ static void click(void *private, gui *g, if (button == 1) this->autoscroll = 1; } -view *new_view_time(int number_of_seconds, float refresh_rate, - gui *g, widget *w) +view *new_view_time(float refresh_rate, gui *g, widget *w) { struct time *ret = calloc(1, sizeof(struct time)); if (ret == NULL) abort(); diff --git a/common/utils/T/tracer/view/tti.c b/common/utils/T/tracer/view/tti.c index d7238f0ca7..77fdcccc1f 100644 --- a/common/utils/T/tracer/view/tti.c +++ b/common/utils/T/tracer/view/tti.c @@ -94,6 +94,7 @@ static void *tti_thread(void *_this) static void clear(view *this) { /* TODO */ + UNUSED(this); } static void append(view *_this, int frame, int tick, double value) diff --git a/common/utils/T/tracer/view/view.h b/common/utils/T/tracer/view/view.h index acfc471e1f..1b4596119b 100644 --- a/common/utils/T/tracer/view/view.h +++ b/common/utils/T/tracer/view/view.h @@ -6,6 +6,7 @@ #define _VIEW_H_ #include "gui/gui.h" +#include "common/platform_types.h" /* defines the public API of views */ @@ -19,14 +20,10 @@ enum xy_mode { XY_LOOP_MODE, XY_FORCED_MODE }; view *new_view_stdout(void); view *new_view_textlist(int maxsize, float refresh_rate, gui *g, widget *w); -view *new_view_xy(int length, float refresh_rate, gui *g, widget *w, - int color, enum xy_mode mode); -view *new_view_tti(float refresh_rate, gui *g, widget *w, int color, - int ticks_per_frame); -view *new_view_scrolltti(float refresh_rate, gui *g, widget *w, - int color, widget *throughput_label, int ticks_per_frame); -view *new_view_time(int number_of_seconds, float refresh_rate, - gui *g, widget *w); +view *new_view_xy(int length, float refresh_rate, gui *g, widget *w, int color, enum xy_mode mode); +view *new_view_tti(float refresh_rate, gui *g, widget *w, int color, int ticks_per_frame); +view *new_view_scrolltti(float refresh_rate, gui *g, widget *w, int color, widget *throughput_label, int ticks_per_frame); +view *new_view_time(float refresh_rate, gui *g, widget *w); view *new_subview_time(view *time, int line, int color, int size); view *new_view_ticktime(float refresh_rate, gui *g, widget *w); view *new_subview_ticktime(view *ticktime, int line, int color, int size); diff --git a/common/utils/T/tracer/view/xy.c b/common/utils/T/tracer/view/xy.c index 9b938ae385..b5b93fe528 100644 --- a/common/utils/T/tracer/view/xy.c +++ b/common/utils/T/tracer/view/xy.c @@ -42,6 +42,7 @@ static void *xy_thread(void *_this) static void clear(view *this) { /* TODO */ + UNUSED(this); } static void append_loop(view *_this, float *x, float *y, int length) diff --git a/common/utils/ds/hashtable.c b/common/utils/ds/hashtable.c index 5fb3bbbd3b..c84d332973 100644 --- a/common/utils/ds/hashtable.c +++ b/common/utils/ds/hashtable.c @@ -45,7 +45,10 @@ char *hashtable_rc_code2string(hashtable_rc_t rcP) * hash_free_int_func() is used when this hashtable is used to store int values as data (pointer = value). */ -void hash_free_int_func(void *memoryP) {} +void hash_free_int_func(void *memoryP) +{ + UNUSED(memoryP); +} //------------------------------------------------------------------------------------------------------------------------------- /* diff --git a/common/utils/system.c b/common/utils/system.c index 9672cfd38e..cb6f914f95 100644 --- a/common/utils/system.c +++ b/common/utils/system.c @@ -284,12 +284,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, // Legacy, pthread_create + thread_top_init() should be replaced by threadCreate // threadCreate encapsulates the posix pthread api -void thread_top_init(char *thread_name, - int affinity, - uint64_t runtime, - uint64_t deadline, - uint64_t period) { - +void thread_top_init(char *thread_name) +{ int policy, s, j; struct sched_param sparam; char cpu_affinity[1024]; diff --git a/common/utils/system.h b/common/utils/system.h index 8cb856977c..5776971ef2 100644 --- a/common/utils/system.h +++ b/common/utils/system.h @@ -36,11 +36,7 @@ void threadCreate(pthread_t *t, void *(*func)(void *), void *param, char *name, #define OAI_PRIORITY_RT ((sched_get_priority_min(SCHED_OAI)+sched_get_priority_max(SCHED_OAI))/2) #define OAI_PRIORITY_RT_MAX sched_get_priority_max(SCHED_OAI)-2 -void thread_top_init(char *thread_name, - int affinity, - uint64_t runtime, - uint64_t deadline, - uint64_t period); +void thread_top_init(char *thread_name); /**************************************************** * Functions to check system at runtime. diff --git a/common/utils/telnetsrv/telnetsrv.c b/common/utils/telnetsrv/telnetsrv.c index aaf08ff0f7..10edfc6477 100644 --- a/common/utils/telnetsrv/telnetsrv.c +++ b/common/utils/telnetsrv/telnetsrv.c @@ -81,7 +81,6 @@ int get_phybsize(void) { }; int add_telnetcmd(char *modulename,telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd ); int setoutput(char *buff, int debug, telnet_printfunc_t prnt); -int wsetoutput(char *buff, int debug, telnet_printfunc_t prnt, ...); int setparam(char *buff, int debug, telnet_printfunc_t prnt); int wsetparam(char *buff, int debug, telnet_printfunc_t prnt, ...); int history_cmd(char *buff, int debug, telnet_printfunc_t prnt); @@ -245,12 +244,9 @@ void redirstd(char *newfname,telnet_printfunc_t prnt ) { } } -int wsetoutput(char *buffer, int debug, telnet_printfunc_t prnt, ...) +int setoutput(char *buff, int debug, telnet_printfunc_t prnt) { - return 0; -} - -int setoutput(char *buff, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE]; char *logfname; char stdout_str[64]; @@ -288,10 +284,16 @@ int setoutput(char *buff, int debug, telnet_printfunc_t prnt) { int wsetparam(char *buff, int debug, telnet_printfunc_t prnt, ...) { + UNUSED(buff); + UNUSED(debug); + UNUSED(prnt); return 0; } -int setparam(char *buff, int debug, telnet_printfunc_t prnt) { +int setparam(char *buff, int debug, telnet_printfunc_t prnt) +{ + UNUSED(debug); + UNUSED(prnt); char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE]; memset(cmds,0,sizeof(cmds)); sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] ); @@ -322,7 +324,9 @@ int setparam(char *buff, int debug, telnet_printfunc_t prnt) { return CMDSTATUS_NOTFOUND; } /* setparam */ -int history_cmd(char *buff, int debug, telnet_printfunc_t prnt) { +int history_cmd(char *buff, int debug, telnet_printfunc_t prnt) +{ + UNUSED(debug); char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE]; memset(cmds,0,sizeof(cmds)); sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] ); @@ -502,7 +506,7 @@ void telnet_pushcmd(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t pushNotifiedFIFO(cmd->qptr, msg); } -int process_command(char *buf, int iteration) +int process_command(char *buf) { int i,j,k; char modulename[TELNET_CMD_MAXSIZE]; @@ -581,7 +585,7 @@ int process_command(char *buf, int iteration) char tbuff[64]; client_printf(CSI "1J" CSI "1;10H " STDFMT "%s %i/%i\n", get_time(tbuff,sizeof(tbuff)),lc,telnetparams.loopcount ); - process_command(buf + strlen("loop") + 1, lc); + process_command(buf + strlen("loop") + 1); errno=0; int rs = read(telnetparams.new_socket,dummybuff,sizeof(dummybuff)); @@ -710,7 +714,7 @@ void run_telnetsrv(void) { } if (strlen(buf) > 2 ) { - status = process_command(buf, 0); + status = process_command(buf); } else status=CMDSTATUS_NOCMD; diff --git a/common/utils/telnetsrv/telnetsrv_bearer.c b/common/utils/telnetsrv/telnetsrv_bearer.c index 81d52ea271..8628ff45d2 100644 --- a/common/utils/telnetsrv/telnetsrv_bearer.c +++ b/common/utils/telnetsrv/telnetsrv_bearer.c @@ -28,6 +28,7 @@ static int get_single_ue_rnti(void) int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (buf) ERROR_MSG_RET("no parameter allowed\n"); @@ -42,6 +43,7 @@ int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt) //void rrc_gNB_trigger_new_bearer(int rnti); int add_bearer(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); int rnti = -1; if (!buf) { rnti = get_single_ue_rnti(); @@ -67,6 +69,7 @@ int add_bearer(char *buf, int debug, telnet_printfunc_t prnt) //void rrc_gNB_trigger_release_bearer(int rnti); int release_bearer(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); int rnti = -1; if (!buf) { rnti = get_single_ue_rnti(); diff --git a/common/utils/telnetsrv/telnetsrv_ci.c b/common/utils/telnetsrv/telnetsrv_ci.c index 84a7abe686..5d92adfc47 100644 --- a/common/utils/telnetsrv/telnetsrv_ci.c +++ b/common/utils/telnetsrv/telnetsrv_ci.c @@ -47,6 +47,7 @@ static int get_single_ue_rnti_mac(void) int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (buf) ERROR_MSG_RET("no parameter allowed\n"); @@ -81,6 +82,7 @@ rrc_gNB_ue_context_t *get_single_rrc_ue(void) int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrrrc) ERROR_MSG_RET("no RRC present, cannot list counts\n"); rrc_gNB_ue_context_t *ue = NULL; @@ -119,6 +121,7 @@ int fetch_rnti(char *buf, telnet_printfunc_t prnt) int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrmac) ERROR_MSG_RET("no MAC/RLC present, cannot trigger reestablishment\n"); int rnti = fetch_rnti(buf, prnt); @@ -134,6 +137,7 @@ extern nr_rrc_du_container_t *get_du_for_ue(gNB_RRC_INST *rrc, uint32_t ue_id); /** @brief Get connected DU by the UE ID */ int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrrrc) ERROR_MSG_RET("no RRC present, cannot list counts\n"); @@ -169,6 +173,7 @@ extern void nr_HO_F1_trigger_telnet(gNB_RRC_INST *rrc, uint32_t rrc_ue_id); */ int rrc_gNB_trigger_f1_ho(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrrrc) ERROR_MSG_RET("no RRC present, cannot list counts\n"); rrc_gNB_ue_context_t *ue = NULL; @@ -198,6 +203,7 @@ extern void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, u * @return 0 on success, -1 on failure */ int rrc_gNB_trigger_n2_ho(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrrrc) ERROR_MSG_RET("no RRC present, cannot list counts\n"); @@ -238,6 +244,7 @@ int rrc_gNB_trigger_n2_ho(char *buf, int debug, telnet_printfunc_t prnt) int force_ul_failure(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!RC.nrmac) ERROR_MSG_RET("no MAC/RLC present, force_ul_failure failed\n"); int rnti = fetch_rnti(buf, prnt); @@ -263,6 +270,7 @@ int force_ue_release(char *buf, int debug, telnet_printfunc_t prnt) static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); int rnti = fetch_rnti(buf, prnt); if (rnti < 0) ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n"); @@ -288,6 +296,7 @@ static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt) * @return 0 on success; negative value on error. */ static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (buf == NULL) { ERROR_MSG_RET("Missing input. Usage: trigger_pdu_session_release [ue_id=gNB_ue_ngap_id(int,opt)],pdusession_id(int)[,pdusession_id(int)...]\n"); } @@ -360,6 +369,7 @@ static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfu static int trigger_bwp_switch(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); char *sbwpId = strtok(buf, " "); int bwpId = atoi(sbwpId); char *srnti = strtok(NULL, " "); diff --git a/common/utils/telnetsrv/telnetsrv_ciUE.c b/common/utils/telnetsrv/telnetsrv_ciUE.c index ac39b4d4f3..650ffd6834 100644 --- a/common/utils/telnetsrv/telnetsrv_ciUE.c +++ b/common/utils/telnetsrv/telnetsrv_ciUE.c @@ -52,6 +52,7 @@ static int get_default_ue_id(void) */ int get_sync_state(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); int ue_id = -1; if (!buf) { ERROR_MSG_RET("no UE ID provided to telnet command\n"); @@ -71,6 +72,9 @@ int get_sync_state(char *buf, int debug, telnet_printfunc_t prnt) */ int force_rlf(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); + UNUSED(prnt); NR_UE_RRC_INST_t *rrc = get_NR_UE_rrc_inst(0); handle_rlf_detection(rrc); return 0; @@ -81,6 +85,9 @@ int force_rlf(char *buf, int debug, telnet_printfunc_t prnt) */ int force_RRC_IDLE(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); + UNUSED(prnt); NR_UE_RRC_INST_t *rrc = get_NR_UE_rrc_inst(0); nr_rrc_going_to_IDLE(rrc, OTHER, NULL); return 0; @@ -89,6 +96,9 @@ int force_RRC_IDLE(char *buf, int debug, telnet_printfunc_t prnt) /** @brief Trigger RA with Msg3 C-RNTI */ int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); + UNUSED(prnt); NR_UE_MAC_INST_t *mac = get_mac_inst(0); trigger_MAC_UE_RA(mac, NULL); return 0; @@ -96,6 +106,9 @@ int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt) static int force_deregistration(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); + UNUSED(prnt); MessageDef *msg = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_DEREGISTRATION_REQ); NAS_DEREGISTRATION_REQ(msg).cause = AS_DETACH; itti_send_msg_to_task(TASK_NAS_NRUE, 0, msg); @@ -105,6 +118,8 @@ static int force_deregistration(char *buf, int debug, telnet_printfunc_t prnt) extern float get_prs_max_dl_toa(prs_meas_t *prs_meas); static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); // TODO multiple antennas, resources, gNBs? int gNB_id = 0; int rsc_id = 0; @@ -124,6 +139,7 @@ static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt) static int add_pdu_session(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); int ue_id = -1; int pdusession_id = -1; diff --git a/common/utils/telnetsrv/telnetsrv_enb_phycmd.c b/common/utils/telnetsrv/telnetsrv_enb_phycmd.c index f860f69a6c..fdcb5f8910 100644 --- a/common/utils/telnetsrv/telnetsrv_enb_phycmd.c +++ b/common/utils/telnetsrv/telnetsrv_enb_phycmd.c @@ -46,11 +46,15 @@ void dump_uestats(int debug, telnet_printfunc_t prnt, uint8_t prntflag) { } void display_uestats(int debug, telnet_printfunc_t prnt, int ue) { + UNUSED(debug); + UNUSED(prnt); + UNUSED(ue); for (int cc=0; cc<1 ; cc++) { } } void display_phycounters(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(buf); prnt(" DLSCH kb DLSCH kb/s\n"); dump_uestats(debug, prnt,0); } diff --git a/common/utils/telnetsrv/telnetsrv_measurements.c b/common/utils/telnetsrv/telnetsrv_measurements.c index c9bc48a1e5..08ed347746 100644 --- a/common/utils/telnetsrv/telnetsrv_measurements.c +++ b/common/utils/telnetsrv/telnetsrv_measurements.c @@ -206,6 +206,7 @@ int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt) { } void measurcmd_async_help(telnet_printfunc_t prnt) { + UNUSED(prnt); } int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt) { diff --git a/common/utils/telnetsrv/telnetsrv_o1.c b/common/utils/telnetsrv/telnetsrv_o1.c index 7bbbf6b15e..42922a5a8a 100644 --- a/common/utils/telnetsrv/telnetsrv_o1.c +++ b/common/utils/telnetsrv/telnetsrv_o1.c @@ -62,6 +62,7 @@ typedef struct ue_stat { static int get_stats(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (buf) ERROR_MSG_RET("no parameter allowed\n"); @@ -209,6 +210,7 @@ static int read_long(const char *buf, const char *end, const char *id, long *val bool running = true; // in the beginning, the softmodem is started automatically static int set_config(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (!buf) ERROR_MSG_RET("need param: o1 config param1 val1 [param2 val2 ...]\n"); if (running) @@ -271,6 +273,7 @@ static int set_config(char *buf, int debug, telnet_printfunc_t prnt) static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); if (running) ERROR_MSG_RET("cannot set parameters while L1 is running\n"); if (!buf) @@ -344,6 +347,8 @@ static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt) extern int stop_L1(module_id_t gnb_id); static int stop_modem(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); if (!running) ERROR_MSG_RET("cannot stop, nr-softmodem not running\n"); @@ -366,6 +371,8 @@ static int stop_modem(char *buf, int debug, telnet_printfunc_t prnt) extern int start_L1L2(module_id_t gnb_id); static int start_modem(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); if (running) ERROR_MSG_RET("cannot start, nr-softmodem already running\n"); start_L1L2(0); @@ -377,6 +384,8 @@ static int start_modem(char *buf, int debug, telnet_printfunc_t prnt) extern void du_clear_all_ue_states(); static int remove_mac_ues(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); du_clear_all_ue_states(); prnt("OK\n"); return 0; diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.c b/common/utils/telnetsrv/telnetsrv_proccmd.c index fd1d9bc92b..5a9fc0a0ab 100644 --- a/common/utils/telnetsrv/telnetsrv_proccmd.c +++ b/common/utils/telnetsrv/telnetsrv_proccmd.c @@ -36,6 +36,7 @@ void decode_procstat(char *record, int debug, telnet_printfunc_t prnt, webdatadef_t *tdata) { +UNUSED(debug); char prntline[160]; char *procfile_fields; char *strtokptr; @@ -169,10 +170,11 @@ char arecord[1024]; int nullprnt(char *fmt, ...) { + UNUSED(fmt); return 0; } -void proccmd_get_threaddata(char *buf, int debug, telnet_printfunc_t fprnt, webdatadef_t *tdata) +void proccmd_get_threaddata(int debug, telnet_printfunc_t fprnt, webdatadef_t *tdata) { char aname[256]; @@ -222,9 +224,9 @@ char aname[256]; closedir(proc_dir); } /* proccmd_get_threaddata */ -void print_threads(char *buf, int debug, telnet_printfunc_t prnt) +void print_threads(int debug, telnet_printfunc_t prnt) { - proccmd_get_threaddata(buf, debug, prnt, NULL); + proccmd_get_threaddata(debug, prnt, NULL); } #define FLAG_PRINT_DEBUG_DUMP(flag) \ @@ -349,7 +351,7 @@ int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfun } } if (strcasestr(cmdbuff, "threadsched") != NULL) { - proccmd_get_threaddata(cmdbuff, debug, prnt, (webdatadef_t *)data); + proccmd_get_threaddata(debug, prnt, (webdatadef_t *)data); } } // show @@ -373,7 +375,7 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt) if (debug > 0) prnt(" proccmd_show received %s\n",buf); if (strcasestr(buf,"thread") != NULL) { - print_threads(buf,debug,prnt); + print_threads(debug, prnt); } if (strcasestr(buf,"loglvl") != NULL) { prnt("\n component level enabled output\n"); @@ -466,7 +468,7 @@ if (buf == NULL) { prnt(" proccmd_thread: %i params = %i,%s,%i\n",res,bv1,sv1,bv2); if(res != 3) { - print_threads(buf, debug, prnt); + print_threads(debug, prnt); return 0; } diff --git a/common/utils/telnetsrv/telnetsrv_rrc.c b/common/utils/telnetsrv/telnetsrv_rrc.c index 8d81606eec..2a678291d7 100644 --- a/common/utils/telnetsrv/telnetsrv_rrc.c +++ b/common/utils/telnetsrv/telnetsrv_rrc.c @@ -53,6 +53,7 @@ static int get_single_ue_id(void) */ int rrc_gNB_trigger_release(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); ue_id_t ue_id = -1; if (!buf) { @@ -91,6 +92,8 @@ int rrc_gNB_trigger_release(char *buf, int debug, telnet_printfunc_t prnt) */ int rrc_gNB_trigger_release_all(char *buf, int debug, telnet_printfunc_t prnt) { + UNUSED(debug); + UNUSED(buf); rrc_gNB_ue_context_t *ue_context_p = NULL; gNB_RRC_INST *rrc = RC.nrrrc[0]; diff --git a/common/utils/time_manager/time_manager.c b/common/utils/time_manager/time_manager.c index 14f6330ed1..384bcafff3 100644 --- a/common/utils/time_manager/time_manager.c +++ b/common/utils/time_manager/time_manager.c @@ -26,6 +26,7 @@ static int tick_functions_count; */ static void tick(void *unused) { + UNUSED(unused); for (int i = 0; i < tick_functions_count; i++) tick_functions[i](); } diff --git a/common/utils/time_meas.c b/common/utils/time_meas.c index c2ebe7fc00..8c5378ec99 100644 --- a/common/utils/time_meas.c +++ b/common/utils/time_meas.c @@ -35,10 +35,9 @@ double get_cpu_freq_GHz(void) -void print_meas_now(time_stats_t *ts, - const char *name, - FILE *file_name) +void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name) { + UNUSED(name); if (cpu_meas_enabled) { //static double cpu_freq_GHz = 3.2; diff --git a/executables/lte-enb.c b/executables/lte-enb.c index cde96614a4..b62815b70a 100644 --- a/executables/lte-enb.c +++ b/executables/lte-enb.c @@ -259,7 +259,7 @@ static void *L1_thread_tx(void *param) { PHY_VARS_eNB *eNB = eNB_proc->eNB; char thread_name[100]; sprintf(thread_name,"TXnp4_%d\n",&eNB->proc.L1_proc == proc ? 0 : 1); - thread_top_init(thread_name,1,470000,500000,500000); + thread_top_init(thread_name); int ret; //wait_sync("tx_thread"); @@ -342,7 +342,7 @@ static void *L1_thread( void *param ) { } } #else - thread_top_init(thread_name,1,470000,500000,500000); + thread_top_init(thread_name); #endif LOG_I(PHY,"thread rxtx created id=%ld\n", syscall(__NR_gettid)); @@ -699,7 +699,7 @@ static void *eNB_thread_prach( void *param ) { L1_proc_t *proc = &eNB->proc; // set default return value eNB_thread_prach_status = 0; - thread_top_init("eNB_thread_prach",1,500000,1000000,20000000); + thread_top_init("eNB_thread_prach"); //wait_sync("eNB_thread_prach"); @@ -732,7 +732,7 @@ static void *eNB_thread_prach_br( void *param ) { L1_proc_t *proc = &eNB->proc; // set default return value eNB_thread_prach_status = 0; - thread_top_init("eNB_thread_prach_br",1,500000,1000000,20000000); + thread_top_init("eNB_thread_prach_br"); while (!oai_exit) { if (wait_on_condition(&proc->mutex_prach_br,&proc->cond_prach_br,&proc->instance_cnt_prach_br,"eNB_prach_thread_br") < 0) break; diff --git a/executables/lte-ru.c b/executables/lte-ru.c index 708b363e21..91470d8f63 100644 --- a/executables/lte-ru.c +++ b/executables/lte-ru.c @@ -778,7 +778,7 @@ static void *ru_thread_asynch_rxtx( void *param ) { RU_t *ru = (RU_t *)param; RU_proc_t *proc = &ru->proc; int subframe=0, frame=0; - thread_top_init("ru_thread_asynch_rxtx",1,870000,1000000,1000000); + thread_top_init("ru_thread_asynch_rxtx"); // wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe wait_sync("ru_thread_asynch_rxtx"); // wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe @@ -869,7 +869,7 @@ void *ru_thread_prach( void *param ) { RU_proc_t *proc = (RU_proc_t *)&ru->proc; // set default return value ru_thread_prach_status = 0; - thread_top_init("ru_thread_prach",1,500000,1000000,20000000); + thread_top_init("ru_thread_prach"); //wait_sync("ru_thread_prach"); while (*ru->ru_mask>0 && ru->function!=eNodeB_3GPP) { @@ -919,7 +919,7 @@ void *ru_thread_prach_br( void *param ) { RU_proc_t *proc = (RU_proc_t *)&ru->proc; // set default return value ru_thread_prach_status = 0; - thread_top_init("ru_thread_prach_br",1,500000,1000000,20000000); + thread_top_init("ru_thread_prach_br"); //wait_sync("ru_thread_prach_br"); while (!oai_exit) { @@ -1411,7 +1411,7 @@ static void *ru_thread_tx( void *param ) { L1_rxtx_proc_t *L1_proc; cpu_set_t cpuset; CPU_ZERO(&cpuset); - thread_top_init("ru_thread_tx",1,400000,500000,500000); + thread_top_init("ru_thread_tx"); //CPU_SET(5, &cpuset); //pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); //wait_sync("ru_thread_tx"); @@ -1518,7 +1518,7 @@ static void *ru_thread( void *param ) { dlsch_ue_select_tbl_in_use = 1; #endif // set default return value - thread_top_init("ru_thread",1,400000,500000,500000); + thread_top_init("ru_thread"); //CPU_SET(1, &cpuset); //pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); pthread_setname_np( pthread_self(),"ru thread"); @@ -1799,7 +1799,7 @@ static void *ru_thread_synch(void *arg) { int64_t peak_val, avg; static int ru_thread_synch_status = 0; int cnt=0; - thread_top_init("ru_thread_synch",0,5000000,10000000,10000000); + thread_top_init("ru_thread_synch"); wait_sync("ru_thread_synch"); // initialize variables for PSS detection ru_sync_time_init(ru); //lte_sync_time_init(ru->frame_parms); @@ -1873,7 +1873,7 @@ void *pre_scd_thread( void *param ) { frame = 0; subframe = 4; - thread_top_init("pre_scd_thread",0,870000,1000000,1000000); + thread_top_init("pre_scd_thread"); while (!oai_exit) { if(oai_exit) { @@ -1933,7 +1933,7 @@ static void *eNB_thread_phy_tx( void *param ) { // set default return value eNB_thread_phy_tx_status = 0; int ret; - thread_top_init("eNB_thread_phy_tx",1,500000L,1000000L,20000000L); + thread_top_init("eNB_thread_phy_tx"); while (!oai_exit) { if (oai_exit) break; @@ -1988,7 +1988,7 @@ static void *rf_tx( void *param ) { RU_proc_t *proc = &ru->proc; // set default return value rf_tx_status = 0; - thread_top_init("rf_tx",1,500000L,1000000L,20000000L); + thread_top_init("rf_tx"); while (!oai_exit) { if (oai_exit) break; diff --git a/executables/lte-ue.c b/executables/lte-ue.c index f96de51f16..629b36a9ad 100644 --- a/executables/lte-ue.c +++ b/executables/lte-ue.c @@ -879,7 +879,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) { } } #else - thread_top_init("UE_phy_stub_thread_rxn_txnp4", 1, 870000L, 1000000L, 1000000L); + thread_top_init("UE_phy_stub_thread_rxn_txnp4"); #endif // for multipule UE's L2-emulator //module_id_t Mod_id = 0; @@ -1233,7 +1233,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) { static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { #if 0 // TODO: doesn't currently compile, obviated by multi-ue proxy - thread_top_init("UE_phy_stub_thread_rxn_txnp4",1,870000L,1000000L,1000000L); + thread_top_init("UE_phy_stub_thread_rxn_txnp4"); // for multipule UE's L2-emulator //module_id_t Mod_id = 0; //int init_ra_UE = -1; // This counter is used to initiate the RA of each UE in different SFrames @@ -2225,7 +2225,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, //02/02/2018 static void *timer_thread( void *param ) { - thread_top_init("timer_thread",1,870000L,1000000L,1000000L); + thread_top_init("timer_thread"); timer_subframe =9; timer_frame =1023; //phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking)); diff --git a/nfapi/CMakeLists.txt b/nfapi/CMakeLists.txt index 521465f058..7dd9cf744d 100644 --- a/nfapi/CMakeLists.txt +++ b/nfapi/CMakeLists.txt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LicenseRef-CSSL-1.0 +add_compile_options(-Wunused-parameter) add_subdirectory(oai_integration/aerial) if (OAI_WLS) add_subdirectory(oai_integration/wls_integration) diff --git a/nfapi/oai_integration/aerial/fapi_nvIPC.c b/nfapi/oai_integration/aerial/fapi_nvIPC.c index 973b21e09c..5178fce014 100644 --- a/nfapi/oai_integration/aerial/fapi_nvIPC.c +++ b/nfapi/oai_integration/aerial/fapi_nvIPC.c @@ -63,7 +63,7 @@ static uint16_t old_sfn = 0; static uint16_t old_slot = 0; //////////////////////////////////////////////////////////////////////// // Handle an RX message -static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg) +static int ipc_handle_rx_msg(nv_ipc_msg_t *msg) { if (msg == NULL) { LOG_E(NFAPI_VNF, "%s: ERROR: buffer is empty\n", __func__); @@ -121,12 +121,7 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg) int dataBufLen = msg->data_len; uint8_t *data_end = msg->data_buf + dataBufLen; nfapi_nr_srs_indication_t ind; - aerial_unpack_nr_srs_indication(&pReadPackedMessage, - end, - &pReadData, - data_end, - &ind, - &vnf_p7_config->_public.codec_config); + aerial_unpack_nr_srs_indication(&pReadPackedMessage, end, &pReadData, data_end, &ind); if (vnf_p7_config->_public.nr_srs_indication) { (vnf_p7_config->_public.nr_srs_indication)(&ind); } @@ -285,7 +280,7 @@ bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_messa } // Always allocate message buffer, but allocate data buffer only when data_len > 0 -static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg) +static int aerial_recv_msg(nv_ipc_msg_t *recv_msg) { if (ipc == NULL) { return -1; @@ -305,7 +300,7 @@ static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg) recv_msg->msg_len, recv_msg->data_len, recv_msg->data_pool); - ipc_handle_rx_msg(ipc, recv_msg); + ipc_handle_rx_msg(recv_msg); // Release buffer of RX message int release_retval = ipc->rx_release(ipc, recv_msg); @@ -318,6 +313,7 @@ static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg) void *epoll_recv_task(void *arg) { + UNUSED(arg); struct epoll_event ev, events[MAX_EVENTS]; LOG_D(NFAPI_VNF,"Aerial recv task start \n"); @@ -356,7 +352,7 @@ void *epoll_recv_task(void *arg) if (events[n].data.fd == ipc_rx_event_fd) { ipc->get_value(ipc); nv_ipc_msg_t recv_msg; - while (aerial_recv_msg(ipc, &recv_msg) == 0); + while (aerial_recv_msg(&recv_msg) == 0); } } } @@ -482,7 +478,8 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) return retval; } -int oai_fapi_send_end_request(int cell, uint32_t frame, uint32_t slot){ +int oai_fapi_send_end_request(uint32_t frame, uint32_t slot) +{ nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config(); nfapi_nr_slot_indication_scf_t nr_slot_resp = {.header.message_id = 0x8F, .sfn = frame, .slot = slot}; diff --git a/nfapi/oai_integration/aerial/fapi_nvIPC.h b/nfapi/oai_integration/aerial/fapi_nvIPC.h index 306f9e5ae9..65853b7556 100644 --- a/nfapi/oai_integration/aerial/fapi_nvIPC.h +++ b/nfapi/oai_integration/aerial/fapi_nvIPC.h @@ -24,7 +24,7 @@ void release_msg(nv_ipc_msg_t* send_msg); bool send_nvipc_msg(nv_ipc_msg_t* send_msg); bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len); int nvIPC_Init(nvipc_params_t nvipc_params_s); -int oai_fapi_send_end_request(int cell_id, uint32_t frame, uint32_t slot); +int oai_fapi_send_end_request(uint32_t frame, uint32_t slot); int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req); int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req); int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req); diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p7.c b/nfapi/oai_integration/aerial/fapi_vnf_p7.c index 3dc42180c4..e8e5d133a7 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p7.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p7.c @@ -68,14 +68,9 @@ uint8_t aerial_unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, return 1; } -uint8_t aerial_unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, - uint8_t *end, - uint8_t **pDataMsg, - uint8_t *data_end, - void *msg, - nfapi_p7_codec_config_t *config) +uint8_t aerial_unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, uint8_t **pDataMsg, uint8_t *data_end, void *msg) { - uint8_t retval = unpack_nr_srs_indication(ppReadPackedMsg, end, msg, config); + uint8_t retval = unpack_nr_srs_indication(ppReadPackedMsg, end, msg); nfapi_nr_srs_indication_t *srs_ind = (nfapi_nr_srs_indication_t *)msg; for (uint8_t pdu_idx = 0; pdu_idx < srs_ind->number_of_pdus; pdu_idx++) { nfapi_nr_srs_indication_pdu_t *pdu = &srs_ind->pdu_list[pdu_idx]; diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p7.h b/nfapi/oai_integration/aerial/fapi_vnf_p7.h index b0c3a32f86..947532c461 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p7.h +++ b/nfapi/oai_integration/aerial/fapi_vnf_p7.h @@ -33,11 +33,6 @@ uint8_t aerial_unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, nfapi_nr_rx_data_indication_t *msg, nfapi_p7_codec_config_t *config); -uint8_t aerial_unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, - uint8_t *end, - uint8_t **pDataMsg, - uint8_t *data_end, - void *msg, - nfapi_p7_codec_config_t *config); +uint8_t aerial_unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, uint8_t **pDataMsg, uint8_t *data_end, void *msg); bool aerial_nr_send_p7_message(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t *header); #endif // OPENAIRINTERFACE_FAPI_VNF_P7_H diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 4e68bb116d..2381f00be5 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -915,7 +915,7 @@ int phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind) send_slt_resp = true; } if (send_slt_resp) { - oai_fapi_send_end_request(0, ind->sfn, ind->slot); + oai_fapi_send_end_request(ind->sfn, ind->slot); } #else if (sched_response.DL_req.dl_tti_request_body.nPDUs > 0) diff --git a/nfapi/oai_integration/socket/socket_pnf.c b/nfapi/oai_integration/socket/socket_pnf.c index 3db7d5249f..f72417d002 100644 --- a/nfapi/oai_integration/socket/socket_pnf.c +++ b/nfapi/oai_integration/socket/socket_pnf.c @@ -61,6 +61,7 @@ static int send_p7_msg(pnf_p7_t *pnf_p7, uint8_t *msg, uint32_t len) bool pnf_nr_send_p7_message(pnf_p7_t *pnf_p7, nfapi_nr_p7_message_header_t *header, uint32_t msg_len) { + UNUSED(msg_len); if (pnf_p7->terminate) { //don't send any further P7 messages after terminating return false; diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p7.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p7.h index a4f7c7a7b6..c8a0a5a42e 100644 --- a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p7.h +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p7.h @@ -12,28 +12,25 @@ bool fapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config); -uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_dl_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_slot_indication(uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_nr_slot_indication_scf_t *msg, - nfapi_p7_codec_config_t *config); -uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_ul_dci_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_tx_data_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_tx_data_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_nr_rx_data_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_nr_crc_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_nr_uci_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_uci_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); -uint8_t pack_nr_srs_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); +uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_dl_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t unpack_nr_slot_indication(uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_nr_slot_indication_scf_t *msg); +uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_ul_dci_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_tx_data_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_tx_data_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_nr_rx_data_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_nr_crc_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_nr_uci_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_nr_uci_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); +uint8_t pack_nr_srs_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); uint8_t unpack_nr_srs_report_tlv_value(nfapi_srs_report_tlv_t *report_tlv, uint8_t **ppReadPackedMsg, uint8_t *end); -uint8_t pack_nr_rach_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config); -uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config); +uint8_t pack_nr_rach_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end); +uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg); #endif // OPENAIRINTERFACE_NR_FAPI_P7_H diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi.c b/nfapi/open-nFAPI/fapi/src/nr_fapi.c index 5302542bf3..fe8937f5ac 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi.c @@ -153,6 +153,7 @@ bool fapi_nr_p7_message_header_unpack(void *pMessageBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { + UNUSED(config); return fapi_nr_message_header_unpack(pMessageBuf, messageBufLen, pUnpackedBuf, @@ -166,6 +167,7 @@ bool fapi_nr_message_header_unpack(void *pMessageBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) { + UNUSED(config); uint8_t *pReadPackedMessage = pMessageBuf; nfapi_nr_p4_p5_message_header_t *header = pUnpackedBuf; fapi_message_header_t fapi_msg = {0}; diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c index 4d40fe87c7..2f9bc6e3f7 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c @@ -66,6 +66,7 @@ int fapi_nr_p5_message_pack(void *pMessageBuf, const uint32_t packedBufLen, nfapi_p4_p5_codec_config_t *config) { + UNUSED(messageBufLen); nfapi_nr_p4_p5_message_header_t *pMessageHeader = pMessageBuf; uint8_t *pWritePackedMessage = pPackedBuf; AssertFatal(isFAPIMessageIDValid(pMessageHeader->message_id), @@ -1141,6 +1142,7 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e // END Digital Beam Table (DBT) PDU #ifdef ENABLE_AERIAL + UNUSED(config); retval &= pack_nr_tlv(NFAPI_NR_CONFIG_NUM_TX_PORT_TAG, &(pNfapiMsg->carrier_config.num_tx_port), ppWritePackedMsg, diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c index d82fd18e13..6f224438ec 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c @@ -15,38 +15,38 @@ uint8_t fapi_nr_p7_message_body_pack(nfapi_nr_p7_message_header_t *header, uint8_t result = 0; switch (header->message_id) { case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: - result = pack_dl_tti_request(header, ppWritePackedMsg, end, config); + result = pack_dl_tti_request(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: - result = pack_ul_tti_request(header, ppWritePackedMsg, end, config); + result = pack_ul_tti_request(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION: - result = pack_nr_slot_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_slot_indication(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: - result = pack_ul_dci_request(header, ppWritePackedMsg, end, config); + result = pack_ul_dci_request(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: - result = pack_tx_data_request(header, ppWritePackedMsg, end, config); + result = pack_tx_data_request(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: - result = pack_nr_rx_data_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_rx_data_indication(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: - result = pack_nr_crc_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_crc_indication(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION: - result = pack_nr_uci_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_uci_indication(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION: - result = pack_nr_srs_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_srs_indication(header, ppWritePackedMsg, end); break; case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: - result = pack_nr_rach_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_rach_indication(header, ppWritePackedMsg, end); break; #ifdef ENABLE_AERIAL case NFAPI_NR_PHY_MSG_TYPE_VENDOR_EXT_SLOT_RESPONSE: - result = pack_nr_slot_indication(header, ppWritePackedMsg, end, config); + result = pack_nr_slot_indication(header, ppWritePackedMsg, end); break; #endif default: { @@ -150,49 +150,49 @@ bool fapi_nr_p7_message_unpack(void *pMessageBuf, switch (pMessageHeader->message_id) { case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST, unpackedBufLen)) - result = unpack_dl_tti_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_dl_tti_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST, unpackedBufLen)) - result = unpack_ul_tti_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_ul_tti_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION, unpackedBufLen)) { nfapi_nr_slot_indication_scf_t *msg = (nfapi_nr_slot_indication_scf_t *)pMessageHeader; - result = unpack_nr_slot_indication(&pReadPackedMessage, end, msg, config); + result = unpack_nr_slot_indication(&pReadPackedMessage, end, msg); } break; case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST, unpackedBufLen)) - result = unpack_ul_dci_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_ul_dci_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST, unpackedBufLen)) - result = unpack_tx_data_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_tx_data_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION, unpackedBufLen)) { - result = unpack_nr_rx_data_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_rx_data_indication(&pReadPackedMessage, end, pMessageHeader); } break; case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION, unpackedBufLen)) { - result = unpack_nr_crc_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_crc_indication(&pReadPackedMessage, end, pMessageHeader); } break; case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION, unpackedBufLen)) { - result = unpack_nr_uci_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_uci_indication(&pReadPackedMessage, end, pMessageHeader); } break; case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION, unpackedBufLen)) { - result = unpack_nr_srs_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_srs_indication(&pReadPackedMessage, end, pMessageHeader); } break; case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION, unpackedBufLen)) { - result = unpack_nr_rach_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_rach_indication(&pReadPackedMessage, end, pMessageHeader); } break; default: @@ -435,7 +435,7 @@ static uint8_t pack_dl_tti_request_body_value(void *tlv, uint8_t **ppWritePacked return push16(value->PDUSize, &pPackedLengthField, end); } -uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_dl_tti_request_t *pNfapiMsg = (nfapi_nr_dl_tti_request_t *)msg; @@ -665,7 +665,7 @@ static uint8_t unpack_dl_tti_request_body_value(uint8_t **ppReadPackedMsg, uint8 return 1; } -uint8_t unpack_dl_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_dl_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_dl_tti_request_t *pNfapiMsg = (nfapi_nr_dl_tti_request_t *)msg; pNfapiMsg->vendor_extension = NULL; @@ -979,7 +979,7 @@ static uint8_t pack_ul_tti_groups_list_value(void *tlv, uint8_t **ppWritePackedM return 1; } -uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_ul_tti_request_t *pNfapiMsg = (nfapi_nr_ul_tti_request_t *)msg; pNfapiMsg->n_ulcch = 0; @@ -1297,7 +1297,7 @@ static uint8_t unpack_ul_tti_groups_list_value(uint8_t **ppReadPackedMsg, uint8_ return 1; } -uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_ul_tti_request_t *pNfapiMsg = (nfapi_nr_ul_tti_request_t *)msg; @@ -1328,7 +1328,7 @@ uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg return 1; } -uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_slot_indication_scf_t *pNfapiMsg = (nfapi_nr_slot_indication_scf_t *)msg; @@ -1338,10 +1338,7 @@ uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t * return 1; } -uint8_t unpack_nr_slot_indication(uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_nr_slot_indication_scf_t *msg, - nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_slot_indication(uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_nr_slot_indication_scf_t *msg) { nfapi_nr_slot_indication_scf_t *pNfapiMsg = (nfapi_nr_slot_indication_scf_t *)msg; @@ -1414,7 +1411,7 @@ static uint8_t pack_ul_dci_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg, return push16(value->PDUSize, &pPackedLengthField, end); } -uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_ul_dci_request_t *pNfapiMsg = (nfapi_nr_ul_dci_request_t *)msg; @@ -1485,7 +1482,7 @@ static uint8_t unpack_ul_dci_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t * return 1; } -uint8_t unpack_ul_dci_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_ul_dci_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_ul_dci_request_t *pNfapiMsg = (nfapi_nr_ul_dci_request_t *)msg; @@ -1554,7 +1551,7 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg return 1; } -uint8_t pack_tx_data_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_tx_data_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)msg; @@ -1622,7 +1619,7 @@ static uint8_t unpack_tx_data_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t return 1; } -uint8_t unpack_tx_data_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_tx_data_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)msg; @@ -1653,7 +1650,7 @@ static uint8_t pack_nr_rx_data_indication_body(const nfapi_nr_rx_data_pdu_t *val return 1; } -uint8_t pack_nr_rx_data_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_rx_data_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_rx_data_indication_t *pNfapiMsg = (nfapi_nr_rx_data_indication_t *)msg; @@ -1669,10 +1666,7 @@ uint8_t pack_nr_rx_data_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_ return 1; } -static uint8_t unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!(pull32(ppReadPackedMsg, &value->handle, end) && pull16(ppReadPackedMsg, &value->rnti, end) && pull8(ppReadPackedMsg, &value->harq_id, end) && pull32(ppReadPackedMsg, &value->pdu_length, end) @@ -1689,7 +1683,7 @@ static uint8_t unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t *value, return 1; } -uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_rx_data_indication_t *pNfapiMsg = (nfapi_nr_rx_data_indication_t *)msg; @@ -1702,7 +1696,7 @@ uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, vo } for (int i = 0; i < pNfapiMsg->number_of_pdus; i++) { - if (!unpack_nr_rx_data_indication_body(&pNfapiMsg->pdu_list[i], ppReadPackedMsg, end, config)) + if (!unpack_nr_rx_data_indication_body(&pNfapiMsg->pdu_list[i], ppReadPackedMsg, end)) return 0; } @@ -1730,7 +1724,7 @@ static uint8_t pack_nr_crc_indication_body(const nfapi_nr_crc_t *value, uint8_t return 1; } -uint8_t pack_nr_crc_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_crc_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_crc_indication_t *pNfapiMsg = (nfapi_nr_crc_indication_t *)msg; @@ -1768,7 +1762,7 @@ uint8_t unpack_nr_crc_indication_body(nfapi_nr_crc_t *value, uint8_t **ppReadPac return 1; } -uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_crc_indication_t *pNfapiMsg = (nfapi_nr_crc_indication_t *)msg; @@ -1971,7 +1965,7 @@ static uint8_t pack_nr_uci_indication_body(nfapi_nr_uci_t *value, uint8_t **ppWr return 1; } -uint8_t pack_nr_uci_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_uci_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_uci_indication_t *pNfapiMsg = (nfapi_nr_uci_indication_t *)msg; @@ -1990,10 +1984,7 @@ uint8_t pack_nr_uci_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e return 1; } -static uint8_t unpack_nr_uci_pusch(nfapi_nr_uci_pusch_pdu_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_uci_pusch(nfapi_nr_uci_pusch_pdu_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!pull8(ppReadPackedMsg, &value->pduBitmap, end)) return 0; @@ -2063,10 +2054,7 @@ static uint8_t unpack_nr_uci_pusch(nfapi_nr_uci_pusch_pdu_t *value, return 1; } -static uint8_t unpack_nr_uci_pucch_0_1(nfapi_nr_uci_pucch_pdu_format_0_1_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_uci_pucch_0_1(nfapi_nr_uci_pucch_pdu_format_0_1_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!(pull8(ppReadPackedMsg, &value->pduBitmap, end) && pull32(ppReadPackedMsg, &value->handle, end) && pull16(ppReadPackedMsg, &value->rnti, end) && pull8(ppReadPackedMsg, &value->pucch_format, end) @@ -2094,10 +2082,7 @@ static uint8_t unpack_nr_uci_pucch_0_1(nfapi_nr_uci_pucch_pdu_format_0_1_t *valu return 1; } -static uint8_t unpack_nr_uci_pucch_2_3_4(nfapi_nr_uci_pucch_pdu_format_2_3_4_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_uci_pucch_2_3_4(nfapi_nr_uci_pucch_pdu_format_2_3_4_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!pull8(ppReadPackedMsg, &value->pduBitmap, end)) return 0; @@ -2183,10 +2168,7 @@ static uint8_t unpack_nr_uci_pucch_2_3_4(nfapi_nr_uci_pucch_pdu_format_2_3_4_t * return 1; } -static uint8_t unpack_nr_uci_indication_body(nfapi_nr_uci_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_uci_indication_body(nfapi_nr_uci_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!pull16(ppReadPackedMsg, &value->pdu_type, end)) return 0; @@ -2196,19 +2178,19 @@ static uint8_t unpack_nr_uci_indication_body(nfapi_nr_uci_t *value, switch (value->pdu_type) { case NFAPI_NR_UCI_PUSCH_PDU_TYPE: { nfapi_nr_uci_pusch_pdu_t *uci_pdu = &value->pusch_pdu; - if (!unpack_nr_uci_pusch(uci_pdu, ppReadPackedMsg, end, config)) + if (!unpack_nr_uci_pusch(uci_pdu, ppReadPackedMsg, end)) return 0; break; } case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: { nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &value->pucch_pdu_format_0_1; - if (!unpack_nr_uci_pucch_0_1(uci_pdu, ppReadPackedMsg, end, config)) + if (!unpack_nr_uci_pucch_0_1(uci_pdu, ppReadPackedMsg, end)) return 0; break; } case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: { nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu = &value->pucch_pdu_format_2_3_4; - if (!unpack_nr_uci_pucch_2_3_4(uci_pdu, ppReadPackedMsg, end, config)) + if (!unpack_nr_uci_pucch_2_3_4(uci_pdu, ppReadPackedMsg, end)) return 0; break; } @@ -2220,7 +2202,7 @@ static uint8_t unpack_nr_uci_indication_body(nfapi_nr_uci_t *value, return 1; } -uint8_t unpack_nr_uci_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_uci_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_uci_indication_t *pNfapiMsg = (nfapi_nr_uci_indication_t *)msg; @@ -2233,15 +2215,15 @@ uint8_t unpack_nr_uci_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void * pNfapiMsg->uci_list = calloc(pNfapiMsg->num_ucis, sizeof(*pNfapiMsg->uci_list)); for (int i = 0; i < pNfapiMsg->num_ucis; i++) { - if (!unpack_nr_uci_indication_body(&pNfapiMsg->uci_list[i], ppReadPackedMsg, end, config)) + if (!unpack_nr_uci_indication_body(&pNfapiMsg->uci_list[i], ppReadPackedMsg, end)) return 0; } return 1; } -static uint8_t pack_nr_srs_report_tlv(const nfapi_srs_report_tlv_t *report_tlv, uint8_t **ppWritePackedMsg, uint8_t *end) { - +static uint8_t pack_nr_srs_report_tlv(const nfapi_srs_report_tlv_t *report_tlv, uint8_t **ppWritePackedMsg, uint8_t *end) +{ if(!(push16(report_tlv->tag, ppWritePackedMsg, end) && push32(report_tlv->length, ppWritePackedMsg, end))) { return 0; @@ -2256,8 +2238,8 @@ static uint8_t pack_nr_srs_report_tlv(const nfapi_srs_report_tlv_t *report_tlv, return 1; } -static uint8_t pack_nr_srs_indication_body(const nfapi_nr_srs_indication_pdu_t *value, uint8_t **ppWritePackedMsg, uint8_t *end) { - +static uint8_t pack_nr_srs_indication_body(const nfapi_nr_srs_indication_pdu_t *value, uint8_t **ppWritePackedMsg, uint8_t *end) +{ if(!(push32(value->handle, ppWritePackedMsg, end) && push16(value->rnti, ppWritePackedMsg, end) && push16(value->timing_advance_offset, ppWritePackedMsg, end) && @@ -2274,7 +2256,7 @@ static uint8_t pack_nr_srs_indication_body(const nfapi_nr_srs_indication_pdu_t * return 1; } -uint8_t pack_nr_srs_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_srs_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_srs_indication_t *pNfapiMsg = (nfapi_nr_srs_indication_t *)msg; @@ -2328,8 +2310,8 @@ static uint8_t unpack_nr_srs_report_tlv(nfapi_srs_report_tlv_t *report_tlv, uint return 1; } -static uint8_t unpack_nr_srs_indication_body(nfapi_nr_srs_indication_pdu_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { - +static uint8_t unpack_nr_srs_indication_body(nfapi_nr_srs_indication_pdu_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) +{ if(!(pull32(ppReadPackedMsg, &value->handle, end) && pull16(ppReadPackedMsg, &value->rnti, end) && pull16(ppReadPackedMsg, &value->timing_advance_offset, end) && @@ -2346,7 +2328,7 @@ static uint8_t unpack_nr_srs_indication_body(nfapi_nr_srs_indication_pdu_t *valu return 1; } -uint8_t unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_srs_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_srs_indication_t *pNfapiMsg = (nfapi_nr_srs_indication_t *)msg; if (!(pull16(ppReadPackedMsg, &pNfapiMsg->sfn, end) && pull16(ppReadPackedMsg, &pNfapiMsg->slot, end) @@ -2381,7 +2363,7 @@ static uint8_t pack_nr_rach_indication_body(void *tlv, uint8_t **ppWritePackedMs return 1; } -uint8_t pack_nr_rach_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) +uint8_t pack_nr_rach_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_rach_indication_t *pNfapiMsg = (nfapi_nr_rach_indication_t *)msg; @@ -2397,10 +2379,7 @@ uint8_t pack_nr_rach_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t * return 1; } -static uint8_t unpack_nr_rach_indication_body(nfapi_nr_prach_indication_pdu_t *value, - uint8_t **ppReadPackedMsg, - uint8_t *end, - nfapi_p7_codec_config_t *config) +static uint8_t unpack_nr_rach_indication_body(nfapi_nr_prach_indication_pdu_t *value, uint8_t **ppReadPackedMsg, uint8_t *end) { if (!(pull16(ppReadPackedMsg, &value->phy_cell_id, end) && pull8(ppReadPackedMsg, &value->symbol_index, end) && pull8(ppReadPackedMsg, &value->slot_index, end) && pull8(ppReadPackedMsg, &value->freq_index, end) @@ -2419,7 +2398,7 @@ static uint8_t unpack_nr_rach_indication_body(nfapi_nr_prach_indication_pdu_t *v return 1; } -uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config) +uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_rach_indication_t *pNfapiMsg = (nfapi_nr_rach_indication_t *)msg; @@ -2431,7 +2410,7 @@ uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void if (pNfapiMsg->number_of_pdus > 0) { pNfapiMsg->pdu_list = calloc(pNfapiMsg->number_of_pdus, sizeof(*pNfapiMsg->pdu_list)); for (int i = 0; i < pNfapiMsg->number_of_pdus; i++) { - if (!unpack_nr_rach_indication_body(&(pNfapiMsg->pdu_list[i]), ppReadPackedMsg, end, config)) + if (!unpack_nr_rach_indication_body(&(pNfapiMsg->pdu_list[i]), ppReadPackedMsg, end)) return 0; } } diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c index 6da1b487ad..3f7f36ec6a 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7_utils.c @@ -862,11 +862,13 @@ void free_ul_tti_request(nfapi_nr_ul_tti_request_t *msg) void free_slot_indication(nfapi_nr_slot_indication_scf_t *msg) { // Nothing to free + UNUSED(msg); } void free_ul_dci_request(nfapi_nr_ul_dci_request_t *msg) { // Nothing to free + UNUSED(msg); } void free_tx_data_request(nfapi_nr_tx_data_request_t *msg) diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c index 3ac4d2e27a..e00924025e 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c @@ -2620,19 +2620,19 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe uint8_t result = 0; switch (pMessageHeader->message_id) { case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: - result = pack_dl_tti_request(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_dl_tti_request(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: - result = pack_ul_tti_request(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_ul_tti_request(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: - result = pack_tx_data_request(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_tx_data_request(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: - result = pack_ul_dci_request(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_ul_dci_request(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_UE_RELEASE_REQUEST: result = pack_nr_ue_release_request(pMessageHeader, &pWritePackedMessage, end, config); @@ -2643,27 +2643,27 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe break; case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION: - result = pack_nr_slot_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_slot_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: - result = pack_nr_rx_data_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_rx_data_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: - result = pack_nr_crc_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_crc_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION: - result = pack_nr_uci_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_uci_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION: - result = pack_nr_srs_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_srs_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: - result = pack_nr_rach_indication(pMessageHeader, &pWritePackedMessage, end, config); + result = pack_nr_rach_indication(pMessageHeader, &pWritePackedMessage, end); break; case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC: @@ -6258,20 +6258,20 @@ bool nfapi_nr_p7_message_unpack(void *pMessageBuf, switch (pMessageHeader->message_id) { case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST, unpackedBufLen)) - result = unpack_dl_tti_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_dl_tti_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST, unpackedBufLen)) - result = unpack_ul_tti_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_ul_tti_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST, unpackedBufLen)) - result = unpack_tx_data_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_tx_data_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST, unpackedBufLen)) - result = unpack_ul_dci_request(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_ul_dci_request(&pReadPackedMessage, end, pMessageHeader); break; case NFAPI_UE_RELEASE_REQUEST: if (check_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen)) @@ -6280,39 +6280,39 @@ bool nfapi_nr_p7_message_unpack(void *pMessageBuf, case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION, unpackedBufLen)) { nfapi_nr_slot_indication_scf_t *msg = (nfapi_nr_slot_indication_scf_t *)pMessageHeader; - result = unpack_nr_slot_indication(&pReadPackedMessage, end, msg, config); + result = unpack_nr_slot_indication(&pReadPackedMessage, end, msg); } break; case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION, unpackedBufLen)) { - result = unpack_nr_rx_data_indication(&pReadPackedMessage, end, pMessageHeader, config); + result = unpack_nr_rx_data_indication(&pReadPackedMessage, end, pMessageHeader); } - break; + break; case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION, unpackedBufLen)) { - result = unpack_nr_crc_indication(&pReadPackedMessage, end, pMessageHeader, config); - } - break; + result = unpack_nr_crc_indication(&pReadPackedMessage, end, pMessageHeader); + } + break; case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION, unpackedBufLen)) { - result = unpack_nr_uci_indication(&pReadPackedMessage, end, pMessageHeader, config); - } - break; + result = unpack_nr_uci_indication(&pReadPackedMessage, end, pMessageHeader); + } + break; case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION, unpackedBufLen)) { - result = unpack_nr_srs_indication(&pReadPackedMessage, end, pMessageHeader, config); - } - break; + result = unpack_nr_srs_indication(&pReadPackedMessage, end, pMessageHeader); + } + break; case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION, unpackedBufLen)) { - result = unpack_nr_rach_indication(&pReadPackedMessage, end, pMessageHeader, config); - } - break; + result = unpack_nr_rach_indication(&pReadPackedMessage, end, pMessageHeader); + } + break; case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC: if (check_nr_fapi_unpack_length(NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC, unpackedBufLen)) diff --git a/nfapi/open-nFAPI/utils/nfapi_hex_parser.c b/nfapi/open-nFAPI/utils/nfapi_hex_parser.c index e40484aa2e..7e9a8c3e96 100644 --- a/nfapi/open-nFAPI/utils/nfapi_hex_parser.c +++ b/nfapi/open-nFAPI/utils/nfapi_hex_parser.c @@ -15,6 +15,7 @@ void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); if (s != NULL) { printf("%s:%d %s() Exiting OAI (n)FAPI Hex Parser: %s\n", file, line, function, s); } diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index 3fb09e2ed7..6e2e515ac8 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -152,12 +152,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, } // generate pilot - lte_dl_cell_spec_rx(ue, - eNB_offset, - &pilot[p][0], - Ns, - (l==0)?0:1, - p); + lte_dl_cell_spec_rx(ue, eNB_offset, &pilot[p][0], Ns, (l == 0) ? 0 : 1); for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { c16_t *pil = (c16_t *)&pilot[p][0]; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h index 7d3d23d087..df9bcedb80 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h +++ b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h @@ -180,7 +180,6 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, c16_t **ul_ch_estimates, c16_t **ul_ch_estimates_time, c16_t **rxdataF_ext, - module_id_t UE_id, uint8_t l, uint8_t Ns); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 985a2a7f8a..55c08c8024 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -56,7 +56,6 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, c16_t **ul_ch_estimates, c16_t **ul_ch_estimates_time, c16_t **rxdataF_ext, - module_id_t UE_id, unsigned char l, unsigned char Ns) { diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c index 2bf7385cb3..6903a9987b 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c @@ -174,15 +174,8 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB, return(0); } -int lte_dl_cell_spec_rx(PHY_VARS_UE *ue, - uint8_t eNB_offset, - int *output, - unsigned char Ns, - unsigned char l, - unsigned char p) +int lte_dl_cell_spec_rx(PHY_VARS_UE *ue, uint8_t eNB_offset, int *output, unsigned char Ns, unsigned char l) { - - unsigned char mprime,mprime_dword,mprime_qpsk_symb,m; unsigned short k=0; unsigned int qpsk[4]; diff --git a/openair1/PHY/LTE_REFSIG/lte_refsig.h b/openair1/PHY/LTE_REFSIG/lte_refsig.h index 66ac6e25a5..0645d68547 100644 --- a/openair1/PHY/LTE_REFSIG/lte_refsig.h +++ b/openair1/PHY/LTE_REFSIG/lte_refsig.h @@ -108,14 +108,8 @@ int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *phy_vars_eNB, int32_t *output, @param output Output vector for OFDM symbol (Frequency Domain) @param Ns Slot number (0..19) @param l symbol (0,1) - Note 1 means 3! -@param p antenna intex */ -int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue, - uint8_t eNB_offset, - int *output, - unsigned char Ns, - unsigned char l, - unsigned char p); +int lte_dl_cell_spec_rx(PHY_VARS_UE *ue, uint8_t eNB_offset, int *output, unsigned char Ns, unsigned char l); /*!\brief This function generates the ue-specific reference signal * sequence (36-211, Sec 6.10.3.1) for beamforming channel estimation upon reception diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c index 21e752c09b..b16c0a8022 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c @@ -834,13 +834,6 @@ void generate_RIV_tables(void) // n_tilde_PRB(2,3) = (3,5) // n_tilde_PRB(0,1) = (0,2) -uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci) -{ - - return(localRIV2alloc_LUT25[rb_alloc_dci]); - -} - uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t subframe) { uint8_t ret = 255; diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h index 8bc71e5536..f8d64d0582 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h @@ -53,13 +53,6 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb); */ uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap); -/* \brief Return prb for a given vrb index - @param vrb_type VRB type (0=localized,1=distributed) - @param rb_alloc_dci rballoc field from DCI -*/ -uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci); - - /* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type @returns Transmission mode (1-7) */ diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index ff456eed44..bc57ac5f81 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -384,7 +384,6 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, int32_t **rxdataF_comp, LTE_DL_FRAME_PARMS *frame_parms, uint8_t symbol, - uint8_t Qm, uint16_t nb_rb, uint8_t output_shift) { @@ -518,7 +517,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB, (c16_t **)eNB->pusch_vars[UE_id]->drs_ch_estimates, (c16_t **)eNB->pusch_vars[UE_id]->drs_ch_estimates_time, (c16_t **)eNB->pusch_vars[UE_id]->rxdataF_ext, - UE_id, l % (frame_parms->symbols_per_tti / 2), l / (frame_parms->symbols_per_tti / 2)); } @@ -599,7 +597,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB, pusch_vars->rxdataF_comp, frame_parms, l, - Qm, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, log2_maxh); // log2_maxh+I0_shift diff --git a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c index ce0ef00d11..f6ca3157d5 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c @@ -135,13 +135,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms, return(0); } -int generate_srs_tx_emul(PHY_VARS_UE *phy_vars_ue,uint8_t subframe) -{ - - LOG_D(PHY,"[UE] generate_srs_tx_emul for subframe %d\n",subframe); - return(0); -} - #ifdef MAIN main() { diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h index 210373ad74..8364307a34 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h +++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h @@ -945,13 +945,6 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb); @return Transport block size */ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb); -/* \brief Return prb for a given vrb index - @param vrb_type VRB type (0=localized,1=distributed) - @param rb_alloc_dci rballoc field from DCI -*/ -uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci); - - /* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type @returns Transmission mode (1-7) */ diff --git a/openair1/PHY/MODULATION/beamforming.c b/openair1/PHY/MODULATION/beamforming.c index 9dd48a02fe..56def37b41 100644 --- a/openair1/PHY/MODULATION/beamforming.c +++ b/openair1/PHY/MODULATION/beamforming.c @@ -86,7 +86,6 @@ void nr_beam_precoding(c16_t **txdataF, c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, - int slot, int symbol, int aa, int nb_antenna_ports, diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 2afd9f81f4..ef834db509 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -80,7 +80,6 @@ void nr_beam_precoding(c16_t **txdataF, c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, - int slot, int symbol, int aa, int nb_antenna_ports, diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 1878fc2d55..4d70db6f02 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -783,6 +783,8 @@ int nr_srs_ls_channel_estimation(int ant, #ifdef SRS_DEBUG LOG_I(NR_PHY, "====================== UE port %d --> gNB Rx antenna %i ======================\n", p_index, ant); LOG_I(NR_PHY, "============================== SRS symbol index %d ===========================\n", srs_symb); +#else + UNUSED(ant); #endif uint16_t subcarrier = CIRCULAR_INC(subcarrier_offset + nr_srs_info->k_0_p[p_index][srs_symb], 0, ofdm_symbol_size); diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 9f0dc43e8d..f7497a148a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -88,14 +88,8 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch, uint16_t N_RB, const NR_DL_FRAME_PARM @param UE_id id of current UE @param frame Frame number @param slot Slot number - @param harq_pid HARQ process ID */ -int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, - uint8_t ulsch_id, - uint32_t frame, - uint8_t slot, - unsigned char harq_pid, - int beam_nb); +int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, uint8_t ulsch_id, uint32_t frame, uint8_t slot, int beam_nb); /*! \brief This function implements the idft transform precoding in PUSCH @@ -147,9 +141,7 @@ void nr_ulsch_compute_llr(c16_t *rxdataF_comp, void reset_active_stats(PHY_VARS_gNB *gNB, int frame); void reset_active_ulsch(PHY_VARS_gNB *gNB, int frame); -void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, - uint32_t symbol, - c16_t *rxdataF_comp0, +void nr_ulsch_compute_ML_llr(c16_t *rxdataF_comp0, c16_t *rxdataF_comp1, c16_t *ul_ch_mag0, c16_t *ul_ch_mag1, diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 27d0a25b0f..82d6b0d99d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -79,7 +79,6 @@ static void nr_ulsch_extract_rbs(c16_t* const rxdataF, c16_t *chFext, int rxoffset, int choffset, - int aarx, int is_dmrs_symbol, nfapi_nr_pusch_pdu_t *pusch_pdu, NR_DL_FRAME_PARMS *frame_parms) @@ -265,9 +264,7 @@ static void nr_ulsch_det_HhH(c16_t *after_mf_00, // a c16_t *after_mf_10, // c c16_t *after_mf_11, // d uint32_t *det_fin, // 1/ad-bc - unsigned short nb_rb, - unsigned char symbol, - int32_t shift) + unsigned short nb_rb) { simde__m128i *after_mf_00_128,*after_mf_01_128, *after_mf_10_128, *after_mf_11_128, ad_re_128, bc_re_128; //ad_im_128, bc_im_128; simde__m128i *det_fin_128, det_re_128; //det_im_128, tmp_det0, tmp_det1; @@ -390,8 +387,7 @@ static void nr_ulsch_construct_HhH_elements(c16_t *conjch00_ch00, c16_t *after_mf_01, c16_t *after_mf_10, c16_t *after_mf_11, - unsigned short nb_rb, - unsigned char symbol) + unsigned short nb_rb) { //This function is used to construct the (H_hermitian * H matrix) matrix elements simde__m128i *conjch00_ch00_128 = (simde__m128i *)conjch00_ch00; @@ -678,8 +674,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb_0, - symbol); + nb_rb_0); } if (nb_rx_ant == 2) { nr_ulsch_construct_HhH_elements(conjch00_ch00, @@ -702,8 +697,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb_0, - symbol); + nb_rb_0); } // Add noise_var such that: H^h * H + noise_var * I @@ -725,9 +719,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_10,//c af_mf_11,//d determ_fin, - nb_rb_0, - symbol, - shift); + nb_rb_0); /* 2- Compute the channel matrix inversion ********************************** * * |(conj_H_00xH_00+conj_H_10xH_10) (conj_H_00xH_01+conj_H_10xH_11)| @@ -871,10 +863,8 @@ static void inner_rx(PHY_VARS_gNB *gNB, NR_gNB_PUSCH *pusch_vars, nfapi_nr_pusch_pdu_t *rel15_ul, c16_t **rxF, - c16_t **ul_ch, int16_t **llr, int soffset, - int length, int symbol, int output_shift, uint32_t nvar, @@ -906,7 +896,6 @@ static void inner_rx(PHY_VARS_gNB *gNB, chFext[aatx][aarx], soffset+(symbol * frame_parms->ofdm_symbol_size), dmrs_symbol * frame_parms->ofdm_symbol_size, - aarx, dmrs_symbol_flag, rel15_ul, frame_parms); @@ -972,10 +961,8 @@ static void inner_rx(PHY_VARS_gNB *gNB, if (nb_layer == 2) { if (rel15_ul->qam_mod_order <= 6) { - nr_ulsch_compute_ML_llr(pusch_vars, - symbol, - &pusch_vars->rxdataF_comp[0][symbol * buffer_length], - &pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], + nr_ulsch_compute_ML_llr((c16_t *)&pusch_vars->rxdataF_comp[0][symbol * buffer_length], + (c16_t *)&pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], rxF_ch_maga[0], rxF_ch_maga[1], llr[0], @@ -1057,10 +1044,8 @@ static void nr_pusch_symbol_processing(void *arg) pusch_vars, rel15_ul, gNB->common_vars.rxdataF[rdata->beam_nb], - (c16_t **)gNB->pusch_vars[ulsch_id].ul_ch_estimates, llrss, soffset, - gNB->pusch_vars[ulsch_id].ul_valid_re_per_slot[symbol], symbol, gNB->pusch_vars[ulsch_id].log2_maxh, rdata->nvar, @@ -1113,12 +1098,7 @@ static uint32_t average_u32(const uint32_t *x, uint16_t size) return (uint32_t)(sum_x / size); } -int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, - uint8_t ulsch_id, - uint32_t frame, - uint8_t slot, - unsigned char harq_pid, - int beam_nb) +int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, uint8_t ulsch_id, uint32_t frame, uint8_t slot, int beam_nb) { NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id].harq_process->ulsch_pdu; @@ -1323,7 +1303,6 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, (c16_t*)&ul_ch_estimates_ext[nl * frame_parms->nb_antennas_rx + aarx][meas_symbol * nb_re_pusch], soffset + meas_symbol * frame_parms->ofdm_symbol_size, dmrs_symbol * frame_parms->ofdm_symbol_size, - aarx, (rel15_ul->ul_dmrs_symb_pos >> meas_symbol) & 0x01, rel15_ul, frame_parms); diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c index 0e4ef15d32..318da26b75 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -1741,12 +1741,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, #endif } -static void nr_ulsch_shift_llr(int16_t *llr_layer0, - int16_t *llr_layer1, - uint32_t nb_re, - uint32_t rxdataF_ext_offset, - uint8_t mod_order, - int shift) +static void nr_ulsch_shift_llr(int16_t *llr_layer0, int16_t *llr_layer1, uint32_t nb_re, int shift) { simde__m128i *llr_layers0 = (simde__m128i *)llr_layer0; simde__m128i *llr_layers1 = (simde__m128i *)llr_layer1; @@ -1770,9 +1765,7 @@ static void nr_ulsch_shift_llr(int16_t *llr_layer0, } } -void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, - uint32_t symbol, - c16_t *rxdataF_comp0, +void nr_ulsch_compute_ML_llr(c16_t *rxdataF_comp0, c16_t *rxdataF_comp1, c16_t *ul_ch_mag0, c16_t *ul_ch_mag1, @@ -1787,7 +1780,7 @@ void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, case 2: nr_ulsch_qpsk_qpsk(rxdataF_comp0, rxdataF_comp1, llr_layers0, rho0, nb_re); nr_ulsch_qpsk_qpsk(rxdataF_comp1, rxdataF_comp0, llr_layers1, rho1, nb_re); - nr_ulsch_shift_llr((int16_t *)llr_layers0, (int16_t *)llr_layers1, nb_re, pusch_vars->llr_offset[symbol] >> 1, 2, 4); + nr_ulsch_shift_llr((int16_t *)llr_layers0, (int16_t *)llr_layers1, nb_re, 4); break; case 4: nr_ulsch_qam16_qam16(rxdataF_comp0, rxdataF_comp1, ul_ch_mag0, ul_ch_mag1, llr_layers0, rho0, nb_re); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index b2e3c276dc..b9fba62a27 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -517,7 +517,6 @@ int nr_prs_channel_estimation(uint8_t gNB_id, } c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const int symbol, const int dmrss, const int Nid_cell, @@ -535,8 +534,7 @@ c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, unsigned int k = Nid_cell % 4; - DEBUG_PBCH("PBCH DMRS Correlation : gNB_id %d , OFDM size %d, Ncp=%d, k=%u symbol %d\n", - proc->gNB_id, + DEBUG_PBCH("PBCH DMRS Correlation : OFDM size %d, Ncp=%d, k=%u symbol %d\n", fp->ofdm_symbol_size, fp->Ncp, k, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index a9755283c8..6c5b049634 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -39,7 +39,6 @@ void nr_pdcch_channel_estimation(const PHY_VARS_NR_UE *ue, c16_t *pilot); c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const int symbol, const int dmrss, const int Nid_cell, diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index e2f1356692..dd4db7f23f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -211,6 +211,9 @@ static int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue, ant_rx, rx_csi_rs_signal[k].r, rx_csi_rs_signal[k].i); +#else + UNUSED(proc); + UNUSED(nr_csi_info); #endif } } @@ -250,7 +253,6 @@ uint32_t calc_power_csirs(const uint16_t *x, const fapi_nr_dl_config_csirs_pdu_r static int nr_csi_rs_channel_estimation( const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, const nr_csi_info_t *nr_csi_info, const c16_t **csi_rs_generated_signal, @@ -421,14 +423,13 @@ static int nr_csi_rs_channel_estimation( return 0; } -int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, - const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, - const nr_csi_info_t *nr_csi_info, - const uint8_t N_ports, - uint8_t mem_offset, - c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], - const int16_t log2_maxh, - uint8_t *rank_indicator) +static int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, + const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, + const uint8_t N_ports, + uint8_t mem_offset, + c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], + const int16_t log2_maxh, + uint8_t *rank_indicator) { const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; const int16_t cond_dB_threshold = 5; @@ -554,18 +555,16 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, return 0; } -int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue, - const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, - const nr_csi_info_t *nr_csi_info, - const uint8_t N_ports, - uint8_t mem_offset, - const c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], - const uint32_t interference_plus_noise_power, - const uint8_t rank_indicator, - const int16_t log2_re, - uint8_t *i1, - uint8_t *i2, - int32_t *precoded_sinr_dB) +static int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue, + const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, + const uint8_t N_ports, + uint8_t mem_offset, + const c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], + const uint32_t interference_plus_noise_power, + const uint8_t rank_indicator, + const int16_t log2_re, + uint8_t *i2, + int32_t *precoded_sinr_dB) { const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; @@ -787,7 +786,6 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, } void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu) { @@ -898,7 +896,6 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, // if we need to measure only RSRP no need to do channel estimation if (csirs_config_pdu->measurement_bitmap > 1) nr_csi_rs_channel_estimation(frame_parms, - proc, csirs_config_pdu, csi_info, (const c16_t **)csi_info->csi_rs_generated_signal, @@ -917,7 +914,6 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, if (csirs_config_pdu->measurement_bitmap & 2) { nr_csi_rs_ri_estimation(ue, csirs_config_pdu, - csi_info, mapping_parms.ports, mem_offset, csi_rs_estimated_channel_freq, @@ -933,14 +929,12 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, if (csirs_config_pdu->measurement_bitmap & 8) { nr_csi_rs_pmi_estimation(ue, csirs_config_pdu, - csi_info, mapping_parms.ports, mem_offset, csi_rs_estimated_channel_freq, csi_info->csi_im_meas_computed ? csi_info->interference_plus_noise_power : noise_power, rank_indicator, log2_re, - i1, i2, &precoded_sinr_dB); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index bcae6e011b..53a6cbc19f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -123,8 +123,7 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, int length, unsigned char mod_order, unsigned short nb_rb, - unsigned char output_shift, - PHY_NR_MEASUREMENTS *measurements) + unsigned char output_shift) { simde__m128i *dl_ch128, *dl_ch128_2, *dl_ch_mag128, *dl_ch_mag128b, *dl_ch_mag128r, *rxdataF128, *rxdataF_comp128, *rho128; simde__m128i QAM_amp128 = {0}, QAM_amp128b = {0}, QAM_amp128r = {0}; @@ -967,7 +966,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, memset(dl_ch_estimates_ext, 0, sizeof(dl_ch_estimates_ext)); NR_UE_COMMON *common_vars = &ue->common_vars; - PHY_NR_MEASUREMENTS *measurements = &ue->measurements; const int frame = proc->frame_rx; const int nr_slot_rx = proc->nr_slot_rx; const int gNB_id = proc->gNB_id; @@ -1228,8 +1226,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, nb_re_pdsch, dlsch_config->qamModOrder, nb_rb_pdsch, - *log2_maxh, - measurements); // log2_maxh+I0_shift + *log2_maxh); // log2_maxh+I0_shift stop_meas_nr_ue_phy(ue, DLSCH_CHANNEL_COMPENSATION_STATS); if (meas_enabled) { LOG_D(PHY, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 5091b2c35d..77b7d7964a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -58,7 +58,6 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc, cd_t cumul = {0}; for (int i = pbch_initial_symbol; i < pbch_initial_symbol + 3; i++) { c32_t meas = nr_pbch_dmrs_correlation(frame_parms, - proc, i, i - pbch_initial_symbol, Nid_cell, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 8abd67c231..9ff9246c50 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -141,6 +141,7 @@ There is no data in DMRS symbol for other scenarios in type 1. */ static void map_data_dmrs_type1_cdm1_rb(const unsigned int num_cdm_no_data, const c16_t *data, c16_t *out) { + UNUSED(num_cdm_no_data); *(out + 1) = *data++; *(out + 3) = *data++; *(out + 5) = *data++; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index a61cb30b95..63771f7125 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -47,8 +47,6 @@ #define openair_sched_exit() exit(-1) #define bzero(s,n) (memset((s),0,(n))) -/// suppress compiler warning for unused arguments -#define UNUSED(x) (void)x; // Set the number of barriers for processSlotTX to 512. This value has to be at least 483 for NTN where // DL-to-UL offset is up to 483. The selected value is also half of the frame range so that diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index de72db32db..7a5af5b070 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -1112,7 +1112,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N pusch_decode_done = 1; start_meas(&gNB->rx_pusch_stats); - nr_rx_pusch_tp(gNB, ULSCH_id, frame_rx, slot_rx, ulsch->harq_pid, ulsch->beam_nb); + nr_rx_pusch_tp(gNB, ULSCH_id, frame_rx, slot_rx, ulsch->beam_nb); NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ULSCH_id]; pusch_vars->ulsch_power_tot = 0; pusch_vars->ulsch_noise_power_tot = 0; diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index 0c2d2897c6..415e4442d9 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -127,7 +127,6 @@ void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc, c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size]); void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 3d11c2af3b..225634937b 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1241,7 +1241,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ slot_fep_map[symb] = true; } } - nr_ue_csi_im_procedures(ue, proc, rxdataF, &phy_data->csiim_vars.csiim_config_pdu); + nr_ue_csi_im_procedures(ue, rxdataF, &phy_data->csiim_vars.csiim_config_pdu); } // do procedures for CSI-RS diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c index 92d1bd1b87..9a595a9295 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c @@ -20,61 +20,62 @@ void sigint_handler(int arg) { static const char msg[] = "\nCaught SIGINT, shutting down\nPress again CTRL+C to force shutdown\n"; __attribute__((unused)) int unused = write(STDOUT_FILENO, msg, sizeof(msg) - 1); - + UNUSED(arg); stop = true; } -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) -{ - return (0); -} -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) -{ - return (0); -} -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) -{ - return (0); -} -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) -{ - return (0); -} int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { + UNUSED(ind); return (0); } int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { + UNUSED(ind); return (0); } int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { + UNUSED(ind); return (0); } int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { + UNUSED(ind); return (0); } int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { + UNUSED(ind); return 0; } void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) { + UNUSED(sfn); + UNUSED(slot); } int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { + UNUSED(pMessageBuf); + UNUSED(pPackedBuf); + UNUSED(packedBufLen); return 0; } int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { + UNUSED(pMessageBuf); + UNUSED(messageBufLen); + UNUSED(pUnpackedBuf); + UNUSED(unpackedBufLen); return 0; } int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { + UNUSED(pMessageBuf); + UNUSED(pPackedBuf); + UNUSED(packedBufLen); return 0; } int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, @@ -82,24 +83,31 @@ int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pUnpackedBuf, uint32_t unpackedBufLen) { + UNUSED(pMessageBuf); + UNUSED(messageBufLen); + UNUSED(pUnpackedBuf); + UNUSED(unpackedBufLen); return 0; } -void get_position_coordinates(int Mod_id, position_t *position) -{ -} -int32_t get_uldl_offset(int nr_bandP) -{ - return (0); -} void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { + UNUSED(vnf_ip_addr); + UNUSED(vnf_p5_port); + UNUSED(pnf_ip_addr); + UNUSED(pnf_p7_port); + UNUSED(vnf_p7_port); } void configure_nr_nfapi_vnf(eth_params_t params) { + UNUSED(params); } int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t *config) { + UNUSED(pMessageBuf); + UNUSED(pPackedBuf); + UNUSED(packedBufLen); + UNUSED(config); return 0; } bool nfapi_nr_p7_message_unpack(void *pMessageBuf, @@ -108,6 +116,11 @@ bool nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { + UNUSED(pMessageBuf); + UNUSED(messageBufLen); + UNUSED(pUnpackedBuf); + UNUSED(unpackedBufLen); + UNUSED(config); return false; } int nfapi_p7_message_header_unpack(void *pMessageBuf, @@ -116,23 +129,37 @@ int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { + UNUSED(pMessageBuf); + UNUSED(messageBufLen); + UNUSED(pUnpackedBuf); + UNUSED(unpackedBufLen); + UNUSED(config); return 0; } void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync) { + UNUSED(module_id); + UNUSED(frame); + UNUSED(in_sync); } void nr_mac_rrc_msg3_ind(const module_id_t mod_id, int rnti, int gnb_id) { + UNUSED(mod_id); + UNUSED(gnb_id); + UNUSED(rnti); } void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success) { + UNUSED(mod_id); + UNUSED(success); } void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) { + UNUSED(mod_id); } void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, @@ -140,6 +167,10 @@ void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, const sdu_size_t sdu_sizeP, const uint8_t *const buffer_pP) { + UNUSED(ctxt_pP); + UNUSED(Srb_id); + UNUSED(sdu_sizeP); + UNUSED(buffer_pP); } typedef uint32_t channel_t; @@ -156,12 +187,20 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const uint8_t *pduP, const sdu_size_t pdu_len) { + UNUSED(module_id); + UNUSED(CC_id); + UNUSED(gNB_index); + UNUSED(hfn); + UNUSED(frame); + UNUSED(slot); + UNUSED(rnti); + UNUSED(arfcn); + UNUSED(channel); + UNUSED(pduP); + UNUSED(pdu_len); + UNUSED(cellid); return 0; } -void *rrc_nrue(void *notUsed) -{ - return NULL; -} void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint32_t gNB_index, @@ -170,4 +209,10 @@ void nr_mac_rrc_meas_ind_ue(module_id_t module_id, bool is_neighboring_cell, int rsrp_dBm) { + UNUSED(module_id); + UNUSED(Nid_cell); + UNUSED(gNB_index); + UNUSED(csi_meas); + UNUSED(is_neighboring_cell); + UNUSED(rsrp_dBm); } diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h index f70082fc86..09aec413e8 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h @@ -21,6 +21,7 @@ int oai_exit = 0; void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + UNUSED(assert); const char *msg = s == NULL ? "no comment" : s; printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); exit(-1); @@ -41,16 +42,6 @@ signed char quantize(double D, double x, unsigned char B) return ((char)qxd); } -int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) -{ - return (0); -} -// NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);} -int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) -{ - return (0); -} - void stop_nr_nfapi_vnf() { abort(); diff --git a/openair2/CMakeLists.txt b/openair2/CMakeLists.txt index 36186e8ade..8d1238c3e5 100644 --- a/openair2/CMakeLists.txt +++ b/openair2/CMakeLists.txt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LicenseRef-CSSL-1.0 +add_compile_options(-Wunused-parameter) add_subdirectory(E1AP) if(E2_AGENT) add_subdirectory(E2AP) diff --git a/openair2/E1AP/e1ap.c b/openair2/E1AP/e1ap.c index 5722bc5bcc..265341024c 100644 --- a/openair2/E1AP/e1ap.c +++ b/openair2/E1AP/e1ap.c @@ -103,46 +103,6 @@ static void e1_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *s AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } -int e1ap_send_RESET(bool isCu, sctp_assoc_t assoc_id, E1AP_Reset_t *Reset) -{ - AssertFatal(false, "Not implemented yet\n"); - E1AP_E1AP_PDU_t *pdu = calloc_or_fail(1, sizeof(*pdu)); - return e1ap_encode_send(isCu, assoc_id, pdu, 0, __func__); -} - -int e1ap_send_RESET_ACKNOWLEDGE(instance_t instance, E1AP_Reset_t *Reset) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -/* - Error Indication -*/ -int e1ap_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_send_ERROR_INDICATION(instance_t instance, E1AP_ErrorIndication_t *ErrorIndication) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - void e1ap_send_SETUP_RESPONSE(sctp_assoc_t assoc_id, const e1ap_setup_resp_t *e1ap_setup_resp) { E1AP_E1AP_PDU_t *pdu = encode_e1ap_cuup_setup_response(e1ap_setup_resp); @@ -162,6 +122,7 @@ static void e1apCUCP_send_SETUP_FAILURE(sctp_assoc_t assoc_id, const e1ap_setup_ int e1apCUCP_handle_SETUP_REQUEST(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { DevAssert(pdu != NULL); + UNUSED(inst); /* Create ITTI message and send to queue */ MessageDef *msg_p = itti_alloc_new_message(TASK_CUCP_E1, 0 /*unused by callee*/, E1AP_SETUP_REQ); // Decode E1 CU-UP Setup Request @@ -187,6 +148,7 @@ int e1apCUCP_handle_SETUP_REQUEST(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, int e1apCUUP_handle_SETUP_RESPONSE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); // Decode E1 CU-UP Setup Response e1ap_setup_resp_t out = {0}; if (!decode_e1ap_cuup_setup_response(pdu, &out)) { @@ -210,6 +172,7 @@ int e1apCUUP_handle_SETUP_RESPONSE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst */ int e1apCUUP_handle_SETUP_FAILURE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); LOG_D(E1AP, "CU-UP: Decoding E1AP Setup Failure...\n"); E1AP_GNB_CU_UP_E1SetupFailureIEs_t *ie; DevAssert(pdu != NULL); @@ -302,58 +265,6 @@ int e1apCUCP_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(void) return -1; } -int e1apCUCP_handle_CONFIGURATION_UPDATE(E1AP_E1AP_PDU_t *pdu) -{ - /* - E1AP_GNB_CU_UP_E1SetupRequestIEs_t *ie; - DevAssert(pdu != NULL); - E1AP_GNB_CU_UP_E1SetupRequest_t *in = &pdu->choice.initiatingMessage->value.choice.GNB_CU_UP_E1SetupRequest; - */ - - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUUP_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUUP_handle_gNB_DU_CONFIGURATION_FAILURE(sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -/* - E1 release -*/ - -int e1ap_send_RELEASE_REQUEST(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_send_RELEASE_ACKNOWLEDGE(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_handle_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1ap_handle_RELEASE_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - void e1apCUCP_send_BEARER_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, e1ap_bearer_setup_req_t *const bearerCxt) { E1AP_E1AP_PDU_t *pdu = encode_E1_bearer_context_setup_request(bearerCxt); @@ -375,6 +286,8 @@ static void e1apCUUP_send_BEARER_CONTEXT_SETUP_FAILURE(sctp_assoc_t assoc_id, co int e1apCUUP_handle_BEARER_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(e1_inst); // Decode E1AP message e1ap_bearer_setup_req_t bearerCxt = {0}; if (!decode_E1_bearer_context_setup_request(pdu, &bearerCxt)) { @@ -387,6 +300,7 @@ int e1apCUUP_handle_BEARER_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, e1ap_upc int e1apCUCP_handle_BEARER_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(inst); MessageDef *msg = itti_alloc_new_message(TASK_CUCP_E1, 0, E1AP_BEARER_CONTEXT_SETUP_RESP); // Decode e1ap_bearer_setup_resp_t *bearerCxt = &E1AP_BEARER_CONTEXT_SETUP_RESP(msg); @@ -404,6 +318,7 @@ int e1apCUCP_handle_BEARER_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, e1ap_up int e1apCUCP_handle_BEARER_CONTEXT_SETUP_FAILURE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(inst); e1ap_bearer_context_setup_failure_t fail = {0}; if (!decode_E1_bearer_context_setup_failure(&fail, pdu)) { LOG_E(E1AP, "Failed to decode Bearer Context Setup Failure\n"); @@ -447,6 +362,8 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(e1_inst); e1ap_bearer_mod_req_t bearerCxt = {0}; if (!decode_E1_bearer_context_mod_request(pdu, &bearerCxt)) { LOG_E(E1AP, "Failed to handle Bearer Context Modification Request\n"); @@ -462,6 +379,8 @@ int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(e1_inst); MessageDef *msg = itti_alloc_new_message(TASK_CUUP_E1, 0, E1AP_BEARER_CONTEXT_MODIFICATION_RESP); e1ap_bearer_modif_resp_t *modif = &E1AP_BEARER_CONTEXT_MODIFICATION_RESP(msg); if(!decode_E1_bearer_context_mod_response(modif, pdu)) { @@ -474,6 +393,8 @@ int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(inst); e1ap_bearer_context_mod_failure_t failure = {0}; if (!decode_E1_bearer_context_mod_failure(&failure, pdu)) { free_E1_bearer_context_mod_failure(&failure); @@ -489,35 +410,6 @@ int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id, e return 0; } -int e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_REQUIRED(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUCP_send_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, - sctp_assoc_t assoc_id, - uint32_t stream, - E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, - sctp_assoc_t assoc_id, - uint32_t stream, - E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} /* BEARER CONTEXT RELEASE */ @@ -534,14 +426,10 @@ int e1apCUUP_send_BEARER_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, const e return e1ap_encode_send(CPtype, assoc_id, pdu, 0, __func__); } -int e1apCUUP_send_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(inst); e1ap_bearer_release_cmd_t release = {0}; if(!decode_e1_bearer_context_release_command(&release, pdu)) { free_e1_bearer_context_release_command(&release); @@ -553,6 +441,8 @@ int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_u int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) { + UNUSED(assoc_id); + UNUSED(e1_inst); e1ap_bearer_release_cplt_t bearerCxt = {0}; if(!decode_e1_bearer_context_release_complete(&bearerCxt, pdu)) { free_e1_bearer_context_release_complete(&bearerCxt); @@ -565,61 +455,6 @@ int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, e1ap_ return 0; } -int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance, - sctp_assoc_t assoc_id, - uint32_t stream, - E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -/* -BEARER CONTEXT INACTIVITY NOTIFICATION - */ - -int e1apCUUP_send_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUCP_handle_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance, - sctp_assoc_t assoc_id, - uint32_t stream, - E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} -/* - DL DATA -*/ - -int e1apCUUP_send_DL_DATA_NOTIFICATION(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUUP_send_DATA_USAGE_REPORT(instance_t instance) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUCP_handle_DL_DATA_NOTIFICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - -int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) -{ - AssertFatal(false, "Not implemented yet\n"); - return -1; -} - static instance_t cuup_task_create_gtpu_instance_to_du(eth_params_t *IPaddrs) { openAddr_t tmp = {0}; @@ -775,6 +610,7 @@ static void e1apHandleTimer(instance_t myInstance) */ void *E1AP_CUCP_task(void *arg) { + UNUSED(arg); LOG_I(E1AP, "Starting E1AP at CU CP\n"); MessageDef *msg = NULL; e1ap_common_init(); @@ -859,6 +695,7 @@ void *E1AP_CUCP_task(void *arg) */ void *E1AP_CUUP_task(void *arg) { + UNUSED(arg); LOG_I(E1AP, "Starting E1AP at CU UP\n"); e1ap_common_init(); int result; diff --git a/openair2/E1AP/lib/e1ap_bearer_context_management.c b/openair2/E1AP/lib/e1ap_bearer_context_management.c index ff90f3bbb2..01bca3a1fa 100644 --- a/openair2/E1AP/lib/e1ap_bearer_context_management.c +++ b/openair2/E1AP/lib/e1ap_bearer_context_management.c @@ -1086,6 +1086,7 @@ bool eq_bearer_context_setup_response(const e1ap_bearer_setup_resp_t *a, const e */ void free_e1ap_context_setup_response(const e1ap_bearer_setup_resp_t *msg) { + UNUSED(msg); // Do nothing (no dynamic allocation) } @@ -1305,6 +1306,7 @@ e1ap_bearer_release_cmd_t cp_bearer_context_release_command(const e1ap_bearer_re /** @brief Bearer Context Release Command equality check */ void free_e1_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg) { + UNUSED(msg); // do nothing } @@ -1392,6 +1394,7 @@ e1ap_bearer_release_cplt_t cp_bearer_context_release_complete(const e1ap_bearer_ /** @brief Bearer Context Release Complete equality check */ void free_e1_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *msg) { + UNUSED(msg); // No dynamic memory, do nothing } @@ -2662,5 +2665,6 @@ bool eq_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *a /** @brief E1AP Bearer Context Modification Failure: free */ void free_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg) { + UNUSED(msg); // do nothing } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 4770d0a967..d25e3499b9 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -12,7 +12,7 @@ int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { DevAssert(pdu != NULL); - + UNUSED(stream); f1ap_reset_ack_t ack = {0}; /* Decode */ if (!decode_f1ap_reset_ack(pdu, &ack)) { @@ -30,6 +30,8 @@ int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); + UNUSED(ack); AssertFatal(1 == 0, "Not implemented yet\n"); } diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 32082c27a7..c28daa4263 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -19,6 +19,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_initial_ul_rrc_message_t msg; if (!decode_initial_ul_rrc_message_transfer(pdu, &msg)) { LOG_E(F1AP, "cannot decode F1 initial UL RRC message Transfer\n"); diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 362d4d280d..6b8ad48198 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -26,9 +26,7 @@ static instance_t cu_task_create_gtpu_instance(eth_params_t *IPaddrs) { return gtpv1Init(tmp); } -static void cu_task_handle_sctp_association_ind(instance_t instance, - sctp_new_association_ind_t *sctp_new_association_ind, - eth_params_t *IPaddrs) +static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind) { // save the assoc id f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance); @@ -80,7 +78,9 @@ static void cu_task_send_sctp_init_req(instance_t instance, char *my_addr) itti_send_msg_to_task(TASK_SCTP, instance, message_p); } -void *F1AP_CU_task(void *arg) { +void *F1AP_CU_task(void *arg) +{ + UNUSED(arg); MessageDef *received_msg = NULL; int result; LOG_I(F1AP, "Starting F1AP at CU\n"); @@ -113,8 +113,7 @@ void *F1AP_CU_task(void *arg) { switch (ITTI_MSG_ID(received_msg)) { case SCTP_NEW_ASSOCIATION_IND: cu_task_handle_sctp_association_ind(ITTI_MSG_ORIGIN_INSTANCE(received_msg), - &received_msg->ittiMsg.sctp_new_association_ind, - IPaddrs); + &received_msg->ittiMsg.sctp_new_association_ind); break; case SCTP_NEW_ASSOCIATION_RESP: diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index b7c853e66a..ff48873a5f 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -41,6 +41,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, const f1ap_ue_contex int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_setup_resp_t resp = {0}; if (!decode_ue_context_setup_resp(pdu, &resp)) { LOG_E(F1AP, "cannot decode F1 UE Context Setup Resp\n"); @@ -57,11 +58,16 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_ int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); + UNUSED(pdu); AssertFatal(1==0,"Not implemented yet\n"); } int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_rel_req_t req = {0}; if (!decode_ue_context_rel_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Request\n"); @@ -94,6 +100,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, f1ap_ue_context_re int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_rel_cplt_t cplt = {0}; if (!decode_ue_context_rel_cplt(pdu, &cplt)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Complete\n"); @@ -126,6 +133,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, const f1ap_ue int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(stream); f1ap_ue_context_mod_resp_t resp = {0}; if (!decode_ue_context_mod_resp(pdu, &resp)) { LOG_E(F1AP, "cannot decode F1 UE Context Modification Response\n"); @@ -141,13 +149,17 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - AssertFatal(1 == 0, "Not implemented yet\n"); + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); + UNUSED(pdu); + AssertFatal(1 == 0, "Not implemented yet\n"); } int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { DevAssert(pdu != NULL); - + UNUSED(stream); MessageDef *msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_MODIFICATION_REQUIRED); msg_p->ittiMsgHeader.originInstance = assoc_id; f1ap_ue_context_modif_required_t *required = &F1AP_UE_CONTEXT_MODIFICATION_REQUIRED(msg_p); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 848e7ab02a..c2bbda1b69 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -14,6 +14,7 @@ int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); LOG_D(F1AP, "DU_handle_RESET\n");\ F1AP_Reset_t *container; F1AP_ResetIEs_t *ie; @@ -133,6 +134,9 @@ int DU_send_F1_SETUP_REQUEST(sctp_assoc_t assoc_id, const f1ap_setup_req_t *setu int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); LOG_D(F1AP, "DU_handle_F1_SETUP_RESPONSE\n"); /* Decode */ f1ap_setup_resp_t resp = {0}; @@ -153,6 +157,9 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint */ int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_setup_failure_t fail; if (!decode_f1ap_setup_failure(pdu, &fail)) { LOG_E(F1AP, "Failed to decode F1AP Setup Failure\n"); @@ -189,6 +196,8 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, f1ap_gnb_du_confi */ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(stream); LOG_D(F1AP, "DU_handle_gNB_CU_CONFIGURATION_UPDATE\n"); f1ap_gnb_cu_configuration_update_t in = {0}; if (!decode_f1ap_cu_configuration_update(pdu, &in)) { @@ -212,6 +221,9 @@ int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); // Decoding f1ap_gnb_du_configuration_update_acknowledge_t in = {0}; if (!decode_f1ap_du_configuration_update_acknowledge(pdu, &in)) { @@ -225,8 +237,10 @@ int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, return 0; } -int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(sctp_assoc_t assoc_id, - f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure) { +int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(sctp_assoc_t assoc_id, + f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure) +{ + UNUSED(assoc_id); AssertFatal(1==0,"received gNB CU CONFIGURATION UPDATE FAILURE with cause %d\n", GNBCUConfigurationUpdateFailure->cause); } diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 7d1811d212..e2439b4f42 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -29,6 +29,9 @@ /* DL RRC Message Transfer */ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_dl_rrc_message_t msg = {0}; if (!decode_dl_rrc_message_transfer(pdu, &msg)) { LOG_E(F1AP, "cannot decode F1 DL RRC message Transfer\n"); diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 3d27f7db19..78117bd0c1 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -90,7 +90,9 @@ void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_dat AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } -void *F1AP_DU_task(void *arg) { +void *F1AP_DU_task(void *arg) +{ + UNUSED(arg); //sctp_cu_init(); LOG_I(F1AP, "Starting F1AP at DU\n"); itti_mark_task_ready(TASK_DU_F1); diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 0c3eb853f8..9e620106c7 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -14,6 +14,9 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_setup_req_t req = {0}; if (!decode_ue_context_setup_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Setup Request\n"); @@ -45,6 +48,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_context_set int DU_send_UE_CONTEXT_SETUP_FAILURE(sctp_assoc_t assoc_id) { + UNUSED(assoc_id); AssertFatal(1==0,"Not implemented yet\n"); } @@ -66,6 +70,9 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_re int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_rel_cmd_t cmd = {0}; if (!decode_ue_context_rel_cmd(pdu, &cmd)) { LOG_E(F1AP, "cannot decode F1 UE Context Release Command\n"); @@ -96,6 +103,9 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, f1ap_ue_context_r int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); f1ap_ue_context_mod_req_t req = {0}; if (!decode_ue_context_mod_req(pdu, &req)) { LOG_E(F1AP, "cannot decode F1 UE Context Modification Request\n"); @@ -124,7 +134,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_cont return 0; } -int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id) { +int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id) +{ + UNUSED(assoc_id); AssertFatal(1==0,"Not implemented yet\n"); } @@ -250,6 +262,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(sctp_assoc_t assoc_id, f1ap_ue_cont int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); F1AP_UEContextModificationConfirm_t *container = &pdu->choice.successfulOutcome->value.choice.UEContextModificationConfirm; f1ap_ue_context_modif_confirm_t confirm = {0}; F1AP_UEContextModificationConfirmIEs_t *ie = NULL; @@ -326,6 +341,9 @@ int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, sctp_assoc_t int DU_handle_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + UNUSED(instance); + UNUSED(assoc_id); + UNUSED(stream); F1AP_UEContextModificationRefuse_t *container = &pdu->choice.unsuccessfulOutcome->value.choice.UEContextModificationRefuse; f1ap_ue_context_modif_refuse_t refuse = {0}; F1AP_UEContextModificationRefuseIEs_t *ie = NULL; diff --git a/openair2/F1AP/lib/f1ap_positioning.c b/openair2/F1AP/lib/f1ap_positioning.c index c353d22407..bfcac8e495 100644 --- a/openair2/F1AP/lib/f1ap_positioning.c +++ b/openair2/F1AP/lib/f1ap_positioning.c @@ -3552,6 +3552,7 @@ bool eq_positioning_information_req(const f1ap_positioning_information_req_t *a, void free_positioning_information_req(f1ap_positioning_information_req_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -3839,6 +3840,7 @@ bool eq_positioning_information_failure(const f1ap_positioning_information_failu void free_positioning_information_failure(f1ap_positioning_information_failure_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -4130,6 +4132,7 @@ bool eq_positioning_activation_resp(const f1ap_positioning_activation_resp_t *a, void free_positioning_activation_resp(f1ap_positioning_activation_resp_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -4258,6 +4261,7 @@ bool eq_positioning_activation_failure(const f1ap_positioning_activation_failure void free_positioning_activation_failure(f1ap_positioning_activation_failure_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -4401,6 +4405,7 @@ bool eq_positioning_deactivation(const f1ap_positioning_deactivation_t *a, const void free_positioning_deactivation(f1ap_positioning_deactivation_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -5063,6 +5068,7 @@ bool eq_trp_information_failure(const f1ap_trp_information_failure_t *a, const f void free_trp_information_failure(f1ap_trp_information_failure_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -5761,6 +5767,7 @@ bool eq_positioning_measurement_failure(const f1ap_positioning_measurement_failu void free_positioning_measurement_failure(f1ap_positioning_measurement_failure_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -6084,6 +6091,7 @@ bool eq_positioning_measurement_abort(const f1ap_positioning_measurement_abort_t void free_positioning_measurement_abort(f1ap_positioning_measurement_abort_t *msg) { // nothing to free + UNUSED(msg); } /** @@ -6230,6 +6238,7 @@ bool eq_positioning_measurement_failure_indication(const f1ap_positioning_measur void free_positioning_measurement_failure_indication(f1ap_positioning_measurement_failure_indication_t *msg) { // nothing to free + UNUSED(msg); } /** diff --git a/openair2/F1AP/lib/f1ap_ue_context.c b/openair2/F1AP/lib/f1ap_ue_context.c index 8899c8888c..ee50db20e9 100644 --- a/openair2/F1AP/lib/f1ap_ue_context.c +++ b/openair2/F1AP/lib/f1ap_ue_context.c @@ -287,6 +287,7 @@ static bool eq_srb_to_setup(const f1ap_srb_to_setup_t *a, const f1ap_srb_to_setu static void free_srb_to_setup(f1ap_srb_to_setup_t *srbs) { // nothing to free + UNUSED(srbs); } static F1AP_SRBs_Setup_List_t encode_srbs_setup(int n, const f1ap_srb_setup_t *srbs) @@ -375,6 +376,7 @@ static bool eq_srb_setup(const f1ap_srb_setup_t *a, const f1ap_srb_setup_t *b) static void free_srb_setup(f1ap_srb_setup_t *srbs) { // nothing to free + UNUSED(srbs); } static F1AP_QoSFlowLevelQoSParameters_t encode_qos_flow_param(const f1ap_qos_flow_param_t *p) @@ -639,6 +641,7 @@ static bool eq_up_tnl(const f1ap_up_tnl_t *a, const f1ap_up_tnl_t *b) static void free_up_tnl(const f1ap_up_tnl_t *tnl) { // nothing to free + UNUSED(tnl); } /* Encode a DRBs_ToSetup list for UE Context Setup Request, from f1ap_drb_to_setup_t. */ @@ -1115,6 +1118,7 @@ static bool eq_drb_to_release(const f1ap_drb_to_release_t *a, const f1ap_drb_to_ static void free_drb_to_release(f1ap_drb_to_release_t *drb) { // nothing to free + UNUSED(drb); } /** @@ -2224,6 +2228,7 @@ bool eq_ue_context_rel_req(const f1ap_ue_context_rel_req_t *a, const f1ap_ue_con void free_ue_context_rel_req(f1ap_ue_context_rel_req_t *req) { // nothing to free + UNUSED(req); } /* @@ -2491,4 +2496,5 @@ bool eq_ue_context_rel_cplt(const f1ap_ue_context_rel_cplt_t *a, const f1ap_ue_c void free_ue_context_rel_cplt(f1ap_ue_context_rel_cplt_t *cplt) { // nothing to free + UNUSED(cplt); } diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index ae7ff9933b..040a549462 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -82,11 +82,11 @@ uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) { void *gNB_app_task(void *args_p) { - - MessageDef *msg_p = NULL; - const char *msg_name = NULL; - instance_t instance; - int result; + UNUSED(args_p); + MessageDef *msg_p = NULL; + const char *msg_name = NULL; + instance_t instance; + int result; /* for no gcc warnings */ (void)instance; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index f4d6d6bda8..74adb9325f 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -37,14 +37,12 @@ void nr_ue_decode_mib(NR_UE_MAC_INST_t *mac, int cc_id); /**\brief decode SIB1 and other SIs pdus in NR_UE, from if_module dl_ind \param mac pointer to MAC instance - \param cc_id component carrier id \param gNB_index gNB index \param sibs_mask sibs mask \param pduP pointer to pdu \param pdu_length length of pdu \param frame,slot Received TTI*/ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index 2937794ca3..8576028f9b 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -15,7 +15,7 @@ static NR_UE_MAC_INST_t *nr_ue_mac_inst[MAX_NUM_NR_UE_INST] = {0}; void send_srb0_rrc(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data) { AssertFatal(sdu_len > 0 && sdu_len < CCCH_SDU_SIZE, "invalid CCCH SDU size %d\n", sdu_len); - + UNUSED(data); MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_CCCH_DATA_IND); memset(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, 0, sdu_len); memcpy(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, sdu, sdu_len); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d6c49d3797..65dab84a0b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -270,7 +270,6 @@ static void configure_ratematching_csi(fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsc } void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, @@ -281,7 +280,7 @@ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, { if(ack_nack) { LOG_D(NR_MAC, "Decoding NR-BCCH-DL-SCH-Message (SIB1 or SI)\n"); - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, hfn, frame, slot, 0, mac->physCellId, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, hfn, frame, slot, mac->physCellId, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); if (mac->get_sib1) mac->get_sib1 = false; for (int i = 0; i < MAX_SI_GROUPS; i++) { @@ -298,7 +297,7 @@ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac, } else { LOG_E(NR_MAC, "Got NACK on NR-BCCH-DL-SCH-Message (%s)\n", mac->get_sib1 ? "SIB1" : "other SI"); - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, hfn, frame, slot, 0, mac->physCellId, 0, NR_BCCH_DL_SCH, NULL, 0); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, hfn, frame, slot, mac->physCellId, 0, NR_BCCH_DL_SCH, NULL, 0); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index e461459238..202590f9fc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -1213,7 +1213,7 @@ bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t bool res = add_connected_nr_ue(nrmac, UE); if (!res) { LOG_E(NR_MAC, "Error adding UE %04x\n", rnti); - delete_nr_ue_data(UE, NULL, &nrmac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &nrmac->UE_info.uid_allocator); NR_SCHED_UNLOCK(&nrmac->sched_lock); return false; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 48fa4a3aca..ab2588a25b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -169,7 +169,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, slot_t slo } nr_measgap_scheduling(gNB, frame, slot); - nr_mac_update_timers(module_idP, frame, slot); + nr_mac_update_timers(module_idP); if (wait_prach_completed || get_softmodem_params()->phy_test) { // This schedules MIB diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 180c43b12a..6b2c9e23ac 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -24,7 +24,7 @@ #include -static void nr_fill_rar(uint8_t Mod_idP, NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu); +static void nr_fill_rar(NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu); static const float ssb_per_rach_occasion[8] = {0.125, 0.25, 0.5, 1, 2, 4, 8}; @@ -640,6 +640,7 @@ static uint8_t nr_get_msg3_tpc(uint32_t preamble_power) // in any case OAI L1 sets this as invalid // and Aerial report doesn't seem to be reliable (not matching preambleReceivedTargetPower) // so for now we feedback 0dB TPC + UNUSED(preamble_power); return 3; // it means 0dB } @@ -700,7 +701,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, UE = get_new_nr_ue_inst(&nr_mac->UE_info.uid_allocator, rnti, NULL, &nr_mac->radio_config); if (!add_new_UE_RA(nr_mac, UE)) { LOG_E(NR_MAC, "FAILURE: %4d.%2d initiating RA procedure for preamble index %d: no free RA process\n", frame, slot, preamble_index); - delete_nr_ue_data(UE, NULL, &nr_mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &nr_mac->UE_info.uid_allocator); NR_SCHED_UNLOCK(&nr_mac->sched_lock); return; } @@ -1176,7 +1177,7 @@ static void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, slot_ future_ul_tti_req->n_pdus += 1; // calling function to fill rar message - nr_fill_rar(module_idP, UE, RAR_pdu, pusch_pdu); + nr_fill_rar(UE, RAR_pdu, pusch_pdu); } static bool check_msg2_monitoring(const NR_SearchSpace_t *ss, int slots_per_frame, int current_frame, int current_slot) @@ -1260,7 +1261,6 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac, nr_rnti_type_t rnti_type, int aggregation_level, int CCEIndex, - int ndi, int current_harq_pid, int CC_id, int rnti, @@ -1574,7 +1574,6 @@ static void nr_generate_Msg2(module_id_t module_idP, aggregation_level, CCEIndex, 0, - 0, CC_id, ra->RA_rnti, 0, @@ -1867,7 +1866,6 @@ static void nr_generate_Msg4_MsgB(module_id_t module_idP, TYPE_TC_RNTI_, aggregation_level, CCEIndex, - harq->ndi, current_harq_pid, CC_id, rnti, @@ -1996,7 +1994,7 @@ bool nr_check_Msg4_MsgB_Ack(module_id_t module_id, frame_t frame, slot_t slot, N // - sending only 1 RAR subPDU // - UL Grant: hardcoded CSI, TPC, time alloc // - padding -static void nr_fill_rar(uint8_t Mod_idP, NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu) +static void nr_fill_rar(NR_UE_info_t *UE, uint8_t *dlsch_buffer, nfapi_nr_pusch_pdu_t *pusch_pdu) { NR_RA_t *ra = UE->ra; LOG_D(NR_MAC, @@ -2095,7 +2093,7 @@ void nr_release_ra_UE(gNB_MAC_INST *mac, rnti_t rnti) NR_UEs_t *UE_info = &mac->UE_info; NR_UE_info_t *UE = remove_UE_from_list(NR_NB_RA_PROC_MAX, UE_info->access_ue_list, rnti); if (UE) { - delete_nr_ue_data(UE, mac->common_channels, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); } else { LOG_W(NR_MAC,"Call to release RA UE with rnti %04x, but not existing\n", rnti); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 894a829909..977c3d12a9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -328,7 +328,6 @@ static void nr_fill_nfapi_dl_SIB_pdu(gNB_MAC_INST *gNB_mac, int cce_index, nfapi_nr_dl_tti_request_body_t *dl_req, int pdu_index, - NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, bool is_sib1, int beam_index) { @@ -574,7 +573,6 @@ void schedule_nr_sib1(module_id_t module_idP, cce_index, dl_req, pdu_index, - type0_PDCCH_CSS_config, true, beam_index); @@ -710,7 +708,6 @@ static void other_sib_sched_control(module_id_t module_idP, cce_index, dl_req, pdu_index, - type0_PDCCH_CSS_config, false, beam_index); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 9bd6ecc686..d2f3b764d7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -577,7 +577,7 @@ static void ack_reconfig(gNB_MAC_INST *mac, NR_UE_info_t *UE) configure_UE_BWP(mac, scc, UE, false, NR_SearchSpace__searchSpaceType_PR_common, -1, -1); } -static bool dlsch_to_schedule(const NR_UE_sched_ctrl_t *sched_ctrl, int frame) +static bool dlsch_to_schedule(const NR_UE_sched_ctrl_t *sched_ctrl) { /* Check DL buffer, TA to be sent and beam switch needed*/ if (sched_ctrl->num_total_bytes > 0) @@ -686,7 +686,7 @@ static void pf_dl(gNB_MAC_INST *mac, update_dlsch_buffer(pp_pdsch->frame, pp_pdsch->slot, UE); - if (!dlsch_to_schedule(sched_ctrl, frame)) + if (!dlsch_to_schedule(sched_ctrl)) continue; /* Calculate coeff */ @@ -915,7 +915,7 @@ static void nr_dlsch_preprocessor(gNB_MAC_INST *mac, post_process_pdsch_t *pp_pd pf_dl(mac, pp_pdsch, UE_info->connected_ue_list, max_sched_ues, num_beams, n_rb_sched); } -nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id) +nr_pp_impl_dl nr_init_dlsch_preprocessor() { return nr_dlsch_preprocessor; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 20e92f7130..9d267d4d2e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2509,7 +2509,7 @@ NR_UE_info_t *find_ra_UE(NR_UEs_t *UEs, rnti_t rntiP) return NULL; } -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia) +void delete_nr_ue_data(NR_UE_info_t *UE, uid_allocator_t *uia) { ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup); ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->reconfigCellGroup); @@ -2553,7 +2553,7 @@ void free_transportBlock_buffer(byte_array_t *tb) free_byte_array(*tb); } -void set_max_fb_time(NR_UE_UL_BWP_t *UL_BWP, const NR_UE_DL_BWP_t *DL_BWP) +static void set_max_fb_time(NR_UE_UL_BWP_t *UL_BWP) { UL_BWP->max_fb_time = 8; // default value // take the maximum in dl_DataToUL_ACK list @@ -2955,7 +2955,7 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, create_dl_harq_list(sched_ctrl, sc_info, format_00_10); create_ul_harq_list(sched_ctrl, sc_info, format_00_10); - set_max_fb_time(UL_BWP, DL_BWP); + set_max_fb_time(UL_BWP); set_sched_pucch_list(sched_ctrl, UL_BWP, scc, &nr_mac->frame_structure); // Set MCS tables @@ -3073,7 +3073,7 @@ bool add_connected_nr_ue(gNB_MAC_INST *nr_mac, NR_UE_info_t *UE) bool success = add_UE_to_list(MAX_MOBILES_PER_GNB, UE_info->connected_ue_list, UE); if (!success) { LOG_E(NR_MAC,"Try to add UE %04x but the list is full\n", UE->rnti); - delete_nr_ue_data(UE, NULL, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); return false; } @@ -3140,7 +3140,7 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti) NR_UEs_t *UE_info = &nr_mac->UE_info; NR_UE_info_t *UE = remove_UE_from_list(MAX_MOBILES_PER_GNB + 1, UE_info->connected_ue_list, rnti); if (UE) - delete_nr_ue_data(UE, nr_mac->common_channels, &UE_info->uid_allocator); + delete_nr_ue_data(UE, &UE_info->uid_allocator); else nr_release_ra_UE(nr_mac, rnti); } @@ -3606,7 +3606,7 @@ void beam_switching_procedure(gNB_MAC_INST *mac, NR_UE_info_t *UE, int new_beam_ nr_mac_trigger_reconfiguration(mac, UE, -1, true); } -void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot) +void nr_mac_update_timers(module_id_t module_id) { gNB_MAC_INST *mac = RC.nrmac[module_id]; @@ -3617,7 +3617,7 @@ void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot) UE_iterator(UE_info->connected_ue_list, UE) { NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - if (nr_mac_check_release(sched_ctrl, UE->rnti)) { + if (nr_mac_check_release(sched_ctrl)) { // trigger release first as nr_mac_release_ue() invalidates UE ptr nr_mac_trigger_release_complete(mac, UE->rnti); nr_mac_release_ue(mac, UE->rnti); @@ -3886,7 +3886,7 @@ void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierS sched_ctrl->release_timer = 100 << subcarrier_spacing; } -bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti) +bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl) { if (sched_ctrl->release_timer == 0) return false; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index b779489abd..a6f66d738a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -421,8 +421,7 @@ static uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t st return rev_bits; } -static void evaluate_sinr_report(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, +static void evaluate_sinr_report(NR_UE_info_t *UE, NR_UE_sched_ctrl_t *sched_ctrl, uint8_t csi_report_id, uint8_t *payload, @@ -504,8 +503,7 @@ static void evaluate_sinr_report(gNB_MAC_INST *nrmac, LOG_D(MAC, "Reported SSB-SINR = %01f, dl_max_mcs %d\n", sinr_report->r[0].SINRx10 / 10.0, sched_ctrl->dl_max_mcs); } -static void evaluate_rsrp_report(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, +static void evaluate_rsrp_report(NR_UE_info_t *UE, NR_UE_sched_ctrl_t *sched_ctrl, uint8_t csi_report_id, uint8_t *payload, @@ -741,7 +739,7 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, LOG_D(MAC, "SFN/SF:%d/%d reportQuantity type = %d, type_r16 = %d\n", frame, slot, reportQuantity_type, reportQuantity_type_r16); if (reportQuantity_type_r16 == NR_CSI_ReportConfig__ext2__reportQuantity_r16_PR_cri_SINR_r16 || reportQuantity_type_r16 == NR_CSI_ReportConfig__ext2__reportQuantity_r16_PR_ssb_Index_SINR_r16) { - evaluate_sinr_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type_r16); + evaluate_sinr_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type_r16); } else { // phy-test has hardcoded allocation, so no use to handle CSI reports except RSRP if (get_softmodem_params()->phy_test @@ -750,10 +748,10 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, continue; switch (reportQuantity_type) { case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP: - evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); + evaluate_rsrp_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); break; case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP: - evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); + evaluate_rsrp_report(UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); new_bf_index = beam_selection_procedures(nrmac, UE); break; case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI: @@ -1046,7 +1044,7 @@ static void set_pucch_allocation(const NR_UE_UL_BWP_t *ul_bwp, const int r_pucch } } -static bool test_pucch0_vrb_occupation(const NR_sched_pucch_t *pucch, uint16_t *vrb_map_UL, const int bwp_start, const int bwp_size) +static bool test_pucch0_vrb_occupation(const NR_sched_pucch_t *pucch, uint16_t *vrb_map_UL, const int bwp_start) { // We assume initial cyclic shift is always 0 so different pucch resources can't overlap @@ -1235,7 +1233,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, } const int index = ul_buffer_index(pucch_frame, pucch_slot, n_slots_frame, mac->vrb_map_UL_size); uint16_t *vrb_map_UL = &mac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; - bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start, bwp_size); + bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start); if(!ret) { LOG_D(NR_MAC, "DL %4d.%2d, UL_ACK %4d.%2d PRB resources for this occasion are already occupied, move to the following occasion\n", @@ -1336,10 +1334,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, slot_t slot) const int bwp_start = ul_bwp->BWPStart; const int bwp_size = ul_bwp->BWPSize; set_pucch_allocation(ul_bwp, -1, bwp_size, curr_pucch); - bool ret = test_pucch0_vrb_occupation(curr_pucch, - vrb_map_UL, - bwp_start, - bwp_size); + bool ret = test_pucch0_vrb_occupation(curr_pucch, vrb_map_UL, bwp_start); if (!ret) { LOG_E(NR_MAC,"Cannot schedule SR. PRBs not available\n"); continue; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 6a85cfb970..a095c61ecb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -339,7 +339,6 @@ static rnti_t lcid_crnti_lookahead(uint8_t *pdu, uint32_t pdu_len) static int nr_process_mac_pdu(instance_t module_idP, NR_UE_info_t *UE, - uint8_t CC_id, frame_t frameP, slot_t slot, uint8_t *pduP, @@ -640,13 +639,7 @@ static void abort_nr_ul_harq(NR_UE_info_t *UE, int8_t harq_pid) sched_ctrl->sched_ul_bytes = 0; } -static void handle_nr_ul_harq(gNB_MAC_INST *nrmac, - NR_UE_info_t *UE, - frame_t frame, - slot_t slot, - rnti_t rnti, - int crc_harq_id, - bool crc_status) +static void handle_nr_ul_harq(gNB_MAC_INST *nrmac, NR_UE_info_t *UE, rnti_t rnti, int crc_harq_id, bool crc_status) { if (nrmac->radio_config.disable_harq) { LOG_D(NR_MAC, "skipping UL feedback handling as HARQ is disabled\n"); @@ -756,7 +749,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, UE->UE_sched_ctrl.ta_frame = (frame + 100) % MAX_FRAME_NUMBER; if (!transition_ra_connected_nr_ue(mac, UE)) { LOG_E(NR_MAC, "cannot add UE %04x: list is full\n", UE->rnti); - delete_nr_ue_data(UE, NULL, &mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &mac->UE_info.uid_allocator); } else { LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", UE->rnti); } @@ -869,7 +862,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, // Decode the entire MAC PDU // It may have multiple MAC subPDUs, for example, a MAC subPDU with LCID 1 caring a RRCReestablishmentComplete - nr_process_mac_pdu(mod_id, old_UE, CC_id, frame, slot, sdu, sdu_len, -1); + nr_process_mac_pdu(mod_id, old_UE, frame, slot, sdu, sdu_len, -1); return; } @@ -884,7 +877,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id, // Decode MAC PDU // the function is only called to decode the contention resolution sub-header // harq_pid set a non-valid value because it is not used in this call - nr_process_mac_pdu(mod_id, UE, CC_id, frame, slot, sdu, sdu_len, -1); + nr_process_mac_pdu(mod_id, UE, frame, slot, sdu, sdu_len, -1); LOG_I(NR_MAC, "Activating scheduling %s for TC_RNTI 0x%04x (state %s)\n", @@ -951,7 +944,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, UE_scheduling_control->ta_update = timing_advance; const NR_sched_pusch_t *sched_pusch = &UE_scheduling_control->ul_harq_processes[harq_pid].sched_pusch; - (void) sched_pusch; // avoids warnings of unused sched_pusch when compiling without T + UNUSED(sched_pusch); // avoids warnings of unused sched_pusch when compiling without T T(T_GNB_MAC_PUSCH_POWER_CONTROL, T_INT(rntiP), T_INT(frameP), T_INT(slotP), T_INT(pusch_snrx10), T_INT(UE_scheduling_control->ph), @@ -982,7 +975,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, if (UE_scheduling_control->sched_ul_bytes < 0) UE_scheduling_control->sched_ul_bytes = 0; - nr_process_mac_pdu(gnb_mod_idP, UE, CC_idP, frameP, slotP, sduP, sdu_lenP, harq_pid); + nr_process_mac_pdu(gnb_mod_idP, UE, frameP, slotP, sduP, sdu_lenP, harq_pid); } else { if (ul_cqi == 0xff || ul_cqi <= 128) { UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt++; @@ -1000,7 +993,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, nr_mac_trigger_ul_failure(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs); } } - handle_nr_ul_harq(gNB_mac, UE, frameP, slotP, current_rnti, harq_pid, sduP == NULL); + handle_nr_ul_harq(gNB_mac, UE, current_rnti, harq_pid, sduP == NULL); } else { nr_rx_ra_sdu(gnb_mod_idP, CC_idP, frameP, slotP, current_rnti, sduP, sdu_lenP, harq_pid, timing_advance, ul_cqi, rssi); } @@ -1381,10 +1374,8 @@ static void get_precoder_matrix_coef(char *w, static int nr_srs_tpmi_estimation(const NR_PUSCH_Config_t *pusch_Config, const long transform_precoding, const uint8_t *channel_matrix, - const uint8_t normalized_iq_representation, const uint16_t num_gnb_antenna_elements, const uint16_t num_ue_srs_ports, - const uint16_t prg_size, const uint16_t num_prgs, const uint8_t ul_ri) { @@ -1593,10 +1584,8 @@ void handle_nr_srs_measurements(const module_id_t module_id, sched_ctrl->srs_feedback.tpmi = nr_srs_tpmi_estimation(current_BWP->pusch_Config, current_BWP->transform_precoding, nr_srs_channel_iq_matrix.channel_matrix, - nr_srs_channel_iq_matrix.normalized_iq_representation, nr_srs_channel_iq_matrix.num_gnb_antenna_elements, nr_srs_channel_iq_matrix.num_ue_srs_ports, - nr_srs_channel_iq_matrix.prg_size, nr_srs_channel_iq_matrix.num_prgs, sched_ctrl->srs_feedback.ul_ri); stop_meas(&nr_mac->nr_srs_tpmi_computation_timer); @@ -2642,7 +2631,7 @@ static void nr_ulsch_preprocessor(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp } } -nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) +nr_pp_impl_ul nr_init_ulsch_preprocessor() { return nr_ulsch_preprocessor; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 433bb4aa32..0c62645318 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -26,7 +26,7 @@ int get_dl_slots_per_period(const frame_structure_t *fs); int get_full_ul_slots_per_period(const frame_structure_t *fs); int get_full_dl_slots_per_period(const frame_structure_t *fs); int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed); -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia); +void delete_nr_ue_data(NR_UE_info_t *UE, uid_allocator_t *uia); void mac_top_init_gNB(ngran_node_t node_type, NR_ServingCellConfigCommon_t *scc, @@ -47,7 +47,7 @@ int nr_transmission_action_indicator_stop(gNB_MAC_INST *mac, NR_UE_info_t *UE_in void clear_nr_nfapi_information(gNB_MAC_INST *gNB, int CC_idP, frame_t frameP, slot_t slotP); -void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot); +void nr_mac_update_timers(module_id_t module_id); void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, slot_t slot_rxP, NR_Sched_Rsp_t *sched_info); @@ -61,7 +61,7 @@ void nr_schedule_ue_spec(module_id_t module_id, nfapi_nr_tx_data_request_t *TX_req); /* \brief default DL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id); +nr_pp_impl_dl nr_init_dlsch_preprocessor(); void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, @@ -85,7 +85,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, slot_t slotP, nfapi void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_nr_ul_dci_request_t *ul_dci_req); /* \brief default UL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id); +nr_pp_impl_ul nr_init_ulsch_preprocessor(); /////// Random Access MAC-PHY interface functions and primitives /////// @@ -284,7 +284,6 @@ void remove_front_nr_list(NR_list_t *listP); void nr_release_ra_UE(gNB_MAC_INST *mac, rnti_t rnti); NR_UE_info_t * find_nr_UE(NR_UEs_t* UEs, rnti_t rntiP); NR_UE_info_t *find_ra_UE(NR_UEs_t *UEs, rnti_t rntiP); -void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia); void configure_UE_BWP(gNB_MAC_INST *nr_mac, NR_ServingCellConfigCommon_t *scc, NR_UE_info_t *UE, @@ -469,7 +468,7 @@ void finish_nr_dl_harq(NR_UE_sched_ctrl_t *sched_ctrl, int harq_pid); void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid); void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing); -bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti); +bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl); void nr_mac_trigger_release_complete(gNB_MAC_INST *mac, int rnti); void nr_mac_release_ue(gNB_MAC_INST *mac, int rnti); bool nr_mac_request_release_ue(const gNB_MAC_INST *nrmac, int rnti); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index edb0eec898..64779bc250 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -74,6 +74,10 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP, const uint32_t *sourceL2Id, const uint32_t *destinationL2Id) { + UNUSED(confirmP); + UNUSED(modeP); + UNUSED(sourceL2Id); + UNUSED(destinationL2Id); // The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue uint8_t *sdu = malloc16(sdu_buffer_sizeP); memcpy(sdu, sdu_buffer_pP, sdu_buffer_sizeP); @@ -196,6 +200,7 @@ void f1_setup_response(const f1ap_setup_resp_t *resp) void f1_setup_failure(const f1ap_setup_failure_t *failure) { + UNUSED(failure); LOG_E(MAC, "the CU reported F1AP Setup Failure, is there a configuration mismatch?\n"); exit(1); } @@ -577,7 +582,7 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id, const NR_C DevAssert(res); } else { if (!add_new_UE_RA(mac, UE)) { - delete_nr_ue_data(UE, /*not used*/ NULL, &mac->UE_info.uid_allocator); + delete_nr_ue_data(UE, &mac->UE_info.uid_allocator); LOG_E(NR_MAC, "UE list full while creating new UE\n"); return NULL; } diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 405c7fa306..ca12c48c48 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -303,8 +303,8 @@ void mac_top_init_gNB(ngran_node_t node_type, RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; } else { - RC.nrmac[i]->pre_processor_dl = nr_init_dlsch_preprocessor(0); - RC.nrmac[i]->pre_processor_ul = nr_init_ulsch_preprocessor(0); + RC.nrmac[i]->pre_processor_dl = nr_init_dlsch_preprocessor(); + RC.nrmac[i]->pre_processor_ul = nr_init_ulsch_preprocessor(); } if (!IS_SOFTMODEM_NOSTATS) threadCreate(&RC.nrmac[i]->stats_thread, @@ -344,10 +344,10 @@ void mac_top_destroy_gNB(gNB_MAC_INST *mac) NR_UEs_t *UE_info = &mac->UE_info; for (int i = 0; i < sizeofArray(UE_info->connected_ue_list); ++i) if (UE_info->connected_ue_list[i]) - delete_nr_ue_data(UE_info->connected_ue_list[i], cc, &UE_info->uid_allocator); + delete_nr_ue_data(UE_info->connected_ue_list[i], &UE_info->uid_allocator); for (int i = 0; i < sizeofArray(UE_info->access_ue_list); ++i) if (UE_info->access_ue_list[i]) - delete_nr_ue_data(UE_info->access_ue_list[i], cc, &UE_info->uid_allocator); + delete_nr_ue_data(UE_info->access_ue_list[i], &UE_info->uid_allocator); if (mac->f1_config.setup_resp) free_f1ap_setup_response(mac->f1_config.setup_resp); free(mac->f1_config.setup_resp); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index c652dd927e..ad3b4997dc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -662,8 +662,7 @@ static void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcell *pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers); } -static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const NR_ServingCellConfigCommon_t *scc, - const int uid) +static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const int uid) { frame_structure_t *fs = &RC.nrmac[0]->frame_structure; int offset = get_ul_slot_offset(fs, uid, false); // only full UL slots for SRS @@ -771,8 +770,7 @@ static NR_SRS_ResourceSet_t *get_srs_resourceset(const int resset_id, return srs_resset; } -static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *scc, - const NR_UE_NR_Capability_t *uecap, +static NR_SRS_Resource_t *get_srs_resource(const NR_UE_NR_Capability_t *uecap, const int curr_bwp, const int uid, const int res_id, @@ -849,7 +847,7 @@ static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *s srs_res->groupOrSequenceHopping = NR_SRS_Resource__groupOrSequenceHopping_neither; if (do_srs) { srs_res->resourceType.present = NR_SRS_Resource__resourceType_PR_periodic; - srs_res->resourceType.choice.periodic = configure_periodic_srs(scc, uid); + srs_res->resourceType.choice.periodic = configure_periodic_srs(uid); } else { srs_res->resourceType.present = NR_SRS_Resource__resourceType_PR_aperiodic; srs_res->resourceType.choice.aperiodic = calloc_or_fail(1, sizeof(*srs_res->resourceType.choice.aperiodic)); @@ -863,8 +861,7 @@ static NR_SRS_Resource_t *get_srs_resource(const NR_ServingCellConfigCommon_t *s return srs_res; } -static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_ServingCellConfigCommon_t *scc, - const NR_UE_NR_Capability_t *uecap, +static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_UE_NR_Capability_t *uecap, const int curr_bwp, const int uid, const int res_id, @@ -879,7 +876,7 @@ static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_ServingCellConfigCo srs_Config->srs_ResourceToAddModList = calloc_or_fail(1, sizeof(*srs_Config->srs_ResourceToAddModList)); NR_SRS_Resource_t *srs_res0 = - get_srs_resource(scc, uecap, curr_bwp, uid, res_id, maxMIMO_Layers, NR_SRS_Resource__transmissionComb_PR_n2, do_srs); + get_srs_resource(uecap, curr_bwp, uid, res_id, maxMIMO_Layers, NR_SRS_Resource__transmissionComb_PR_n2, do_srs); asn1cSeqAdd(&srs_Config->srs_ResourceToAddModList->list, srs_res0); srs_Config->srs_ResourceSetToAddModList = calloc_or_fail(1, sizeof(*srs_Config->srs_ResourceSetToAddModList)); @@ -1184,7 +1181,7 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i qsort(tda_list->list.array, tda_list->list.count, sizeof(tda_list->list.array), tda_cmp); } -static void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time, NR_SubcarrierSpacing_t subcarrierSpacing) +static void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time) { pucch_Config->dl_DataToUL_ACK = calloc(1,sizeof(*pucch_Config->dl_DataToUL_ACK)); long *delay[8]; @@ -1294,8 +1291,8 @@ static void config_pucch_resset1(const NR_ServingCellConfigCommon_t *scc, *pucchfmt2->simultaneousHARQ_ACK_CSI = NR_PUCCH_FormatConfig__simultaneousHARQ_ACK_CSI_true; } -void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) { - +static void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config) +{ pucch_Config->pucch_PowerControl = calloc(1,sizeof(*pucch_Config->pucch_PowerControl)); NR_P0_PUCCH_t *p00 = calloc(1,sizeof(*p00)); p00->p0_PUCCH_Id = 1; @@ -1331,7 +1328,7 @@ void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) { asn1cSeqAdd(&pucch_Config->spatialRelationInfoToAddModList->list,pucchspatial); } -static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, const NR_ServingCellConfigCommon_t *scc, int scs) +static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, int scs) { const frame_structure_t *fs = &RC.nrmac[0]->frame_structure; int sr_slot = 1; // in FDD SR in slot 1 @@ -1376,7 +1373,7 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul } } -static void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, NR_PUCCH_Config_t *pucch_Config, int scs) +static void scheduling_request_config(NR_PUCCH_Config_t *pucch_Config, int scs) { // format with <=2 bits in pucch resource set 0 NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[0]; @@ -1388,7 +1385,7 @@ static void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, N schedulingRequestResourceConfig->schedulingRequestResourceId = 1; schedulingRequestResourceConfig->schedulingRequestID = 0; - set_SR_periodandoffset(schedulingRequestResourceConfig, scc, scs); + set_SR_periodandoffset(schedulingRequestResourceConfig, scs); schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource)); *schedulingRequestResourceConfig->resource = *pucchressetid; @@ -1694,11 +1691,7 @@ static NR_PTRS_DownlinkConfig_t *config_dlptrs(const nr_ptrs_config_t *ptrs) return ptrs_config; } -static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, - int bwp_Id, - int dl_antenna_ports, - bool do_TCI, - nr_ptrs_config_t *ptrs) +static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, int bwp_Id, bool do_TCI, nr_ptrs_config_t *ptrs) { NR_SetupRelease_PDSCH_Config_t *setup_pdsch_Config = calloc(1,sizeof(*setup_pdsch_Config)); setup_pdsch_Config->present = NR_SetupRelease_PDSCH_Config_PR_setup; @@ -1752,7 +1745,6 @@ static NR_SetupRelease_PDSCH_Config_t *config_pdsch(uint64_t ssb_bitmap, static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap, - int dl_antenna_ports, bool force_256qam_off, bool is_SA, const nr_mac_config_t *configuration) @@ -1848,7 +1840,7 @@ static NR_BWP_Downlink_t *config_downlinkBWP(const NR_ServingCellConfigCommon_t asn1cSeqAdd(&bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list, ss3); bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToReleaseList = NULL; - bwp->bwp_Dedicated->pdsch_Config = config_pdsch(ssb_bitmap, bwp->bwp_Id, dl_antenna_ports, configuration->do_TCI, configuration->ptrs); + bwp->bwp_Dedicated->pdsch_Config = config_pdsch(ssb_bitmap, bwp->bwp_Id, configuration->do_TCI, configuration->ptrs); set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing, force_256qam_off ? NULL : uecap, @@ -1904,14 +1896,13 @@ static NR_BWP_Uplink_t *config_uplinkBWP(bool is_SA, pucch_Config->resourceToReleaseList = NULL; config_pucch_resset0(scc, pucch_Config, uid, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); config_pucch_resset1(scc, pucch_Config, uid, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); - set_pucch_power_config(pucch_Config, configuration->do_CSIRS); - scheduling_request_config(scc, pucch_Config, ubwp->bwp_Common->genericParameters.subcarrierSpacing); - set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, ubwp->bwp_Common->genericParameters.subcarrierSpacing); + set_pucch_power_config(pucch_Config); + scheduling_request_config(pucch_Config, ubwp->bwp_Common->genericParameters.subcarrierSpacing); + set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME); ubwp->bwp_Dedicated->pusch_Config = config_pusch(configuration, scc, uecap); - ubwp->bwp_Dedicated->srs_Config = get_config_srs(scc, - NULL, + ubwp->bwp_Dedicated->srs_Config = get_config_srs(NULL, curr_bwp, uid, ubwp->bwp_Id, @@ -3351,15 +3342,15 @@ static NR_BWP_UplinkDedicated_t *configure_initial_ul_bwp(const NR_ServingCellCo pucch_Config->resourceToReleaseList = NULL; config_pucch_resset0(scc, pucch_Config, id, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); config_pucch_resset1(scc, pucch_Config, id, curr_bwp, uecap, &configuration->pdsch_AntennaPorts); - set_pucch_power_config(pucch_Config, configuration->do_CSIRS); + set_pucch_power_config(pucch_Config); initialUplinkBWP->pusch_Config = config_pusch(configuration, scc, uecap); // We are using do_srs = 0 here because the periodic SRS will only be enabled in update_cellGroupConfig() if do_srs == 1 - initialUplinkBWP->srs_Config = get_config_srs(scc, uecap, curr_bwp, id, 0, maxMIMO_Layers, configuration->minRXTXTIME, 0); + initialUplinkBWP->srs_Config = get_config_srs(uecap, curr_bwp, id, 0, maxMIMO_Layers, configuration->minRXTXTIME, 0); - scheduling_request_config(scc, pucch_Config, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); - set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, genericParameters->subcarrierSpacing); + scheduling_request_config(pucch_Config, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); + set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME); return initialUplinkBWP; } @@ -3398,7 +3389,7 @@ static NR_BWP_DownlinkDedicated_t *configure_initial_dl_bwp(const NR_ServingCell asn1cSeqAdd(&pdcch_Config->searchSpacesToAddModList->list, ss2); bwp_Dedicated->pdcch_Config->choice.setup = pdcch_Config; - bwp_Dedicated->pdsch_Config = config_pdsch(bitmap, 0, pdsch_AntennaPorts, configuration->do_TCI, configuration->ptrs); + bwp_Dedicated->pdsch_Config = config_pdsch(bitmap, 0, configuration->do_TCI, configuration->ptrs); // we might call configuration of initial BWP for BWP switch when we already have UE capabilities set_dl_mcs_table(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing, configuration->force_256qam_off ? NULL : uecap, @@ -3576,12 +3567,7 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid, configDedicated->initialDownlinkBWP = configure_initial_dl_bwp(scc, pdsch_AntennaPorts, bitmap, NULL, configuration); } else { configDedicated->downlinkBWP_ToAddModList = calloc(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); - NR_BWP_Downlink_t *bwp = config_downlinkBWP(scc, - NULL, - 0, - false, - true, - configuration); + NR_BWP_Downlink_t *bwp = config_downlinkBWP(scc, NULL, false, true, configuration); asn1cSeqAdd(&configDedicated->downlinkBWP_ToAddModList->list, bwp); uplinkConfig->uplinkBWP_ToAddModList = calloc(1, sizeof(*uplinkConfig->uplinkBWP_ToAddModList)); NR_BWP_Uplink_t *ubwp = config_uplinkBWP(true, uid, maxMIMO_Layers, configuration, scc, NULL); @@ -3839,12 +3825,7 @@ NR_CellGroupConfig_t *update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t } else { if (!configDedicated->downlinkBWP_ToAddModList) configDedicated->downlinkBWP_ToAddModList = calloc_or_fail(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); - NR_BWP_Downlink_t *dl_bwp = config_downlinkBWP(scc, - uecap, - pdsch_AntennaPorts, - local_config.force_256qam_off, - true, - &local_config); + NR_BWP_Downlink_t *dl_bwp = config_downlinkBWP(scc, uecap, local_config.force_256qam_off, true, &local_config); asn1cSeqAdd(&configDedicated->downlinkBWP_ToAddModList->list, dl_bwp); if (!uplinkConfig->uplinkBWP_ToAddModList) @@ -3980,8 +3961,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, *pusch_Config->maxRank = maxMIMO_Layers; if (configuration->do_SRS) { ASN_STRUCT_FREE(asn_DEF_NR_SetupRelease_SRS_Config, ul_bwp_Dedicated->srs_Config); - ul_bwp_Dedicated->srs_Config = get_config_srs(scc, - uecap, + ul_bwp_Dedicated->srs_Config = get_config_srs(uecap, curr_bwp, uid, bwp_id, @@ -4043,8 +4023,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC int uid, int ssb_index) { - const nr_pdsch_AntennaPorts_t *pdschap = &configuration->pdsch_AntennaPorts; - const int dl_antenna_ports = pdschap->N1 * pdschap->N2 * pdschap->XP; AssertFatal(servingcellconfigcommon, "servingcellconfigcommon is null\n"); if (uecap == NULL) @@ -4084,8 +4062,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC configDedicated->initialDownlinkBWP = calloc(1, sizeof(*configDedicated->initialDownlinkBWP)); configDedicated->initialDownlinkBWP->pdcch_Config = NULL; - configDedicated->initialDownlinkBWP->pdsch_Config = - config_pdsch(bitmap, 0, dl_antenna_ports, configuration->do_TCI, configuration->ptrs); + configDedicated->initialDownlinkBWP->pdsch_Config = config_pdsch(bitmap, 0, configuration->do_TCI, configuration->ptrs); configDedicated->initialDownlinkBWP->sps_Config = NULL; // calloc(1,sizeof(struct NR_SetupRelease_SPS_Config)); configDedicated->initialDownlinkBWP->radioLinkMonitoringConfig = NULL; @@ -4105,8 +4082,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC long maxMIMO_Layers = set_ul_max_layers(configuration, uecap); int curr_bwp = NRRIV2BW(servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - initialUplinkBWP->srs_Config = get_config_srs(servingcellconfigcommon, - NULL, + initialUplinkBWP->srs_Config = get_config_srs(NULL, curr_bwp, uid, 0, @@ -4119,7 +4095,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC configDedicated->downlinkBWP_ToAddModList = calloc(1, sizeof(*configDedicated->downlinkBWP_ToAddModList)); NR_BWP_Downlink_t *bwp = config_downlinkBWP(servingcellconfigcommon, uecap, - dl_antenna_ports, configuration->force_256qam_off, false, configuration); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 93b7ad1074..4fa2d3539c 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -140,8 +140,9 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP, uint8_t *const kRRCint_pP, uint8_t *const kUPenc_pP); -void *pdcp_stats_thread(void *param) { - +void *pdcp_stats_thread(void *param) +{ + UNUSED(param); FILE *fd; int old_byte_cnt[MAX_MOBILES_PER_ENB][NB_RB_MAX],old_byte_cnt_rx[MAX_MOBILES_PER_ENB][NB_RB_MAX]; for (int i=0;iue_id); // in NoS1 mode: the SDAP should write() packets to an FD (TUN interface), // so below, set is_gnb == 0 to do that - sdap_data_ind(entity->rb_id, 0, entity->has_sdap_rx, entity->pdusession_id, ue->ue_id, buf, size); + sdap_data_ind(entity->rb_id, 0, entity->pdusession_id, ue->ue_id, buf, size); } else{ for (i = 0; i < MAX_DRBS_PER_UE; i++) { @@ -414,13 +414,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, rb_found: { LOG_D(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size); - sdap_data_ind(rb_id, - ue->drb[rb_id - 1]->is_gnb, - ue->drb[rb_id - 1]->has_sdap_rx, - ue->drb[rb_id - 1]->pdusession_id, - ue->ue_id, - buf, - size); + sdap_data_ind(rb_id, ue->drb[rb_id - 1]->is_gnb, ue->drb[rb_id - 1]->pdusession_id, ue->ue_id, buf, size); } } } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c index a9d6e4bfd3..f88a7a7fb2 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c @@ -9,7 +9,6 @@ #include "nr_rlc_pdu.h" #include "common/utils/time_stat.h" - #include "LOG/log.h" /*************************************************************************/ @@ -78,9 +77,9 @@ static int generate_tx_pdu(nr_rlc_entity_tm_t *entity, char *buffer, int size) return ret; } -nr_rlc_entity_buffer_status_t nr_rlc_entity_tm_buffer_status( - nr_rlc_entity_t *_entity, int maxsize) +nr_rlc_entity_buffer_status_t nr_rlc_entity_tm_buffer_status(nr_rlc_entity_t *_entity, int maxsize) { + UNUSED(maxsize); nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity; nr_rlc_entity_buffer_status_t ret; @@ -166,7 +165,8 @@ void nr_rlc_entity_tm_set_time(nr_rlc_entity_t *_entity, uint64_t now) void nr_rlc_entity_tm_discard_sdu(nr_rlc_entity_t *_entity, int sdu_id) { - /* nothing to do */ + UNUSED(_entity); + UNUSED(sdu_id); } static void clear_entity(nr_rlc_entity_tm_t *entity) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.h b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.h index e81ad1db2b..085eb7996c 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.h @@ -30,8 +30,7 @@ void nr_rlc_entity_tm_recv_sdu(nr_rlc_entity_t *entity, int sdu_id); void nr_rlc_entity_tm_recv_pdu(nr_rlc_entity_t *entity, char *buffer, int size); -nr_rlc_entity_buffer_status_t nr_rlc_entity_tm_buffer_status( - nr_rlc_entity_t *entity, int maxsize); +nr_rlc_entity_buffer_status_t nr_rlc_entity_tm_buffer_status(nr_rlc_entity_t *entity, int maxsize); int nr_rlc_entity_tm_generate_pdu(nr_rlc_entity_t *entity, char *buffer, int size); void nr_rlc_entity_tm_set_time(nr_rlc_entity_t *entity, uint64_t now); diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c index a12c991f82..12eb507a62 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c @@ -523,9 +523,9 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size) return ret; } -nr_rlc_entity_buffer_status_t nr_rlc_entity_um_buffer_status( - nr_rlc_entity_t *_entity, int maxsize) +nr_rlc_entity_buffer_status_t nr_rlc_entity_um_buffer_status(nr_rlc_entity_t *_entity, int maxsize) { + UNUSED(maxsize); nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity; nr_rlc_entity_buffer_status_t ret; diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.h b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.h index b3e5da5b16..a230ac22cf 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.h @@ -49,15 +49,10 @@ typedef struct { int tx_maxsize; } nr_rlc_entity_um_t; -void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *entity, - char *buffer, int size, - int sdu_id); -void nr_rlc_entity_um_recv_pdu(nr_rlc_entity_t *entity, - char *buffer, int size); -nr_rlc_entity_buffer_status_t nr_rlc_entity_um_buffer_status( - nr_rlc_entity_t *entity, int maxsize); -int nr_rlc_entity_um_generate_pdu(nr_rlc_entity_t *entity, - char *buffer, int size); +void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *entity, char *buffer, int size, int sdu_id); +void nr_rlc_entity_um_recv_pdu(nr_rlc_entity_t *entity, char *buffer, int size); +nr_rlc_entity_buffer_status_t nr_rlc_entity_um_buffer_status(nr_rlc_entity_t *entity, int maxsize); +int nr_rlc_entity_um_generate_pdu(nr_rlc_entity_t *entity, char *buffer, int size); void nr_rlc_entity_um_set_time(nr_rlc_entity_t *entity, uint64_t now); void nr_rlc_entity_um_discard_sdu(nr_rlc_entity_t *_entity, int sdu_id); void nr_rlc_entity_um_reestablishment(nr_rlc_entity_t *_entity); diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index cd18d0261b..d0c2afa3cb 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -163,7 +163,7 @@ void nr_mac_rlc_data_ind(const module_id_t module_idP, logical_chan_id_t ch = data[i].ch; nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, ch); if (rb != NULL) { - LOG_D(RLC, "RB found! (channel ID %d) \n", ch); + LOG_D(RLC, "RB found! (instance %d channel ID %d) \n", module_idP, ch); rb->set_time(rb, get_nr_rlc_current_time()); rb->recv_pdu(rb, (char *)data[i].buf, data[i].len); } else { @@ -196,7 +196,7 @@ int nr_mac_rlc_multi_data_req(const module_id_t module_idP, pdu_siz[0] = rb->generate_pdu(rb, buffer_pP + 3, tb_sizeP - 3); if (pdu_siz[0] == 0) break; - LOG_D(RLC, "MAC PDU created: channel_idP %d len %d\n", channel_idP, pdu_siz[0]); + LOG_D(RLC, "MAC PDU created: instance %d channel_idP %d len %d\n", module_idP, channel_idP, pdu_siz[0]); // reserve header tb_sizeP -= 3 + pdu_siz[0]; buffer_pP += 3 + pdu_siz[0]; @@ -233,7 +233,7 @@ tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP); if (rb != NULL) { - LOG_D(RLC, "MAC PDU to get created for channel_idP:%d \n", channel_idP); + LOG_D(RLC, "MAC PDU to get created for channel_idP:%d instance %d\n", channel_idP, module_idP); rb->set_time(rb, get_nr_rlc_current_time()); maxsize = tb_sizeP; ret = rb->generate_pdu(rb, buffer_pP, maxsize); @@ -245,8 +245,7 @@ tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, nr_rlc_manager_unlock(nr_rlc_ue_manager); if (gnb_flagP) - T(T_ENB_RLC_MAC_DL, T_INT(module_idP), T_INT(ue_id), - T_INT(channel_idP), T_INT(ret)); + T(T_ENB_RLC_MAC_DL, T_INT(module_idP), T_INT(ue_id), T_INT(channel_idP), T_INT(ret)); return ret; } @@ -911,6 +910,7 @@ struct srb0_data { void deliver_sdu_srb0(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size) { + UNUSED(entity); struct srb0_data *s0 = (struct srb0_data *)deliver_sdu_data; s0->send_initial_ul_rrc_message(s0->ue_id, (unsigned char *)buf, size, s0->data); } @@ -933,8 +933,7 @@ bool nr_rlc_activate_srb0(int ue_id, srb0_data->data = data; srb0_data->send_initial_ul_rrc_message = send_initial_ul_rrc_message; - nr_rlc_entity_t *nr_rlc_tm = new_nr_rlc_entity_tm(10000, - deliver_sdu_srb0, srb0_data); + nr_rlc_entity_t *nr_rlc_tm = new_nr_rlc_entity_tm(10000, deliver_sdu_srb0, srb0_data); nr_rlc_ue_add_srb_rlc_entity(ue, 0, nr_rlc_tm); LOG_I(RLC, "Activated srb0 for UE %d\n", ue_id); diff --git a/openair2/LAYER2/rlc_v2/rlc_oai_api.c b/openair2/LAYER2/rlc_v2/rlc_oai_api.c index d536ba53bf..8f2ec5fd7b 100644 --- a/openair2/LAYER2/rlc_v2/rlc_oai_api.c +++ b/openair2/LAYER2/rlc_v2/rlc_oai_api.c @@ -398,7 +398,7 @@ rb_found: exit(1); } memcpy(memblock, buf, size); - if (!pdcp_data_ind(&ctx, is_srb, is_mbms, rb_id, size, memblock, NULL, NULL)) { + if (!pdcp_data_ind(&ctx, is_srb, is_mbms, rb_id, size, memblock)) { LOG_E(RLC, "ERROR: pdcp_data_ind failed (is_srb %d rb_id %d rnti %x)\n", is_srb, rb_id, ue->rnti); /* what to do in case of failure? for the moment: nothing */ } diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 61292048c4..21e95164e7 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -80,7 +80,6 @@ void print_ue_mac_stats(const module_id_t mod, const int frame_rx, const int slo // L2 Abstraction Layer static int handle_bcch_bch(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t *pduP, unsigned int additional_bits, @@ -104,13 +103,12 @@ static int handle_bcch_bch(NR_UE_MAC_INST_t *mac, else mac->frequency_range = FR1; // fixed 3 bytes MIB PDU - nr_mac_rrc_data_ind_ue(mac->ue_id, cc_id, gNB_index, 0, 0, 0, 0, cell_id, ssb_arfcn, NR_BCCH_BCH, (uint8_t *) pduP, 3); + nr_mac_rrc_data_ind_ue(mac->ue_id, gNB_index, 0, 0, 0, cell_id, ssb_arfcn, NR_BCCH_BCH, (uint8_t *) pduP, 3); return 0; } // L2 Abstraction Layer static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac, - int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, @@ -119,7 +117,7 @@ static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac, int frame, int slot) { - nr_ue_decode_BCCH_DL_SCH(mac, cc_id, gNB_index, ack_nack, pduP, pdu_len, hfn, frame, slot); + nr_ue_decode_BCCH_DL_SCH(mac, gNB_index, ack_nack, pduP, pdu_len, hfn, frame, slot); return 0; } @@ -256,7 +254,6 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio mac); if(rx_indication_body.ssb_pdu.decoded_pdu) { ret_mask |= (handle_bcch_bch(mac, - dl_info->cc_id, dl_info->gNB_index, rx_indication_body.ssb_pdu.pdu, rx_indication_body.ssb_pdu.additional_bits, @@ -269,7 +266,6 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio break; case FAPI_NR_RX_PDU_TYPE_SIB: ret_mask |= (handle_bcch_dlsch(mac, - dl_info->cc_id, dl_info->gNB_index, rx_indication_body.pdsch_pdu.ack_nack, rx_indication_body.pdsch_pdu.pdu, @@ -396,7 +392,7 @@ static void handle_sl_bch(int ue_id, sl_mac->decoded_DFN = frame; sl_mac->decoded_slot = slot; - nr_mac_rrc_data_ind_ue(ue_id, 0, 0, hfn_rx, frame_rx, slot_rx, 0, rx_slss_id, 0, NR_SBCCH_SL_BCH, (uint8_t *)sl_mib, len); + nr_mac_rrc_data_ind_ue(ue_id, 0, hfn_rx, frame_rx, slot_rx, rx_slss_id, 0, NR_SBCCH_SL_BCH, (uint8_t *)sl_mib, len); return; } diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index c2e326d9cb..50998b118c 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -88,8 +88,6 @@ static const float RSRQ_meas_mapping[35] = {-19, -18.5, -18, -17.5, -17, -16.5, extern void pdcp_config_set_security( const protocol_ctxt_t *const ctxt_pP, pdcp_t *const pdcp_pP, - const rb_id_t rb_idP, - const uint16_t lc_idP, const uint8_t security_modeP, uint8_t *const kRRCenc, uint8_t *const kRRCint, @@ -1514,7 +1512,7 @@ rrc_ue_process_securityModeCommand( derive_key_nas(UP_ENC_ALG, UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm, UE_rrc_inst[ctxt_pP->module_id].kenb, kUPenc); if (securityMode != 0xff) { - pdcp_config_set_security(ctxt_pP, pdcp_p, 0, 0, + pdcp_config_set_security(ctxt_pP, pdcp_p, UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm | (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4), kRRCenc, kRRCint, kUPenc); diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index b07e50ac7d..7c1f9d5b5d 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -502,8 +502,6 @@ rrc_pdcp_config_security( pdcp_config_set_security( ctxt_pP, pdcp_p, - DCCH, - DCCH+2, (send_security_mode_command == true) ? 0 | (ue_context_pP->ue_context.integrity_algorithm << 4) : (ue_context_pP->ue_context.ciphering_algorithm ) | diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index d12b627cd9..8d5d00c975 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1141,7 +1141,6 @@ static NR_MeasIdToAddMod_t *get_MeasId(NR_MeasId_t measId, NR_ReportConfigId_t r NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, int band, - int scs, int nr_pci, NR_ReportConfigToAddMod_t *rc_PER, NR_ReportConfigToAddMod_t *rc_A2, @@ -1444,7 +1443,7 @@ byte_array_t get_HandoverCommandMessage(nr_rrc_reconfig_param_t *params) * 2) encodes UE Capabilities from UE Context * 3) encodes AS context * 4) generates HO Preparation Info */ -byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params, int scell_pci) +byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params) { // Buffer to return byte_array_t buffer = {.buf = NULL, .len = 0}; diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index 543749d40d..7aeb2b4ed0 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -140,7 +140,6 @@ int do_RRCReestablishmentComplete(uint8_t *buffer, size_t buffer_size, int64_t r NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, int band, - int scs, int nr_pci, NR_ReportConfigToAddMod_t *rc_PER, NR_ReportConfigToAddMod_t *rc_A2, @@ -150,7 +149,7 @@ NR_MeasConfig_t *get_MeasConfig(const NR_MeasTiming_t *mt, void free_MeasConfig(NR_MeasConfig_t *mc); int do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi); -byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params, int scell_pci); +byte_array_t get_HandoverPreparationInformation(nr_rrc_reconfig_param_t *params); byte_array_t get_HandoverCommandMessage(nr_rrc_reconfig_param_t *params); void fill_removal_lists_from_source_measConfig(NR_MeasConfig_t *measConfig, byte_array_t prep_info); byte_array_t doRRCReconfiguration_from_HandoverCommand(byte_array_t handoverCommand); diff --git a/openair2/RRC/NR/mac_rrc_dl_direct.c b/openair2/RRC/NR/mac_rrc_dl_direct.c index 7f69afaa82..693e9ccbf4 100644 --- a/openair2/RRC/NR/mac_rrc_dl_direct.c +++ b/openair2/RRC/NR/mac_rrc_dl_direct.c @@ -19,6 +19,7 @@ static void f1_reset_cu_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset static void f1_reset_acknowledge_du_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); (void)ack; AssertFatal(false, "%s() not implemented yet\n", __func__); } diff --git a/openair2/RRC/NR/mac_rrc_dl_f1ap.c b/openair2/RRC/NR/mac_rrc_dl_f1ap.c index a102e30101..1385c3fd82 100644 --- a/openair2/RRC/NR/mac_rrc_dl_f1ap.c +++ b/openair2/RRC/NR/mac_rrc_dl_f1ap.c @@ -29,6 +29,7 @@ static void f1_reset_cu_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_t static void f1_reset_acknowledge_du_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack) { + UNUSED(assoc_id); (void)ack; AssertFatal(false, "%s() not implemented yet\n", __func__); } diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index 4e9061138b..ad69ab19df 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -23,7 +23,7 @@ #define SRB2 2 void rrc_add_nsa_user(gNB_RRC_INST *rrc, x2ap_ENDC_sgnb_addition_req_t *m, sctp_assoc_t assoc_id); -void rrc_add_nsa_user_resp(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp); +void rrc_add_nsa_user_resp(gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp); void rrc_release_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context); void rrc_remove_nsa_user_context(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context); @@ -43,18 +43,18 @@ void rrc_gNB_generate_RRCRelease(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); \param args_p Pointer on arguments to start the task. */ void *rrc_gnb_task(void *args_p); -int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const int dl_bwp_id, const int ul_bwp_id); +int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p); NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cellid); -bool ue_associated_to_cuup(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue); -sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue); +bool ue_associated_to_cuup(const gNB_RRC_UE_t *ue); +sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_UE_t *ue); sctp_assoc_t get_new_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue, int sst, int sd); int rrc_gNB_process_e1_setup_req(sctp_assoc_t assoc_id, const e1ap_setup_req_t *req); bool is_cuup_associated(gNB_RRC_INST *rrc); /* Process indication of E1 connection loss on CU-CP */ -void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, e1ap_lost_connection_t *lc, sctp_assoc_t assoc_id); +void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id); void bearer_context_setup_direct(e1ap_bearer_setup_req_t *req, instance_t instance); @@ -91,7 +91,7 @@ void rrc_gNB_generate_UeContextModificationRequest(const gNB_RRC_INST *rrc, void free_RRCReconfiguration_params(nr_rrc_reconfig_param_t params); -byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params); +byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params); nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t srb_reest_bitmap, bool drb_reestablish); diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 8cf5fb1378..096dc98eea 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -222,6 +222,9 @@ const NR_RedCapParameters_r17_t *get_redcapparam_r17(NR_UE_NR_Capability_t *UE_C static void rrc_deliver_ue_ctxt_release_cmd(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(srb_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_ue_ctxt_release_data_t *data = deliver_pdu_data; byte_array_t rrc_cont = {.buf = (uint8_t *)buf, .len = size}; @@ -278,8 +281,11 @@ typedef struct deliver_dl_rrc_message_data_s { f1ap_dl_rrc_message_t *dl_rrc; sctp_assoc_t assoc_id; } deliver_dl_rrc_message_data_t; + static void rrc_deliver_dl_rrc_message(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_dl_rrc_message_data_t *data = (deliver_dl_rrc_message_data_t *)deliver_pdu_data; data->dl_rrc->rrc_container = (uint8_t *)buf; @@ -310,6 +316,8 @@ static void nr_rrc_transfer_protected_rrc_message(const gNB_RRC_INST *rrc, #ifdef E2_AGENT E2_AGENT_SIGNAL_DL_DCCH_RRC_MSG(buffer, size, message_id); +#else + UNUSED(message_id); #endif } @@ -552,7 +560,6 @@ static f1ap_ue_context_setup_req_t rrc_fill_f1_ue_context_setup(gNB_RRC_UE_t *ue //----------------------------------------------------------------------------- static void rrc_gNB_generate_RRCSetup(instance_t instance, - rnti_t rnti, rrc_gNB_ue_context_t *const ue_context_pP, const uint8_t *masterCellGroup, int masterCellGroup_len) @@ -760,7 +767,6 @@ NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cell seq_arr_init(&neigh_seq, sizeof(nr_neighbour_cell_t)); // Get cell info from the cell container - int scs = cell->info.mode == NR_MODE_TDD ? cell->info.tdd.dlul.scs : cell->info.fdd.dl.scs; int band = cell->info.mode == NR_MODE_TDD ? cell->info.tdd.dlul.band : cell->info.fdd.dl.band; const NR_MeasTimingList_t *mtlist = cell->mtc->criticalExtensions.choice.c1->choice.measTimingConf->measTiming; @@ -815,7 +821,7 @@ NR_MeasConfig_t *nr_rrc_get_measconfig(const gNB_RRC_INST *rrc, uint64_t nr_cell if (rrc->measurementConfiguration.a2_event) rc_A2 = prepare_a2_event_report(rrc->measurementConfiguration.a2_event); - NR_MeasConfig_t *result = get_MeasConfig(mt, band, scs, cell->info.pci, rc_PER, rc_A2, &rc_A3_seq, &neigh_seq, neigh_a3_id); + NR_MeasConfig_t *result = get_MeasConfig(mt, band, cell->info.pci, rc_PER, rc_A2, &rc_A3_seq, &neigh_seq, neigh_a3_id); // Clean up sequence arrays seq_arr_free(&rc_A3_seq, NULL); @@ -885,7 +891,7 @@ nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC return params; } -byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params) +byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_UE_t *UE, nr_rrc_reconfig_param_t params) { byte_array_t msg = do_RRCReconfiguration(¶ms); if (msg.len <= 0) { @@ -931,7 +937,7 @@ static void rrc_gNB_generate_dedicatedRRCReconfiguration(gNB_RRC_INST *rrc, gNB_ ue_p->xids[params.transaction_id] = params.n_drb_rel > 0 ? RRC_PDUSESSION_RELEASE : RRC_PDUSESSION_ESTABLISH; } - byte_array_t msg = rrc_gNB_encode_RRCReconfiguration(rrc, ue_p, params); + byte_array_t msg = rrc_gNB_encode_RRCReconfiguration(ue_p, params); if (msg.len <= 0) { LOG_E(NR_RRC, "UE %d: Failed to generate RRCReconfiguration%s\n", @@ -1139,7 +1145,7 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) .gNB_cu_up_ue_id = ue_p->rrc_ue_id, }; // Quit re-establishment notification if no CU-UP is associated - if (!is_cuup_associated(rrc) || !ue_associated_to_cuup(rrc, ue_p)) { + if (!is_cuup_associated(rrc) || !ue_associated_to_cuup(ue_p)) { return; } @@ -1159,7 +1165,7 @@ static void cuup_notify_reestablishment(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) fill_security_info(rrc, ue_p, req.secInfo); /* Send E1 Bearer Context Modification Request (3GPP TS 38.463) */ - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, ue_p); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(ue_p); rrc->cucp_cuup.bearer_context_mod(assoc_id, &req); free_e1ap_context_mod_request(&req); } @@ -1250,10 +1256,7 @@ static void rrc_gNB_generate_RRCReestablishment(rrc_gNB_ue_context_t *ue_context } /// @brief Function tha processes RRCReestablishmentComplete message sent by the UE, after RRCReestasblishment request. -static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue_p, - const uint8_t xid, - const sctp_assoc_t assoc_id) +static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const uint8_t xid) { LOG_I(NR_RRC, "UE %d Processing NR_RRCReestablishmentComplete from UE\n", ue_p->rrc_ue_id); @@ -1295,7 +1298,7 @@ static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, } } -int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p, const int dl_bwp_id, const int ul_bwp_id) +int nr_rrc_reconfiguration_req(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue_p) { uint8_t xid = rrc_gNB_get_next_transaction_identifier(rrc->module_id); ue_p->xids[xid] = RRC_DEDICATED_RECONF; @@ -1406,7 +1409,7 @@ static void rrc_handle_RRCSetupRequest(gNB_RRC_INST *rrc, UE->ongoing_reconfiguration = false; UE->measConfig = nr_rrc_get_measconfig(rrc, msg->nr_cellid); activate_srb(UE, 1); - rrc_gNB_generate_RRCSetup(0, msg->crnti, ue_context_p, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); + rrc_gNB_generate_RRCSetup(0, ue_context_p, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); } static const char *get_reestab_cause(NR_ReestablishmentCause_t c) @@ -1672,7 +1675,7 @@ fallback_rrc_setup: activate_srb(&new->ue_context, 1); added = rrc_update_ue_pcell(&new->ue_context, current_cell); DevAssert(added); - rrc_gNB_generate_RRCSetup(0, msg->crnti, new, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); + rrc_gNB_generate_RRCSetup(0, new, msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); return; } @@ -1792,7 +1795,7 @@ static void process_Event_Based_Measurement_Report(gNB_RRC_INST *rrc, // UE can send multiple neighbour cells A3 event report in 1 Meas Report. So, we need to find the best neighbour best_rsrp = neighbourCellRSRP; LOG_I(NR_RRC, "HO LOG: Serving Cell RSRP: %d - Best Neighbor RSRP: %d ! Trigger N2 HO\n", servingCellRSRP, best_rsrp); - nr_rrc_trigger_n2_ho(rrc, ue, scell_pci, neighbour); + nr_rrc_trigger_n2_ho(rrc, ue, neighbour); } LOG_D(NR_RRC, "HO LOG: Trigger N2 HO for the neighbour gnb: %u cell: %lu\n", neighbour->gNB_ID, neighbour->nrcell_id); } @@ -1869,9 +1872,7 @@ static void rrc_gNB_process_MeasurementReport(gNB_RRC_INST *rrc, gNB_RRC_UE_t *U static void handle_rrcReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, - const uint32_t gNB_DU_ue_id, - const NR_RRCReestablishmentComplete_t *cplt, - const sctp_assoc_t assoc_id) + const NR_RRCReestablishmentComplete_t *cplt) { NR_RRCReestablishmentComplete__criticalExtensions_PR p = cplt->criticalExtensions.present; if (p != NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) { @@ -1879,7 +1880,7 @@ static void handle_rrcReestablishmentComplete(gNB_RRC_INST *rrc, return; } - rrc_gNB_process_RRCReestablishmentComplete(rrc, UE, cplt->rrc_TransactionIdentifier, assoc_id); + rrc_gNB_process_RRCReestablishmentComplete(rrc, UE, cplt->rrc_TransactionIdentifier); UE->ue_reestablishment_counter++; } @@ -2123,7 +2124,7 @@ static void handle_rrcReconfigurationComplete(gNB_RRC_INST *rrc, gNB_RRC_UE_t *U free(UE->initial_pdus); UE->initial_pdus = NULL; } else if (seq_arr_size(&UE->pduSessions) > 0) - rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(rrc, UE, xid); + rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(rrc, UE); else LOG_W(NR_RRC, "UE %d: RRC Reconfiguration Complete for PDU session establishment, but no PDU sessions were setup\n", @@ -2188,7 +2189,7 @@ static void rrc_gNB_generate_UECapabilityEnquiry(gNB_RRC_INST *rrc, gNB_RRC_UE_t nr_rrc_transfer_protected_rrc_message(rrc, ue, DL_SCH_LCID_DCCH, msg_id, buffer, size); } -static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *msg, const sctp_assoc_t assoc_id) +static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *msg) { /* we look up by CU UE ID! Do NOT change back to RNTI! */ rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, msg->gNB_CU_ue_id); @@ -2294,7 +2295,7 @@ static int rrc_gNB_decode_dcch(gNB_RRC_INST *rrc, const f1ap_ul_rrc_message_t *m case NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete: LOG_UE_UL_EVENT(UE, "Received RRCReestablishmentComplete\n"); const NR_RRCReestablishmentComplete_t *rc = ul_dcch_msg->message.choice.c1->choice.rrcReestablishmentComplete; - handle_rrcReestablishmentComplete(rrc, UE, msg->gNB_DU_ue_id, rc, assoc_id); + handle_rrcReestablishmentComplete(rrc, UE, rc); break; default: @@ -2454,7 +2455,7 @@ static void e1_send_bearer_modification_request(gNB_RRC_INST *rrc, gNB_RRC_UE_t req->secInfo = malloc_or_fail(sizeof(*req->secInfo)); fill_security_info(rrc, UE, req->secInfo); - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); rrc->cucp_cuup.bearer_context_mod(assoc_id, req); } @@ -2608,7 +2609,7 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, instance } if (!IS_SA_MODE(get_softmodem_params())) { - rrc_add_nsa_user_resp(rrc, UE, resp); + rrc_add_nsa_user_resp(UE, resp); return; } @@ -2805,7 +2806,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, i DevAssert(source_ctx->old_rnti == UE->rnti); nr_rrc_apply_target_context(UE); /* Update cell association after handover */ - if (!nr_rrc_update_cell_assoc_after_ho(rrc, UE)) { + if (!nr_rrc_update_cell_assoc_after_ho(UE)) { return; } } @@ -2883,7 +2884,7 @@ static void rrc_CU_process_ue_modification_required(MessageDef *msg_p, instance_ /* trigger reconfiguration */ if (!UE->ongoing_reconfiguration) - nr_rrc_reconfiguration_req(rrc, UE, 0, 0); + nr_rrc_reconfiguration_req(rrc, UE); return; } LOG_W(RRC, @@ -3038,7 +3039,7 @@ static int fill_drb_to_be_setup_from_e1_resp(const gNB_RRC_INST *rrc, /** * @brief E1AP Bearer Context Setup Response processing on CU-CP */ -void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp, instance_t instance) +static void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp) { gNB_RRC_INST *rrc = RC.nrrrc[0]; rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, resp->gNB_cu_cp_ue_id); @@ -3317,10 +3318,12 @@ static bool write_rrc_stats(const gNB_RRC_INST *rrc) return true; } -void *rrc_gnb_task(void *args_p) { +void *rrc_gnb_task(void *args_p) +{ + UNUSED(args_p); MessageDef *msg_p; - instance_t instance; - int result; + instance_t instance; + int result; long stats_timer_id = 1; if (!IS_SOFTMODEM_NOSTATS) { @@ -3371,12 +3374,12 @@ void *rrc_gnb_task(void *args_p) { /* Messages from PDCP */ /* From DU -> CU */ case F1AP_UL_RRC_MESSAGE: - rrc_gNB_decode_dcch(RC.nrrrc[instance], &F1AP_UL_RRC_MESSAGE(msg_p), msg_p->ittiMsgHeader.originInstance); + rrc_gNB_decode_dcch(RC.nrrrc[instance], &F1AP_UL_RRC_MESSAGE(msg_p)); free_ul_rrc_message_transfer(&F1AP_UL_RRC_MESSAGE(msg_p)); break; case NGAP_DOWNLINK_NAS: - rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, instance, &rrc_gNB_mui); + rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, instance); break; case NGAP_PDUSESSION_SETUP_REQ: @@ -3482,7 +3485,7 @@ void *rrc_gnb_task(void *args_p) { break; case E1AP_BEARER_CONTEXT_SETUP_RESP: - rrc_gNB_process_e1_bearer_context_setup_resp(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p), instance); + rrc_gNB_process_e1_bearer_context_setup_resp(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p)); free_e1ap_context_setup_response(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p)); break; @@ -3505,7 +3508,7 @@ void *rrc_gnb_task(void *args_p) { break; case E1AP_LOST_CONNECTION: /* CUCP */ - rrc_gNB_process_e1_lost_connection(RC.nrrrc[0], &E1AP_LOST_CONNECTION(msg_p), msg_p->ittiMsgHeader.originInstance); + rrc_gNB_process_e1_lost_connection(RC.nrrrc[0], msg_p->ittiMsgHeader.originInstance); break; case NGAP_PAGING_IND: @@ -3513,7 +3516,7 @@ void *rrc_gnb_task(void *args_p) { break; case NGAP_HANDOVER_REQUEST: - rrc_gNB_process_Handover_Request(RC.nrrrc[instance], instance, &NGAP_HANDOVER_REQUEST(msg_p)); + rrc_gNB_process_Handover_Request(RC.nrrrc[instance], &NGAP_HANDOVER_REQUEST(msg_p)); rrc_gNB_free_Handover_Request(&NGAP_HANDOVER_REQUEST(msg_p)); // Free transfered NG message break; diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 035447be55..02b042a2c2 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -472,9 +472,7 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ LOG_W(NR_RRC, "[gNB %ld] In NGAP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from NGAP ids (%u)\n", instance, req->gNB_ue_ngap_id); ngap_cause_t cause = { .type = NGAP_CAUSE_RADIO_NETWORK, .value = NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_LOCAL_UE_NGAP_ID}; - rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(req->gNB_ue_ngap_id, - NULL, - cause); + rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(req->gNB_ue_ngap_id, cause); return (-1); } gNB_RRC_UE_t *UE = &ue_context_p->ue_context; @@ -624,9 +622,7 @@ void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_ itti_send_msg_to_task (TASK_NGAP, rrc->module_id, msg_p); } -void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_cause_t causeP) +void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, const ngap_cause_t causeP) { MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_INITIAL_CONTEXT_SETUP_FAIL); ngap_initial_context_setup_fail_t *fail = &NGAP_INITIAL_CONTEXT_SETUP_FAIL(msg_p); @@ -727,7 +723,7 @@ static void set_UE_security_algos(const gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, con } //------------------------------------------------------------------------------ -int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui) +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance) //------------------------------------------------------------------------------ { ngap_downlink_nas_t *req = &NGAP_DOWNLINK_NAS(msg_p); @@ -785,7 +781,7 @@ void rrc_gNB_send_NGAP_UPLINK_NAS(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const NR_ itti_send_msg_to_task(TASK_NGAP, rrc->module_id, msg_p); } -void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t xid) +void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) { MessageDef *msg_p; int pdu_sessions_done = 0; @@ -1127,7 +1123,7 @@ void rrc_gNB_send_NGAP_HANDOVER_FAILURE(gNB_RRC_INST *rrc, ngap_handover_failure } /** @brief Process NG Handover Request message (8.4.2.2 3GPP TS 38.413) */ -int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, instance_t instance, ngap_handover_request_t *msg) +int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, ngap_handover_request_t *msg) { // Check if UE context already exists for this AMF UE NGAP ID rrc_gNB_ue_context_t *existing_ue_context = rrc_gNB_get_ue_context_by_amf_ue_ngap_id(rrc, msg->amf_ue_ngap_id); @@ -1380,8 +1376,8 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_ /* a UE might not be associated to a CU-UP if it never requested a PDU * session (intentionally, or because of erros) */ - if (ue_associated_to_cuup(rrc, UE)) { - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + if (ue_associated_to_cuup(UE)) { + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); e1ap_cause_t cause = {.type = E1AP_CAUSE_RADIO_NETWORK, .value = E1AP_RADIO_CAUSE_NORMAL_RELEASE}; e1ap_bearer_release_cmd_t cmd = { .gNB_cu_cp_ue_id = UE->rrc_ue_id, @@ -1619,7 +1615,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(ngap_pdusession_release_comm if (req.numPDUSessionsRem == 0) { LOG_E(NR_RRC, "Received NG PDU Session Release Command but no PDU Sessions to release\n"); return -1; - } else if (!ue_associated_to_cuup(rrc, UE)) { + } else if (!ue_associated_to_cuup(UE)) { LOG_E(NR_RRC, "UE %d is not associated to CU-UP\n", UE->rrc_ue_id); // TODO handle, e.g., only trigger F1 release return 0; @@ -1631,7 +1627,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(ngap_pdusession_release_comm LOG_I(NR_RRC, "Send F1 Bearer Context Modification Request with PDU Session release \n"); req.gNB_cu_cp_ue_id = UE->rrc_ue_id; req.gNB_cu_up_ue_id = UE->rrc_ue_id; - sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + sctp_assoc_t assoc_id = get_existing_cuup_for_ue(UE); rrc->cucp_cuup.bearer_context_mod(assoc_id, &req); } init_delayed_action(&UE->delayed_action); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.h b/openair2/RRC/NR/rrc_gNB_NGAP.h index ab5e637b2d..035e0a2036 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.h +++ b/openair2/RRC/NR/rrc_gNB_NGAP.h @@ -26,15 +26,13 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); -void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_cause_t causeP); +void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_FAIL(uint32_t gnb, const ngap_cause_t causeP); -int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui); +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance); void rrc_gNB_send_NGAP_UPLINK_NAS(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const NR_UL_DCCH_Message_t *const ul_dcch_msg); -void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t xid); +void rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t instance); @@ -71,7 +69,7 @@ void rrc_gNB_send_NGAP_HANDOVER_REQUIRED(gNB_RRC_INST *rrc, void rrc_gNB_send_NGAP_HANDOVER_FAILURE(gNB_RRC_INST *rrc, ngap_handover_failure_t *msg); -int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, instance_t instance, ngap_handover_request_t *msg); +int rrc_gNB_process_Handover_Request(gNB_RRC_INST *rrc, ngap_handover_request_t *msg); void rrc_gNB_free_Handover_Request(ngap_handover_request_t *msg); void rrc_gNB_send_NGAP_HANDOVER_REQUEST_ACKNOWLEDGE(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, byte_array_t ho_command); diff --git a/openair2/RRC/NR/rrc_gNB_cuup.c b/openair2/RRC/NR/rrc_gNB_cuup.c index bfb78dc0d3..1757cf477a 100644 --- a/openair2/RRC/NR/rrc_gNB_cuup.c +++ b/openair2/RRC/NR/rrc_gNB_cuup.c @@ -90,13 +90,13 @@ bool is_cuup_associated(gNB_RRC_INST *rrc) return false; } -bool ue_associated_to_cuup(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue) +bool ue_associated_to_cuup(const gNB_RRC_UE_t *ue) { f1_ue_data_t ue_data = cu_get_f1_ue_data(ue->rrc_ue_id); return ue_data.e1_assoc_id != 0; } -sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_INST *rrc, const gNB_RRC_UE_t *ue) +sctp_assoc_t get_existing_cuup_for_ue(const gNB_RRC_UE_t *ue) { f1_ue_data_t ue_data = cu_get_f1_ue_data(ue->rrc_ue_id); AssertFatal(ue_data.e1_assoc_id != 0, "UE %d should be associated to CU-UP, but is not\n", ue->rrc_ue_id); @@ -178,7 +178,7 @@ static bool has_assoc_id(const void *vval, const void *vit) * that are in the process of connecting or that are on another DU might be * affected by that reset procedure as well; we suppose they will connect later * again. */ -static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc, sctp_assoc_t e1_assoc_id) +static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc) { seq_arr_t affected_du; seq_arr_init(&affected_du, sizeof(sctp_assoc_t)); @@ -189,7 +189,7 @@ static void remove_unassociated_e1_connections(gNB_RRC_INST *rrc, sctp_assoc_t e RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc->rrc_ue_head) { gNB_RRC_UE_t *UE = &ue_context_p->ue_context; uint32_t ue_id = UE->rrc_ue_id; - if (ue_associated_to_cuup(rrc, UE)) + if (ue_associated_to_cuup(UE)) continue; f1_ue_data_t ue_data = cu_get_f1_ue_data(ue_id); elm_arr_t ret = find_if(&affected_du, &ue_data.du_assoc_id, has_assoc_id); @@ -268,7 +268,7 @@ int rrc_gNB_process_e1_setup_req(sctp_assoc_t assoc_id, const e1ap_setup_req_t * RB_INSERT(rrc_cuup_tree, &rrc->cuups, cuup); rrc->num_cuups++; - remove_unassociated_e1_connections(rrc, assoc_id); + remove_unassociated_e1_connections(rrc); MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_GNB, 0, E1AP_SETUP_RESP); msg_p->ittiMsgHeader.originInstance = assoc_id; @@ -300,7 +300,7 @@ static void invalidate_cuup_connections(gNB_RRC_INST *rrc, sctp_assoc_t e1_assoc /** * @brief RRC Processing of the indication of E1 connection loss on CU-CP */ -void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, e1ap_lost_connection_t *lc, sctp_assoc_t assoc_id) +void rrc_gNB_process_e1_lost_connection(gNB_RRC_INST *rrc, sctp_assoc_t assoc_id) { LOG_I(NR_RRC, "Received E1 connection loss indication on RRC\n"); AssertFatal(assoc_id != 0, "illegal assoc_id == 0: should be -1 (monolithic) or >0 (split)\n"); diff --git a/openair2/RRC/NR/rrc_gNB_mobility.c b/openair2/RRC/NR/rrc_gNB_mobility.c index f2296f0fdc..e36e6ee684 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.c +++ b/openair2/RRC/NR/rrc_gNB_mobility.c @@ -154,6 +154,9 @@ typedef struct { static void rrc_deliver_ue_ctxt_modif_req(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, char *buf, int size, int sdu_id) { + UNUSED(ue_id); + UNUSED(srb_id); + UNUSED(sdu_id); DevAssert(deliver_pdu_data != NULL); deliver_ue_ctxt_modification_data_t *data = deliver_pdu_data; byte_array_t ba = {.buf = (uint8_t *) buf, .len = size}; @@ -199,7 +202,7 @@ static void nr_rrc_f1_ho_acknowledge(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) * in NR, do not re-establish PDCP */ nr_rrc_reconfig_param_t params = get_RRCReconfiguration_params(rrc, UE, (1 << SRB2), true); UE->xids[params.transaction_id] = RRC_DEDICATED_RECONF; - byte_array_t buffer = rrc_gNB_encode_RRCReconfiguration(rrc, UE, params); + byte_array_t buffer = rrc_gNB_encode_RRCReconfiguration(UE, params); free_RRCReconfiguration_params(params); if (!buffer.len) { LOG_E(NR_RRC, "UE %d: Failed to generate RRCReconfiguration\n", UE->rrc_ue_id); @@ -345,12 +348,12 @@ void nr_HO_F1_trigger_telnet(gNB_RRC_INST *rrc, uint32_t rrc_ue_id) /** @brief Generate the HandoverPreparationInformation to be carried * in the RRC Container (9.3.1.29 of 3GPP TS 38.413) of the Source * NG-RAN Node to Target NG-RAN Node Transparent Container IE */ -static byte_array_t rrc_gNB_generate_HandoverPreparationInformation(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, int serving_pci) +static byte_array_t rrc_gNB_generate_HandoverPreparationInformation(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue) { nr_rrc_reconfig_param_t params = get_RRCReconfiguration_params(rrc, ue, 0, false); params.ue_cap = ue->ue_cap_buffer; - byte_array_t hoPrepInfo = get_HandoverPreparationInformation(¶ms, serving_pci); + byte_array_t hoPrepInfo = get_HandoverPreparationInformation(¶ms); free_RRCReconfiguration_params(params); if (hoPrepInfo.len < 0) { @@ -415,7 +418,7 @@ static byte_array_t rrc_gNB_encode_HandoverCommand(gNB_RRC_UE_t *UE, gNB_RRC_INS * - Source absent (inter-CU): N2 or Xn handover (target CU created new UE * on Handover Request). This UE context has no serving cells yet; add * target cell as first PCell. */ -bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) +bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_UE_t *UE) { DevAssert(UE->ho_context); DevAssert(UE->ho_context->target); @@ -471,7 +474,7 @@ static void nr_rrc_n2_ho_acknowledge(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE) /* Update cell association after handover */ nr_ho_target_cu_t *target = UE->ho_context->target; - if (!nr_rrc_update_cell_assoc_after_ho(rrc, UE)) { + if (!nr_rrc_update_cell_assoc_after_ho(UE)) { ngap_handover_failure_t fail = {.amf_ue_ngap_id = UE->amf_ue_ngap_id, .cause.type = NGAP_CAUSE_RADIO_NETWORK, .cause.value = NGAP_CAUSE_RADIO_NETWORK_HO_FAILURE_IN_TARGET_5GC_NGRAN_NODE_OR_TARGET_SYSTEM}; @@ -547,12 +550,9 @@ void nr_rrc_trigger_n2_ho_target(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue) /** @brief Trigger N2 handover on source gNB: * 1) Prepare RRC Container with HandoverPreparationInformation message * 2) send NGAP Handover Required message */ -void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue, - int serving_pci, - const nr_neighbour_cell_t *neighbour_config) +void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, const nr_neighbour_cell_t *neighbour_config) { - byte_array_t hoPrepInfo = rrc_gNB_generate_HandoverPreparationInformation(rrc, ue, serving_pci); + byte_array_t hoPrepInfo = rrc_gNB_generate_HandoverPreparationInformation(rrc, ue); if (hoPrepInfo.len < 0) { free_byte_array(hoPrepInfo); LOG_E(NR_RRC, "Failed to trigger N2 handover on source gNB for UE %x\n", ue->rrc_ue_id); @@ -614,7 +614,7 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t .plmn = pcell->info.plmn, .subcarrierSpacing = pcell->info.mode == NR_MODE_TDD ? pcell->info.tdd.dlul.scs : pcell->info.fdd.dl.scs, }; - nr_rrc_trigger_n2_ho(rrc, UE, neighbour_pci, &neighbourConfig); + nr_rrc_trigger_n2_ho(rrc, UE, &neighbourConfig); return; } @@ -635,7 +635,7 @@ void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, uint32_t return; } - nr_rrc_trigger_n2_ho(rrc, UE, pcell->info.pci, neighbour); + nr_rrc_trigger_n2_ho(rrc, UE, neighbour); } // This function detects if there are at least two different ssbFrequency values, and if so, returns meas_timing_config; diff --git a/openair2/RRC/NR/rrc_gNB_mobility.h b/openair2/RRC/NR/rrc_gNB_mobility.h index de4eabae64..eada8a6900 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.h +++ b/openair2/RRC/NR/rrc_gNB_mobility.h @@ -85,10 +85,7 @@ void nr_rrc_trigger_f1_ho(gNB_RRC_INST *rrc, void nr_rrc_finalize_ho(gNB_RRC_UE_t *ue); void nr_rrc_n2_ho_failure(gNB_RRC_INST *rrc, uint32_t gnb_ue_id, ngap_handover_failure_t *msg); -void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, - gNB_RRC_UE_t *ue, - int serving_pci, - const nr_neighbour_cell_t *neighbour_config); +void nr_rrc_trigger_n2_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, const nr_neighbour_cell_t *neighbour_config); void rrc_gNB_trigger_reconfiguration_for_handover(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, uint8_t *rrc_reconf, int rrc_reconf_len); @@ -98,6 +95,6 @@ byte_array_t *get_meas_timing_config(const NR_MeasurementTimingConfiguration_t * void nr_rrc_apply_target_context(gNB_RRC_UE_t *UE); -bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE); +bool nr_rrc_update_cell_assoc_after_ho(gNB_RRC_UE_t *UE); #endif /* RRC_GNB_MOBILITY_H_ */ diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 908956c0e9..44fd779605 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -435,7 +435,7 @@ static NR_CG_Config_t *generate_CG_Config(const NR_RRCReconfiguration_t *reconfi return cg_Config; } -void rrc_add_nsa_user_resp(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp) +void rrc_add_nsa_user_resp(gNB_RRC_UE_t *UE, const f1ap_ue_context_setup_resp_t *resp) { DevAssert(resp->crnti != NULL); /* we did not fill any DU-related ID info in rrc_add_nsa_user() */ diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.c b/openair2/RRC/NR/rrc_gNB_radio_bearers.c index de634d27a1..d10f50345e 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.c +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.c @@ -63,7 +63,11 @@ nr_rrc_qos_t *add_qos(seq_arr_t *qos, const pdusession_level_qos_parameter_t *in } /** @brief Free QoS flows list items */ -static void free_qos(void *ptr) { /*nothing to do*/ } +static void free_qos(void *ptr) +{ + /*nothing to do*/ + UNUSED(ptr); +} /** @brief Free QoS flows list */ static void free_rrc_qos_list(seq_arr_t *seq) @@ -233,6 +237,7 @@ drb_t *get_drb(seq_arr_t *seq, int id) void free_drb(void *ptr) { // do nothing + UNUSED(ptr); } rrc_pdu_session_param_t *find_pduSession_from_drbId(gNB_RRC_UE_t *ue, int drb_id) diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index 9d921d2131..b0b3b501cd 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -33,12 +33,10 @@ void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const } void nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, const uint8_t gNB_index, const int hfn, const frame_t frame, const int slot, - const rnti_t rnti, const uint32_t cellid, const long arfcn, const channel_t channel, diff --git a/openair2/RRC/NR_UE/L2_interface_ue.h b/openair2/RRC/NR_UE/L2_interface_ue.h index eaac8290c9..09c7b7daae 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.h +++ b/openair2/RRC/NR_UE/L2_interface_ue.h @@ -10,12 +10,10 @@ typedef uint32_t channel_t; #define _L2_INTERFACE_UE_H_ void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync); void nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, const uint8_t gNB_index, const int hfn, const frame_t frame, const int slot, - const rnti_t rnti, const uint32_t cellid, const long arfcn, const channel_t channel, diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 0a4b1a7fb5..37bca1d45a 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2014,8 +2014,6 @@ static void nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc, const uint8_t gNB_index, uint8_t *const Sdu, const uint8_t Sdu_len, - const uint8_t rsrq, - const uint8_t rsrp, int hfn, int frame, int slot) @@ -3067,6 +3065,7 @@ static void nr_rrc_handle_meas_indication(NR_UE_RRC_INST_t *rrc, NRRrcMacMeasDat void *rrc_nrue_task(void *args_p) { + UNUSED(args_p); itti_mark_task_ready(TASK_RRC_NRUE); while (1) { rrc_nrue(NULL); @@ -3075,6 +3074,7 @@ void *rrc_nrue_task(void *args_p) void *rrc_nrue(void *notUsed) { + UNUSED(notUsed); MessageDef *msg_p = NULL; itti_receive_msg(TASK_RRC_NRUE, &msg_p); instance_t instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p); @@ -3152,24 +3152,15 @@ void *rrc_nrue(void *notUsed) if (bcch->is_bch) nr_rrc_ue_decode_NR_BCCH_BCH_Message(rrc, bcch->gnb_index, bcch->phycellid, bcch->ssb_arfcn, bcch->sdu, bcch->sdu_size); else - nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(rrc, - bcch->gnb_index, - bcch->sdu, - bcch->sdu_size, - bcch->rsrq, - bcch->rsrp, - bcch->hfn, - bcch->frame, - bcch->slot); + nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(rrc, bcch->gnb_index, bcch->sdu, bcch->sdu_size, bcch->hfn, bcch->frame, bcch->slot); break; case NR_RRC_MAC_SBCCH_DATA_IND: LOG_D(NR_RRC, "[UE %ld] Received %s: gNB %d\n", instance, ITTI_MSG_NAME(msg_p), NR_RRC_MAC_SBCCH_DATA_IND(msg_p).gnb_index); NRRrcMacSBcchDataInd *sbcch = &NR_RRC_MAC_SBCCH_DATA_IND(msg_p); - - nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(rrc, sbcch->gnb_index,sbcch->frame, sbcch->slot, sbcch->sdu, - sbcch->sdu_size, sbcch->rx_slss_id); + nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(rrc, sbcch->sdu, sbcch->sdu_size, sbcch->rx_slss_id); break; + case NR_RRC_MAC_MEAS_DATA_IND: nr_rrc_handle_meas_indication(rrc, &NR_RRC_MAC_MEAS_DATA_IND(msg_p)); break; diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index 02005d0986..5efd15306a 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -67,9 +67,6 @@ void start_sidelink(int instance); void rrc_ue_process_sidelink_Preconfiguration(NR_UE_RRC_INST_t *rrc_inst, int sync_ref); void nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(NR_UE_RRC_INST_t *rrc, - const uint8_t gNB_index, - const frame_t frame, - const int slot, uint8_t* pduP, const sdu_size_t pdu_len, const uint16_t rx_slss_id); diff --git a/openair2/RRC/NR_UE/rrc_sl_preconfig.c b/openair2/RRC/NR_UE/rrc_sl_preconfig.c index 8bd5c37104..84f73df4a3 100644 --- a/openair2/RRC/NR_UE/rrc_sl_preconfig.c +++ b/openair2/RRC/NR_UE/rrc_sl_preconfig.c @@ -421,9 +421,7 @@ int configure_NR_SL_Preconfig(NR_UE_RRC_INST_t *rrc,int sync_source) } /*decode SL-BCH (SL-MIB) message*/ -static int8_t nr_sl_rrc_ue_decode_SL_MIB(const uint8_t gNB_index, - uint8_t *const bufferP, - const uint8_t buffer_len) +static int8_t nr_sl_rrc_ue_decode_SL_MIB(uint8_t *const bufferP, const uint8_t buffer_len) { NR_MasterInformationBlockSidelink_t *sl_mib = NULL; @@ -456,15 +454,12 @@ static int8_t nr_sl_rrc_ue_decode_SL_MIB(const uint8_t gNB_index, void nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(NR_UE_RRC_INST_t *rrc, - const uint8_t gNB_index, - const frame_t frame, - const int slot, uint8_t* pduP, const sdu_size_t pdu_len, const uint16_t rx_slss_id) { - nr_sl_rrc_ue_decode_SL_MIB(gNB_index, (uint8_t*)pduP, pdu_len); + nr_sl_rrc_ue_decode_SL_MIB((uint8_t*)pduP, pdu_len); DevAssert(rrc->sl_preconfig); diff --git a/openair2/SDAP/nr_sdap/nr_sdap.c b/openair2/SDAP/nr_sdap/nr_sdap.c index e477764c45..c78fdca973 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap.c +++ b/openair2/SDAP/nr_sdap/nr_sdap.c @@ -63,18 +63,13 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p, return ret; } -void sdap_data_ind(int pdcp_entity, - int is_gnb, - bool has_sdap_rx, - int pdusession_id, - ue_id_t ue_id, - char *buf, - int size) { +void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size) +{ nr_sdap_entity_t *sdap_entity; sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id); if (sdap_entity == NULL) { - LOG_E(SDAP, "%s:%d:%s: Entity not found for ue rnti/ue_id: %lx and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ue_id, pdusession_id); + LOG_E(SDAP, "Entity not found for ue rnti/ue_id: %lx and pdusession id: %d\n", ue_id, pdusession_id); return; } diff --git a/openair2/SDAP/nr_sdap/nr_sdap.h b/openair2/SDAP/nr_sdap/nr_sdap.h index f66c954f2c..4275e1757a 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap.h +++ b/openair2/SDAP/nr_sdap/nr_sdap.h @@ -35,13 +35,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p, * Uplink - gNB * Downlink - nrUE */ -void sdap_data_ind(int pdcp_entity, - int is_gnb, - bool has_sdap_rx, - int pdusession_id, - ue_id_t ue_id, - char *buf, - int size); +void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size); void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id); void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id, bool is_default); diff --git a/openair2/UTIL/OPT/probe.c b/openair2/UTIL/OPT/probe.c index 45743bb9be..5c6b6aadc2 100644 --- a/openair2/UTIL/OPT/probe.c +++ b/openair2/UTIL/OPT/probe.c @@ -189,7 +189,9 @@ static int PCAP_WritePDU(const uint8_t *PDU, return length; } -static void *opt_listener_thread(void *arg) { +static void *opt_listener_thread(void *arg) +{ + UNUSED(arg); ssize_t ret; struct sockaddr_in from_address; socklen_t socklen = sizeof(from_address); diff --git a/openair2/XNAP/lib/xnap_gNB_interface_management.c b/openair2/XNAP/lib/xnap_gNB_interface_management.c index 6fb0985487..bcf2b5ee09 100644 --- a/openair2/XNAP/lib/xnap_gNB_interface_management.c +++ b/openair2/XNAP/lib/xnap_gNB_interface_management.c @@ -451,4 +451,5 @@ bool eq_xnap_setup_failure(const xnap_setup_failure_t *a, const xnap_setup_failu void free_xnap_setup_failure(xnap_setup_failure_t *msg) { // nothing to free + UNUSED(msg); } diff --git a/openair3/CMakeLists.txt b/openair3/CMakeLists.txt index c3b3756362..e31761006e 100644 --- a/openair3/CMakeLists.txt +++ b/openair3/CMakeLists.txt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LicenseRef-CSSL-1.0 +add_compile_options(-Wunused-parameter) add_subdirectory(LPP) add_subdirectory(ocp-gtpu) add_subdirectory(M3AP) diff --git a/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c index e2ebd90feb..6fd5722030 100644 --- a/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c +++ b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c @@ -32,7 +32,7 @@ int decode_authentication_response_parameter(AuthenticationResponseParameter *au decoded += decode_result; #if defined (NAS_DEBUG) - dump_authentication_response_parameter_xml(authenticationresponseparameter, iei); + dump_authentication_response_parameter_xml(authenticationresponseparameter); #endif return decoded; } @@ -47,7 +47,7 @@ int encode_authentication_response_parameter(const AuthenticationResponseParamet /* Checking IEI and pointer */ CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_RESPONSE_PARAMETER_MINIMUM_LENGTH, len); #if defined (NAS_DEBUG) - dump_authentication_response_parameter_xml(authenticationresponseparameter, iei); + dump_authentication_response_parameter_xml(authenticationresponseparameter); #endif if (iei > 0) { @@ -67,7 +67,7 @@ int encode_authentication_response_parameter(const AuthenticationResponseParamet return encoded; } -void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei) +void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter) { printf("\n"); dump_octet_string_xml(&authenticationresponseparameter->res); diff --git a/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h index 3ac57d7719..45339c3f10 100644 --- a/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h +++ b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h @@ -25,7 +25,7 @@ int encode_authentication_response_parameter(const AuthenticationResponseParamet int decode_authentication_response_parameter(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei, uint8_t *buffer, uint32_t len); -void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei); +void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter); #endif /* AUTHENTICATION RESPONSE PARAMETER_H_ */ diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.c b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.c index c147080993..6065a7a5da 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.c +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.c @@ -17,7 +17,7 @@ #define NO_FOLLOW_ON_REQUEST 0x0 #define FOLLOW_ON_REQUEST 0x08 -int decode_5gs_registration_type(FGSRegistrationType *fgsregistrationtype, uint8_t iei, uint8_t value, uint32_t len) +int decode_5gs_registration_type(FGSRegistrationType *fgsregistrationtype, uint8_t iei, uint8_t value) { int decoded = 0; uint8_t *buffer = &value; diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.h b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.h index 6f8b3462b2..b11320356e 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.h +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSRegistrationType.h @@ -28,6 +28,6 @@ typedef uint8_t FGSRegistrationType; int encode_5gs_registration_type(const FGSRegistrationType *fgsregistrationtype, bool follow_on_request); -int decode_5gs_registration_type(FGSRegistrationType *fgsregistrationtype, uint8_t iei, uint8_t value, uint32_t len); +int decode_5gs_registration_type(FGSRegistrationType *fgsregistrationtype, uint8_t iei, uint8_t value); #endif /* FGS_REGISTRATION_TYPE_H_*/ diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.c b/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.c index 7b3471dac6..4c155551d8 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.c +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.c @@ -10,10 +10,7 @@ #include "TLVDecoder.h" #include "NrUESecurityCapability.h" -int encode_nrue_security_capability(const NrUESecurityCapability *nruesecuritycapability, - uint8_t iei, - uint8_t *buffer, - uint32_t len) +int encode_nrue_security_capability(const NrUESecurityCapability *nruesecuritycapability, uint8_t iei, uint8_t *buffer) { int encoded = 0; if (iei) { diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.h b/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.h index 6d3e787452..e9da0b2751 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.h +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/NrUESecurityCapability.h @@ -20,9 +20,6 @@ typedef struct { uint8_t EIA; } NrUESecurityCapability; -int encode_nrue_security_capability(const NrUESecurityCapability *nruesecuritycapability, - uint8_t iei, - uint8_t *buffer, - uint32_t len); +int encode_nrue_security_capability(const NrUESecurityCapability *nruesecuritycapability, uint8_t iei, uint8_t *buffer); #endif /* NRUE_SECURITY_CAPABILITY_H_ */ diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationRequest.c b/openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationRequest.c index f7321cd684..6b99b75cd2 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationRequest.c +++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationRequest.c @@ -23,7 +23,7 @@ int decode_registration_request(registration_request_msg *registration_request, /* Decoding mandatory fields */ if ((decoded_result = - decode_5gs_registration_type(®istration_request->fgsregistrationtype, 0, *(buffer + decoded) & 0x0f, len - decoded)) + decode_5gs_registration_type(®istration_request->fgsregistrationtype, 0, *(buffer + decoded) & 0x0f)) < 0) { LOG_FUNC_RETURN(decoded_result); } @@ -76,8 +76,7 @@ int encode_registration_request(const registration_request_msg *registration_req == REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_PRESENT) { if ((encode_result = encode_nrue_security_capability(®istration_request->nruesecuritycapability, REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_IEI, - buffer + encoded, - len - encoded)) + buffer + encoded)) < 0) // Return in case of error return encode_result; diff --git a/openair3/NAS/NR_UE/nr_nas_msg.c b/openair3/NAS/NR_UE/nr_nas_msg.c index c6d227294d..75145a48c2 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg.c +++ b/openair3/NAS/NR_UE/nr_nas_msg.c @@ -235,11 +235,10 @@ static void nas_security_compute_mac(nr_ue_nas_t *nas, * @brief: Decrypt the payload of a NAS message. The buffer is modified in place * @param[in] nas The NAS context * @param[in] pdu_buffer The buffer containing the full (header + payload) NAS message - * @param[in] is_uplink True if the message is uplink, false Downlink * @param[in] is3gpp_access True if the message is 3GPP access, false otherwise * @param[in] pdu_length The length of the NAS message */ -static void nas_security_decrypt_payload(nr_ue_nas_t *nas, byte_array_t buffer, const bool is_uplink, const bool is3gpp_access) +static void nas_security_decrypt_payload(nr_ue_nas_t *nas, byte_array_t buffer, const bool is3gpp_access) { Security_header_t sec_hdr; @@ -393,7 +392,7 @@ static security_state_t nas_security_rx_process(nr_ue_nas_t *nas, byte_array_t b return NAS_SECURITY_INTEGRITY_FAILED; /* decipher */ - nas_security_decrypt_payload(nas, buffer, false, true); + nas_security_decrypt_payload(nas, buffer, true); /* update estimated DL Counter */ nas->security.nas_count_dl++; @@ -802,7 +801,7 @@ static FGSRegistrationType set_fgs_ksi(nr_ue_nas_t *nas) * @brief Set contents of 5GMM capability * @note Currently hardcoded, sending min length only (1 octet) */ -static FGMMCapability set_fgmm_capability(nr_ue_nas_t *nas) +static FGMMCapability set_fgmm_capability() { FGMMCapability cap = {0}; cap.iei = REGISTRATION_REQUEST_5GMM_CAPABILITY_IEI; @@ -927,7 +926,7 @@ void generateRegistrationRequest(as_nas_info_t *initialNasMsg, nr_ue_nas_t *nas, if (full_rr->fgsregistrationtype != PERIODIC_REGISTRATION_UPDATING) { cleartext_only = false; // The UE needs to send non-cleartext IE full_rr->presencemask |= REGISTRATION_REQUEST_5GMM_CAPABILITY_PRESENT; - full_rr->fgmmcapability = set_fgmm_capability(nas); + full_rr->fgmmcapability = set_fgmm_capability(); FGMMCapability *cap = &full_rr->fgmmcapability; size_nct += sizeof(cap->length) + sizeof(cap->iei) + cap->length; } @@ -1155,7 +1154,7 @@ static void generateAuthenticationResp(nr_ue_nas_t *nas, as_nas_info_t *initialN /** @brief Send Authentication Failure message from the UE to the AMF to * indicate that authentication of the network has failed */ -static void generateAuthenticationFailure(nr_ue_nas_t *nas, as_nas_info_t *initialNasMsg, cause_id_t cause) +static void generateAuthenticationFailure(as_nas_info_t *initialNasMsg, cause_id_t cause) { int size = sizeof(fgmm_msg_header_t); fgmm_nas_message_plain_t plain = {0}; @@ -1199,7 +1198,7 @@ static void handle_fgmm_authentication_request(nr_ue_nas_t *nas, as_nas_info_t * /* If the ngKSI value received is already associated with one of the 5G security contexts stored in the UE, send failure message */ LOG_E(NAS, "Invalid NAS Key Set Identifier: send Authentication Failure\n"); - generateAuthenticationFailure(nas, initialNasMsg, ngKSI_already_in_use); + generateAuthenticationFailure(initialNasMsg, ngKSI_already_in_use); return; } generateAuthenticationResp(nas, initialNasMsg, buffer->buf); @@ -1211,7 +1210,7 @@ static void handle_fgmm_authentication_request(nr_ue_nas_t *nas, as_nas_info_t * * @todo The UE shall performs actions as per 5.4.1.3.5 of 3GPP TS 24.501, including * (1) Abort any ongoing 5GMM procedure (2) Stop all active timers: T3510, T3516, T3517, * T3519, T3520, T3521 (3) Delete stored SUCI. (4) handle EAP-failure message. */ -static void handle_authentication_reject(nr_ue_nas_t *nas, as_nas_info_t *initialNasMsg, uint8_t *pdu, int pdu_length) +static void handle_authentication_reject(nr_ue_nas_t *nas, uint8_t *pdu, int pdu_length) { LOG_E(NAS, "Received Authentication Reject message from the network\n"); uint8_t eap_msg[MAX_EAP_CONTENTS_LEN] = {0}; @@ -1707,7 +1706,7 @@ void handleDownlinkNASTransport(const nr_ue_nas_t *nas, uint8_t * pdu_buffer, in } } -static void generateDeregistrationRequest(nr_ue_nas_t *nas, as_nas_info_t *initialNasMsg, const nas_deregistration_req_t *req) +static void generateDeregistrationRequest(nr_ue_nas_t *nas, as_nas_info_t *initialNasMsg) { fgmm_nas_msg_security_protected_t sp_msg = {0}; fgs_nas_message_security_header_t *sp_header = &sp_msg.header; @@ -1935,6 +1934,7 @@ static int get_user_nssai_idx(nssai_t ch_nssai, const nr_nas_msg_snssai_t allowe void *nas_nrue_task(void *args_p) { + UNUSED(args_p); while (1) { nas_nrue(NULL); } @@ -2075,6 +2075,7 @@ static void handle_service_reject(nr_ue_nas_t *nas, const byte_array_t *buffer) void *nas_nrue(void *args_p) { + UNUSED(args_p); // Wait for a message or an event MessageDef *msg_p; itti_receive_msg(TASK_NAS_NRUE, &msg_p); @@ -2205,7 +2206,7 @@ void *nas_nrue(void *args_p) send_nas_detach_req(nas, true); } as_nas_info_t initialNasMsg = {0}; - generateDeregistrationRequest(nas, &initialNasMsg, req); + generateDeregistrationRequest(nas, &initialNasMsg); send_nas_uplink_data_req(nas, &initialNasMsg); } else { LOG_W(NAS, "No GUTI, cannot trigger deregistration request.\n"); @@ -2241,7 +2242,7 @@ void *nas_nrue(void *args_p) handle_fgmm_authentication_request(nas, &initialNasMsg, &buffer); break; case FGS_AUTHENTICATION_REJECT: - handle_authentication_reject(nas, &initialNasMsg, pdu_buffer, pdu_length); + handle_authentication_reject(nas, pdu_buffer, pdu_length); break; case FGS_SECURITY_MODE_COMMAND: handle_security_mode_command(nas, &initialNasMsg, pdu_buffer, pdu_length); diff --git a/openair3/NAS/UE/API/USIM/usim_api.c b/openair3/NAS/UE/API/USIM/usim_api.c index 6151eef11f..9e801781aa 100644 --- a/openair3/NAS/UE/API/USIM/usim_api.c +++ b/openair3/NAS/UE/API/USIM/usim_api.c @@ -455,6 +455,8 @@ int usim_api_authenticate(usim_data_t *usim_data, const OctetString* rand_pP, co static int _usim_api_check_sqn(uint32_t seq, uint8_t ind) { /* TODO */ + UNUSED(seq); + UNUSED(ind); return (RETURNok); } diff --git a/openair3/NRPPA/nrppa_gNB.c b/openair3/NRPPA/nrppa_gNB.c index b315eacb37..4c11686b16 100644 --- a/openair3/NRPPA/nrppa_gNB.c +++ b/openair3/NRPPA/nrppa_gNB.c @@ -24,6 +24,7 @@ void nrppa_gNB_init(void) void *nrppa_gNB_process_itti_msg(void *notUsed) { + UNUSED(notUsed); MessageDef *received_msg = NULL; int result; itti_receive_msg(TASK_NRPPA, &received_msg); @@ -65,6 +66,7 @@ void *nrppa_gNB_process_itti_msg(void *notUsed) void *nrppa_gNB_task(void *arg) { + UNUSED(arg); nrppa_gNB_init(); while (1) { diff --git a/openair3/UICC/pdu_session.c b/openair3/UICC/pdu_session.c index 879eabebdf..7cc22ae054 100644 --- a/openair3/UICC/pdu_session.c +++ b/openair3/UICC/pdu_session.c @@ -42,6 +42,7 @@ static int config_check_dnn(configmodule_interface_t *cfg, paramdef_t *param) { + UNUSED(cfg); const char *dnn = *param->strptr; int dnn_len = strlen(dnn); if (dnn_len > 102) { diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 69ed55c0ae..78f48feac9 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -908,6 +908,9 @@ int gtpv1u_create_x2u_tunnel(const instance_t instanceP, const gtpv1u_enb_create_x2u_tunnel_req_t *const create_tunnel_req_pP, gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP) { + UNUSED(instanceP); + UNUSED(create_tunnel_req_pP); + UNUSED(create_tunnel_resp_pP); AssertFatal(false, "to be developped\n"); } @@ -1002,6 +1005,8 @@ int gtpv1u_delete_all_s1u_tunnel(const instance_t instance, const rnti_t rnti) int gtpv1u_delete_x2u_tunnel(const instance_t instanceP, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) { + UNUSED(instanceP); + UNUSED(req_pP); LOG_E(GTPU, "x2 tunnel not implemented\n"); return 0; } @@ -1013,7 +1018,7 @@ static gtpv1u_bearer_t create_bearer(int socket, const struct sockaddr_in *addr, return bearer; } -static int Gtpv1uHandleEchoReq(int h, uint8_t *msgBuf, uint32_t msgBufLen, const struct sockaddr_in *addr) +static int Gtpv1uHandleEchoReq(int h, uint8_t *msgBuf, const struct sockaddr_in *addr) { Gtpv1uMsgHeaderT *msgHdr = (Gtpv1uMsgHeaderT *)msgBuf; @@ -1041,7 +1046,7 @@ static int Gtpv1uHandleEchoReq(int h, uint8_t *msgBuf, uint32_t msgBufLen, const 0); } -static int Gtpv1uHandleError(int h, uint8_t *msgBuf, uint32_t msgBufLen, const struct sockaddr_in *addr) +static int Gtpv1uHandleError(uint8_t *msgBuf, uint32_t msgBufLen) { if (msgBufLen < sizeof(Gtpv1uError)) LOG_E(GTPU, "Received GTP error indication with truncated size %u (mini size: %lu)\n", msgBufLen,sizeof(Gtpv1uError)+4); @@ -1063,7 +1068,7 @@ static int Gtpv1uHandleError(int h, uint8_t *msgBuf, uint32_t msgBufLen, const s return rc; } -static int Gtpv1uHandleSupportedExt(int h, uint8_t *msgBuf, uint32_t msgBufLen, const sockaddr_in *addr) +static int Gtpv1uHandleSupportedExt() { LOG_E(GTPU, "Supported extensions to be dev\n"); int rc = GTPNOK; @@ -1073,7 +1078,7 @@ static int Gtpv1uHandleSupportedExt(int h, uint8_t *msgBuf, uint32_t msgBufLen, // When end marker arrives, we notify the client with buffer size = 0 // The client will likely call "delete tunnel" // nevertheless we don't take the initiative -static int Gtpv1uHandleEndMarker(int h, uint8_t *msgBuf, uint32_t msgBufLen, const sockaddr_in *addr) +static int Gtpv1uHandleEndMarker(int h, uint8_t *msgBuf) { Gtpv1uMsgHeaderT *msgHdr = (Gtpv1uMsgHeaderT *)msgBuf; @@ -1302,19 +1307,19 @@ static bool gtpv1uReceiveHandleMessage(int h) break; case GTP_ECHO_REQ: - Gtpv1uHandleEchoReq(h, udpData, udpDataLen, &addr); + Gtpv1uHandleEchoReq(h, udpData, &addr); break; case GTP_ERROR_INDICATION: - Gtpv1uHandleError(h, udpData, udpDataLen, &addr); + Gtpv1uHandleError(udpData, udpDataLen); break; case GTP_SUPPORTED_EXTENSION_HEADER_INDICATION: - Gtpv1uHandleSupportedExt(h, udpData, udpDataLen, &addr); + Gtpv1uHandleSupportedExt(); break; case GTP_END_MARKER: - Gtpv1uHandleEndMarker(h, udpData, udpDataLen, &addr); + Gtpv1uHandleEndMarker(h, udpData); break; case GTP_GPDU: @@ -1351,6 +1356,7 @@ static void gtpv1uReceiverCancel(pthread_t t) void *gtpv1uTask(void *args) { + UNUSED(args); while (1) { /* Trying to fetch a message from the message queue. If the queue is empty, this function will block till a diff --git a/radio/USRP/CMakeLists.txt b/radio/USRP/CMakeLists.txt index 2540e8d182..c0e4f551fa 100644 --- a/radio/USRP/CMakeLists.txt +++ b/radio/USRP/CMakeLists.txt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LicenseRef-CSSL-1.0 +add_compile_options(-Wunused-parameter) #find_package(Boost REQUIRED) find_package(UHD REQUIRED UHD) diff --git a/radio/USRP/usrp_lib.cpp b/radio/USRP/usrp_lib.cpp index ead8660738..5b8b34c9ed 100644 --- a/radio/USRP/usrp_lib.cpp +++ b/radio/USRP/usrp_lib.cpp @@ -260,7 +260,7 @@ static void trx_usrp_start_interdigital_gpio(openair0_device_t *device, usrp_sta s->usrp->set_gpio_attr(s->gpio_bank, "OUT", (1 << 4), 0x1c); } -static void trx_usrp_start_generic_gpio(openair0_device_t *device, usrp_state_t *s) +static void trx_usrp_start_generic_gpio(usrp_state_t *s) { // setup GPIO for TDD, GPIO(4) = ATR_RX // set data direction register (DDR) to output @@ -298,7 +298,7 @@ static int trx_usrp_start(openair0_device_t *device) case RU_GPIO_CONTROL_NONE: break; case RU_GPIO_CONTROL_GENERIC: - trx_usrp_start_generic_gpio(device, s); + trx_usrp_start_generic_gpio(s); break; case RU_GPIO_CONTROL_INTERDIGITAL: trx_usrp_start_interdigital_gpio(device, s); @@ -881,6 +881,7 @@ int trx_usrp_set_gains(openair0_device_t *device, */ int trx_usrp_stop(openair0_device_t *device) { + UNUSED(device); return(0); } @@ -1002,6 +1003,7 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_ */ int trx_usrp_get_stats(openair0_device_t *device) { + UNUSED(device); return(0); } @@ -1011,6 +1013,7 @@ int trx_usrp_get_stats(openair0_device_t *device) */ int trx_usrp_reset_stats(openair0_device_t *device) { + UNUSED(device); return(0); } diff --git a/radio/rfsimulator/CMakeLists.txt b/radio/rfsimulator/CMakeLists.txt index c93ab8cbec..e04ad1edcc 100644 --- a/radio/rfsimulator/CMakeLists.txt +++ b/radio/rfsimulator/CMakeLists.txt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LicenseRef-CSSL-1.0 +add_compile_options(-Wunused-parameter) add_library(rfsimulator MODULE simulator.cpp apply_channelmod.c diff --git a/radio/rfsimulator/apply_channelmod.c b/radio/rfsimulator/apply_channelmod.c index 800cf9b55d..0994231376 100644 --- a/radio/rfsimulator/apply_channelmod.c +++ b/radio/rfsimulator/apply_channelmod.c @@ -213,12 +213,7 @@ void update_channel_model(channel_desc_t *channelDesc, int nbSamples, uint64_t T either we regenerate the channel (call again random_channel(desc,0)), or we keep it over subframes legacy: we regenerate each sub frame in UL, and each frame only in DL */ -void rxAddInput(c16_t **input_sig, - cf_t *after_channel_sig, - int rxAnt, - channel_desc_t *channelDesc, - int nbSamples, - uint64_t TS) +void rxAddInput(c16_t **input_sig, cf_t *after_channel_sig, int rxAnt, channel_desc_t *channelDesc, int nbSamples) { // channelDesc->path_loss_dB should contain the total path gain // so, in actual RF: tx gain + path loss + rx gain (+antenna gain, ...) diff --git a/radio/rfsimulator/rfsimulator.h b/radio/rfsimulator/rfsimulator.h index be8884fbe6..895f9b8341 100644 --- a/radio/rfsimulator/rfsimulator.h +++ b/radio/rfsimulator/rfsimulator.h @@ -5,11 +5,6 @@ #ifndef __RFSIMULATOR_H #define __RFSIMULATOR_H #include -void rxAddInput(c16_t **input_sig, - cf_t *after_channel_sig, - int rxAnt, - channel_desc_t *channelDesc, - int nbSamples, - uint64_t TS); +void rxAddInput(c16_t **input_sig, cf_t *after_channel_sig, int rxAnt, channel_desc_t *channelDesc, int nbSamples); void update_channel_model(channel_desc_t *channelDesc, int nbSamples, uint64_t TS); #endif diff --git a/radio/rfsimulator/simulator.cpp b/radio/rfsimulator/simulator.cpp index ee2eb01343..3b2f64dbca 100644 --- a/radio/rfsimulator/simulator.cpp +++ b/radio/rfsimulator/simulator.cpp @@ -606,6 +606,7 @@ static void rfsimulator_readconfig(rfsimulator_state_t *rfsimulator) static int rfsimu_set_beam(char *buff, int debug, telnet_printfunc_t prnt, void *arg) { + UNUSED(debug); rfsimulator_state_t *t = (rfsimulator_state_t *)arg; rfsim_beam_ctrl_t *beam_ctrl = t->beam_ctrl; AssertFatal(beam_ctrl->enable_beams, "Beam simualtion is disabled, cannot set beams\n"); @@ -620,6 +621,7 @@ static int rfsimu_set_beam(char *buff, int debug, telnet_printfunc_t prnt, void static int rfsimu_set_beamids(char *buff, int debug, telnet_printfunc_t prnt, void *arg) { + UNUSED(debug); rfsimulator_state_t *t = (rfsimulator_state_t *)arg; rfsim_beam_ctrl_t *beam_ctrl = t->beam_ctrl; AssertFatal(beam_ctrl->enable_beams, "Beam simualtion is disabled, cannot set beams\n"); @@ -788,6 +790,8 @@ static int rfsimu_getdistance_cmd(char *buff, int debug, telnet_printfunc_t prnt static int rfsimu_vtime_cmd(char *buff, int debug, telnet_printfunc_t prnt, void *arg) { + UNUSED(debug); + UNUSED(buff); rfsimulator_state_t *t = (rfsimulator_state_t *)arg; const openair0_timestamp_t ts = t->nextRxTstamp; const double sample_rate = t->sample_rate; @@ -1317,7 +1321,7 @@ static void rfsimulator_read_internal(rfsimulator_state_t *t, input); for (int aarx = 0; aarx < nbAnt; aarx++) { - rxAddInput(input, temp_array[aarx], aarx, ptr->channel_model, nsamps, timestamp); + rxAddInput(input, temp_array[aarx], aarx, ptr->channel_model, nsamps); } } else { if (is_first_beam && is_first_peer && (ptr->nbAnt == 1 || nbAnt == 1)) { @@ -1529,10 +1533,12 @@ static int rfsimulator_read(openair0_device_t *device, openair0_timestamp_t *pti static int rfsimulator_get_stats(openair0_device_t *device) { + UNUSED(device); return 0; } static int rfsimulator_reset_stats(openair0_device_t *device) { + UNUSED(device); return 0; } static void rfsimulator_end(openair0_device_t *device) @@ -1560,6 +1566,7 @@ static void stopServer(openair0_device_t *device) static int rfsimulator_stop(openair0_device_t *device) { + UNUSED(device); return 0; } static int rfsimulator_set_freq(openair0_device_t *device, openair0_config_t *openair0_cfg) @@ -1570,10 +1577,13 @@ static int rfsimulator_set_freq(openair0_device_t *device, openair0_config_t *op } static int rfsimulator_set_gains(openair0_device_t *device, openair0_config_t *openair0_cfg) { + UNUSED(device); + UNUSED(openair0_cfg); return 0; } static int rfsimulator_write_init(openair0_device_t *device) { + UNUSED(device); return 0; }