Provide O1 telnet interface to remove all UEs

This commit is contained in:
Robert Schmidt
2024-12-16 16:18:11 +01:00
parent c71c9de953
commit 70a746a445
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -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},
};
@@ -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);