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
Hide 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,13 +2922,13 @@ int decode_BCCH_DLSCH_Message(
...
@@ -2922,13 +2922,13 @@ int decode_BCCH_DLSCH_Message(
decode_SIB1
(
ctxt_pP
,
eNB_index
,
rsrq
,
rsrp
);
decode_SIB1
(
ctxt_pP
,
eNB_index
,
rsrq
,
rsrp
);
}
}
}
break
;
break
;
case
BCCH_DL_SCH_MessageType__c1_PR_systemInformation
:
case
BCCH_DL_SCH_MessageType__c1_PR_systemInformation
:
if
((
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
eNB_index
].
SIStatus
&
1
)
==
1
)
{
if
((
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
eNB_index
].
SIStatus
&
1
)
==
1
)
{
// SIB1 with schedulingInfoList is available
// SIB1 with schedulingInfoList is available
SystemInformation_t
*
si
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
si
[
eNB_index
];
SystemInformation_t
*
si
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
si
[
eNB_index
];
memcpy
(
si
,
memcpy
(
si
,
&
bcch_message
->
message
.
choice
.
c1
.
choice
.
systemInformation
,
&
bcch_message
->
message
.
choice
.
c1
.
choice
.
systemInformation
,
...
@@ -2941,24 +2941,24 @@ int decode_BCCH_DLSCH_Message(
...
@@ -2941,24 +2941,24 @@ int decode_BCCH_DLSCH_Message(
//if (nfapi_mode == 3)
//if (nfapi_mode == 3)
UE_mac_inst
[
ctxt_pP
->
module_id
].
SI_Decoded
=
1
;
UE_mac_inst
[
ctxt_pP
->
module_id
].
SI_Decoded
=
1
;
}
}
break
;
break
;
case
BCCH_DL_SCH_MessageType__c1_PR_NOTHING
:
case
BCCH_DL_SCH_MessageType__c1_PR_NOTHING
:
default:
default:
break
;
break
;
}
}
}
}
if
((
rrc_get_sub_state
(
ctxt_pP
->
module_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
if
((
rrc_get_sub_state
(
ctxt_pP
->
module_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
#if defined(ENABLE_USE_MME)
#if defined(ENABLE_USE_MME)
&&
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
initialNasMsg
.
data
!=
NULL
)
&&
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
initialNasMsg
.
data
!=
NULL
)
#endif
#endif
)
{
)
{
rrc_ue_generate_RRCConnectionRequest
(
ctxt_pP
,
0
);
rrc_ue_generate_RRCConnectionRequest
(
ctxt_pP
,
0
);
rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
rrc_set_sub_state
(
ctxt_pP
->
module_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH
,
VCD_FUNCTION_OUT
);
return
0
;
return
0
;
}
}
...
@@ -4536,20 +4536,22 @@ void *rrc_ue_task( void *args_p )
...
@@ -4536,20 +4536,22 @@ void *rrc_ue_task( void *args_p )
unsigned
int
ue_mod_id
;
unsigned
int
ue_mod_id
;
int
result
;
int
result
;
SRB_INFO
*
srb_info_p
;
SRB_INFO
*
srb_info_p
;
protocol_ctxt_t
ctxt
;
protocol_ctxt_t
ctxt
;
itti_mark_task_ready
(
TASK_RRC_UE
);
itti_mark_task_ready
(
TASK_RRC_UE
);
while
(
1
)
{
while
(
1
)
{
// Wait for a message
// Wait for a message
itti_receive_msg
(
TASK_RRC_UE
,
&
msg_p
);
itti_receive_msg
(
TASK_RRC_UE
,
&
msg_p
);
instance
=
ITTI_MSG_INSTANCE
(
msg_p
);
instance
=
ITTI_MSG_INSTANCE
(
msg_p
);
ue_mod_id
=
UE_INSTANCE_TO_MODULE_ID
(
instance
);
ue_mod_id
=
UE_INSTANCE_TO_MODULE_ID
(
instance
);
switch
(
ITTI_MSG_ID
(
msg_p
))
{
switch
(
ITTI_MSG_ID
(
msg_p
))
{
case
TERMINATE_MESSAGE
:
case
TERMINATE_MESSAGE
:
LOG_W
(
RRC
,
" *** Exiting RRC thread
\n
"
);
LOG_W
(
RRC
,
" *** Exiting RRC thread
\n
"
);
itti_exit_task
();
itti_exit_task
();
break
;
break
;
case
MESSAGE_TEST
:
case
MESSAGE_TEST
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
...
@@ -4593,8 +4595,9 @@ void *rrc_ue_task( void *args_p )
...
@@ -4593,8 +4595,9 @@ 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
),
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
);
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)
break
;
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
:
case
RRC_MAC_CCCH_DATA_IND
:
LOG_D
(
RRC
,
"[UE %d] RNTI %x Received %s: frameP %d, eNB %d
\n
"
,
LOG_D
(
RRC
,
"[UE %d] RNTI %x Received %s: frameP %d, eNB %d
\n
"
,
...
@@ -4669,8 +4672,9 @@ void *rrc_ue_task( void *args_p )
...
@@ -4669,8 +4672,9 @@ void *rrc_ue_task( void *args_p )
# if defined(ENABLE_USE_MME)
# if defined(ENABLE_USE_MME)
case
NAS_KENB_REFRESH_REQ
:
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 = "
LOG_D
(
RRC
,
"[UE %d] Received %s: refreshed RRC::KeNB = "
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
...
@@ -4728,82 +4732,60 @@ void *rrc_ue_task( void *args_p )
...
@@ -4728,82 +4732,60 @@ void *rrc_ue_task( void *args_p )
case
RRC_STATE_INACTIVE
:
{
case
RRC_STATE_INACTIVE
:
{
/* Need to first activate lower layers */
/* Need to first activate lower layers */
MessageDef
*
message_p
;
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
ACTIVATE_MESSAGE
);
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
);
itti_send_msg_to_task
(
TASK_L2L1
,
UE_MODULE_ID_TO_INSTANCE
(
ue_mod_id
),
message_p
);
/* Save cell selection criterion */
rrc_set_state
(
ue_mod_id
,
RRC_STATE_IDLE
);
{
/* Fall through to next case */
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
"
,
case
RRC_STATE_IDLE
:
{
ue_mod_id
,
/* Ask to layer 1 to find a cell matching the criterion */
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit1
,
MessageDef
*
message_p
;
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit2
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MCCdigit3
,
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
PHY_FIND_CELL_REQ
);
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit1
,
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit2
,
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_start
=
1
;
UE_rrc_inst
[
ue_mod_id
].
plmnID
.
MNCdigit3
);
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
);
switch
(
rrc_get_state
(
ue_mod_id
))
{
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_SEARCHING
);
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 */
}
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
));
break
;
default:
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
break
;
}
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
/* 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
));
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
;
break
;
case
NAS_CONN_ESTABLI_REQ
:
default:
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
,
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
NAS_CONN_ESTABLI_REQ
(
msg_p
).
type
,
break
;
NAS_CONN_ESTABLI_REQ
(
msg_p
).
s_tmsi
.
MMEcode
,
}
NAS_CONN_ESTABLI_REQ
(
msg_p
).
s_tmsi
.
m_tmsi
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit1
,
break
;
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit2
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit3
,
case
NAS_CONN_ESTABLI_REQ
:
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MNCdigit1
,
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
).
plmnID
.
MNCdigit2
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
type
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MNCdigit3
);
NAS_CONN_ESTABLI_REQ
(
msg_p
).
s_tmsi
.
MMEcode
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
s_tmsi
.
m_tmsi
,
//PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, 0, 0);
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit1
,
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
ENB_FLAG_NO
,
NOT_A_RNTI
,
0
,
0
,
0
);
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit2
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MCCdigit3
,
UE_rrc_inst
[
ue_mod_id
].
initialNasMsg
=
NAS_CONN_ESTABLI_REQ
(
msg_p
).
initialNasMsg
;
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MNCdigit1
,
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MNCdigit2
,
switch
(
rrc_get_state
(
ue_mod_id
))
{
NAS_CONN_ESTABLI_REQ
(
msg_p
).
plmnID
.
MNCdigit3
);
//PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
ENB_FLAG_NO
,
NOT_A_RNTI
,
0
,
0
,
0
);
UE_rrc_inst
[
ue_mod_id
].
initialNasMsg
=
NAS_CONN_ESTABLI_REQ
(
msg_p
).
initialNasMsg
;
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
{
case
RRC_STATE_IDLE
:
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
{
rrc_ue_generate_RRCConnectionRequest
(
&
ctxt
,
0
);
rrc_ue_generate_RRCConnectionRequest
(
&
ctxt
,
0
);
...
@@ -4813,6 +4795,7 @@ void *rrc_ue_task( void *args_p )
...
@@ -4813,6 +4795,7 @@ void *rrc_ue_task( void *args_p )
}
}
break
;
break
;
}
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
case
RRC_STATE_CONNECTED
:
...
@@ -4862,6 +4845,7 @@ void *rrc_ue_task( void *args_p )
...
@@ -4862,6 +4845,7 @@ void *rrc_ue_task( void *args_p )
}
}
# endif
# endif
# if ENABLE_RAL
# if ENABLE_RAL
case
RRC_RAL_SCAN_REQ
:
case
RRC_RAL_SCAN_REQ
:
...
@@ -4871,95 +4855,77 @@ void *rrc_ue_task( void *args_p )
...
@@ -4871,95 +4855,77 @@ void *rrc_ue_task( void *args_p )
case
RRC_STATE_INACTIVE
:
{
case
RRC_STATE_INACTIVE
:
{
/* Need to first activate lower layers */
/* Need to first activate lower layers */
MessageDef
*
message_p
;
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
ACTIVATE_MESSAGE
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
ACTIVATE_MESSAGE
);
itti_send_msg_to_task
(
TASK_L2L1
,
instance
,
message_p
);
itti_send_msg_to_task
(
TASK_L2L1
,
instance
,
message_p
);
rrc_set_state
(
ue_mod_id
,
RRC_STATE_IDLE
);
rrc_set_state
(
ue_mod_id
,
RRC_STATE_IDLE
);
/* Fall through to next case */
/* Fall through to next case */
}
}
case
RRC_STATE_IDLE
:
{
case
RRC_STATE_IDLE
:
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
!=
RRC_SUB_STATE_IDLE_SEARCHING
)
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
!=
RRC_SUB_STATE_IDLE_SEARCHING
)
{
/* Ask to layer 1 to find a cell matching the criterion */
/* Ask to layer 1 to find a cell matching the criterion */
MessageDef
*
message_p
;
MessageDef
*
message_p
;
case
RRC_STATE_IDLE
:
{
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
PHY_FIND_CELL_REQ
);
if
(
rrc_get_sub_state
(
ue_mod_id
)
!=
RRC_SUB_STATE_IDLE_SEARCHING
)
{
/* Ask to layer 1 to find a cell matching the criterion */
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_SEARCHING
);
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
PHY_FIND_CELL_REQ
);
PHY_FIND_CELL_REQ
(
message_p
).
transaction_id
=
RRC_RAL_SCAN_REQ
(
msg_p
).
transaction_id
;
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_SEARCHING
);
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_start
=
1
;
PHY_FIND_CELL_REQ
(
message_p
).
transaction_id
=
RRC_RAL_SCAN_REQ
(
msg_p
).
transaction_id
;
PHY_FIND_CELL_REQ
(
message_p
).
earfcn_end
=
1
;
//44
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
);
itti_send_msg_to_task
(
TASK_PHY_UE
,
instance
,
message_p
);
}
break
;
}
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
;
break
;
}
case
RRC_STATE_CONNECTED
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
/* 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
));
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
;
break
;
default:
default:
LOG_E
(
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
;
}
}
break
;
break
;
case
PHY_FIND_CELL_IND
:
case
PHY_FIND_CELL_IND
:
LOG_D
(
RRC
,
"[UE %d] Received %s: state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
rrc_get_state
(
ue_mod_id
));
LOG_D
(
RRC
,
"[UE %d] Received %s: state %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
rrc_get_state
(
ue_mod_id
));
switch
(
rrc_get_state
(
ue_mod_id
))
{
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
case
RRC_STATE_IDLE
:
switch
(
rrc_get_sub_state
(
ue_mod_id
))
{
switch
(
rrc_get_sub_state
(
ue_mod_id
))
{
case
RRC_SUB_STATE_IDLE_SEARCHING
:
case
RRC_SUB_STATE_IDLE_SEARCHING
:
{
{
MessageDef
*
message_p
;
MessageDef
*
message_p
;
int
i
;
int
i
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
RRC_RAL_SCAN_CONF
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
RRC_RAL_SCAN_CONF
);
RRC_RAL_SCAN_CONF
(
message_p
).
transaction_id
=
PHY_FIND_CELL_IND
(
msg_p
).
transaction_id
;
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
;
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
++
)
{
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE
);
// TO DO
itti_send_msg_to_task
(
TASK_RAL_UE
,
instance
,
message_p
);
memset
(
&
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
link_addr
,
0
,
sizeof
(
ral_link_addr_t
));
break
;
// TO DO
}
memset
(
&
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
network_id
,
0
,
sizeof
(
ral_network_id_t
));
default:
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
sig_strength
.
choice
=
RAL_SIG_STRENGTH_CHOICE_DBM
;
LOG_C
(
RRC
,
"[UE %d] Invalid RRC state %d substate %d
\n
"
,
RRC_RAL_SCAN_CONF
(
message_p
).
link_scan_resp
[
i
].
sig_strength
.
_union
.
dbm
=
PHY_FIND_CELL_IND
(
msg_p
).
cells
[
i
].
rsrp
;
ue_mod_id
,
}
rrc_get_state
(
ue_mod_id
),
rrc_get_sub_state
(
ue_mod_id
));
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE
);
}
itti_send_msg_to_task
(
TASK_RAL_UE
,
instance
,
message_p
);
break
;
break
;
}
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
));
break
;
default:
default:
LOG_E
(
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
,
ue_mod_id
,
...
@@ -4968,57 +4934,90 @@ void *rrc_ue_task( void *args_p )
...
@@ -4968,57 +4934,90 @@ void *rrc_ue_task( void *args_p )
}
}
break
;
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
);
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
ENB_FLAG_NO
,
UE_rrc_inst
[
ue_mod_id
].
Info
[
0
].
rnti
,
0
,
0
,
0
);
rrc_ue_generate_RRCConnectionRequest
(
&
ctxt
,
0
);
LOG_D
(
RRC
,
"not sending connection request
\n
"
);
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
}
break
;
}
case
RRC_RAL_CONNECTION_ESTABLISHMENT_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
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_INACTIVE
:
case
RRC_STATE_INACTIVE
:
case
RRC_STATE_CONNECTED
:
case
RRC_STATE_CONNECTED
:
/* should not happen */
/* 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
));
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
;
break
;
#endif
default:
default:
LOG_E
(
RRC
,
"[UE %d] Received unexpected message %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
break
;
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
msg_p
);
break
;
// PHY_FIND_CELL_IND
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
case
PHY_MEAS_REPORT_IND
:
{
msg_p
=
NULL
;
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
,
ITTI_MSG_NAME
(
msg_p
));
switch
(
rrc_get_state
(
ue_mod_id
))
{
case
RRC_STATE_IDLE
:
{
if
(
rrc_get_sub_state
(
ue_mod_id
)
==
RRC_SUB_STATE_IDLE_SIB_COMPLETE
)
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
ENB_FLAG_NO
,
UE_rrc_inst
[
ue_mod_id
].
Info
[
0
].
rnti
,
0
,
0
,
0
);
rrc_ue_generate_RRCConnectionRequest
(
&
ctxt
,
0
);
LOG_D
(
RRC
,
"not sending connection request
\n
"
);
rrc_set_sub_state
(
ue_mod_id
,
RRC_SUB_STATE_IDLE_CONNECTING
);
}
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
));
break
;
default:
LOG_E
(
RRC
,
"[UE %d] Invalid RRC state %d
\n
"
,
ue_mod_id
,
rrc_get_state
(
ue_mod_id
));
break
;
}
break
;
case
RRC_RAL_CONNECTION_RELEASE_REQ
:
LOG_D
(
RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
#endif
default:
LOG_E
(
RRC
,
"[UE %d] Received unexpected message %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
msg_p
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
msg_p
=
NULL
;
}
}
}
#endif
#endif
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
void
void
...
@@ -5303,8 +5302,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
...
@@ -5303,8 +5302,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//-----------------------------------------------------------
//-----------------------------------------------------------
void
void
rrc_control_socket_init
(){
rrc_control_socket_init
(){
struct
sockaddr_in
rrc_ctrl_socket_addr
;
struct
sockaddr_in
rrc_ctrl_socket_addr
;
pthread_attr_t
attr
;
pthread_attr_t
attr
;
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
efeb48e0
...
@@ -5478,28 +5478,28 @@ openair_rrc_eNB_init(
...
@@ -5478,28 +5478,28 @@ openair_rrc_eNB_init(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
paging
[
ue_id
]
=
(
uint8_t
*
)
malloc16
(
256
);
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
paging
[
ue_id
]
=
(
uint8_t
*
)
malloc16
(
256
);
}
}
}
rrc_init_global_param
();
rrc_init_global_param
();
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
switch
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
)
{
switch
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
)
{
case
1
:
case
1
:
case
2
:
case
2
:
case
3
:
case
3
:
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_FMT
" Configuring 1 MBSFN sync area
\n
"
,
PROTOCOL_RRC_CTXT_ARGS
(
&
ctxt
));
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_FMT
" Configuring 1 MBSFN sync area
\n
"
,
PROTOCOL_RRC_CTXT_ARGS
(
&
ctxt
));
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
1
;
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
1
;
break
;
break
;
case
4
:
case
4
:
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_FMT
" Configuring 2 MBSFN sync area
\n
"
,
PROTOCOL_RRC_CTXT_ARGS
(
&
ctxt
));
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_FMT
" Configuring 2 MBSFN sync area
\n
"
,
PROTOCOL_RRC_CTXT_ARGS
(
&
ctxt
));
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
2
;
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
2
;
break
;
break
;
default:
default:
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
0
;
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
num_mbsfn_sync_area
=
0
;
break
;
break
;
}
}
// if we are here the RC.rrc[enb_mod_idP]->MBMS_flag > 0,
// if we are here the RC.rrc[enb_mod_idP]->MBMS_flag > 0,
/// MCCH INIT
/// MCCH INIT
if
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
>
0
)
{
if
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
>
0
)
{
...
@@ -5507,7 +5507,7 @@ openair_rrc_eNB_init(
...
@@ -5507,7 +5507,7 @@ openair_rrc_eNB_init(
/// MTCH data bearer init
/// MTCH data bearer init
init_MBMS
(
ctxt
.
module_id
,
CC_id
,
0
);
init_MBMS
(
ctxt
.
module_id
,
CC_id
,
0
);
}
}
#endif
#endif
openair_rrc_top_init_eNB
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
,
0
);
openair_rrc_top_init_eNB
(
RC
.
rrc
[
ctxt
.
module_id
]
->
carrier
[
CC_id
].
MBMS_flag
,
0
);
}
}
...
@@ -5857,7 +5857,7 @@ rrc_eNB_decode_ccch(
...
@@ -5857,7 +5857,7 @@ rrc_eNB_decode_ccch(
MSC_AS_TIME_ARGS
(
ctxt_pP
),
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
rnti
,
dec_rval
.
consumed
);
dec_rval
.
consumed
);
}
else
{
}
else
{
rrcConnectionRequest
=
&
ul_ccch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionRequest
.
criticalExtensions
.
choice
.
rrcConnectionRequest_r8
;
rrcConnectionRequest
=
&
ul_ccch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionRequest
.
criticalExtensions
.
choice
.
rrcConnectionRequest_r8
;
{
{
if
(
InitialUE_Identity_PR_randomValue
==
rrcConnectionRequest
->
ue_Identity
.
present
)
{
if
(
InitialUE_Identity_PR_randomValue
==
rrcConnectionRequest
->
ue_Identity
.
present
)
{
...
...
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