Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangwenhui
OpenXG-RAN
Commits
b480c8ca
Commit
b480c8ca
authored
Jan 19, 2019
by
laurent
Committed by
frtabu
Feb 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compilation cleanup
parent
077cec4e
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
76 additions
and
790 deletions
+76
-790
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+9
-4
cmake_targets/build_oai
cmake_targets/build_oai
+6
-6
openair1/PHY/LTE_ESTIMATION/adjust_gain.c
openair1/PHY/LTE_ESTIMATION/adjust_gain.c
+2
-22
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+1
-1
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+4
-13
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair1/SCHED_UE/phy_procedures_lte_ue.c
+15
-19
openair2/COMMON/mac_rrc_primitives.h
openair2/COMMON/mac_rrc_primitives.h
+0
-82
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+0
-13
openair2/LAYER2/MAC/mac_vars.h
openair2/LAYER2/MAC/mac_vars.h
+1
-2
openair2/LAYER2/MAC/main_ue.c
openair2/LAYER2/MAC/main_ue.c
+0
-1
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+0
-2
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+2
-0
openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
+2
-0
openair2/LAYER2/openair2_proc.c
openair2/LAYER2/openair2_proc.c
+2
-1
openair2/NETWORK_DRIVER/UE_IP/device.c
openair2/NETWORK_DRIVER/UE_IP/device.c
+1
-1
openair2/NETWORK_DRIVER/UE_IP/local.h
openair2/NETWORK_DRIVER/UE_IP/local.h
+0
-1
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+2
-2
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+5
-4
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+5
-9
openair2/RRC/LTE/rrm_2_rrc_msg.c
openair2/RRC/LTE/rrm_2_rrc_msg.c
+0
-205
openair2/RRC/LTE/utils.c
openair2/RRC/LTE/utils.c
+1
-2
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
+12
-352
targets/COMMON/openairinterface5g_limits.h
targets/COMMON/openairinterface5g_limits.h
+6
-47
targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
+0
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
b480c8ca
...
...
@@ -21,7 +21,7 @@
# Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required
(
VERSION
2.8
)
cmake_minimum_required
(
VERSION
3.0
)
#############################################
# Base directories, compatible with legacy OAI building
...
...
@@ -169,11 +169,12 @@ endif()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC "
)
# add autotools definitions that were maybe used!
set
(
MKVER
"'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'
"
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D
${
MKVER
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=c++11 -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'
"
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-std=c++11 -D
${
MKVER
}
"
)
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
...
...
@@ -479,6 +480,10 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4
add_list1_option
(
NB_ANTENNAS_TX
"4"
"Number of antennas in transmission"
"1"
"2"
"4"
)
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"EXMIMO"
"OAI_USRP"
"OAI_BLADERF"
"CPRIGW"
"OAI_LMSSDR"
)
if
(
NOT
${
RF_BOARD
}
STREQUAL
"None"
)
add_definitions
(
-DMANAGED_RF=1
)
endif
()
add_list2_option
(
TRANSP_PRO
"None"
"Transport protocol type"
"None"
"ETHERNET"
)
#NOKIA config enhancement
...
...
@@ -2272,7 +2277,7 @@ endfunction(make_driver name dir src)
# nashmesh module
################
list
(
APPEND nasmesh_src device.c common.c ioctl.c classifier.c tool.c mesh.c
)
set
(
module_cc_opt
"
${
module_cc_opt
}
-DNAS_NETLINK -DPDCP_USE_NETLINK"
)
set
(
module_cc_opt
"
${
module_cc_opt
}
-DNAS_NETLINK -DPDCP_USE_NETLINK
-D
${
MKVER
}
"
)
# legacy Makefile was using NAS_NETLINK flag, but other drivers the hereafter flag
# so, this cmake use OAI_NW_DRIVER_USE_NETLINK everywhere
if
(
OAI_NW_DRIVER_USE_NETLINK
)
...
...
cmake_targets/build_oai
View file @
b480c8ca
...
...
@@ -108,7 +108,7 @@ Options
Rel8 limits the implementation to 3GPP Release 8 version
Rel10 limits the implementation to 3GPP Release 10 version
-w | --hardware
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, IRIS, None (Default)
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, IRIS,
SIMU,
None (Default)
Adds this RF board support (in external packages installation and in compilation)
-t | --transport protocol
ETHERNET , None
...
...
@@ -238,7 +238,7 @@ function main() {
"EXMIMO"
)
HW
=
"EXMIMO"
;;
"USRP"
|
"BLADERF"
|
"LMSSDR"
|
"IRIS"
)
"USRP"
|
"BLADERF"
|
"LMSSDR"
|
"IRIS"
|
"SIMU"
)
HW
=
"OAI_"
$2
;;
"None"
)
...
...
@@ -514,7 +514,7 @@ function main() {
[
"
$CLEAN
"
=
"1"
]
&&
rm
-rf
$DIR
/
$lte_build_dir
/build
mkdir
-p
$DIR
/
$lte_build_dir
/build
cmake_file
=
$DIR
/
$lte_build_dir
/CMakeLists.txt
echo
"cmake_minimum_required(VERSION
2.8
)"
>
$cmake_file
echo
"cmake_minimum_required(VERSION
3.0
)"
>
$cmake_file
if
[
"
$NOS1
"
=
"True"
]
;
then
cat
$DIR
/
$lte_build_dir
/CMakeLists.template
>>
$cmake_file
fi
...
...
@@ -790,7 +790,7 @@ function main() {
fi
fi
if
[
"
$RFSIMULATOR
"
==
"true"
]
;
then
if
[
"
$RFSIMULATOR
"
==
"true"
-o
"
$HW
"
==
"OAI_SIMU"
]
;
then
echo_info
"Compiling rfsimulator"
compilations
\
$lte_build_dir
rfsimulator
\
...
...
@@ -855,7 +855,7 @@ function main() {
# enb
cmake_file
=
$OPENAIR_DIR
/cmake_targets/basic_simulator/enb/CMakeLists.txt
echo
"cmake_minimum_required(VERSION
2.8
)"
>
$cmake_file
echo
"cmake_minimum_required(VERSION
3.0
)"
>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CFLAGS_PROCESSOR_USER
\"
$CFLAGS_PROCESSOR_USER
\"
)"
>>
$cmake_file
echo
"set ( RRC_ASN1_VERSION
\"
${
REL
}
\"
)"
>>
$cmake_file
...
...
@@ -908,7 +908,7 @@ function main() {
conf2uedata
$dbin
/conf2uedata
cmake_file
=
$OPENAIR_DIR
/cmake_targets/basic_simulator/ue/CMakeLists.txt
echo
"cmake_minimum_required(VERSION
2.8
)"
>
$cmake_file
echo
"cmake_minimum_required(VERSION
3.0
)"
>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CFLAGS_PROCESSOR_USER
\"
$CFLAGS_PROCESSOR_USER
\"
)"
>>
$cmake_file
echo
"set ( RRC_ASN1_VERSION
\"
${
REL
}
\"
)"
>>
$cmake_file
...
...
openair1/PHY/LTE_ESTIMATION/adjust_gain.c
View file @
b480c8ca
...
...
@@ -37,29 +37,9 @@ phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
// Adjust gain in ue->rx_vars[0].rx_total_gain_dB
if
(
rx_power_fil_dB
<
TARGET_RX_POWER
-
5
)
//&& (ue->rx_total_gain_dB < MAX_RF_GAIN) )
ue
->
rx_total_gain_dB
+=
5
;
ue
->
rx_total_gain_dB
=
min
(
ue
->
rx_total_gain_dB
+
5
,
MAX_RF_GAIN
)
;
else
if
(
rx_power_fil_dB
>
TARGET_RX_POWER
+
5
)
//&& (ue->rx_total_gain_dB > MIN_RF_GAIN) )
ue
->
rx_total_gain_dB
-=
5
;
if
(
ue
->
rx_total_gain_dB
>
MAX_RF_GAIN
)
{
/*
if ((openair_daq_vars.rx_rf_mode==0) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=1;
ue->rx_total_gain_dB = max(MIN_RF_GAIN,MAX_RF_GAIN-25);
}
else {
*/
ue
->
rx_total_gain_dB
=
MAX_RF_GAIN
;
}
else
if
(
ue
->
rx_total_gain_dB
<
MIN_RF_GAIN
)
{
/*
if ((openair_daq_vars.rx_rf_mode==1) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=0;
ue->rx_total_gain_dB = min(MAX_RF_GAIN,MIN_RF_GAIN+25);
}
else {
*/
ue
->
rx_total_gain_dB
=
MIN_RF_GAIN
;
}
ue
->
rx_total_gain_dB
=
max
(
ue
->
rx_total_gain_dB
-
5
,
MIN_RF_GAIN
);
LOG_D
(
PHY
,
"Gain control: rx_total_gain_dB = %d (max %d,rxpf %d)
\n
"
,
ue
->
rx_total_gain_dB
,
MAX_RF_GAIN
,
rx_power_fil_dB
);
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
b480c8ca
...
...
@@ -109,7 +109,7 @@ static uint dci_encoding(uint8_t *a,
}
uint
generate_dci0
(
uint8_t
*
dci
,
static
uint
generate_dci0
(
uint8_t
*
dci
,
uint8_t
*
eee
,
uint8_t
DCI_LENGTH
,
uint16_t
coded_bits
,
...
...
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
View file @
b480c8ca
...
...
@@ -547,7 +547,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
ue
->
frame_parms
.
nb_antenna_ports_eNB
);
#endif
#if defined(
OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
# if DISABLE_LOG_X
printf
(
"[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)
\n
"
,
ue
->
Mod_id
,
...
...
@@ -608,23 +608,14 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]
);
#endif
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
#ifndef MANAGED_RF
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
#endif
#endif
#endif
}
else
{
}
else
{
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
#ifndef MANAGED_RF
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
#endif
#endif
#endif
}
...
...
openair1/SCHED_UE/phy_procedures_lte_ue.c
View file @
b480c8ca
...
...
@@ -76,7 +76,7 @@ extern double cpuf;
void
Msg1_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
);
void
Msg3_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
);
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
extern
uint32_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
#endif
...
...
@@ -160,7 +160,7 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s
}
}
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
//unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
/*
unsigned int get_tx_amp_prach(int power_dBm, int power_max_dBm, int N_RB_UL)
...
...
@@ -1130,7 +1130,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
int
subframe_tx
=
proc
->
subframe_tx
;
int
ulsch_start
;
int
overflow
=
0
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
int
k
,
l
;
int
dummy_tx_buffer
[
frame_parms
->
samples_per_tti
]
__attribute__
((
aligned
(
16
)));
#endif
...
...
@@ -1141,7 +1141,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
}
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)//this is the EXPRESS MIMO case
#if defined(
MANAGED_RF)
ulsch_start
=
(
ue
->
rx_offset
+
subframe_tx
*
frame_parms
->
samples_per_tti
-
ue
->
hw_timing_advance
-
ue
->
timing_advance
-
...
...
@@ -1177,7 +1177,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
if
(
frame_parms
->
Ncp
==
1
)
PHY_ofdm_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][
subframe_tx
*
nsymb
*
frame_parms
->
ofdm_symbol_size
],
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
dummy_tx_buffer
,
#else
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
...
...
@@ -1188,7 +1188,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
CYCLIC_PREFIX
);
else
{
normal_prefix_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][
subframe_tx
*
nsymb
*
frame_parms
->
ofdm_symbol_size
],
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
dummy_tx_buffer
,
#else
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
...
...
@@ -1196,7 +1196,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
nsymb
>>
1
,
&
ue
->
frame_parms
);
normal_prefix_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][((
subframe_tx
*
nsymb
)
+
(
nsymb
>>
1
))
*
frame_parms
->
ofdm_symbol_size
],
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
dummy_tx_buffer
+
(
frame_parms
->
samples_per_tti
>>
1
),
#else
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
+
(
frame_parms
->
samples_per_tti
>>
1
)],
...
...
@@ -1205,14 +1205,14 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
&
ue
->
frame_parms
);
}
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
apply_7_5_kHz
(
ue
,
dummy_tx_buffer
,
0
);
apply_7_5_kHz
(
ue
,
dummy_tx_buffer
,
1
);
#else
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
0
);
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
1
);
#endif
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
overflow
=
ulsch_start
-
9
*
frame_parms
->
samples_per_tti
;
for
(
k
=
ulsch_start
,
l
=
0
;
k
<
cmin
(
frame_parms
->
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
ulsch_start
+
frame_parms
->
samples_per_tti
);
k
++
,
l
++
)
{
...
...
@@ -1310,7 +1310,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
prach_resources
[
eNB_id
]
->
ra_TDD_map_index
,
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
ue
->
tx_total_RE
[
subframe_tx
]
=
96
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
ue
->
prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
...
...
@@ -1676,7 +1676,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
}
ue
->
tx_total_RE
[
subframe_tx
]
=
nb_rb
*
12
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
...
...
@@ -1747,7 +1747,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
Po_SRS
=
ue
->
tx_power_max_dBm
;
}
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
if
(
ue
->
mac_enabled
==
1
)
{
tx_amp
=
get_tx_amp
(
Po_SRS
,
...
...
@@ -1986,7 +1986,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
...
...
@@ -2067,7 +2067,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
#if defined(
EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR
)
#if defined(
MANAGED_RF
)
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
...
...
@@ -2311,12 +2311,8 @@ void ue_measurement_procedures(
if
((
(
slot
%
2
)
==
0
)
&&
(
l
==
(
4
-
frame_parms
->
Ncp
)))
{
// AGC
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_IN
);
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
#ifndef MANAGED_RF
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
#endif
#endif
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_OUT
);
eNB_id
=
0
;
...
...
openair2/COMMON/mac_rrc_primitives.h
View file @
b480c8ca
...
...
@@ -308,88 +308,6 @@ typedef struct {
}
__attribute__
((
__packed__
))
DEFAULT_CH_MEAS
;
#define DEFAULT_eNB_MEAS_SIZE sizeof(DEFAULT_eNB_MEAS)
#ifndef OPENAIR2_IN
typedef
struct
{
//RRC_INTERFACE_FUNCTIONS
unsigned
int
Frame_index
;
unsigned
short
UE_index
[
NB_MODULES_MAX
][
NB_SIG_CNX_UE
];
uint8_t
eNB_id
[
NB_MODULES_MAX
][
NB_CNX_UE
];
// L2_ID UE_id[NB_MODULES_MAX][NB_CNX_CH];
uint8_t
UE_id
[
NB_MODULES_MAX
][
NB_CNX_CH
][
5
];
void
(
*
openair_rrc_top_init
)(
void
);
char
(
*
openair_rrc_eNB_init
)(
uint8_t
);
char
(
*
openair_rrc_UE_init
)(
uint8_t
,
uint8_t
);
RRC_status_t
(
*
rrc_rx_tx
)(
uint8_t
,
uint32_t
,
uint8_t
,
uint8_t
);
uint8_t
(
*
mac_rrc_data_ind
)(
uint8_t
,
uint32_t
,
uint16_t
,
uint8_t
*
,
uint16_t
,
eNB_flag_t
eNB_flag
,
uint8_t
eNB_index
);
uint8_t
(
*
mac_rrc_data_req
)(
uint8_t
,
uint32_t
,
uint16_t
,
uint8_t
,
uint8_t
*
,
eNB_flag_t
eNB_flag
,
uint8_t
eNB_index
);
void
(
*
mac_rrc_meas_ind
)(
uint8_t
,
MAC_MEAS_REQ_ENTRY
*
);
void
(
*
def_meas_ind
)(
uint8_t
,
uint8_t
);
void
(
*
rrc_data_indP
)
(
module_id_t
,
rb_id_t
,
sdu_size_t
,
char
*
);
void
(
*
fn_rrc
)
(
void
);
uint8_t
(
*
get_rrc_status
)(
uint8_t
Mod_id
,
uint8_t
eNB_flag
,
uint8_t
eNB_index
);
double
(
*
rrc_get_estimated_ue_distance
)
(
module_id_t
Mod_id
,
uint8_t
UE_id
,
uint8_t
CC_id
,
uint8_t
loc_type
);
}
RRC_XFACE
;
typedef
struct
{
//MAC_INTERFACE_FUNCTIONS
unsigned
int
frame
;
unsigned
short
Node_id
[
NB_MODULES_MAX
];
char
Is_cluster_head
[
NB_MODULES_MAX
];
void
(
*
macphy_exit
)(
const
char
*
);
/* Pointer function that stops the low-level scheduler due an exit condition */
unsigned
short
(
*
mac_config_req
)(
uint8_t
,
uint8_t
,
MAC_CONFIG_REQ
*
);
MAC_MEAS_REQ_ENTRY
*
(
*
mac_meas_req
)(
uint8_t
,
MAC_MEAS_REQ
*
);
void
(
*
mac_out_of_sync_ind
)(
uint8_t
,
uint32_t
,
unsigned
short
);
//RLC_INTERFACE_FUNCTIONS
void
(
*
pdcp_run
)(
void
);
void
(
*
pdcp_data_req
)(
module_id_t
,
rb_id_t
,
sdu_size_t
,
char
*
);
signed
int
(
*
rrc_rlc_config_req
)(
unsigned
int
,
unsigned
int
,
unsigned
int
,
unsigned
int
,
rlc_info_t
);
int
(
*
rrc_mac_config_req
)(
uint8_t
Mod_id
,
uint8_t
eNB_flag
,
uint8_t
UE_id
,
uint8_t
eNB_index
,
LTE_RadioResourceConfigCommonSIB_t
*
radioResourceConfigCommon
,
struct
LTE_PhysicalConfigDedicated
*
physicalConfigDedicated
,
LTE_MAC_MainConfig_t
*
mac_MainConfig
,
long
logicalChannelIdentity
,
LTE_LogicalChannelConfig_t
*
logicalChannelConfig
,
LTE_MeasGapConfig_t
*
measGapConfig
,
LTE_TDD_Config_t
*
tdd_Config
,
uint8_t
*
SIwindowsize
,
uint16_t
*
SIperiod
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,
MBMS_flag_t
MBMS_Flag
,
struct
LTE_MBSFN_SubframeConfigList
*
mbsfn_SubframeConfigList
,
LTE_MBSFN_AreaInfoList_r9_t
*
mbsfn_AreaInfoList
,
struct
LTE_PMCH_InfoList_r9
*
pmch_InfoList
#endif
);
unsigned
int
(
*
mac_rlc_data_req
)(
module_id_t
,
unsigned
int
,
const
unsigned
int
,
char
*
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint32_t
,
uint32_t
#endif
);
void
(
*
mac_rlc_data_ind
)(
module_id_t
,
logical_chan_id_t
,
char
*
,
tb_size_t
,
num_tb_t
,
crc_t
*
);
mac_rlc_status_resp_t
(
*
mac_rlc_status_ind
)
(
module_id_t
enb_mod_idP
,
module_id_t
ue_mod_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
eNB_flag_t
eNB_flagP
,
MBMS_flag_t
MBMS_flagP
,
logical_chan_id_t
channel_idP
,
tb_size_t
tb_sizeP
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint32_t
sourceL2Id
,
uint32_t
destinationL2Id
#endif
);
signed
int
(
*
rrc_rlc_data_req
)(
module_id_t
,
rb_id_t
,
mui_t
,
confirm_t
,
sdu_size_t
,
char
*
);
void
(
*
rrc_rlc_register_rrc
)
(
void
(
*
rrc_data_indP
)(
module_id_t
,
rb_id_t
,
sdu_size_t
,
char
*
),
void
(
*
rrc_data_confP
)
(
module_id_t
,
rb_id_t
,
mui_t
)
)
;
void
(
*
mrbch_phy_sync_failure
)
(
uint8_t
Mod_id
,
frame_t
frame
,
uint8_t
Free_ch_index
);
void
(
*
dl_phy_sync_success
)
(
uint8_t
Mod_id
,
frame_t
frame
,
uint8_t
eNB_index
);
}
MAC_RLC_XFACE
;
#endif
#define IDLE 0
#define NEED_RADIO_CONFIG 3
#define RADIO_CONFIG_TX 2
...
...
openair2/COMMON/platform_constants.h
View file @
b480c8ca
...
...
@@ -39,14 +39,6 @@
#define NL_MAX_PAYLOAD 9000
/* this should cover the max mtu size*/
#endif
#ifdef LARGE_SCALE
# define NB_MODULES_MAX 128
# define NB_NODE_MAX 128
#else
# define NB_MODULES_MAX 32
# define NB_NODE_MAX 32
#endif
#ifdef JUMBO_FRAME
# define MAX_IP_PACKET_SIZE 10000 // 9000
#else
...
...
@@ -59,9 +51,6 @@
# define MAX_IP_PACKET_SIZE 1500 // 3000
# endif
#endif
// overwrite the previous deinitions
# define MAX_MODULES NB_MODULES_MAX
#ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
...
...
@@ -146,8 +135,6 @@
#define UNUSED_PARAM_MBMS_SESSION_ID 0
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
#define printk printf
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
#endif
/* __PLATFORM_CONSTANTS_H__ */
openair2/LAYER2/MAC/mac_vars.h
View file @
b480c8ca
...
...
@@ -95,8 +95,7 @@ const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
uint32_t
RRC_CONNECTION_FLAG
;
UE_MAC_INST
*
UE_mac_inst
=
NULL
;
//[NB_MODULE_MAX];
MAC_RLC_XFACE
*
Mac_rlc_xface
;
UE_MAC_INST
*
UE_mac_inst
;
//[NB_MODULE_MAX];
/// Primary component carrier index of eNB
int
pCC_id
[
NUMBER_OF_eNB_MAX
];
...
...
openair2/LAYER2/MAC/main_ue.c
View file @
b480c8ca
...
...
@@ -70,7 +70,6 @@ mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
uint16_t
eNB_index
)
{
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
}
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
b480c8ca
...
...
@@ -2565,8 +2565,6 @@ ue_scheduler(const module_id_t module_idP,
}
#endif
//Mac_rlc_xface->frameP=frameP;
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
//if (subframe%5 == 0)
//LG#ifdef EXMIMO
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
b480c8ca
...
...
@@ -380,8 +380,10 @@ int pdcp_module_init (void);
void
pdcp_module_cleanup
(
void
);
void
pdcp_layer_init
(
void
);
void
pdcp_layer_cleanup
(
void
);
#if defined(PDCP_USE_NETLINK_QUEUES)
int
pdcp_netlink_init
(
void
);
#endif
#define PDCP2NW_DRIVER_FIFO 21
#define NW_DRIVER2PDCP_FIFO 22
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
View file @
b480c8ca
...
...
@@ -70,6 +70,7 @@ extern struct iovec nas_iov_rx;
extern
int
nas_sock_fd
;
extern
struct
msghdr
nas_msg_rx
;
#if defined(PDCP_USE_NETLINK_QUEUES)
static
pthread_t
pdcp_netlink_thread
;
/* We use lock-free queues between the User-plane driver running in kernel-space
...
...
@@ -292,3 +293,4 @@ void *pdcp_netlink_thread_fct(void *arg)
return
NULL
;
}
#endif
openair2/LAYER2/openair2_proc.c
View file @
b480c8ca
...
...
@@ -363,6 +363,7 @@ int dump_eNB_l2_stats(char *buffer, int length) {
return
len
+
1
/* SR: for trailing \0 */
;
}
#ifdef PROC
int
openair2_stats_read
(
char
*
buffer
,
char
**
my_buffer
,
off_t
off
,
int
length
)
{
int
len
=
0
,
fg
,
Overhead
,
Sign
;
unsigned
int
i
,
j
,
k
,
kk
;
...
...
@@ -563,6 +564,7 @@ int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) {
if (status == RLC_OP_STATUS_OK) {
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_SDU_TO_TX = %d\tNB_SDU_DISC %d\tNB_RX_SDU %d\n",
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
tx_pdcp_sdu,
tx_pdcp_sdu_discarded,
rx_sdu);
...
...
@@ -617,7 +619,6 @@ int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) {
}
}
}
return
len
;
}
...
...
openair2/NETWORK_DRIVER/UE_IP/device.c
View file @
b480c8ca
...
...
@@ -349,7 +349,7 @@ static const struct net_device_ops ue_ip_netdev_ops = {
.
ndo_set_mac_address
=
ue_ip_set_mac_address
,
.
ndo_set_config
=
ue_ip_set_config
,
.
ndo_do_ioctl
=
NULL
,
#if
RHEL_RELEASE_CODE>=
1797
#if
defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >=
1797
.
extended
.
ndo_change_mtu
=
ue_ip_change_mtu
,
#else
.
ndo_change_mtu
=
ue_ip_change_mtu
,
...
...
openair2/NETWORK_DRIVER/UE_IP/local.h
View file @
b480c8ca
...
...
@@ -57,7 +57,6 @@
#include "platform_types.h"
#include "sap.h"
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
typedef
struct
ue_ip_priv_s
{
int
irq
;
...
...
openair2/PHY_INTERFACE/IF_Module.c
View file @
b480c8ca
...
...
@@ -613,7 +613,7 @@ void UL_indication(UL_IND_t *UL_info)
IF_Module_t
*
IF_Module_init
(
int
Mod_id
){
AssertFatal
(
Mod_id
<
MAX_MODULES
,
"Asking for Module %d > %d
\n
"
,
Mod_id
,
MAX_IF_MODULES
);
AssertFatal
(
Mod_id
==
0
,
"Asking for Module %d > %d
\n
"
,
Mod_id
,
MAX_IF_MODULES
);
LOG_D
(
PHY
,
"Installing callbacks for IF_Module - UL_indication
\n
"
);
...
...
@@ -632,7 +632,7 @@ IF_Module_t *IF_Module_init(int Mod_id){
void
IF_Module_kill
(
int
Mod_id
)
{
AssertFatal
(
Mod_id
>
MAX_MODULES
,
"Asking for Module %d > %d
\n
"
,
Mod_id
,
MAX_IF_MODULES
);
AssertFatal
(
Mod_id
==
0
,
"Asking for Module %d > %d
\n
"
,
Mod_id
,
MAX_IF_MODULES
);
if
(
if_inst
[
Mod_id
]
!=
NULL
)
free
(
if_inst
[
Mod_id
]);
}
openair2/RRC/LTE/rrc_UE.c
View file @
b480c8ca
...
...
@@ -805,6 +805,7 @@ rrc_ue_establish_drb(
(
void
)
oip_ifup
;
(
void
)
ip_addr_offset3
;
(
void
)
ip_addr_offset4
;
LOG_I
(
RRC
,
"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d
\n
"
,
ue_mod_idP
,
frameP
,
DRB_config
->
drb_Identity
,
(
int
)
*
DRB_config
->
logicalChannelIdentity
);
/*
...
...
@@ -816,12 +817,12 @@ rrc_ue_establish_drb(
RADIO_ACCESS_BEARER,Rlc_info_um);
*/
#ifdef PDCP_USE_NETLINK
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(
EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADE
RF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
ip_addr_offset3
=
0
;
ip_addr_offset4
=
1
;
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(
MANAGED_
RF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
i
nt
i
p_addr_offset3
=
0
;
i
nt
i
p_addr_offset4
=
1
;
LOG_I
(
OIP
,
"[UE %d] trying to bring up the OAI interface oai%d, IP 10.0.%d.%d
\n
"
,
ue_mod_idP
,
ip_addr_offset3
+
ue_mod_idP
,
ip_addr_offset3
+
ue_mod_idP
+
1
,
ip_addr_offset4
+
ue_mod_idP
+
1
);
oip_ifup
=
nas_config
(
ip_addr_offset3
+
ue_mod_idP
,
// interface_id
int
oip_ifup
=
nas_config
(
ip_addr_offset3
+
ue_mod_idP
,
// interface_id
ip_addr_offset3
+
ue_mod_idP
+
1
,
// third_octet
ip_addr_offset4
+
ue_mod_idP
+
1
);
// fourth_octet
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
b480c8ca
...
...
@@ -6295,11 +6295,6 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
//-----------------------------------------------------------------------------
{
int
i
,
drb_id
;
int
oip_ifup
=
0
;
int
dest_ip_offset
=
0
;
/* avoid gcc warnings */
(
void
)
oip_ifup
;
(
void
)
dest_ip_offset
;
uint8_t
*
kRRCenc
=
NULL
;
uint8_t
*
kRRCint
=
NULL
;
uint8_t
*
kUPenc
=
NULL
;
...
...
@@ -6423,18 +6418,19 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
(
int
)
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
);
#if defined(PDCP_USE_NETLINK) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
// can mean also IPV6 since ether -> ipv6 autoconf
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET)
LOG_I
(
OIP
,
"[eNB %d] trying to bring up the OAI interface oai%d
\n
"
,
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(MANAGED_RF) && !defined(ETHERNET)
LOG_I
(
OIP
,
"[eNB %d] trying to bring up the OAI interface oai%d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
module_id
);
oip_ifup
=
nas_config
(
int
oip_ifup
=
nas_config
(
ctxt_pP
->
module_id
,
// interface index
ctxtReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA_pP
->
module_id
+
1
,
// thrid octet
ctxt_pP
->
module_id
+
1
);
// fourth octet
if
(
oip_ifup
==
0
)
{
// interface is up --> send a config the DRB
module_id_t
ue_module_id
;
dest_ip_offset
=
8
;
int
dest_ip_offset
=
8
;
LOG_I
(
OIP
,
"[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
module_id
,
...
...
openair2/RRC/LTE/rrm_2_rrc_msg.c
deleted
100644 → 0
View file @
077cec4e
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*!
*******************************************************************************
\file emul_interface.c
\brief RRM interface emulation, it sends message to the RRM interface
- RRC -> RRM
- CMM -> RRM
\author BURLOT Pascal
\date 10/07/08
\par Historique:
$Author$ $Date$ $Revision$
$Id$
$Log$
*******************************************************************************
*/
#include "defs.h"
#include "extern.h"
//#include "mac_lchan_interface.h"
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
extern
EMULATION_VARS
*
Emul_vars
;
extern
CH_MAC_INST
*
CH_mac_inst
;
extern
UE_MAC_INST
*
UE_mac_inst
;
#endif
/******************************************************************************/
void
fn_rrc
(
void
)
{
/******************************************************************************/
msg_head_t
*
Header
;
char
*
Data
;
L2_ID
Mac_id
;
while
(
1
)
{
Header
=
(
msg_head_t
*
)
recv_msg
(
&
S_rrc
)
;
if
(
Header
==
NULL
)
{
break
;
}
Data_to_read
=
Header
->
size
;
if
(
Data_to_read
>
0
)
{
Data
=
(
char
*
)
(
Header
+
1
)
;
}
msg
(
"Got MSG of Type %d on Inst %d
\n
"
,
Header
->
msg_type
,
Header
->
inst
);
switch
(
Header
->
msg_type
)
{
case
RRM_INIT_CH_REQ
:
{
rrm_init_ch_req_t
*
p
=
(
rrm_init_ch_req_t
*
)
Data
;
msg
(
"[RRM]>[RRC][Inst %d]:RRM_INIT_CH_REQ
\n
"
,
Header
->
inst
);
rrc_init_ch_req
(
Header
->
inst
,
p
);
break
;
}
case
RRCI_INIT_MR_REQ
:
{
rrci_init_mr_req_t
*
p
=
(
rrci_init_mr_req_t
*
)
Data
;
msg
(
"[RRM]>[RRC][Inst %d]:RRCI_INIT_MR_REQ
\n
"
,
Header
->
inst
);
rrc_init_mr_req
(
Header
->
inst
,
p
);
break
;
}
case
RRM_RB_ESTABLISH_REQ
:
{
send_msg
((
void
*
)
&
S_rrc
,
msg_rrc_rb_establish_resp
(
Header
->
inst
,
Header
->
Trans_id
));
msg
(
"[RRM]>[RRC][Inst %d]:RRM_RB_ESTABLISH_REQ, size %d
\n
"
,
Header
->
inst
,
sizeof
(
rrm_rb_establish_req_t
));
rrc_config_req
(
Header
->
inst
,(
void
*
)
Data
,
Header
->
msg_type
,
Header
->
Trans_id
);
break
;
}
case
RRM_RB_MODIFY_REQ
:
{
send_msg
((
void
*
)
&
S_rrc
,
msg_rrc_rb_modify_resp
(
Header
->
inst
,
Header
->
Trans_id
));
msg
(
"[RRM]>[RRC][Inst %d]:RRM_RB_MODIFY_REQ
\n
"
,
Header
->
inst
);
rrc_config_req
(
Header
->
inst
,
Data
,
Header
->
msg_type
,
Header
->
Trans_id
);
}
case
RRM_RB_RELEASE_REQ
:
{
send_msg
((
void
*
)
&
S_rrc
,
msg_rrc_rb_release_resp
(
Header
->
inst
,
Header
->
Trans_id
));
msg
(
"[RRM]>[RRC][Inst %d]:RRM_RB_RELEASE_REQ
\n
"
,
Header
->
inst
);
rrc_config_req
(
Header
->
inst
,
Data
,
Header
->
msg_type
,
Header
->
Trans_id
);
}
case
RRCI_CX_ESTABLISH_RESP
:
{
rrci_cx_establish_resp_t
*
p
=
(
rrci_cx_establish_resp_t
*
)
Data
;
unsigned
char
CH_index
,
i
;
msg
(
"[RRCI]>[RRC][Inst %d]:RRCI_CX_ESTABLISH_RESP
\n
"
,
Header
->
inst
);
for
(
i
=
0
;
i
<
NB_SIG_CNX_UE
;
i
++
)
if
(
!
bcmp
(
&
UE_rrc_inst
[
Header
->
inst
-
NB_CH_INST
].
Info
[
i
].
CH_mac_id
,
&
p
->
L2_id
,
sizeof
(
L2_ID
)))
{
CH_index
=
i
;
break
;
}
if
(
i
==
NB_SIG_CNX_UE
)
{
msg
(
"[RRC] FATAL: CH_INDEX NOT FOUND
\n
"
);
return
;
}
UE_rrc_inst
[
Header
->
inst
-
NB_CH_INST
].
Srb2
[
CH_index
].
Srb_info
.
IP_addr_type
=
p
->
L3_info_t
;
if
(
p
->
L3_info_t
==
IPv4_ADDR
)
{
memcpy
(
&
UE_rrc_inst
[
Header
->
inst
-
NB_CH_INST
].
Srb2
[
CH_index
].
Srb_info
.
IP_addr
,
p
->
L3_info
,
4
);
}
else
{
memcpy
(
&
UE_rrc_inst
[
Header
->
inst
-
NB_CH_INST
].
Srb2
[
CH_index
].
Srb_info
.
IP_addr
,
p
->
L3_info
,
16
);
}
}
break
;
case
RRM_SENSING_MEAS_REQ
:
{
// rrm_sensing_meas_req_t *p = (rrm_sensing_meas_req_t *) sock_msg ;
send_msg
((
void
*
)
&
S_rrc
,
msg_rrc_sensing_meas_resp
(
Header
->
inst
,
Header
->
Trans_id
));
msg
(
"[RRM]>[RRC][Inst %d]:RRM_SENSING_MEAS_REQ
\n
"
,
Header
->
inst
);
// rrc_meas_req(header->inst,p,RRC_MEAS_ADD);
}
break
;
case
RRM_SENSING_MEAS_RESP
:
{
msg
(
"[RRM]>[RRC][Inst %d]:RRM_SENSING_MEAS_RESP
\n
"
,
Header
->
inst
);
//rrm_rrc_meas_resp(header->inst,header->Trans_id);
}
break
;
case
RRM_SCAN_ORD
:
msg
(
"[RRM]>[RRC][Inst %d]:RRM_SCAN_ORD
\n
"
,
Header
->
inst
);
//memcpy(&CH_rrc_inst[0].Rrm_init_scan_req,(rrm_init_scan_req_t *) Data,sizeof(rrm_init_scan_req_t));
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break
;
case
RRM_INIT_SCAN_REQ
:
msg
(
"[RRM]>[RRC][Inst %d]:RRM_INIT_SCAN_REQ
\n
"
,
Header
->
inst
);
memcpy
(
&
CH_rrc_inst
[
0
].
Rrm_init_scan_req
,(
rrm_init_scan_req_t
*
)
Data
,
sizeof
(
rrm_init_scan_req_t
));
CH_rrc_inst
[
0
].
Last_scan_req
=
Rrc_xface
->
Frame_index
;
///send over air
break
;
case
RRM_END_SCAN_REQ
:
msg
(
"[RRM]>[RRC][Inst %d]:RRM_END_SCAN_REQ
\n
"
,
Header
->
inst
);
memcpy
(
&
Mac_id
.
L2_id
[
0
],
Data
,
sizeof
(
L2_ID
));
unsigned
char
UE_index
=
Mac_id
.
L2_id
[
0
]
-
NB_CH_MAX
+
1
;
UE_rrc_inst
[
0
].
Srb2
[
UE_index
].
Srb_info
.
Tx_buffer
.
Payload
[
0
]
=
100
;
msg
(
"SRB_ID %d
\n
"
,
CH_rrc_inst
[
0
].
Srb2
[
UE_index
].
Srb_info
.
Srb_id
);
Mac_rlc_xface
->
rrc_rlc_data_req
(
0
,
CH_rrc_inst
[
0
].
Srb2
[
UE_index
].
Srb_info
.
Srb_id
,
0
,
0
,
1
,
CH_rrc_inst
[
0
].
Srb2
[
UE_index
].
Srb_info
.
Tx_buffer
.
Payload
);
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break
;
default
:
msg
(
"[L3_xface]WARNING: msg unknown %d
\n
"
,
Header
->
msg_type
)
;
}
}
}
openair2/RRC/LTE/utils.c
View file @
b480c8ca
...
...
@@ -52,8 +52,7 @@ uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index)
}
msg
(
"NO FREE DTCH LCHAN, exit...
\n
"
);
Mac_rlc_xface
->
macphy_exit
(
"NO FREE DTCH LCHAN, exit"
);
exit
(
1
);
return
0
;
}
...
...
targets/ARCH/tcp_bridge/tcp_bridge_oai.c
View file @
b480c8ca
This diff is collapsed.
Click to expand it.
targets/COMMON/openairinterface5g_limits.h
View file @
b480c8ca
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
#include <platform_constants.h>
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
# define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_ENB
#define NUMBER_OF_CONNECTED_eNB_MAX MAX_MANAGED_ENB_PER_MOBILE
#define NUMBER_OF_eNB_MAX MAX_eNB
#if defined(MANAGED_RF)
# define NUMBER_OF_RU_MAX 2
# ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
// UESIM_EXPANSION is used to be same value of NUMBER_OF_UE_MAX
// in eNB and UE.
// now , if we use --mu option in UE, compiling error will occur.
// This problem will be fixed in the future.
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
#else
# define NUMBER_OF_eNB_MAX 7
# define NUMBER_OF_RU_MAX 32
# ifndef UE_EXPANSION
/* if the value of MAX_MOBILES_PER_ENB and NUMBER_OF_UE_MAX is different,
eNB process will exit because unexpected access happens.
Now some parts are using NUMBER_OF_UE_MAX
and the other are using MAX_MOBILES_PER_ENB in for-loop.
*/
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# endif
# if defined(STANDALONE) && STANDALONE==1
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_RU_MAX
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_UE_MAX 3
# define NUMBER_OF_RU_MAX 3
# endif
# if defined(LARGE_SCALE) && LARGE_SCALE
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_CONNECTED_eNB_MAX
# undef NUMBER_OF_RU_MAX
# define NUMBER_OF_eNB_MAX 2
# define NUMBER_OF_UE_MAX 120
# define NUMBER_OF_RU_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
# endif
#endif
...
...
targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
View file @
b480c8ca
...
...
@@ -224,7 +224,6 @@ int main(int argc, char **argv)
char
*
g_log_level
=
"trace"
;
// by default global log level is set to trace
mac_xface
=
malloc
(
sizeof
(
MAC_xface
));
Mac_rlc_xface
=
(
MAC_RLC_XFACE
*
)
malloc16
(
sizeof
(
MAC_RLC_XFACE
));
rlc_module_init
();
pdcp_module_init
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment