openair2: fix abstraction mode for oaisim with MME
When using abstraction mode, layer2_init_UE() and openair_rrc_ue_init() are called according to first_sync state and only without MME support. We added the global variable abstraction_flag to allow abstraction mode when MME is enabled. Openair2 is also used in lte-softmodem, so it must have a global variable abstraction_flag. So we moved it out from the main() scope.
This commit is contained in:
committed by
Frédéric Leroy
parent
3fdcf5b676
commit
a731de2f13
@@ -62,24 +62,26 @@
|
||||
#endif //PHY_EMUL
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
|
||||
extern uint8_t abstraction_flag;
|
||||
void dl_phy_sync_success(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
unsigned char eNB_index,
|
||||
uint8_t first_sync) //init as MR
|
||||
{
|
||||
LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index);
|
||||
#if ! defined(ENABLE_USE_MME)
|
||||
#if defined(ENABLE_USE_MME)
|
||||
int mme_enabled=1;
|
||||
#else
|
||||
int mme_enabled=0;
|
||||
#endif
|
||||
|
||||
if (first_sync==1) {
|
||||
if (first_sync==1 && !(mme_enabled==1 && abstraction_flag==0)) {
|
||||
layer2_init_UE(module_idP);
|
||||
openair_rrc_ue_init(module_idP,eNB_index);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
rrc_in_sync_ind(module_idP,frameP,eNB_index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP, uint8_t free_eNB_index) //init as CH
|
||||
|
||||
Reference in New Issue
Block a user