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
zzha zzha
OpenXG-RAN
Commits
efeb48e0
Commit
efeb48e0
authored
Aug 25, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rrc_UE.c merged
rrc_eNB.c doesn't compile
parent
019149e5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
233 additions
and
235 deletions
+233
-235
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+212
-214
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+21
-21
No files found.
openair2/RRC/LTE/rrc_UE.c
View file @
efeb48e0
...
...
@@ -2922,7 +2922,7 @@ int decode_BCCH_DLSCH_Message(
decode_SIB1
(
ctxt_pP
,
eNB_index
,
rsrq
,
rsrp
);
}
}
break
;
case
BCCH_DL_SCH_MessageType__c1_PR_systemInformation
:
...
...
@@ -4536,12 +4536,14 @@ void *rrc_ue_task( void *args_p )
unsigned
int
ue_mod_id
;
int
result
;
SRB_INFO
*
srb_info_p
;
protocol_ctxt_t
ctxt
;
itti_mark_task_ready
(
TASK_RRC_UE
);
while
(
1
)
{
// Wait for a message
itti_receive_msg
(
TASK_RRC_UE
,
&
msg_p
);
instance
=
ITTI_MSG_INSTANCE
(
msg_p
);
ue_mod_id
=
UE_INSTANCE_TO_MODULE_ID
(
instance
);
...
...
@@ -4593,7 +4595,8 @@ void *rrc_ue_task( void *args_p )
LOG_D
(
RRC
,
"[UE %d] Received %s: eNB %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
RRC_MAC_CCCH_DATA_CNF
(
msg_p
).
enb_index
);
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst
[
ue_mod_id
].
Srb0
[
RRC_MAC_CCCH_DATA_CNF
(
msg_p
).
enb_index
].
Tx_buffer
.
payload_size
=
0
;
break
;
case
RRC_MAC_CCCH_DATA_IND
:
...
...
@@ -4670,7 +4673,8 @@ void *rrc_ue_task( void *args_p )
# if defined(ENABLE_USE_MME)
case
NAS_KENB_REFRESH_REQ
:
memcpy
((
void
*
)
UE_rrc_inst
[
ue_mod_id
].
kenb
,
(
void
*
)
NAS_KENB_REFRESH_REQ
(
msg_p
).
kenb
,
sizeof
(
UE_rrc_inst
[
ue_mod_id
].
kenb
));
memcpy
((
void
*
)
UE_rrc_inst
[
ue_mod_id
].
kenb
,
(
void
*
)
NAS_KENB_REFRESH_REQ
(
msg_p
).
kenb
,
sizeof
(
UE_rrc_inst
[
ue_mod_id
].
kenb
));
LOG_D
(
RRC
,
"[UE %d] Received %s: refreshed RRC::KeNB = "
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
...
...
@@ -4733,26 +4737,6 @@ void *rrc_ue_task( void *args_p )
itti_send_msg_to_task
(
TASK_L2L1
,
UE_MODULE_ID_TO_INSTANCE
(
ue_mod_id
),
message_p
);
/* Save cell selection criterion */
{
UE_rrc_inst
[
ue_mod_id
].
plmnID
=
NAS_CELL_SELECTION_REQ
(
msg_p
).
plmnID
;
UE_rrc_inst
[
ue_mod_id
].
rat
=
NAS_CELL_SELECTION_REQ
(
msg_p
).
rat
;
LOG_D
(
RRC
,
"[UE %d] Save cell selection criterion MCC %X%X%X MNC %X%X%X
\n
"
,
ue_mod_id
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit1
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit2
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit3
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit1
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit2
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit3
);
}
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_INACTIVE
:
{
/* Need to first activate lower layers */
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
ACTIVATE_MESSAGE
);
itti_send_msg_to_task
(
TASK_L2L1
,
UE_MODULE_ID_TO_INSTANCE
(
ue_mod_id
),
message_p
);
rrc_set_state
(
ue_mod_id
,
RRC_STATE_IDLE
);
/* Fall through to next case */
}
...
...
@@ -4760,32 +4744,30 @@ void *rrc_ue_task( void *args_p )
case
RRC_STATE_IDLE
:
{
/* Ask to layer 1 to find a cell matching the criterion */
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
PHY_FIND_CELL_REQ
);
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_start
=
1
;
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_end
=
1
;
itti_send_msg_to_task
(
TASK_PHY_UE
,
UE_MODULE_ID_TO_INSTANCE
(
ue_mod_id
),
message_p
);
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_SEARCHING
);
break
;
}
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
)
,
rrc_get_state
(
ue_mod_id
));
break
;
default:
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
msg_name
,
rrc_get_state
(
ue_mod_id
));
break
;
case
NAS_CONN_ESTABLI_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s: cause %d, type %d, s_tmsi (mme code %"
PRIu8
", m-tmsi %"
PRIu32
"), plmnID (%d%d%d.%d%d%d)
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_CONN_ESTABLI_REQ
(
msg_p
).
cause
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
type
,
...
...
@@ -4813,6 +4795,7 @@ void *rrc_ue_task( void *args_p )
}
break
;
}
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
...
...
@@ -4862,6 +4845,7 @@ void *rrc_ue_task( void *args_p )
}
# endif
# if ENABLE_RAL
case
RRC_RAL_SCAN_REQ
:
...
...
@@ -4885,33 +4869,20 @@ void *rrc_ue_task( void *args_p )
/* Ask to layer 1 to find a cell matching the criterion */
MessageDef
*
message_p
;
case
RRC_STATE_IDLE
:
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
!=
RRC_SUB_STATE_IDLE_SEARCHING
)
{
/* Ask to layer 1 to find a cell matching the criterion */
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
PHY_FIND_CELL_REQ
);
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_SEARCHING
);
PHY_FIND_CELL_REQ
(
message_p
).
transaction_id
=
RRC_RAL_SCAN_REQ
(
msg_p
).
transaction_id
;
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_start
=
1
;
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_end
=
1
;
//44
itti_send_msg_to_task
(
TASK_PHY_UE
,
instance
,
message_p
);
}
break
;
itti_send_msg_to_task
(
TASK_PHY_UE
,
instance
,
message_p
)
;
}
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
msg_name
,
rrc_get_state
(
ue_mod_id
));
break
;
default:
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
rrc_get_state
(
ue_mod_id
));
...
...
@@ -4930,8 +4901,7 @@ void *rrc_ue_task( void *args_p )
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
switch
(
rrc_get_sub_state
(
ue_mod_id
))
{
case
RRC_SUB_STATE_IDLE_SEARCHING
:
{
case
RRC_SUB_STATE_IDLE_SEARCHING
:
{
MessageDef
*
message_p
;
int
i
;
...
...
@@ -4940,13 +4910,24 @@ void *rrc_ue_task( void *args_p )
RRC_RAL_SCAN_CONF
(
message_p
).
transaction_id
=
PHY_FIND_CELL_IND
(
msg_p
).
transaction_id
;
RRC_RAL_SCAN_CONF
(
message_p
).
num_scan_resp
=
PHY_FIND_CELL_IND
(
msg_p
).
cell_nb
;
for
(
i
=
0
;
i
<
PHY_FIND_CELL_IND
(
msg_p
).
cell_nb
;
i
++
)
{
// TO DO
memset
(
&
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
link_addr
,
0
,
sizeof
(
ral_link_addr_t
));
// TO DO
memset
(
&
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
network_id
,
0
,
sizeof
(
ral_network_id_t
));
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
sig_strength
.
choice
=
RAL_SIG_STRENGTH_CHOICE_DBM
;
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
sig_strength
.
_union
.
dbm
=
PHY_FIND_CELL_IND
(
msg_p
).
cells
[
i
].
rsrp
;
}
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE
);
itti_send_msg_to_task
(
TASK_RAL_UE
,
instance
,
message_p
);
break
;
}
default:
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d substate %d
\n
"
,
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d substate %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
),
rrc_get_sub_state
(
ue_mod_id
));
...
...
@@ -4957,24 +4938,39 @@ void *rrc_ue_task( void *args_p )
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] indication %s in RRC state %d
\n
"
,
ue_mod_id
,
msg_name
,
rrc_get_state
(
ue_mod_id
));
LOG_E
(
RRC
,
"[UE %d] indication %s in RRC state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
)
,
rrc_get_state
(
ue_mod_id
));
break
;
default:
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d substate %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
),
rrc_get_sub_state
(
ue_mod_id
));
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
// PHY_FIND_CELL_IND
case
PHY_MEAS_REPORT_IND
:
{
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
RRC_RAL_MEASUREMENT_REPORT_IND
);
memcpy
(
&
RRC_RAL_MEASUREMENT_REPORT_IND
(
message_p
).
threshold
,
&
PHY_MEAS_REPORT_IND
(
msg_p
).
threshold
,
sizeof
(
RRC_RAL_MEASUREMENT_REPORT_IND
(
message_p
).
threshold
));
memcpy
(
&
RRC_RAL_MEASUREMENT_REPORT_IND
(
message_p
).
link_param
,
&
PHY_MEAS_REPORT_IND
(
msg_p
).
link_param
,
sizeof
(
RRC_RAL_MEASUREMENT_REPORT_IND
(
message_p
).
link_param
));
LOG_D
(
RRC
,
"[UE %d] PHY_MEAS_REPORT_IN: sending msg %s to %s
\n
"
,
ue_mod_id
,
"RRC_RAL_MEASUREMENT_REPORT_IND"
,
"TASK_RAL_UE"
);
itti_send_msg_to_task
(
TASK_RAL_UE
,
instance
,
message_p
);
break
;
}
case
RRC_RAL_CONFIGURE_THRESHOLD_REQ
:
rrc_ue_ral_handle_configure_threshold_request
(
ue_mod_id
,
msg_p
);
break
;
case
RRC_RAL_CONNECTION_ESTABLISHMENT_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
msg_name
);
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
)
);
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
{
...
...
@@ -4988,20 +4984,21 @@ void *rrc_ue_task( void *args_p )
break
;
}
case
RRC_RAL_CONNECTION_ESTABLISHMENT_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
rrc_get_state
(
ue_mod_id
));
break
;
default:
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
LOG_E
(
RRC
,
"[UE %d] request %s in RRC state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
rrc_get_state
(
ue_mod_id
));
case
RRC_RAL_CONNECTION_RELEASE_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
#endif
...
...
@@ -5020,6 +5017,8 @@ void *rrc_ue_task( void *args_p )
/*------------------------------------------------------------------------------*/
void
openair_rrc_top_init_ue
(
...
...
@@ -5303,8 +5302,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//-----------------------------------------------------------
void
rrc_control_socket_init
(){
void
rrc_control_socket_init
(){
struct
sockaddr_in
rrc_ctrl_socket_addr
;
pthread_attr_t
attr
;
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
efeb48e0
...
...
@@ -5478,7 +5478,7 @@ openair_rrc_eNB_init(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
paging
[
ue_id
]
=
(
uint8_t
*
)
malloc16
(
256
);
}
}
rrc_init_global_param
();
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
...
...
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