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
lizhongxiao
OpenXG-RAN
Commits
3fa8ff7d
Commit
3fa8ff7d
authored
Sep 12, 2022
by
hscuser
Committed by
jperaldi
Nov 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Structure created for Cell-specific data
parent
868e37e3
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
150 additions
and
118 deletions
+150
-118
openair2/RRC/LTE/L2_interface.c
openair2/RRC/LTE/L2_interface.c
+3
-2
openair2/RRC/LTE/L2_interface_common.c
openair2/RRC/LTE/L2_interface_common.c
+3
-2
openair3/SS/ss_eNB_context.h
openair3/SS/ss_eNB_context.h
+21
-3
openair3/SS/ss_eNB_drb_task.c
openair3/SS/ss_eNB_drb_task.c
+10
-10
openair3/SS/ss_eNB_port_man_task.c
openair3/SS/ss_eNB_port_man_task.c
+2
-2
openair3/SS/ss_eNB_srb_task.c
openair3/SS/ss_eNB_srb_task.c
+11
-11
openair3/SS/ss_eNB_sys_task.c
openair3/SS/ss_eNB_sys_task.c
+48
-46
openair3/SS/ss_eNB_sysind_task.c
openair3/SS/ss_eNB_sysind_task.c
+6
-6
openair3/SS/ss_eNB_vng_task.c
openair3/SS/ss_eNB_vng_task.c
+3
-3
openair3/SS/ss_eNB_vt_timer_task.c
openair3/SS/ss_eNB_vt_timer_task.c
+9
-9
openair3/SS/ss_eNB_vtp_task.c
openair3/SS/ss_eNB_vtp_task.c
+11
-11
openair3/SS/ss_gNB_context.h
openair3/SS/ss_gNB_context.h
+11
-1
openair3/SS/ss_gNB_srb_task.c
openair3/SS/ss_gNB_srb_task.c
+8
-8
openair3/SS/ss_gNB_vtp_task.c
openair3/SS/ss_gNB_vtp_task.c
+2
-2
targets/ARCH/SS/ss_config.h
targets/ARCH/SS/ss_config.h
+2
-2
No files found.
openair2/RRC/LTE/L2_interface.c
View file @
3fa8ff7d
...
...
@@ -50,8 +50,9 @@
#include "flexran_agent_extern.h"
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
#include "openair3/SS/ss_eNB_context.h"
extern
RAN_CONTEXT_t
RC
;
extern
SSConfigContext_t
SS_context
;
//------------------------------------------------------------------------------
int8_t
mac_rrc_data_req
(
...
...
@@ -340,7 +341,7 @@ mac_rrc_data_ind(
ctxt
.
brOption
=
brOption
;
//#ifdef ENB_SS
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_I
(
RRC
,
"RRC Sending CCCH PDU_IND to SS
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
SS_RRC_PDU_IND
);
...
...
openair2/RRC/LTE/L2_interface_common.c
View file @
3fa8ff7d
...
...
@@ -38,11 +38,12 @@
#include "intertask_interface.h"
#include "openair3/SS/ss_eNB_context.h"
//#define RRC_DATA_REQ_DEBUG
//#define DEBUG_RRC 1
extern
RAN_CONTEXT_t
RC
;
extern
SSConfigContext_t
SS_context
;
//------------------------------------------------------------------------------
uint8_t
rrc_data_req
(
...
...
@@ -122,7 +123,7 @@ rrc_data_ind(
ctxt_pP
->
rnti
);
//#ifdef ENB_SS
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_I
(
RRC
,
"L2 Interface Sending DCCH PDU_IND to SS
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
0
,
SS_RRC_PDU_IND
);
...
...
openair3/SS/ss_eNB_context.h
View file @
3fa8ff7d
...
...
@@ -47,8 +47,10 @@ typedef enum SSEvents_E {
SS_VNG_INVALID_MSG
}
SSEventsE
;
typedef
struct
SSConfigContext_s
{
uint16_t
dl_earfcn
;
/** Structure Containing Cell-specific values only */
typedef
struct
SSCellConfigContext_s
{
int
State
;
uint16_t
dl_earfcn
;
uint16_t
ul_earfcn
;
uint32_t
dl_freq
;
uint32_t
ul_freq
;
...
...
@@ -58,7 +60,12 @@ typedef struct SSConfigContext_s {
//TO DO: Need to remove one of the following cellId
EUTRA_CellId_Type
ttcn_cell_id
;
uint16_t
eutra_cellId
;
uint16_t
ss_rnti_g
;
}
SSCellConfigContext_t
;
typedef
struct
SSConfigContext_s
{
/** List of Cells */
SSCellConfigContext_t
SSCell_list
[
8
];
/** Timing info */
uint16_t
sfn
;
uint8_t
sf
;
...
...
@@ -67,6 +74,17 @@ typedef struct SSConfigContext_s {
hash_table_t
*
vt_timer_table
;
// key is SFN_SF
/** TODO: To add more */
}
SSConfigContext_t
[
8
];
}
SSConfigContext_t
;
typedef
enum
{
SS_STATE_NOT_CONFIGURED
=
0
,
SS_STATE_CELL_CONFIGURED
,
SS_STATE_CELL_ACTIVE
,
SS_STATE_AS_SECURITY_ACTIVE
,
SS_STATE_AS_RBS_ACTIVE
,
SS_STATE_CELL_BROADCASTING
,
SS_STATE_MAX_STATE
}
SS_STATE_t
;
#endif
/* _SS_ENB_CONTEXT_ */
openair3/SS/ss_eNB_drb_task.c
View file @
3fa8ff7d
...
...
@@ -52,7 +52,7 @@
#include "ss_eNB_context.h"
extern
RAN_CONTEXT_t
RC
;
extern
uint16_t
ss_rnti_g
;
//
extern uint16_t ss_rnti_g;
static
acpCtx_t
ctx_drb_g
=
NULL
;
extern
SSConfigContext_t
SS_context
;
...
...
@@ -80,7 +80,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
//Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_RadioBearerId
;
...
...
@@ -106,7 +106,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
//Populating the PDU
ind
.
U_Plane
.
SubframeData
.
NoOfTTIs
=
1
;
...
...
@@ -127,7 +127,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] acpDrbProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
//Send Message
status
=
acpSendMsg
(
ctx_drb_g
,
msgSize
,
buffer
);
...
...
@@ -166,7 +166,7 @@ static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req)
}
}
SS_DRB_PDU_REQ
(
message_p
).
rnti
=
ss_rnti_g
;
SS_DRB_PDU_REQ
(
message_p
).
rnti
=
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
;
int
send_res
=
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_g
,
message_p
);
if
(
send_res
<
0
)
...
...
@@ -231,14 +231,14 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] acpDrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] DRB_COMMON_REQ Received in CELL_ACTIVE
\n
"
);
ss_task_handle_drb_pdu_req
(
req
);
}
else
{
LOG_W
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_W
(
ENB_APP
,
"[SS_DRB][DRB_COMMON_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
acpDrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -272,19 +272,19 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_DRB] DUMMY WAKEUP recevied from PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_APP
,
"[SS_DRB] Received SS_DRB_PDU_IND from RRC PDCP
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_drb_data
(
&
received_msg
->
ittiMsg
.
ss_drb_pdu_ind
);
}
else
{
LOG_A
(
ENB_APP
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_APP
,
"ERROR [SS_DRB][SS_DRB_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
...
...
openair3/SS/ss_eNB_port_man_task.c
View file @
3fa8ff7d
...
...
@@ -210,7 +210,7 @@ void ss_port_man_send_data(
size_t
msgSize
=
size
;
memset
(
&
cnf
,
0
,
sizeof
(
cnf
));
cnf
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
cnf
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
cnf
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_None
;
cnf
.
Common
.
RoutingInfo
.
v
.
None
=
true
;
cnf
.
Common
.
TimingInfo
.
d
=
TimingInfo_Type_Now
;
...
...
@@ -363,7 +363,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
{
// No message (timeout on socket)
//Send Dummy Wake up ITTI message to SRB task.
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
&&
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-PORTMAN] Sending Wake up signal to SRB task
\n
"
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SS_PORTMAN
,
0
,
SS_RRC_PDU_IND
);
...
...
openair3/SS/ss_eNB_srb_task.c
View file @
3fa8ff7d
...
...
@@ -62,7 +62,7 @@ SSConfigContext_t SS_context;
static
acpCtx_t
ctx_srb_g
=
NULL
;
static
uint16_t
rnti_g
=
0
;
static
instance_t
instance_g
=
0
;
uint16_t
ss_rnti_g
=
0
;
//
uint16_t ss_rnti_g = 0;
enum
MsgUserId
{
...
...
@@ -104,10 +104,10 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
rnti_g
=
pdu_ind
->
rnti
;
ss_rnti_g
=
rnti_g
;
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
=
rnti_g
;
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
// Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_RadioBearerId
;
...
...
@@ -133,7 +133,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
/* Populate and Send the EUTRA RRC PDU IND to Client */
if
(
pdu_ind
->
srb_id
==
0
)
...
...
@@ -181,7 +181,7 @@ static void ss_send_srb_data(ss_rrc_pdu_ind_t *pdu_ind)
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] acpSysSrbProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_IND] Buffer msgSize=%d (!!2) to EUTRACell %d"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
/* Send message
*/
...
...
@@ -271,7 +271,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
msg_queued
=
vt_timer_setup
(
timer_tinfo
,
TASK_RRC_ENB
,
instance_g
,
message_p
);
}
LOG_A
(
ENB_SS
,
"RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d"
,
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
tinfo
.
sfn
,
tinfo
.
sf
,
SS_context
.
sfn
,
SS_context
.
sf
);
}
if
(
!
msg_queued
)
...
...
@@ -354,13 +354,13 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A
(
ENB_SS
,
"[SS_SRB][EUTRA_RRC_PDU_REQ] acpSysSrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
ss_task_handle_rrc_pdu_req
(
req
);
}
else
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
acpSysSrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -452,19 +452,19 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SRB] Received SS_RRC_PDU_IND from RRC
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_srb_data
(
&
received_msg
->
ittiMsg
.
ss_rrc_pdu_ind
);
}
else
{
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
ENB_SS
,
"ERROR [SS_SRB][EUTRA_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
...
...
openair3/SS/ss_eNB_sys_task.c
View file @
3fa8ff7d
...
...
@@ -63,11 +63,12 @@ extern uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn);
extern
pthread_cond_t
cell_config_done_cond
;
extern
pthread_mutex_t
cell_config_done_mutex
;
extern
int
cell_config_done
;
extern
uint16_t
ss_rnti_g
;
//
extern uint16_t ss_rnti_g;
static
void
sys_send_proxy
(
void
*
msg
,
int
msgLen
);
int
cell_config_done_indication
(
void
);
static
uint16_t
paging_ue_index_g
=
0
;
extern
SSConfigContext_t
SS_context
;
typedef
enum
{
UndefinedMsg
=
0
,
...
...
@@ -79,6 +80,7 @@ char *local_address = "127.0.0.1";
int
proxy_send_port
=
7776
;
int
proxy_recv_port
=
7770
;
bool
reqCnfFlag_g
=
false
;
/*
* Utility function to convert integer to binary
*
...
...
@@ -312,7 +314,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
int
band
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
EutraBand
;
RRC_CONFIGURATION_REQ
(
msg_p
).
eutra_band
[
num_CC
]
=
band
;
RRC_CONFIGURATION_REQ
(
msg_p
).
Nid_cell
[
num_CC
]
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
PhysicalCellId
;
SS_contex
t
[
0
].
cellId
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
PhysicalCellId
;
SS_context
.
SSCell_lis
t
[
0
].
cellId
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Common
.
PhysicalCellId
;
/** TODO: Not filled now */
/** eNB Cell ID: AddOrReconfigure->Basic.v.StaticCellInfo.v.Common.eNB_CellId.v */
...
...
@@ -326,12 +328,12 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
uint32_t
ul_Freq
=
from_earfcn
(
band
,
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Uplink
.
v
.
Earfcn
);
int
ul_Freq_off
=
ul_Freq
-
dl_Freq
;
RRC_CONFIGURATION_REQ
(
msg_p
).
uplink_frequency_offset
[
num_CC
]
=
(
unsigned
int
)
ul_Freq_off
;
SS_context
[
0
].
ul_earfcn
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Uplink
.
v
.
Earfcn
;
SS_context
[
0
].
ul_freq
=
ul_Freq
;
SS_context
.
SSCell_list
[
0
].
ul_earfcn
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Uplink
.
v
.
Earfcn
;
SS_context
.
SSCell_list
[
0
].
ul_freq
=
ul_Freq
;
}
// Updated the SS context for the frequency related configuration
SS_context
[
0
].
dl_earfcn
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Downlink
.
Earfcn
;
SS_context
[
0
].
dl_freq
=
dl_Freq
;
SS_context
.
SSCell_list
[
0
].
dl_earfcn
=
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Downlink
.
Earfcn
;
SS_context
.
SSCell_list
[
0
].
dl_freq
=
dl_Freq
;
switch
(
AddOrReconfigure
->
Basic
.
v
.
StaticCellInfo
.
v
.
Downlink
.
Bandwidth
)
{
...
...
@@ -494,7 +496,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
else
{
RRC_CONFIGURATION_REQ
(
msg_p
).
RlcPduCCCH_Present
=
false
;
if
(
RC
.
ss
.
State
==
SS_STATE_NOT_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
==
SS_STATE_NOT_CONFIGURED
)
RC
.
ss
.
CBRA_flag
=
TRUE
;
}
}
...
...
@@ -515,7 +517,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
/** Handle Initial Cell power, Sending to Proxy */
if
(
AddOrReconfigure
->
Basic
.
v
.
InitialCellPower
.
d
==
true
)
{
SS_context
[
0
].
maxRefPower
=
AddOrReconfigure
->
Basic
.
v
.
InitialCellPower
.
v
.
MaxReferencePower
;
SS_context
.
SSCell_list
[
0
].
maxRefPower
=
AddOrReconfigure
->
Basic
.
v
.
InitialCellPower
.
v
.
MaxReferencePower
;
switch
(
AddOrReconfigure
->
Basic
.
v
.
InitialCellPower
.
v
.
Attenuation
.
d
)
{
case
Attenuation_Type_Value
:
...
...
@@ -533,9 +535,9 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
LOG_A
(
ENB_SS
,
"[SYS] [InitialCellPower.v.Attenuation.v.Value] Unbound or Invalid value received
\n
"
);
}
}
cellConfig
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
cellConfig
->
maxRefPower
=
SS_context
[
0
].
maxRefPower
;
cellConfig
->
dl_earfcn
=
SS_context
[
0
].
dl_earfcn
;
cellConfig
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
cellConfig
->
maxRefPower
=
SS_context
.
SSCell_list
[
0
].
maxRefPower
;
cellConfig
->
dl_earfcn
=
SS_context
.
SSCell_list
[
0
].
dl_earfcn
;
LOG_A
(
ENB_SS
,
"=======Cell configuration received for cell_id: %d Initial attenuation: %d \
Max ref power: %d
\n
for DL_EARFCN: %d ===================================
\n
"
,
cellConfig
->
header
.
cell_id
,
...
...
@@ -573,7 +575,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
if
(
message_p
)
{
LOG_A
(
ENB_SS
,
"[SYS] Send SS_SYS_PORT_MSG_CNF
\n
"
);
msgCnf
->
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
msgCnf
->
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
msgCnf
->
Common
.
Result
.
d
=
resType
;
msgCnf
->
Common
.
Result
.
v
.
Success
=
resVal
;
msgCnf
->
Confirm
.
d
=
cnfType
;
...
...
@@ -646,7 +648,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
int
sys_handle_cell_config_req
(
struct
CellConfigRequest_Type
*
Cell
)
{
int
status
=
false
;
int
returnState
=
RC
.
ss
.
State
;
int
returnState
=
SS_context
.
SSCell_list
[
0
]
.
State
;
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_Cell
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
bool
resVal
=
TRUE
;
...
...
@@ -664,7 +666,7 @@ int sys_handle_cell_config_req(struct CellConfigRequest_Type *Cell)
cell_config_done_indication
();
}
//TODO Change it later to move to cell configuration
if
(
RC
.
ss
.
State
==
SS_STATE_NOT_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
==
SS_STATE_NOT_CONFIGURED
)
{
returnState
=
SS_STATE_CELL_CONFIGURED
;
}
...
...
@@ -698,7 +700,7 @@ int sys_handle_cell_config_req(struct CellConfigRequest_Type *Cell)
*/
static
int
sys_handle_radiobearer_list
(
struct
RadioBearer_Type_RadioBearerList_Type_Dynamic
*
BearerList
)
{
int
returnState
=
RC
.
ss
.
State
;
int
returnState
=
SS_context
.
SSCell_list
[
0
]
.
State
;
enum
SystemConfirm_Type_Sel
cnfType
=
SystemConfirm_Type_RadioBearerList
;
enum
ConfirmationResult_Type_Sel
resType
=
ConfirmationResult_Type_Success
;
bool
resVal
=
TRUE
;
...
...
@@ -1068,7 +1070,7 @@ static int sys_handle_radiobearer_list(struct RadioBearer_Type_RadioBearerList_T
*/
int
sys_handle_pdcp_count_req
(
struct
PDCP_CountReq_Type
*
PdcpCount
)
{
int
returnState
=
RC
.
ss
.
State
;
int
returnState
=
SS_context
.
SSCell_list
[
0
]
.
State
;
int
send_res
=
-
1
;
switch
(
PdcpCount
->
d
)
...
...
@@ -1076,7 +1078,7 @@ int sys_handle_pdcp_count_req(struct PDCP_CountReq_Type *PdcpCount)
case
PDCP_CountReq_Type_Get
:
LOG_A
(
ENB_SS
,
"[SYS] Pdcp_CountReq_Type_Get receivied
\n
"
);
MessageDef
*
get_p
=
itti_alloc_new_message
(
TASK_SYS
,
0
,
SS_REQ_PDCP_CNT
);
SS_REQ_PDCP_CNT
(
get_p
).
rnti
=
ss_rnti_g
;
SS_REQ_PDCP_CNT
(
get_p
).
rnti
=
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
;
switch
(
PdcpCount
->
v
.
Get
.
d
)
{
case
PdcpCountGetReq_Type_AllRBs
:
...
...
@@ -1201,7 +1203,7 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal)
attnConf
=
(
attenuationConfigReq_t
*
)
calloc
(
1
,
sizeof
(
attenuationConfigReq_t
));
attnConf
->
header
.
preamble
=
0xFEEDC0DE
;
attnConf
->
header
.
msg_id
=
SS_ATTN_LIST
;
attnConf
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
attnConf
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
attnConf
->
attnVal
=
attnVal
;
IPV4_STR_ADDR_TO_INT_NWBO
(
local_address
,
peerIpAddr
,
" BAD IP Address"
);
...
...
@@ -1524,7 +1526,7 @@ static void sys_handle_as_security_req(struct AS_Security_Type *ASSecurity)
if
(
msg_p
)
{
LOG_A
(
ENB_SS
,
"[SYS] AS Security Request Received
\n
"
);
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
rnti
=
ss_rnti_g
;
RRC_AS_SECURITY_CONFIG_REQ
(
msg_p
).
rnti
=
SS_context
.
SSCell_list
[
0
].
ss_rnti_g
;
if
(
ASSecurity
->
d
==
AS_Security_Type_StartRestart
)
{
if
(
ASSecurity
->
v
.
StartRestart
.
Integrity
.
d
==
true
)
...
...
@@ -1635,25 +1637,25 @@ static void sys_handle_as_security_req(struct AS_Security_Type *ASSecurity)
*/
static
void
ss_task_sys_handle_req
(
struct
SYSTEM_CTRL_REQ
*
req
,
ss_set_timinfo_t
*
tinfo
)
{
int
enterState
=
RC
.
ss
.
State
;
int
exitState
=
RC
.
ss
.
State
;
int
enterState
=
SS_context
.
SSCell_list
[
0
]
.
State
;
int
exitState
=
SS_context
.
SSCell_list
[
0
]
.
State
;
if
(
req
->
Common
.
CellId
)
SS_context
[
0
].
eutra_cellId
=
req
->
Common
.
CellId
;
SS_context
.
SSCell_list
[
0
].
eutra_cellId
=
req
->
Common
.
CellId
;
LOG_A
(
ENB_SS
,
"[SYS] Current SS_STATE %d received SystemRequest_Type %d eutra_cellId %d cnf_flag %d
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
,
SS_contex
t
[
0
].
eutra_cellId
,
req
->
Common
.
ControlInfo
.
CnfFlag
);
switch
(
RC
.
ss
.
State
)
SS_context
.
SSCell_list
[
0
].
State
,
req
->
Request
.
d
,
SS_context
.
SSCell_lis
t
[
0
].
eutra_cellId
,
req
->
Common
.
ControlInfo
.
CnfFlag
);
switch
(
SS_context
.
SSCell_list
[
0
]
.
State
)
{
case
SS_STATE_NOT_CONFIGURED
:
if
(
req
->
Request
.
d
==
SystemRequest_Type_Cell
)
{
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type_Cell received
\n
"
);
exitState
=
sys_handle_cell_config_req
(
&
(
req
->
Request
.
v
.
Cell
));
RC
.
ss
.
State
=
exitState
;
SS_context
.
SSCell_list
[
0
]
.
State
=
exitState
;
}
else
{
LOG_A
(
ENB_SS
,
"[SYS] Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
}
break
;
case
SS_STATE_CELL_CONFIGURED
:
...
...
@@ -1661,12 +1663,12 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
{
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type_RadioBearerList received
\n
"
);
exitState
=
sys_handle_radiobearer_list
(
&
(
req
->
Request
.
v
.
RadioBearerList
));
RC
.
ss
.
State
=
exitState
;
SS_context
.
SSCell_list
[
0
]
.
State
=
exitState
;
}
else
{
LOG_A
(
ENB_SS
,
"[SYS] Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
}
break
;
case
SS_STATE_CELL_BROADCASTING
:
...
...
@@ -1678,12 +1680,12 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
case
SystemRequest_Type_Cell
:
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type_Cell received
\n
"
);
exitState
=
sys_handle_cell_config_req
(
&
(
req
->
Request
.
v
.
Cell
));
RC
.
ss
.
State
=
exitState
;
SS_context
.
SSCell_list
[
0
]
.
State
=
exitState
;
break
;
case
SystemRequest_Type_RadioBearerList
:
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type_RadioBearerList received in SS_STATE_CELL_ACTIVE state
\n
"
);
exitState
=
sys_handle_radiobearer_list
(
&
(
req
->
Request
.
v
.
RadioBearerList
));
RC
.
ss
.
State
=
exitState
;
SS_context
.
SSCell_list
[
0
]
.
State
=
exitState
;
break
;
case
SystemRequest_Type_CellAttenuationList
:
LOG_A
(
ENB_SS
,
"[SYS] SystemRequest_Type_CellAttenuationList received
\n
"
);
...
...
@@ -1741,22 +1743,22 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
else
{
LOG_A
(
ENB_SS
,
"[SYS] Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
}
break
;
case
SS_STATE_AS_RBS_ACTIVE
:
LOG_A
(
ENB_SS
,
"[SYS] Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
break
;
default:
LOG_A
(
ENB_SS
,
"[SYS] Error ! SS_STATE %d Invalid SystemRequest_Type %d received
\n
"
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
break
;
}
LOG_A
(
ENB_SS
,
"[SYS] Current SS_STATE %d New SS_STATE %d received SystemRequest_Type %d
\n
"
,
enterState
,
RC
.
ss
.
State
,
req
->
Request
.
d
);
enterState
,
SS_context
.
SSCell_list
[
0
]
.
State
,
req
->
Request
.
d
);
}
/*
* Function : valid_sys_msg
...
...
@@ -1786,12 +1788,12 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
// return FALSE;
// }
LOG_A
(
ENB_SS
,
"[SYS] received req : %d for cell %d
RC.ss
.State %d
\n
"
,
req
->
Request
.
d
,
req
->
Common
.
CellId
,
RC
.
ss
.
State
);
LOG_A
(
ENB_SS
,
"[SYS] received req : %d for cell %d
SS_context.SSCell_list[0]
.State %d
\n
"
,
req
->
Request
.
d
,
req
->
Common
.
CellId
,
SS_context
.
SSCell_list
[
0
]
.
State
);
switch
(
req
->
Request
.
d
)
{
case
SystemRequest_Type_Cell
:
if
(
RC
.
ss
.
State
>=
SS_STATE_NOT_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_NOT_CONFIGURED
)
{
valid
=
TRUE
;
sendDummyCnf
=
FALSE
;
...
...
@@ -1803,7 +1805,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
}
break
;
case
SystemRequest_Type_EnquireTiming
:
if
(
RC
.
ss
.
State
==
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
==
SS_STATE_CELL_ACTIVE
)
{
valid
=
TRUE
;
sendDummyCnf
=
FALSE
;
...
...
@@ -1811,7 +1813,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
}
break
;
case
SystemRequest_Type_CellAttenuationList
:
if
(
RC
.
ss
.
State
==
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
==
SS_STATE_CELL_ACTIVE
)
{
valid
=
TRUE
;
sendDummyCnf
=
FALSE
;
...
...
@@ -1831,7 +1833,7 @@ bool valid_sys_msg(struct SYSTEM_CTRL_REQ *req)
reqCnfFlag_g
=
req
->
Common
.
ControlInfo
.
CnfFlag
;
break
;
case
SystemRequest_Type_PdcpCount
:
if
(
RC
.
ss
.
State
==
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
==
SS_STATE_CELL_ACTIVE
)
{
valid
=
TRUE
;
sendDummyCnf
=
FALSE
;
...
...
@@ -1883,8 +1885,8 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
MessageDef
*
received_msg
=
NULL
;
int
result
;
static
ss_set_timinfo_t
tinfo
=
{.
sfn
=
0xFFFF
,
.
sf
=
0xFF
};
SS_context
[
0
]
.
sfn
=
tinfo
.
sfn
;
SS_context
[
0
]
.
sf
=
tinfo
.
sf
;
SS_context
.
sfn
=
tinfo
.
sfn
;
SS_context
.
sf
=
tinfo
.
sf
;
itti_receive_msg
(
TASK_SYS
,
&
received_msg
);
...
...
@@ -1898,8 +1900,8 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
tinfo
.
sf
=
SS_UPD_TIM_INFO
(
received_msg
).
sf
;
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
SS_context
[
0
]
.
sfn
=
tinfo
.
sfn
;
SS_context
[
0
]
.
sf
=
tinfo
.
sf
;
SS_context
.
sfn
=
tinfo
.
sfn
;
SS_context
.
sf
=
tinfo
.
sf
;
g_log
->
sfn
=
tinfo
.
sfn
;
g_log
->
sf
=
tinfo
.
sf
;
...
...
@@ -2071,12 +2073,12 @@ void *ss_eNB_sys_task(void *arg)
// Set the state to NOT_CONFIGURED for Cell Config processing mode
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM
)
{
RC
.
ss
.
State
=
SS_STATE_NOT_CONFIGURED
;
SS_context
.
SSCell_list
[
0
]
.
State
=
SS_STATE_NOT_CONFIGURED
;
}
// Set the state to CELL_ACTIVE for SRB processing mode
else
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM_SRB
)
{
RC
.
ss
.
State
=
SS_STATE_CELL_ACTIVE
;
SS_context
.
SSCell_list
[
0
]
.
State
=
SS_STATE_CELL_ACTIVE
;
}
while
(
1
)
{
...
...
openair3/SS/ss_eNB_sysind_task.c
View file @
3fa8ff7d
...
...
@@ -80,7 +80,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
DevAssert
(
p_ind
!=
NULL
);
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
ind
.
Common
.
CellId
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
CellId
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
// Populated the Routing Info
ind
.
Common
.
RoutingInfo
.
d
=
RoutingInfo_Type_None
;
...
...
@@ -105,7 +105,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
ind
.
Common
.
RlcBearerRouting
.
d
=
true
;
ind
.
Common
.
RlcBearerRouting
.
v
.
d
=
RlcBearerRouting_Type_EUTRA
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
[
0
].
eutra_cellId
;
ind
.
Common
.
RlcBearerRouting
.
v
.
v
.
EUTRA
=
SS_context
.
SSCell_list
[
0
].
eutra_cellId
;
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Frame: %d, Subframe: %d, RAPID: %d, PRTPower: %d, BitMask: %d
\n
"
,
p_ind
->
sfn
,
p_ind
->
sf
,
p_ind
->
ra_PreambleIndex
,
p_ind
->
prtPower_Type
,
p_ind
->
bitmask
);
...
...
@@ -125,7 +125,7 @@ static void ss_send_sysind_data(ss_system_ind_t *p_ind)
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] acpSysIndProcessToSSEncSrv Failure
\n
"
);
return
;
}
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
[
0
].
eutra_cellId
);
LOG_A
(
ENB_SS
,
"[SS_SYSIND][SYSTEM_IND] Buffer msgSize=%d (!!2) to EUTRACell %d
\n
"
,
(
int
)
msgSize
,
SS_context
.
SSCell_list
[
0
].
eutra_cellId
);
/* Send message */
status
=
acpSendMsg
(
ctx_sysind_g
,
msgSize
,
buffer
);
...
...
@@ -278,19 +278,19 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
if
(
origin_task
==
TASK_SS_PORTMAN
)
{
LOG_D
(
ENB_APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
RC
.
ss
.
State
);
LOG_D
(
ENB_APP
,
"[SS_SYSIND] DUMMY WAKEUP receviedfrom PORTMAN state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
else
{
LOG_A
(
ENB_SS
,
"[SS_SYSIND] Received SS_SYSTEM_IND
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_CONFIGURED
)
if
(
SS_context
.
SSCell_list
[
0
]
.
State
>=
SS_STATE_CELL_CONFIGURED
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_sysind_data
(
&
received_msg
->
ittiMsg
.
ss_system_ind
);
}
else
{
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_E
(
ENB_SS
,
"[SS_SYSIND][SS_SYSTEM_IND] received in SS state %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
}
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
received_msg
),
received_msg
);
...
...
openair3/SS/ss_eNB_vng_task.c
View file @
3fa8ff7d
...
...
@@ -115,7 +115,7 @@ vng_ss_configure_cell (EUTRA_CellId_Type CellId, Dl_Bandwidth_Type Bandwidth,
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_VNG
,
0
,
SS_VNG_PROXY_REQ
);
assert
(
message_p
);
SS_VNG_PROXY_REQ
(
message_p
).
cell_id
=
SS_context
[
0
].
cellId
;
SS_VNG_PROXY_REQ
(
message_p
).
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
SS_VNG_PROXY_REQ
(
message_p
).
bw
=
Bandwidth
;
SS_VNG_PROXY_REQ
(
message_p
).
Noc_level
=
NocLevel
;
SS_VNG_PROXY_REQ
(
message_p
).
cmd
=
cmd
;
...
...
@@ -200,8 +200,8 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
break
;
}
if
(
RC
.
ss
.
State
<
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
RC
.
ss
.
State
);
if
(
SS_context
.
SSCell_list
[
0
]
.
State
<
SS_STATE_CELL_ACTIVE
)
{
LOG_A
(
ENB_SS
,
"[SS-VNG] Request received in an invalid state: %d
\n
"
,
SS_context
.
SSCell_list
[
0
]
.
State
);
break
;
}
/** TODO: Dump message here */
...
...
openair3/SS/ss_eNB_vt_timer_task.c
View file @
3fa8ff7d
...
...
@@ -67,8 +67,8 @@ static void vt_subtract_sf(uint16_t *frameP, uint8_t *subframeP, int offset)
uint8_t
msg_can_be_queued
(
ss_set_timinfo_t
req_tinfo
,
ss_set_timinfo_t
*
timer_tinfo
)
{
ss_set_timinfo_t
curr_tinfo
;
curr_tinfo
.
sfn
=
SS_context
[
0
]
.
sfn
;
curr_tinfo
.
sf
=
SS_context
[
0
]
.
sf
;
curr_tinfo
.
sfn
=
SS_context
.
sfn
;
curr_tinfo
.
sf
=
SS_context
.
sf
;
LOG_A
(
ENB_APP
,
"VT_TIMER Enter msg_can_be_queued for SFN %d , SF %d
\n
"
,
req_tinfo
.
sfn
,
req_tinfo
.
sf
);
...
...
@@ -97,7 +97,7 @@ uint8_t vt_timer_setup(ss_set_timinfo_t tinfo, task_id_t task_id,instance_t inst
timer_ele_p
->
task_id
=
task_id
;
timer_ele_p
->
msg
=
msg
;
if
(
hashtable_insert
(
SS_context
[
0
]
.
vt_timer_table
,
if
(
hashtable_insert
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
*
)
timer_ele_p
)
==
HASH_TABLE_OK
)
{
LOG_A
(
ENB_APP
,
"VT_TIMER setup for SFN %d , SF %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
...
...
@@ -117,14 +117,14 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
uint32_t
sfnSfKey
=
(
tinfo
.
sfn
<<
4
)
|
tinfo
.
sf
;
hash_rc
=
hashtable_is_key_exists
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
hash_rc
=
hashtable_is_key_exists
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
//printf("VT_TIMER foudn queued SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
if
(
hash_rc
==
HASH_TABLE_OK
)
{
LOG_D
(
ENB_APP
,
"VT_TIMER Timeout sending curr SFN %d SF %d
\n
"
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
hash_rc
=
hashtable_get
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
**
)
&
timer_ele_p
);
hash_rc
=
hashtable_get
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
,
(
void
**
)
&
timer_ele_p
);
LOG_A
(
ENB_APP
,
"VT_TIMER Enter check SFN %d , SF %d taskID %d timer_ele.task_id instance %ld
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
...
...
@@ -138,11 +138,11 @@ static inline void ss_vt_timer_check(ss_set_timinfo_t tinfo)
{
LOG_A
(
ENB_APP
,
"VT_TIMER Sent message to taskID %d timer_ele.task_id instance %ld
\n
"
,
timer_ele_p
->
task_id
,
timer_ele_p
->
instance
);
hash_rc
=
hashtable_remove
(
SS_context
[
0
]
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
hash_rc
=
hashtable_remove
(
SS_context
.
vt_timer_table
,
(
hash_key_t
)
sfnSfKey
);
}
LOG_D
(
ENB_APP
,
"VT_TIMER Timeout sending done curr SFN %d SF %d
\n
"
,
SS_context
[
0
].
sfn
,
SS_context
[
0
]
.
sf
);
SS_context
.
sfn
,
SS_context
.
sf
);
}
...
...
@@ -195,7 +195,7 @@ void *ss_eNB_vt_timer_process_itti_msg(void *notUsed)
*/
int
ss_eNB_vt_timer_init
(
void
)
{
SS_context
[
0
]
.
vt_timer_table
=
hashtable_create
(
32
,
NULL
,
NULL
);
SS_context
.
vt_timer_table
=
hashtable_create
(
32
,
NULL
,
NULL
);
itti_mark_task_ready
(
TASK_VT_TIMER
);
return
0
;
...
...
openair3/SS/ss_eNB_vtp_task.c
View file @
3fa8ff7d
...
...
@@ -120,14 +120,14 @@ void ss_vtp_send_tinfo(
LOG_E
(
ENB_APP
,
"[SS-VTP] acpSendMsg failed. Error : %d on fd: %d the VTP at SS will be disabled
\n
"
,
status
,
acpGetSocketFd
(
ctx_vtp_g
));
acpFree
(
buffer
);
//SS_context
[0]
.vtp_enabled = VTP_DISABLE;
//SS_context.vtp_enabled = VTP_DISABLE;
return
;
}
else
{
LOG_A
(
ENB_APP
,
"[SS-VTP] acpSendMsg VTP_Send Success SFN %d SF %d virtualTime.Enable %d
\n
"
,
tinfo
->
sfn
,
tinfo
->
sf
,
virtualTime
.
Enable
);
SS_context
[
0
]
.
vtinfo
=
*
tinfo
;
SS_context
.
vtinfo
=
*
tinfo
;
}
// Free allocated buffer
acpFree
(
buffer
);
...
...
@@ -201,7 +201,7 @@ static inline void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
msg_id
=
SS_VTP_RESP
;
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
req
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
req
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
req
->
tinfo
.
sfn
=
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
;
req
->
tinfo
.
sf
=
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
;
...
...
@@ -234,7 +234,7 @@ static inline void ss_enable_vtp()
req
->
header
.
preamble
=
0xFEEDC0DE
;
req
->
header
.
msg_id
=
SS_VTP_ENABLE
;
req
->
header
.
length
=
sizeof
(
proxy_ss_header_t
);
req
->
header
.
cell_id
=
SS_context
[
0
].
cellId
;
req
->
header
.
cell_id
=
SS_context
.
SSCell_list
[
0
].
cellId
;
/* Initialize with zero */
req
->
tinfo
.
sfn
=
0
;
...
...
@@ -320,16 +320,16 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx, bool vtInit)
break
;
}
LOG_A
(
ENB_APP
,
"[SS-VTP] Received VTEnquireTimingAck Request SFN %d Subframe %d Waiting for ACK of SFN %d SF %d
\n
"
,
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
[
0
].
vtinfo
.
sfn
,
SS_context
[
0
]
.
vtinfo
.
sf
);
// if (
RC.ss
.State < SS_STATE_CELL_ACTIVE)
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
.
vtinfo
.
sfn
,
SS_context
.
vtinfo
.
sf
);
// if (
SS_context.SSCell_list[0]
.State < SS_STATE_CELL_ACTIVE)
// {
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
RC.ss
.State);
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
SS_context.SSCell_list[0]
.State);
// break;
// }
// if((SS_context
[0]
.vtinfo.sfn == virtualTime->TimingInfo.SFN.v.Number) &&
// (SS_context[0].vtinfo.sf == virtualTime->TimingInfo.Subframe.v.Number))
// if((SS_context.vtinfo.sfn == virtualTime->TimingInfo.SFN.v.Number) &&
// (SS_context
.SSCell_list
[0].vtinfo.sf == virtualTime->TimingInfo.Subframe.v.Number))
{
if
(
virtualTime
->
Enable
)
{
ss_send_vtp_resp
(
virtualTime
);
...
...
@@ -381,7 +381,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
tinfo
.
sfn
=
SS_UPD_TIM_INFO
(
received_msg
).
sfn
;
LOG_A
(
ENB_APP
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
LOG_A
(
ENB_APP
,
"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d
\n
"
,
tinfo
.
sfn
,
tinfo
.
sf
);
if
(
SS_context
[
0
]
.
vtp_enabled
==
1
)
if
(
SS_context
.
vtp_enabled
==
1
)
ss_vtp_send_tinfo
(
TASK_VTP
,
&
tinfo
);
}
break
;
...
...
@@ -488,7 +488,7 @@ void* ss_eNB_vtp_task(void *arg) {
ss_eNB_wait_first_msg
();
SS_context
[
0
]
.
vtp_enabled
=
1
;
SS_context
.
vtp_enabled
=
1
;
RC
.
ss
.
vtp_ready
=
1
;
ss_enable_vtp
();
sleep
(
1
);
...
...
openair3/SS/ss_gNB_context.h
View file @
3fa8ff7d
...
...
@@ -24,6 +24,7 @@
#include "SidlCommon.h"
typedef
struct
SSConfigContext_s
{
int
State
;
uint16_t
dl_earfcn
;
uint16_t
ul_earfcn
;
uint32_t
dl_freq
;
...
...
@@ -35,9 +36,18 @@ typedef struct SSConfigContext_s {
EUTRA_CellId_Type
ttcn_cell_id
;
uint16_t
eutra_cellId
;
uint16_t
nr_cellId
;
uint16_t
ss_rnti_g
;
/** TODO: To add more */
}
SSConfigContext_t
;
typedef
enum
{
SS_STATE_NOT_CONFIGURED
=
0
,
SS_STATE_CELL_CONFIGURED
,
SS_STATE_CELL_ACTIVE
,
SS_STATE_AS_SECURITY_ACTIVE
,
SS_STATE_AS_RBS_ACTIVE
,
SS_STATE_CELL_BROADCASTING
,
SS_STATE_MAX_STATE
}
SS_STATE_t
;
#endif
/* _SS_GNB_CONTEXT_ */
openair3/SS/ss_gNB_srb_task.c
View file @
3fa8ff7d
...
...
@@ -59,7 +59,7 @@ SSConfigContext_t SS_context;
static
acpCtx_t
ctx_srb_g
=
NULL
;
static
uint16_t
rnti_g
=
0
;
static
instance_t
instance_g
=
0
;
uint16_t
ss_rnti_g
=
0
;
//
uint16_t ss_rnti_g = 0;
typedef
enum
{
// user defined IDs should be an int number >= 1
...
...
@@ -86,7 +86,7 @@ static void ss_send_srb_data(ss_nrrrc_pdu_ind_t *pdu_ind)
DevAssert
(
pdu_ind
->
sdu_size
>=
0
);
DevAssert
(
pdu_ind
->
srb_id
>=
0
);
rnti_g
=
pdu_ind
->
rnti
;
ss_rnti_g
=
rnti_g
;
SS_context
.
ss_rnti_g
=
rnti_g
;
size_t
msgSize
=
size
;
memset
(
&
ind
,
0
,
sizeof
(
ind
));
//TODO: Work Around till Sys port is implemented for 5G
...
...
@@ -300,13 +300,13 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A
(
GNB_APP
,
"[SS_SRB][NR_RRC_PDU_REQ] acpNrSysSrbProcessFromSSDecSrv Failed
\n
"
);
break
;
}
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
ss_task_handle_rrc_pdu_req
(
req
);
}
else
{
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_REQ] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_REQ] received in SS state %d
\n
"
,
SS_context
.
State
);
}
acpNrSysSrbProcessFromSSFreeSrv
(
req
);
...
...
@@ -361,7 +361,7 @@ void ss_gNB_srb_init(void)
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
RC
.
ss
.
State
=
SS_STATE_CELL_ACTIVE
;
SS_context
.
State
=
SS_STATE_CELL_ACTIVE
;
itti_subscribe_event_fd
(
TASK_SS_SRB
,
fd1
);
itti_mark_task_ready
(
TASK_SS_SRB
);
...
...
@@ -387,20 +387,20 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
if (origin_task == TASK_SS_PORTMAN)
{
LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n",
RC.ss
.State);
LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n",
SS_context
.State);
}
else
#endif
{
LOG_A
(
GNB_APP
,
"[SS_SRB] Received SS_NRRRC_PDU_IND from RRC
\n
"
);
if
(
RC
.
ss
.
State
>=
SS_STATE_CELL_ACTIVE
)
if
(
SS_context
.
State
>=
SS_STATE_CELL_ACTIVE
)
{
instance_g
=
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
);
ss_send_srb_data
(
&
received_msg
->
ittiMsg
.
ss_nrrrc_pdu_ind
);
}
else
{
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_IND] received in SS state %d
\n
"
,
RC
.
ss
.
State
);
LOG_A
(
GNB_APP
,
"ERROR [SS_SRB][NR_RRC_PDU_IND] received in SS state %d
\n
"
,
SS_context
.
State
);
}
}
...
...
openair3/SS/ss_gNB_vtp_task.c
View file @
3fa8ff7d
...
...
@@ -310,9 +310,9 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx)
}
LOG_A
(
ENB_APP
,
"[SS-VTP] Received VTEnquireTimingAck Request SFN %d Subframe %d Waiting for ACK of SFN %d SF %d
\n
"
,
virtualTime
->
TimingInfo
.
SFN
.
v
.
Number
,
virtualTime
->
TimingInfo
.
Subframe
.
v
.
Number
,
SS_context
.
vtinfo
.
sfn
,
SS_context
.
vtinfo
.
sf
);
// if (
RC.ss
.State < SS_STATE_CELL_ACTIVE)
// if (
SS_context
.State < SS_STATE_CELL_ACTIVE)
// {
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
RC.ss
.State);
// LOG_E(ENB_APP, "[SS-VTP] Request received in an invalid state: %d \n",
SS_context
.State);
// break;
// }
...
...
targets/ARCH/SS/ss_config.h
View file @
3fa8ff7d
...
...
@@ -65,7 +65,6 @@ typedef struct ss_config_s {
int
SysportNR
;
uint8_t
configured
;
/** State info */
int
State
;
int
vtp_ready
;
int
CBRA_flag
;
int
mac_rlc_data_ind_frame
;
...
...
@@ -74,7 +73,7 @@ typedef struct ss_config_s {
/** Cell Config Array */
ss_cell_config_t
ss_cell_list
[
8
];
}
ss_config_t
;
/**
typedef enum {
SS_STATE_NOT_CONFIGURED = 0,
SS_STATE_CELL_CONFIGURED,
...
...
@@ -84,6 +83,7 @@ typedef enum {
SS_STATE_CELL_BROADCASTING,
SS_STATE_MAX_STATE
} SS_STATE_t;
*/
#endif
/** __SS_CONFIG_H__ */
/** @} */
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