Commit 6753a7af authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into RU-RAU-split

Conflicts:
	openair2/LAYER2/MAC/eNB_scheduler_bch.c
	openair2/RRC/LITE/L2_interface.c
	targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
parents 50ebffea 828077c2
......@@ -99,7 +99,7 @@ schedule_SIB1_BR(
int *Sj;
int n_NB = 0;
int TBS;
int k,rvidx;
int k=0,rvidx;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......@@ -143,6 +143,7 @@ schedule_SIB1_BR(
switch (N_RB_DL) {
case 6:
case 15:
default:
m=1;
n_NB=0;
N_S_NB=0;
......@@ -196,9 +197,8 @@ schedule_SIB1_BR(
AssertFatal(bcch_sdu_length <= TBS, "length returned by RRC %d is not compatible with the TBS %d from MIB\n",bcch_sdu_length,TBS);
if ((frameP%1000) < 40) LOG_D(MAC,"[eNB %d] Frame %d : BCCH_BR->DLSCH (SIB1) CC_id %d, Received %d bytes for NB %d\n",module_idP,frameP,CC_id,bcch_sdu_length,n_NB);
LOG_D(MAC,"[eNB %d] Frame %d : BCCH_BR->DLSCH CC_id %d, Received %d bytes \n",module_idP,frameP,CC_id,bcch_sdu_length);
// allocate all 6 PRBs in narrowband for SIB1_BR
first_rb = n_NB*6;
vrb_map[first_rb] = 1;
......@@ -281,7 +281,6 @@ schedule_SIB1_BR(
}
return;
}
......@@ -563,10 +562,10 @@ schedule_SI(
nfapi_dl_config_request_body_t *dl_req;
start_meas(&eNB->schedule_si);
// Only schedule LTE System Information in subframe 5
if (subframeP == 5) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id];
......@@ -753,7 +752,6 @@ schedule_SI(
schedule_SI_BR(module_idP,frameP,subframeP);
#endif
// this might be misleading when bcch is inactive
stop_meas(&eNB->schedule_si);
return;
}
......
......@@ -302,7 +302,8 @@ mac_rrc_data_req(
//else
//return(0);
}
#endif
#endif //Rel10 || Rel14
#ifdef Rel14
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){
......@@ -320,6 +321,7 @@ mac_rrc_data_req(
}
#endif
} else { //This is an UE
......
......@@ -341,8 +341,9 @@ int trx_usrp_set_gains(openair0_device* device,
openair0_config_t *openair0_cfg) {
usrp_state_t *s = (usrp_state_t*)device->priv;
::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(0);
s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[0]);
s->usrp->set_tx_gain(89.0-openair0_cfg[0].tx_gain[0]);
::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(0);
// limit to maximum gain
if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) {
......@@ -641,11 +642,13 @@ extern "C" {
openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop());
}
}
for(int i=0; i<s->usrp->get_tx_num_channels(); i++) {
::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i);
if (i<openair0_cfg[0].tx_num_channels) {
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
s->usrp->set_tx_gain(89.0-openair0_cfg[0].tx_gain[i],i);
s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i);
}
}
......
......@@ -1638,7 +1638,7 @@ void fill_rf_config(RU_t *ru,const char *rf_config_file) {
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
cfg->tx_gain[i] = (double)fp->att_tx;
cfg->rx_gain[i] = (double)fp->att_rx;
cfg->rx_gain[i] = ru->max_rxgain-(double)fp->att_rx;
cfg->configFilename = rf_config_file;
printf("channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
......
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