Merge remote-tracking branch 'origin/develop' into merging-2019-w51-to-develop-nr
This commit is contained in:
@@ -1255,6 +1255,8 @@ void init_eNB(int single_thread_flag,
|
||||
AssertFatal((eNB->if_inst = IF_Module_init(inst))!=NULL,"Cannot register interface");
|
||||
eNB->if_inst->schedule_response = schedule_response;
|
||||
eNB->if_inst->PHY_config_req = phy_config_request;
|
||||
eNB->if_inst->PHY_config_update_sib2_req = phy_config_update_sib2_request;
|
||||
eNB->if_inst->PHY_config_update_sib13_req = phy_config_update_sib13_request;
|
||||
memset((void *)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO));
|
||||
memset((void *)&eNB->Sched_INFO,0,sizeof(eNB->Sched_INFO));
|
||||
LOG_I(PHY,"Setting indication lists\n");
|
||||
|
||||
@@ -97,6 +97,8 @@ static int DEFBFW[] = {0x00007fff};
|
||||
|
||||
#include "pdcp.h"
|
||||
|
||||
#define MBMS_EXPERIMENTAL
|
||||
|
||||
extern volatile int oai_exit;
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
@@ -1881,10 +1883,19 @@ static void *ru_thread( void *param ) {
|
||||
|
||||
AssertFatal((ret=pthread_mutex_unlock(&ru->proc.mutex_pre_scd))==0,"[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd\n");
|
||||
#endif
|
||||
// wakeup all eNB processes waiting for this RU
|
||||
if (ru->num_eNB>0) wakeup_L1s(ru);
|
||||
|
||||
// wakeup all eNB processes waiting for this RU
|
||||
if (ru->num_eNB>0) wakeup_L1s(ru);
|
||||
|
||||
#ifdef MBMS_EXPERIMENTAL
|
||||
//Workaround ... this must be properly handled
|
||||
if(ru->if_south==LOCAL_RF && ru->function==eNodeB_3GPP && RC.eNB[0][0]!=NULL){
|
||||
if(ru->frame_parms.num_MBSFN_config!=RC.eNB[0][0]->frame_parms.num_MBSFN_config){
|
||||
ru->frame_parms = RC.eNB[0][0]->frame_parms;//->frame_parms;
|
||||
LOG_W(PHY,"RU MBSFN SF PARAMS Updated\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PHY_TX_THREAD
|
||||
|
||||
if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0) {
|
||||
|
||||
@@ -494,6 +494,8 @@ void init_pdcp(void) {
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
||||
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT;
|
||||
|
||||
pdcp_module_init(pdcp_initmask);
|
||||
|
||||
if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
@@ -707,6 +709,8 @@ int main ( int argc, char **argv )
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
|
||||
}
|
||||
create_tasks_mbms(1);
|
||||
|
||||
// wait for end of program
|
||||
LOG_UI(ENB_APP,"TYPE <CTRL-C> TO TERMINATE\n");
|
||||
// CI -- Flushing the std outputs for the previous marker to show on the eNB / DU / CU log file
|
||||
|
||||
@@ -483,6 +483,27 @@ void configure_rru(int idx,
|
||||
phy_init_RU(ru);
|
||||
}
|
||||
|
||||
static int send_update_rru(RU_t * ru, LTE_DL_FRAME_PARMS * fp){
|
||||
//ssize_t msg_len/*,len*/;
|
||||
int i;
|
||||
//LTE_DL_FRAME_PARMS *fp = &RC.eNB[0][0]->frame_parms;
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
memset((void *)&rru_config_msg,0,sizeof(rru_config_msg));
|
||||
rru_config_msg.type = RRU_config_update;
|
||||
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_config_t);
|
||||
LOG_I(PHY,"Sending RAU tick to RRU %d %lu bytes\n",ru->idx,rru_config_msg.len);
|
||||
|
||||
RRU_config_t *config = (RRU_config_t *)&rru_config_msg.msg[0];
|
||||
config->num_MBSFN_config=fp->num_MBSFN_config;
|
||||
for(i=0; i < fp->num_MBSFN_config; i++){
|
||||
config->MBSFN_config[i] = fp->MBSFN_config[i];
|
||||
LOG_W(PHY,"Configuration send to RAU (num MBSFN %d, MBSFN_SubframeConfig[%d] pattern is %x )\n",config->num_MBSFN_config,i,config->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
|
||||
}
|
||||
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),
|
||||
"RU %d cannot access remote radio\n",ru->idx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* ru_thread_control( void* param )
|
||||
{
|
||||
@@ -491,6 +512,7 @@ void* ru_thread_control( void* param )
|
||||
RRU_CONFIG_msg_t rru_config_msg;
|
||||
ssize_t msg_len;
|
||||
int len;
|
||||
int ru_sf_update=0; // SF config update flag (MBSFN)
|
||||
|
||||
// Start IF device if any
|
||||
if (ru->start_if) {
|
||||
@@ -512,6 +534,16 @@ void* ru_thread_control( void* param )
|
||||
if (ru->state == RU_IDLE && ru->if_south != LOCAL_RF)
|
||||
send_tick(ru);
|
||||
|
||||
if (ru->state == RU_RUN && ru->if_south != LOCAL_RF){
|
||||
LTE_DL_FRAME_PARMS *fp = &RC.eNB[0][0]->frame_parms;
|
||||
LOG_D(PHY,"Check MBSFN SF changes\n");
|
||||
if(fp->num_MBSFN_config != ru_sf_update){
|
||||
ru_sf_update = fp->num_MBSFN_config;
|
||||
LOG_W(PHY,"RU SF should be updated ... calling send_update_rru(ru)\n");
|
||||
send_update_rru(ru,fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((len = ru->ifdevice.trx_ctlrecv_func(&ru->ifdevice,
|
||||
&rru_config_msg,
|
||||
@@ -646,6 +678,30 @@ void* ru_thread_control( void* param )
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RRU_config_update: //RRU
|
||||
if (ru->if_south == LOCAL_RF){
|
||||
LOG_W(PHY,"Configuration update received from RAU \n");
|
||||
|
||||
msg_len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_config_t);
|
||||
|
||||
LOG_W(PHY,"New MBSFN config received from RAU --- num_MBSFN_config %d\n",((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config);
|
||||
ru->frame_parms.num_MBSFN_config = ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config;
|
||||
for(int i=0; i < ((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config; i++){
|
||||
ru->frame_parms.MBSFN_config[i].mbsfn_SubframeConfig=((RRU_config_t *)&rru_config_msg.msg[0])->MBSFN_config[i].mbsfn_SubframeConfig;
|
||||
LOG_W(PHY,"Configuration received from RAU (num MBSFN %d, MBSFN_SubframeConfig[%d] pattern is %x )\n",
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->num_MBSFN_config,
|
||||
i,
|
||||
((RRU_config_t *)&rru_config_msg.msg[0])->MBSFN_config[i].mbsfn_SubframeConfig
|
||||
);
|
||||
}
|
||||
} else LOG_E(PHY,"Received RRU_config msg...Ignoring\n");
|
||||
break;
|
||||
case RRU_config_update_ok: //RAU
|
||||
if (ru->if_south == LOCAL_RF) LOG_E(PHY,"Received RRU_config_update_ok msg...Ignoring\n");
|
||||
else{
|
||||
LOG_W(PHY,"Received RRU_config_update_ok msg...\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case RRU_start: // RRU
|
||||
if (ru->if_south == LOCAL_RF){
|
||||
|
||||
Reference in New Issue
Block a user