Commit f13c97db authored by Robert Schmidt's avatar Robert Schmidt

Mark active in add_new_nr_ue() only if phytest

parent 738d61a1
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
#define ENABLE_MAC_PAYLOAD_DEBUG #define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_gNB_SCHEDULER 1 #define DEBUG_gNB_SCHEDULER 1
/*Softmodem params*/
#include "executables/softmodem-common.h"
#include "common/ran_context.h" #include "common/ran_context.h"
...@@ -1638,7 +1640,12 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){ ...@@ -1638,7 +1640,12 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
int UE_id = i; int UE_id = i;
UE_info->num_UEs++; UE_info->num_UEs++;
UE_info->active[UE_id] = false; /* not yet active, we wait for RA! */ /* if real softmodem: not yet active, we wait for RA! FIXME: This opens a
* data race: a UE should complete RA before adding the next, or by the
* above condition, we overwrite the current UE with the following one.
*
* if phytest: there is no RA, so enable directly */
UE_info->active[UE_id] = get_softmodem_params()->phy_test;
UE_info->rnti[UE_id] = rntiP; UE_info->rnti[UE_id] = rntiP;
add_nr_ue_list(&UE_info->list, UE_id); add_nr_ue_list(&UE_info->list, UE_id);
memset((void *) &UE_info->UE_sched_ctrl[UE_id], memset((void *) &UE_info->UE_sched_ctrl[UE_id],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment