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
canghaiwuhen
OpenXG-RAN
Commits
ca790b59
Commit
ca790b59
authored
Feb 05, 2016
by
Aikaterini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve errors after merging with develop / add configuration file for RRH with USRP
parent
8fc747ac
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
375 additions
and
376 deletions
+375
-376
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-51
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+5
-2
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
+8
-8
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+16
-21
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+15
-18
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+23
-73
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.usrpb210.conf
...ECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.usrpb210.conf
+189
-0
targets/RT/USER/UE_transport_IQ.c
targets/RT/USER/UE_transport_IQ.c
+15
-15
targets/RT/USER/eNB_transport_IQ.c
targets/RT/USER/eNB_transport_IQ.c
+97
-186
targets/RT/USER/rrh_gw.c
targets/RT/USER/rrh_gw.c
+5
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
ca790b59
...
...
@@ -749,56 +749,6 @@ include_directories("${OPENAIR_DIR}")
# Utilities Library
################
if
(
ENB_AGENT
)
# set the version of protobuf messages, V3 not supported yet
add_list1_option
(
PRPT_VERSION V2
"PRPT MSG protobuf grammar version"
V2 V3
)
if
(
${
PRPT_VERSION
}
STREQUAL
"V2"
)
set
(
PRPTDIR V2
)
elseif
(
${
PRPT_VERSION
}
STREQUAL
"V3"
)
set
(
PRPTDIR V3
)
endif
(
${
PRPT_VERSION
}
STREQUAL
"V2"
)
set
(
PRPT_MSG_DIR
${
OPENAIR2_DIR
}
/ENB_APP/MESSAGES/
${
PRPTDIR
}
)
set
(
PRPT_MSG_FILES
${
PRPT_MSG_DIR
}
/header.proto
${
PRPT_MSG_DIR
}
/progran.proto
${
PRPT_MSG_DIR
}
/stats_common.proto
${
PRPT_MSG_DIR
}
/stats_messages.proto
)
set
(
PRPT_C_DIR
${
protobuf_generated_dir
}
/
${
PRPTDIR
}
)
message
(
"calling
${
protoc_call
}
${
PRPT_C_DIR
}
${
PRPT_MSG_FILES
}
"
)
execute_process
(
COMMAND
${
protoc_call
}
${
PRPT_C_DIR
}
${
PRPT_MSG_FILES
}
)
file
(
GLOB PRPT_source
${
PRPT_C_DIR
}
/*.c
)
set
(
PRPT_OAI_generated
${
PRPT_C_DIR
}
/header.pb-c.c
${
PRPT_C_DIR
}
/progran.pb-c.c
${
PRPT_C_DIR
}
/stats_common.pb-c.c
${
PRPT_C_DIR
}
/stats_messages.pb-c.c
)
file
(
GLOB prpt_h
${
PRPT_C_DIR
}
/*.h
)
set
(
prpt_h
${
prpt_h
}
)
add_library
(
PRPT_MSG
${
PRPT_OAI_generated
}
${
PRPT_source
}
)
include_directories
(
"
${
PRPT_C_DIR
}
"
)
add_library
(
ASYNC_IF
${
OPENAIR2_DIR
}
/UTIL/ASYNC_IF/socket_link.c
${
OPENAIR2_DIR
}
/UTIL/ASYNC_IF/link_manager.c
${
OPENAIR2_DIR
}
/UTIL/ASYNC_IF/message_queue.c
)
set
(
ASYNC_IF_LIB ASYNC_IF
)
include_directories
(
${
OPENAIR2_DIR
}
/UTIL/ASYNC_IF
)
endif
()
add_library
(
HASHTABLE
${
OPENAIR_DIR
}
/common/utils/collection/hashtable/hashtable.c
${
OPENAIR_DIR
}
/common/utils/collection/hashtable/obj_hashtable.c
...
...
@@ -955,6 +905,7 @@ set(PHY_SRC
${
OPENAIR1_DIR
}
/PHY/CODING/viterbi_lte.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_init.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/file_output.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_dfts.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
...
...
@@ -1706,7 +1657,7 @@ add_executable(oaisim_nos1
target_include_directories
(
oaisim_nos1 PUBLIC
${
OPENAIR_TARGETS
}
/SIMU/USER
)
target_link_libraries
(
oaisim_nos1
-Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
${
ASYNC_IF_LIB
}
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
-Wl,--end-group
)
target_link_libraries
(
oaisim_nos1
${
LIBXML2_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
...
...
targets/ARCH/COMMON/common_lib.c
View file @
ca790b59
...
...
@@ -51,8 +51,11 @@ int set_device(openair0_device *device) {
case
EXMIMO_DEV
:
printf
(
"[%s] has loaded EXPRESS MIMO device.
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
break
;
case
USRP_DEV
:
printf
(
"[%s] has loaded USRP device.
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
case
USRP_B200_DEV
:
printf
(
"[%s] has loaded USRP B200 device.
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
break
;
case
USRP_X300_DEV
:
printf
(
"[%s] has loaded USRP X300 device.
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
break
;
case
BLADERF_DEV
:
printf
(
"[%s] has loaded BLADERF device.
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
View file @
ca790b59
...
...
@@ -72,17 +72,17 @@ int eth_socket_init_raw(openair0_device *device) {
int
sock_proto
=
0
;
if
(
device
->
host_type
==
RRH_HOST
)
{
/* RRH doesn't know remote MAC(will be retrieved from first packet send from BBU) and remote port(don't care) */
local_mac
=
device
->
openair0_cfg
.
my_addr
;
local_port
=
device
->
openair0_cfg
.
my_port
;
local_mac
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_mac
=
malloc
(
ETH_ALEN
);
memset
(
remote_mac
,
0
,
ETH_ALEN
);
remote_port
=
0
;
printf
(
"[%s] local MAC addr %s remote MAC addr %s
\n
"
,
"RRH"
,
local_mac
,
remote_mac
);
}
else
{
local_mac
=
device
->
openair0_cfg
.
my_addr
;
local_port
=
device
->
openair0_cfg
.
my_port
;
remote_mac
=
device
->
openair0_cfg
.
remote_addr
;
remote_port
=
device
->
openair0_cfg
.
remote_port
;
local_mac
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_mac
=
device
->
openair0_cfg
->
remote_addr
;
remote_port
=
device
->
openair0_cfg
->
remote_port
;
printf
(
"[%s] local MAC addr %s remote MAC addr %s
\n
"
,
"BBU"
,
local_mac
,
remote_mac
);
}
...
...
@@ -109,7 +109,7 @@ int eth_socket_init_raw(openair0_device *device) {
local_addr
[
Mod_id
].
sll_family
=
AF_PACKET
;
local_addr
[
Mod_id
].
sll_ifindex
=
if_index
[
Mod_id
].
ifr_ifindex
;
/* hear traffic from specific protocol*/
local_addr
[
Mod_id
].
sll_protocol
=
htons
((
short
)
device
->
openair0_cfg
.
my_port
);
local_addr
[
Mod_id
].
sll_protocol
=
htons
((
short
)
device
->
openair0_cfg
->
my_port
);
local_addr
[
Mod_id
].
sll_halen
=
ETH_ALEN
;
local_addr
[
Mod_id
].
sll_pkttype
=
PACKET_OTHERHOST
;
addr_len
[
Mod_id
]
=
sizeof
(
struct
sockaddr_ll
);
...
...
@@ -122,7 +122,7 @@ int eth_socket_init_raw(openair0_device *device) {
/* Construct the Ethernet header */
ether_aton_r
(
local_mac
,
(
struct
ether_addr
*
)(
&
(
eh
.
ether_shost
)));
ether_aton_r
(
remote_mac
,
(
struct
ether_addr
*
)(
&
(
eh
.
ether_dhost
)));
eh
.
ether_type
=
htons
((
short
)
device
->
openair0_cfg
.
my_port
);
eh
.
ether_type
=
htons
((
short
)
device
->
openair0_cfg
->
my_port
);
printf
(
"[%s] binding mod_%d to hardware address %x:%x:%x:%x:%x:%x
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
),
Mod_id
,
eh
.
ether_shost
[
0
],
eh
.
ether_shost
[
1
],
eh
.
ether_shost
[
2
],
eh
.
ether_shost
[
3
],
eh
.
ether_shost
[
4
],
eh
.
ether_shost
[
5
]);
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
ca790b59
...
...
@@ -71,18 +71,18 @@ int addr_len[MAX_INST];
int
sock_type
=
0
;
int
sock_proto
=
0
;
int
enable
=
1
;
if
(
device
->
host_type
==
RRH_HOST
)
{
local_ip
=
device
->
openair0_cfg
.
my_addr
;
local_port
=
device
->
openair0_cfg
.
my_port
;
local_ip
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_ip
=
"0.0.0.0"
;
remote_port
=
0
;
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"RRH"
,
local_ip
,
local_port
);
}
else
{
local_ip
=
device
->
openair0_cfg
.
my_addr
;
local_port
=
device
->
openair0_cfg
.
my_port
;
remote_ip
=
device
->
openair0_cfg
.
remote_addr
;
remote_port
=
device
->
openair0_cfg
.
remote_port
;
local_ip
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_ip
=
device
->
openair0_cfg
->
remote_addr
;
remote_port
=
device
->
openair0_cfg
->
remote_port
;
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"BBU"
,
local_ip
,
local_port
);
}
...
...
@@ -123,22 +123,17 @@ int addr_len[MAX_INST];
}
/* apply additional configuration */
//ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg
.
samples_per_packet));
//ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg
->
samples_per_packet));
/* if RRH, then I am the server, so bind */
if
(
device
->
host_type
==
RRH_HOST
)
{
/* want to receive -> so bind */
if
(
bind
(
eth
->
sockfd
[
Mod_id
],(
struct
sockaddr
*
)
&
local_addr
[
Mod_id
],
addr_len
[
Mod_id
])
<
0
)
{
perror
(
"ETHERNET: Cannot bind to socket"
);
exit
(
0
);
}
else
{
printf
(
"[%s] binding mod_%d to %s:%d
\n
"
,
"RRH"
,
Mod_id
,
str_local
,
ntohs
(
local_addr
[
Mod_id
].
sin_port
));
}
/* if BBU, then I am a client, so connect */
}
else
{
printf
(
"[%s] Connecting to %s:%d
\n
"
,
"BBU"
,
str_remote
,
ntohs
(
dest_addr
[
Mod_id
].
sin_port
));
}
printf
(
"ssssssssssssssss
\n
"
);
return
0
;
}
...
...
@@ -359,14 +354,14 @@ int eth_get_dev_conf_udp(openair0_device *device) {
/* get remote ip address and port */
/* inet_ntop(AF_INET, &(dest_addr[Mod_id].sin_addr), str1, INET_ADDRSTRLEN); */
/* device->openair0_cfg
.
remote_port =ntohs(dest_addr[Mod_id].sin_port); */
/* device->openair0_cfg
.
remote_addr =str1; */
/* device->openair0_cfg
->
remote_port =ntohs(dest_addr[Mod_id].sin_port); */
/* device->openair0_cfg
->
remote_addr =str1; */
/* /\* restore local ip address and port *\/ */
/* inet_ntop(AF_INET, &(local_addr[Mod_id].sin_addr), str, INET_ADDRSTRLEN); */
/* device->openair0_cfg
.
my_port =ntohs(local_addr[Mod_id].sin_port); */
/* device->openair0_cfg
.
my_addr =str; */
/* device->openair0_cfg
->
my_port =ntohs(local_addr[Mod_id].sin_port); */
/* device->openair0_cfg
->
my_addr =str; */
/* printf("[RRH] mod_%d socket %d connected to BBU %s:%d %s:%d\n", Mod_id, eth->sockfd[Mod_id],str1, device->openair0_cfg
.remote_port, str, device->openair0_cfg.
my_port); */
/* printf("[RRH] mod_%d socket %d connected to BBU %s:%d %s:%d\n", Mod_id, eth->sockfd[Mod_id],str1, device->openair0_cfg
->remote_port, str, device->openair0_cfg->
my_port); */
return
0
;
}
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
ca790b59
...
...
@@ -72,7 +72,7 @@ int trx_eth_start(openair0_device *device) {
if
(
eth_get_dev_conf_raw
(
device
)
!=
0
)
return
-
1
;
}
/* adjust MTU wrt number of samples per packet */
if
(
ethernet_tune
(
device
,
MTU_SIZE
,
RAW_PACKET_SIZE_BYTES
(
device
->
openair0_cfg
.
samples_per_packet
))
!=
0
)
return
-
1
;
if
(
ethernet_tune
(
device
,
MTU_SIZE
,
RAW_PACKET_SIZE_BYTES
(
device
->
openair0_cfg
->
samples_per_packet
))
!=
0
)
return
-
1
;
}
else
{
if
(
eth_socket_init_udp
(
device
)
!=
0
)
return
-
1
;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
...
...
@@ -82,7 +82,7 @@ int trx_eth_start(openair0_device *device) {
if
(
eth_get_dev_conf_udp
(
device
)
!=
0
)
return
-
1
;
}
/* adjust MTU wrt number of samples per packet */
if
(
ethernet_tune
(
device
,
MTU_SIZE
,
UDP_PACKET_SIZE_BYTES
(
device
->
openair0_cfg
.
samples_per_packet
))
!=
0
)
return
-
1
;
if
(
ethernet_tune
(
device
,
MTU_SIZE
,
UDP_PACKET_SIZE_BYTES
(
device
->
openair0_cfg
->
samples_per_packet
))
!=
0
)
return
-
1
;
}
return
0
;
...
...
@@ -93,7 +93,7 @@ void trx_eth_end(openair0_device *device) {
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
int
Mod_id
=
device
->
Mod_id
;
/*destroys socket only for the processes that call the eth_end fuction-- shutdown() for beaking the pipe */
/*
destroys socket only for the processes that call the eth_end fuction-- shutdown() for beaking the pipe */
if
(
close
(
eth
->
sockfd
[
Mod_id
])
<
0
)
{
perror
(
"ETHERNET: Failed to close socket"
);
exit
(
0
);
...
...
@@ -177,7 +177,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
if
(
1
==
0
)
{
/***************** get working interface name ***************************/
/* convert ascii ip address from config file to network binary format */
inet_aton
(
device
->
openair0_cfg
.
my_addr
,
&
ia
);
inet_aton
(
device
->
openair0_cfg
->
my_addr
,
&
ia
);
/* look for the interface used, we have its ip address get info on all our network interfaces*/
ids
=
if_nameindex
();
/* loop on these network interfaces */
...
...
@@ -201,7 +201,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
}
if_freenameindex
(
ids
);
if
(
if_name
==
NULL
)
{
printf
(
"Unable to find interface name for %s
\n
"
,
device
->
openair0_cfg
.
my_addr
);
printf
(
"Unable to find interface name for %s
\n
"
,
device
->
openair0_cfg
->
my_addr
);
return
-
1
;
}
eth
->
if_name
[
Mod_id
]
=
if_name
;
...
...
@@ -339,12 +339,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, cha
eth_state_t
*
eth
=
(
eth_state_t
*
)
malloc
(
sizeof
(
eth_state_t
));
memset
(
eth
,
0
,
sizeof
(
eth_state_t
));
int
card
=
0
;
/*hardcoded!!!!*/
eth
->
flags
=
ETH_RAW_MODE
;
eth
->
buffer_size
=
(
unsigned
int
)
openair0_cfg
[
card
].
samples_per_packet
*
sizeof
(
int32_t
);
printf
(
"[ETHERNET]: Initializing openair0_device for %s ...
\n
"
,
((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
));
device
->
Mod_id
=
num_devices_eth
++
;
device
->
transp_type
=
ETHERNET_TP
;
...
...
@@ -370,7 +367,7 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, cha
device
->
priv
=
eth
;
openair0_cfg
->
iq_txshift
=
5
;
openair0_cfg
->
iq_rxrescale
=
15
;
memcpy
((
void
*
)
&
device
->
openair0_cfg
,(
void
*
)
openair0_cfg
,
sizeof
(
openair0_config_t
));
memcpy
((
void
*
)
device
->
openair0_cfg
,(
void
*
)
openair0_cfg
,
sizeof
(
openair0_config_t
));
return
0
;
}
...
...
@@ -407,14 +404,14 @@ void dump_dev(openair0_device *device) {
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
printf
(
"Ethernet device interface %i configuration:
\n
"
,
device
->
openair0_cfg
.
Mod_id
);
printf
(
" Log level is %i :
\n
"
,
device
->
openair0_cfg
.
log_level
);
printf
(
"Ethernet device interface %i configuration:
\n
"
,
device
->
openair0_cfg
->
Mod_id
);
printf
(
" Log level is %i :
\n
"
,
device
->
openair0_cfg
->
log_level
);
printf
(
" RB number: %i, sample rate: %lf
\n
"
,
device
->
openair0_cfg
.
num_rb_dl
,
device
->
openair0_cfg
.
sample_rate
);
printf
(
"
Delay: %i, Forward samples
: %u
\n
"
,
device
->
openair0_cfg
.
tx_delay
,
device
->
openair0_cfg
.
tx_forward_nsamps
);
device
->
openair0_cfg
->
num_rb_dl
,
device
->
openair0_cfg
->
sample_rate
);
printf
(
"
Scheduling_advance: %i, Sample_advance
: %u
\n
"
,
device
->
openair0_cfg
->
tx_scheduling_advance
,
device
->
openair0_cfg
->
tx_sample_advance
);
printf
(
" BBU configured for %i tx/%i rx channels)
\n
"
,
device
->
openair0_cfg
.
tx_num_channels
,
device
->
openair0_cfg
.
rx_num_channels
);
device
->
openair0_cfg
->
tx_num_channels
,
device
->
openair0_cfg
->
rx_num_channels
);
printf
(
" Running flags: %s %s %s
\n
"
,
((
eth
->
flags
&
ETH_RAW_MODE
)
?
"RAW socket mode - "
:
""
),
((
eth
->
flags
&
ETH_UDP_MODE
)
?
"UDP socket mode - "
:
""
),
...
...
@@ -425,14 +422,14 @@ void dump_dev(openair0_device *device) {
void
inline
dump_txcounters
(
openair0_device
*
device
)
{
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
printf
(
" Ethernet device interface %i, tx counters:
\n
"
,
device
->
openair0_cfg
.
Mod_id
);
printf
(
" Ethernet device interface %i, tx counters:
\n
"
,
device
->
openair0_cfg
->
Mod_id
);
printf
(
" Sent packets: %llu send errors: %i
\n
"
,
eth
->
tx_count
,
eth
->
num_tx_errors
);
}
void
inline
dump_rxcounters
(
openair0_device
*
device
)
{
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
printf
(
" Ethernet device interface %i rx counters:
\n
"
,
device
->
openair0_cfg
.
Mod_id
);
printf
(
" Ethernet device interface %i rx counters:
\n
"
,
device
->
openair0_cfg
->
Mod_id
);
printf
(
" Received packets: %llu missed packets errors: %i
\n
"
,
eth
->
rx_count
,
eth
->
num_underflows
);
}
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
ca790b59
...
...
@@ -172,7 +172,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
if
(
device
->
type
==
USRP_B200_
IF
)
{
if
(
device
->
type
==
USRP_B200_
DEV
)
{
if
(
cc
>
1
)
{
// receive multiple channels (e.g. RF A and RF B)
std
::
vector
<
void
*>
buff_ptrs
;
...
...
@@ -198,7 +198,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
}
}
}
else
if
(
device
->
type
==
USRP_X300_
IF
)
{
}
else
if
(
device
->
type
==
USRP_X300_
DEV
)
{
if
(
cc
>
1
)
{
// receive multiple channels (e.g. RF A and RF B)
std
::
vector
<
void
*>
buff_ptrs
;
...
...
@@ -395,15 +395,9 @@ extern "C" {
// Initialize USRP device
<<<<<<<
HEAD
std
::
string
args
=
"type=b200"
;
std
::
string
args
=
"type=b200"
;
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
size_t
i
;
printf
(
"Checking for USRPs
\n
"
);
=======
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
size_t
i
;
...
...
@@ -413,29 +407,19 @@ extern "C" {
sscanf
(
uhd
::
get_version_string
().
c_str
(),
"%d.%d.%d"
,
&
vers
,
&
subvers
,
&
subsubvers
);
printf
(
"Checking for USRPs : UHD %s (%d.%d.%d)
\n
"
,
uhd
::
get_version_string
().
c_str
(),
vers
,
subvers
,
subsubvers
);
>>>>>>>
acd607fa359709ba16a83437f483c230cee1d9b0
if
(
device_adds
.
size
()
==
0
)
{
double
usrp_master_clock
=
184.32e6
;
std
::
string
args
=
"type=x300"
;
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
if
(
device_adds
.
size
()
==
0
)
<<<<<<<
HEAD
{
std
::
cerr
<<
"No USRP Device Found. "
<<
std
::
endl
;
free
(
s
);
return
-
1
;
}
=======
{
std
::
cerr
<<
"No USRP Device Found. "
<<
std
::
endl
;
free
(
s
);
...
...
@@ -444,17 +428,16 @@ extern "C" {
}
>>>>>>>
acd607fa359709ba16a83437f483c230cee1d9b0
printf
(
"Found USRP X300
\n
"
);
s
->
usrp
=
uhd
::
usrp
::
multi_usrp
::
make
(
args
);
// s->usrp->set_rx_subdev_spec(rx_subdev);
// s->usrp->set_tx_subdev_spec(tx_subdev);
// lock mboard clocks
s
->
usrp
->
set_clock_source
(
"internal"
);
//Setting device type to USRP X300/X310
device
->
type
=
USRP_X300_
IF
;
device
->
type
=
USRP_X300_
DEV
;
// this is not working yet, master clock has to be set via constructor
// set master clock rate and sample rate for tx & rx for streaming
...
...
@@ -511,11 +494,8 @@ extern "C" {
// s->usrp->set_clock_source("internal");
// set master clock rate and sample rate for tx & rx for streaming
device
->
type
=
USRP_B200_
IF
;
device
->
type
=
USRP_B200_
DEV
;
<<<<<<<
HEAD
=======
if
((
vers
==
3
)
&&
(
subvers
==
9
)
&&
(
subsubvers
>=
2
))
{
openair0_cfg
[
0
].
rx_gain_calib_table
=
calib_table_b210
;
...
...
@@ -574,20 +554,14 @@ extern "C" {
}
}
>>>>>>>
acd607fa359709ba16a83437f483c230cee1d9b0
for
(
i
=
0
;
i
<
s
->
usrp
->
get_rx_num_channels
();
i
++
)
{
if
(
i
<
openair0_cfg
[
0
].
rx_num_channels
)
{
s
->
usrp
->
set_rx_rate
(
openair0_cfg
[
0
].
sample_rate
,
i
);
s
->
usrp
->
set_rx_bandwidth
(
openair0_cfg
[
0
].
rx_bw
,
i
);
printf
(
"Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)
\n
"
,
i
,
s
->
usrp
->
get_rx_num_channels
(),
openair0_cfg
[
0
].
rx_bw
/
1e6
,
s
->
usrp
->
get_rx_bandwidth
(
i
)
/
1e6
);
s
->
usrp
->
set_rx_freq
(
openair0_cfg
[
0
].
rx_freq
[
i
],
i
);
<<<<<<<
HEAD
set_rx_gain_offset
(
&
openair0_cfg
[
0
],
i
);
=======
set_rx_gain_offset
(
&
openair0_cfg
[
0
],
i
,
bw_gain_adjust
);
>>>>>>>
acd607fa359709ba16a83437f483c230cee1d9b0
::
uhd
::
gain_range_t
gain_range
=
s
->
usrp
->
get_rx_gain_range
(
i
);
// limit to maximum gain
if
(
openair0_cfg
[
0
].
rx_gain
[
i
]
-
openair0_cfg
[
0
].
rx_gain_offset
[
i
]
>
gain_range
.
stop
())
{
...
...
@@ -610,11 +584,11 @@ extern "C" {
s
->
usrp
->
set_tx_gain
(
openair0_cfg
[
0
].
tx_gain
[
i
],
i
);
}
}
// display USRP settings
std
::
cout
<<
boost
::
format
(
"Actual master clock: %fMHz..."
)
%
(
s
->
usrp
->
get_master_clock_rate
()
/
1e6
)
<<
std
::
endl
;
// create tx & rx streamer
uhd
::
stream_args_t
stream_args_rx
(
"sc16"
,
"sc16"
);
//stream_args_rx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].rx_num_channels*openair0_cfg[0].samples_per_packet));
...
...
@@ -623,17 +597,18 @@ extern "C" {
s
->
rx_stream
=
s
->
usrp
->
get_rx_stream
(
stream_args_rx
);
std
::
cout
<<
boost
::
format
(
"rx_max_num_samps %u"
)
%
(
s
->
rx_stream
->
get_max_num_samps
())
<<
std
::
endl
;
//openair0_cfg[0].samples_per_packet = s->rx_stream->get_max_num_samps();
uhd
::
stream_args_t
stream_args_tx
(
"sc16"
,
"sc16"
);
//stream_args_tx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].tx_num_channels*openair0_cfg[0].samples_per_packet));
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
stream_args_tx
.
channels
.
push_back
(
i
);
stream_args_tx
.
channels
.
push_back
(
i
);
s
->
tx_stream
=
s
->
usrp
->
get_tx_stream
(
stream_args_tx
);
std
::
cout
<<
boost
::
format
(
"tx_max_num_samps %u"
)
%
(
s
->
tx_stream
->
get_max_num_samps
())
<<
std
::
endl
;
s
->
usrp
->
set_time_now
(
uhd
::
time_spec_t
(
0.0
));
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
if
(
i
<
openair0_cfg
[
0
].
rx_num_channels
)
{
printf
(
"RX Channel %lu
\n
"
,
i
);
...
...
@@ -644,8 +619,9 @@ extern "C" {
std
::
cout
<<
boost
::
format
(
"Actual RX antenna: %s..."
)
%
(
s
->
usrp
->
get_rx_antenna
(
i
))
<<
std
::
endl
;
}
}
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
{
if
(
i
<
openair0_cfg
[
0
].
tx_num_channels
)
{
printf
(
"TX Channel %lu
\n
"
,
i
);
std
::
cout
<<
std
::
endl
<<
boost
::
format
(
"Actual TX sample rate: %fMSps..."
)
%
(
s
->
usrp
->
get_tx_rate
(
i
)
/
1e6
)
<<
std
::
endl
;
...
...
@@ -655,11 +631,10 @@ extern "C" {
std
::
cout
<<
boost
::
format
(
"Actual TX antenna: %s..."
)
%
(
s
->
usrp
->
get_tx_antenna
(
i
))
<<
std
::
endl
;
}
}
std
::
cout
<<
boost
::
format
(
"Device timestamp: %f..."
)
%
(
s
->
usrp
->
get_time_now
().
get_real_secs
())
<<
std
::
endl
;
device
->
priv
=
s
;
device
->
type
=
USRP_DEV
;
device
->
trx_start_func
=
trx_usrp_start
;
device
->
trx_write_func
=
trx_usrp_write
;
device
->
trx_read_func
=
trx_usrp_read
;
...
...
@@ -673,37 +648,12 @@ extern "C" {
s
->
sample_rate
=
openair0_cfg
[
0
].
sample_rate
;
// TODO:
// init tx_forward_nsamps based usrp_time_offset ex
/*
if(is_equal(s->sample_rate, (double)30.72e6))
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
30.72e6
))
s
->
tx_forward_nsamps
=
176
;
if(is_equal(s->sample_rate, (double)15.36e6))
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
15.36e6
))
s
->
tx_forward_nsamps
=
90
;
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
7.68e6
))
s->tx_forward_nsamps = 50;*/
/* move device specific parameters from lte-softmodem.c here */
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
30.72e6
))
{
openair0_cfg
->
tx_delay
=
8
;
s
->
tx_forward_nsamps
=
175
;
openair0_cfg
->
tx_forward_nsamps
=
175
;
}
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
15.36e6
))
{
openair0_cfg
->
tx_delay
=
5
;
s
->
tx_forward_nsamps
=
95
;
openair0_cfg
->
tx_forward_nsamps
=
95
;
}
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
7.68e6
))
{
openair0_cfg
->
tx_delay
=
5
;
s
->
tx_forward_nsamps
=
70
;
openair0_cfg
->
tx_forward_nsamps
=
70
;
}
if
(
is_equal
(
s
->
sample_rate
,
(
double
)
1.92e6
))
{
openair0_cfg
->
tx_delay
=
8
;
s
->
tx_forward_nsamps
=
40
;
openair0_cfg
->
tx_forward_nsamps
=
40
;
}
openair0_cfg
->
iq_txshift
=
5
;
openair0_cfg
->
iq_rxrescale
=
15
;
printf
(
"check params %d:%d"
,
openair0_cfg
->
tx_forward_nsamps
,
openair0_cfg
->
tx_delay
);
s
->
tx_forward_nsamps
=
50
;
return
0
;
}
}
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.usrpb210.conf
0 → 100644
View file @
ca790b59
Active_eNBs
= (
"eNB_Eurecom_LTEBox"
);
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity
=
"none"
;
eNBs
=
(
{
//////////
Identification
parameters
:
eNB_ID
=
0
xe00
;
cell_type
=
"CELL_MACRO_ENB"
;
eNB_name
=
"eNB_Eurecom_LTEBox"
;
//
Tracking
area
code
,
0
x0000
and
0
xfffe
are
reserved
values
tracking_area_code
=
"1"
;
mobile_country_code
=
"208"
;
mobile_network_code
=
"92"
;
//////////
Physical
parameters
:
component_carriers
= (
{
frame_type
=
"FDD"
;
tdd_config
=
3
;
tdd_config_s
=
0
;
prefix_type
=
"NORMAL"
;
eutra_band
=
7
;
downlink_frequency
=
2680000000
L
;
uplink_frequency_offset
= -
120000000
;
Nid_cell
=
0
;
N_RB_DL
=
25
;
Nid_cell_mbsfn
=
0
;
nb_antennas_tx
=
1
;
nb_antennas_rx
=
1
;
tx_gain
=
90
;
rx_gain
=
120
;
prach_root
=
0
;
prach_config_index
=
0
;
prach_high_speed
=
"DISABLE"
;
prach_zero_correlation
=
1
;
prach_freq_offset
=
2
;
pucch_delta_shift
=
1
;
pucch_nRB_CQI
=
1
;
pucch_nCS_AN
=
0
;
pucch_n1_AN
=
32
;
pdsch_referenceSignalPower
= -
29
;
pdsch_p_b
=
0
;
pusch_n_SB
=
1
;
pusch_enable64QAM
=
"DISABLE"
;
pusch_hoppingMode
=
"interSubFrame"
;
pusch_hoppingOffset
=
0
;
pusch_groupHoppingEnabled
=
"ENABLE"
;
pusch_groupAssignment
=
0
;
pusch_sequenceHoppingEnabled
=
"DISABLE"
;
pusch_nDMRS1
=
1
;
phich_duration
=
"NORMAL"
;
phich_resource
=
"ONESIXTH"
;
srs_enable
=
"DISABLE"
;
/*
srs_BandwidthConfig
=;
srs_SubframeConfig
=;
srs_ackNackST
=;
srs_MaxUpPts
=;*/
pusch_p0_Nominal
= -
90
;
pusch_alpha
=
"AL1"
;
pucch_p0_Nominal
= -
96
;
msg3_delta_Preamble
=
6
;
pucch_deltaF_Format1
=
"deltaF2"
;
pucch_deltaF_Format1b
=
"deltaF3"
;
pucch_deltaF_Format2
=
"deltaF0"
;
pucch_deltaF_Format2a
=
"deltaF0"
;
pucch_deltaF_Format2b
=
"deltaF0"
;
rach_numberOfRA_Preambles
=
64
;
rach_preamblesGroupAConfig
=
"DISABLE"
;
/*
rach_sizeOfRA_PreamblesGroupA
= ;
rach_messageSizeGroupA
= ;
rach_messagePowerOffsetGroupB
= ;
*/
rach_powerRampingStep
=
4
;
rach_preambleInitialReceivedTargetPower
= -
108
;
rach_preambleTransMax
=
10
;
rach_raResponseWindowSize
=
10
;
rach_macContentionResolutionTimer
=
48
;
rach_maxHARQ_Msg3Tx
=
4
;
pcch_default_PagingCycle
=
128
;
pcch_nB
=
"oneT"
;
bcch_modificationPeriodCoeff
=
2
;
ue_TimersAndConstants_t300
=
1000
;
ue_TimersAndConstants_t301
=
1000
;
ue_TimersAndConstants_t310
=
1000
;
ue_TimersAndConstants_t311
=
10000
;
ue_TimersAndConstants_n310
=
20
;
ue_TimersAndConstants_n311
=
1
;
}
);
srb1_parameters
:
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit
=
80
;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering
=
35
;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit
=
0
;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu
=
4
;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte
=
99999
;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold
=
4
;
}
# ------- SCTP definitions
SCTP
:
{
# Number of streams to use in input/output
SCTP_INSTREAMS
=
2
;
SCTP_OUTSTREAMS
=
2
;
};
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.12.170"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
}
);
rrh_gw_config
= (
{
udp
=
1
;
raw
=
0
;
active
=
1
;
#remote_addr = "169.254.8.28";
#remote_addr = "127.0.0.1";
#remote_addr = "74:d4:35:cc:88:45";
#local_addr = "169.254.7.91";
#local_addr = "127.0.0.1";
#local_addr = "d4:be:d9:22:0a:ac";
local_address
=
"192.168.12.242"
;
remote_address
=
"192.168.12.31"
;
local_port
=
50000
;
remote_port
=
50001
;
}
);
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.12.216/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.12.216/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
log_config
:
{
global_log_level
=
"info"
;
global_log_verbosity
=
"medium"
;
hw_log_level
=
"info"
;
hw_log_verbosity
=
"medium"
;
phy_log_level
=
"info"
;
phy_log_verbosity
=
"medium"
;
mac_log_level
=
"info"
;
mac_log_verbosity
=
"high"
;
rlc_log_level
=
"info"
;
rlc_log_verbosity
=
"medium"
;
pdcp_log_level
=
"info"
;
pdcp_log_verbosity
=
"medium"
;
rrc_log_level
=
"info"
;
rrc_log_verbosity
=
"medium"
;
};
}
);
targets/RT/USER/UE_transport_IQ.c
View file @
ca790b59
...
...
@@ -148,7 +148,7 @@ void *rrh_proc_UE_thread(void * arg) {
unsigned
int
samples_per_frame
=
0
;
rrh_module_t
*
dev
=
(
rrh_module_t
*
)
arg
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_frame
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_frame
;
AssertFatal
(
samples_per_frame
<=
0
,
"invalide samples_per_frame !%u
\n
"
,
samples_per_frame
);
time_req
.
tv_sec
=
0
;
...
...
@@ -260,7 +260,7 @@ void *rrh_UE_thread(void *arg) {
void
*
tmp
;
unsigned
int
samples_per_frame
=
0
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_frame
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_frame
;
time_req_1us
.
tv_sec
=
0
;
time_req_1us
.
tv_nsec
=
1000
;
...
...
@@ -269,26 +269,26 @@ void *rrh_UE_thread(void *arg) {
cmd
=
dev
->
eth_dev
.
trx_start_func
(
&
dev
->
eth_dev
);
/* allocate memory for TX/RX buffers */
rx_buffer_UE
=
(
int32_t
**
)
malloc16
(
dev
->
eth_dev
.
openair0_cfg
.
rx_num_channels
*
sizeof
(
int32_t
*
));
tx_buffer_UE
=
(
int32_t
**
)
malloc16
(
dev
->
eth_dev
.
openair0_cfg
.
tx_num_channels
*
sizeof
(
int32_t
*
));
rx_buffer_UE
=
(
int32_t
**
)
malloc16
(
dev
->
eth_dev
.
openair0_cfg
->
rx_num_channels
*
sizeof
(
int32_t
*
));
tx_buffer_UE
=
(
int32_t
**
)
malloc16
(
dev
->
eth_dev
.
openair0_cfg
->
tx_num_channels
*
sizeof
(
int32_t
*
));
for
(
i
=
0
;
i
<
dev
->
eth_dev
.
openair0_cfg
.
rx_num_channels
;
i
++
)
{
for
(
i
=
0
;
i
<
dev
->
eth_dev
.
openair0_cfg
->
rx_num_channels
;
i
++
)
{
tmp
=
(
void
*
)
malloc
(
sizeof
(
int32_t
)
*
(
samples_per_frame
+
4
));
memset
(
tmp
,
0
,
sizeof
(
int32_t
)
*
(
samples_per_frame
+
4
));
rx_buffer_UE
[
i
]
=
(
tmp
+
4
*
sizeof
(
int32_t
));
}
for
(
i
=
0
;
i
<
dev
->
eth_dev
.
openair0_cfg
.
tx_num_channels
;
i
++
)
{
for
(
i
=
0
;
i
<
dev
->
eth_dev
.
openair0_cfg
->
tx_num_channels
;
i
++
)
{
tmp
=
(
void
*
)
malloc
(
sizeof
(
int32_t
)
*
(
samples_per_frame
+
4
));
memset
(
tmp
,
0
,
sizeof
(
int32_t
)
*
(
samples_per_frame
+
4
));
tx_buffer_UE
[
i
]
=
(
tmp
+
4
*
sizeof
(
int32_t
));
}
printf
(
"Client %s:%d is connected (DL_RB=%d) rt=%d|%d.
\n
"
,
dev
->
eth_dev
.
openair0_cfg
.
remote_addr
,
dev
->
eth_dev
.
openair0_cfg
.
remote_port
,
dev
->
eth_dev
.
openair0_cfg
.
num_rb_dl
,
dev
->
eth_dev
.
openair0_cfg
.
rx_num_channels
,
dev
->
eth_dev
.
openair0_cfg
.
tx_num_channels
);
printf
(
"Client %s:%d is connected (DL_RB=%d) rt=%d|%d.
\n
"
,
dev
->
eth_dev
.
openair0_cfg
->
remote_addr
,
dev
->
eth_dev
.
openair0_cfg
->
remote_port
,
dev
->
eth_dev
.
openair0_cfg
->
num_rb_dl
,
dev
->
eth_dev
.
openair0_cfg
->
rx_num_channels
,
dev
->
eth_dev
.
openair0_cfg
->
tx_num_channels
);
if
(
cmd
==
START_CMD
)
{
...
...
@@ -348,8 +348,8 @@ void *rrh_UE_rx_thread(void *arg) {
openair0_timestamp
temp
,
last_hw_counter
=
0
;
antenna_index
=
0
;
nsamps
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_packet
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_frame
;
nsamps
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_packet
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_frame
;
while
(
rrh_exit
==
0
)
{
if
(
!
UE_rx_started
)
{
...
...
@@ -492,8 +492,8 @@ void *rrh_UE_tx_thread(void *arg) {
unsigned
int
samples_per_frame
=
0
;
antenna_index
=
0
;
nsamps
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_packet
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
.
samples_per_frame
;
nsamps
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_packet
;
samples_per_frame
=
dev
->
eth_dev
.
openair0_cfg
->
samples_per_frame
;
while
(
rrh_exit
==
0
)
{
...
...
targets/RT/USER/eNB_transport_IQ.c
View file @
ca790b59
This diff is collapsed.
Click to expand it.
targets/RT/USER/rrh_gw.c
View file @
ca790b59
...
...
@@ -194,7 +194,10 @@ static rrh_module_t new_module (unsigned int id) {
rrh_mod
.
eth_dev
.
type
=
NONE_DEV
;
rrh_mod
.
eth_dev
.
transp_type
=
NONE_TP
;
/* ethernet device is functioning within RRH */
rrh_mod
.
eth_dev
.
host_type
=
RRH_HOST
;
rrh_mod
.
eth_dev
.
host_type
=
RRH_HOST
;
/* */
rrh_mod
.
eth_dev
.
openair0_cfg
=
(
openair0_config_t
*
)
malloc
(
sizeof
(
openair0_config_t
));
memset
(
rrh_mod
.
eth_dev
.
openair0_cfg
,
0
,
sizeof
(
openair0_config_t
));
/* get IP and MAC address */
get_address
(
if_name
,
eth_mode
);
...
...
@@ -219,12 +222,12 @@ static rrh_module_t new_module (unsigned int id) {
/* allocate space and specify associated RF device */
openair0_device
*
oai_dv
=
(
openair0_device
*
)
malloc
(
sizeof
(
openair0_device
));
memset
(
oai_dv
,
0
,
sizeof
(
openair0_device
));
rrh_mod
.
devs
=
oai_dv
;
rrh_mod
.
devs
->
type
=
NONE_DEV
;
rrh_mod
.
devs
->
transp_type
=
NONE_TP
;
rrh_mod
.
devs
->
host_type
=
RRH_HOST
;
return
rrh_mod
;
}
...
...
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