diff --git a/common/utils/telnetsrv/telnetsrv_o1.c b/common/utils/telnetsrv/telnetsrv_o1.c index 18cd58aa06..dc48a477d3 100644 --- a/common/utils/telnetsrv/telnetsrv_o1.c +++ b/common/utils/telnetsrv/telnetsrv_o1.c @@ -391,12 +391,21 @@ static int start_modem(char *buf, int debug, telnet_printfunc_t prnt) return 0; } +extern void du_clear_all_ue_states(); +static int remove_mac_ues(char *buf, int debug, telnet_printfunc_t prnt) +{ + du_clear_all_ue_states(); + prnt("OK\n"); + return 0; +} + static telnetshell_cmddef_t o1cmds[] = { {"stats", "", get_stats}, {"config", "[]", set_config}, {"bwconfig", "", set_bwconfig}, {"stop_modem", "", stop_modem}, {"start_modem", "", start_modem}, + {"remove_mac_ues", "", remove_mac_ues}, {"", "", NULL}, }; 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 1faee06a39..9c6f5f4b27 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -99,7 +99,8 @@ static bool check_plmn_identity(const f1ap_plmn_t *check_plmn, const f1ap_plmn_t return plmn->mcc == check_plmn->mcc && plmn->mnc_digit_length == check_plmn->mnc_digit_length && plmn->mnc == check_plmn->mnc; } -static void du_clear_all_ue_states() +/* not static, so we can call it from the outside (in telnet) */ +void du_clear_all_ue_states() { gNB_MAC_INST *mac = RC.nrmac[0]; NR_SCHED_LOCK(&mac->sched_lock);