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
wangjie
OpenXG-RAN
Commits
143e765c
Commit
143e765c
authored
Jun 12, 2019
by
Daniel0326
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msg5 decoding in RRC
parent
9c7a5b22
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
625 additions
and
11 deletions
+625
-11
common/utils/hashtable/hashtable.c
common/utils/hashtable/hashtable.c
+10
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
+28
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+2
-0
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+9
-0
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+13
-0
openair2/LAYER2/RLC/rlc_mac.c
openair2/LAYER2/RLC/rlc_mac.c
+23
-1
openair2/LAYER2/RLC/rlc_rrc.c
openair2/LAYER2/RLC/rlc_rrc.c
+31
-1
openair2/RRC/LITE/L2_interface.c
openair2/RRC/LITE/L2_interface.c
+10
-0
openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
+0
-1
openair2/RRC/LITE/proto_NB_IoT.h
openair2/RRC/LITE/proto_NB_IoT.h
+0
-1
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+499
-5
No files found.
common/utils/hashtable/hashtable.c
View file @
143e765c
...
...
@@ -276,14 +276,23 @@ hashtable_rc_t hashtable_get(const hash_table_t * const hashtblP, const hash_key
*
dataP
=
NULL
;
return
HASH_TABLE_BAD_PARAMETER_HASHTABLE
;
}
//printf("Hash table size : %d\n", hashtblP->size);
//printf("hashfunc(keyP) : %d\n", hashtblP->hashfunc(keyP));
hash
=
hashtblP
->
hashfunc
(
keyP
)
%
hashtblP
->
size
;
/* fprintf(stderr, "hashtable_get() key=%s, hash=%d\n", key, hash);*/
//printf("keyP %d\n", keyP);
/*fprintf(stderr, "hashtable_get() key=%s, hash=%d\n", key, hash);*/
//printf("hash %d\n", hash);
node
=
hashtblP
->
nodes
[
hash
];
//printf("nodes_value %d \n", hashtblP->nodes[hash]);
while
(
node
)
{
//printf("node_key %d \n",node->key);
if
(
node
->
key
==
keyP
)
{
//printf("node_key %d \n",node->key);
*
dataP
=
node
->
data
;
//printf("data : %p \n",node->data);
return
HASH_TABLE_OK
;
}
node
=
node
->
next
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
View file @
143e765c
...
...
@@ -30,6 +30,9 @@
#include "defs_NB_IoT.h"
#include "proto_NB_IoT.h"
#include "extern_NB_IoT.h"
#include "RRC/LITE/proto.h"
#include "RRC/LITE/extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
unsigned
char
str20
[]
=
"DCI_uss"
;
unsigned
char
str21
[]
=
"DATA_uss"
;
...
...
@@ -246,16 +249,40 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
printf("%02x ",payload_ptr[a]);
printf("\n");*/
rx_lengths
[
i
]
-=
1
;
mac_rrc_data_ind
(
module_id
,
CC_id
,
frame
,
subframe
,
rnti
,
CCCH
,
(
uint8_t
*
)
payload_ptr
,
rx_lengths
[
i
],
1
,
module_id
,
0
);
LOG_D
(
MAC
,
"rx_lengths : %d
\n
"
,
rx_lengths
[
i
]);
msg4_rrc_pdu
=
mac_rrc_msg3_ind_NB_IoT
(
payload_ptr
,
rnti
,
rx_lengths
[
i
]);
receive_msg3_NB_IoT
(
mac_inst
,
rnti
,
PHR
,
ul_total_buffer
,
first_6
,
msg4_rrc_pdu
);
LOG_
D
(
MAC
,
"Contention resolution ID = %02x %02x %02x %02x %02x %02x
\n
"
,
first_6
[
0
],
first_6
[
1
],
first_6
[
2
],
first_6
[
3
],
first_6
[
4
],
first_6
[
5
]);
LOG_
I
(
MAC
,
"Contention resolution ID = %02x %02x %02x %02x %02x %02x
\n
"
,
first_6
[
0
],
first_6
[
1
],
first_6
[
2
],
first_6
[
3
],
first_6
[
4
],
first_6
[
5
]);
//NB_IoT_mac_rrc_data_ind(payload_ptr,mac_inst,rnti);
//NB_IoT_receive_msg3(mac_inst,rnti,PHR,ul_total_buffer);
break
;
case
DCCH0_NB_IoT
:
case
DCCH1_NB_IoT
:
LOG_I
(
MAC
,
"DCCH PDU Here
\n
"
);
mac_rlc_data_ind
(
module_id
,
rnti
,
module_id
,
frame
,
1
,
0
,
rx_lcids
[
i
],
//1,/* change channel_id equals 1 (SRB) */
(
char
*
)
payload_ptr
,
rx_lengths
[
i
],
1
,
NULL
);
//(unsigned int*)crc_status);
// UE specific here
//NB_IoT_mac_rlc_data_ind(payload_ptr,mac_inst,rnti);
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
143e765c
...
...
@@ -514,6 +514,7 @@ pdcp_data_ind(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
key
=
PDCP_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_id
,
srb_flagP
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
if
(
h_rc
!=
HASH_TABLE_OK
)
{
...
...
@@ -652,6 +653,7 @@ pdcp_data_ind(
PROTOCOL_PDCP_CTXT_FMT
" DATA-IND len %u"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
),
sdu_buffer_sizeP
-
pdcp_header_len
-
pdcp_tailer_len
);
rrc_data_ind
(
ctxt_pP
,
rb_id
,
sdu_buffer_sizeP
-
pdcp_header_len
-
pdcp_tailer_len
,
...
...
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
View file @
143e765c
...
...
@@ -211,6 +211,11 @@ config_req_rlc_am (
hashtable_rc_t
h_rc
;
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
/***************************************/
printf
(
"hashtable_get in comfig_req_rlc_am
\n
"
);
/***************************************/
if
(
h_rc
==
HASH_TABLE_OK
)
{
l_rlc_p
=
&
rlc_union_p
->
rlc
.
am
;
...
...
@@ -265,6 +270,10 @@ void config_req_rlc_am_asn1 (
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
/***************************************/
printf
(
"hashtable_get in config_req_rlc_am_asn1
\n
"
);
/***************************************/
if
(
h_rc
==
HASH_TABLE_OK
)
{
l_rlc_p
=
&
rlc_union_p
->
rlc
.
am
;
...
...
openair2/LAYER2/RLC/rlc.c
View file @
143e765c
...
...
@@ -36,6 +36,7 @@
#include "assertions.h"
extern
boolean_t
pdcp_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
...
...
@@ -581,7 +582,17 @@ void rlc_data_ind (
T
(
T_ENB_RLC_UL
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
rnti
),
T_INT
(
rb_idP
),
T_INT
(
sdu_sizeP
));
#endif
/*************************For SRB1bis (RLC->RRC)*****************************/
rrc_data_ind
(
ctxt_pP
,
rb_idP
,
51
,
(
uint8_t
*
)
&
sdu_pP
->
data
[
0
]);
/***************************************************************************/
/*
pdcp_data_ind (
ctxt_pP,
srb_flagP,
...
...
@@ -589,7 +600,9 @@ void rlc_data_ind (
rb_idP,
sdu_sizeP,
sdu_pP);
*/
}
//-----------------------------------------------------------------------------
void
rlc_data_conf
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
srb_flag_t
srb_flagP
,
...
...
openair2/LAYER2/RLC/rlc_mac.c
View file @
143e765c
...
...
@@ -177,6 +177,7 @@ tbs_size_t mac_rlc_data_req(
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
rlc_mode
=
rlc_union_p
->
mode
;
}
else
{
...
...
@@ -238,8 +239,9 @@ void mac_rlc_data_ind (
rlc_union_t
*
rlc_union_p
=
NULL
;
hash_key_t
key
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_rc
;
srb_flag_t
srb_flag
=
(
channel_idP
<=
2
)
?
SRB_FLAG_YES
:
SRB_FLAG_NO
;
srb_flag_t
srb_flag
=
(
channel_idP
<=
3
)
?
SRB_FLAG_YES
:
SRB_FLAG_NO
;
protocol_ctxt_t
ctxt
;
LOG_I
(
RLC
,
"NB-IoT: RLC PDU receive
\n
"
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
enb_flagP
,
rntiP
,
frameP
,
0
,
eNB_index
);
...
...
@@ -282,7 +284,19 @@ void mac_rlc_data_ind (
return
;
}
}
else
{
key
=
RLC_COLL_KEY_LCID_VALUE
(
module_idP
,
rntiP
,
enb_flagP
,
channel_idP
,
srb_flag
);
/*
printf("*******RLC_COLL_KEY_LCID_VALUE*********\n");
printf("module_id : %d\n",module_idP);
printf("rnti : %d\n",rntiP);
printf("enb_flag : %d\n",enb_flagP );
printf("channel_id : %d\n",channel_idP );
printf("srb_flag : %d\n",srb_flag);
printf("***************************************\n");
*/
}
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
...
...
@@ -298,18 +312,24 @@ void mac_rlc_data_ind (
switch
(
rlc_mode
)
{
case
RLC_MODE_NONE
:
LOG_I
(
RLC
,
"NB-IoT: No Radio bearer configure for
\n
"
);
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
break
;
case
RLC_MODE_AM
:
LOG_I
(
RLC
,
"NB-IoT: AM
\n
"
);
rlc_am_mac_data_indication
(
&
ctxt
,
&
rlc_union_p
->
rlc
.
am
,
data_ind
);
break
;
case
RLC_MODE_UM
:
LOG_I
(
RLC
,
"NB-IoT: UM
\n
"
);
rlc_um_mac_data_indication
(
&
ctxt
,
&
rlc_union_p
->
rlc
.
um
,
data_ind
);
break
;
case
RLC_MODE_TM
:
LOG_I
(
RLC
,
"NB-IoT: TM
\n
"
);
rlc_tm_mac_data_indication
(
&
ctxt
,
&
rlc_union_p
->
rlc
.
tm
,
data_ind
);
break
;
}
...
...
@@ -386,6 +406,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
rlc_mode
=
rlc_union_p
->
mode
;
}
else
{
...
...
@@ -469,6 +490,7 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
rlc_mode
=
rlc_union_p
->
mode
;
}
else
{
...
...
openair2/LAYER2/RLC/rlc_rrc.c
View file @
143e765c
...
...
@@ -113,6 +113,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break
;
case
RLC_Config_PR_am
:
/****************************************config srb1********************************************/
if
(
rrc_rlc_add_rlc
(
ctxt_pP
,
SRB_FLAG_YES
,
MBMS_FLAG_NO
,
rb_id
,
lc_id
,
RLC_MODE_AM
)
!=
NULL
)
{
config_req_rlc_am_asn1
(
ctxt_pP
,
...
...
@@ -124,6 +125,21 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
rb_id
);
}
/***********************************************************************************************/
/****************************************config srb1bis********************************************/
if
(
rrc_rlc_add_rlc
(
ctxt_pP
,
SRB_FLAG_YES
,
MBMS_FLAG_NO
,
3
,
3
,
RLC_MODE_AM
)
!=
NULL
)
{
config_req_rlc_am_asn1
(
ctxt_pP
,
SRB_FLAG_YES
,
&
srb_toaddmod_p
->
rlc_Config
->
choice
.
explicitValue
.
choice
.
am
,
3
,
3
);
}
else
{
LOG_E
(
RLC
,
PROTOCOL_CTXT_FMT
" ERROR IN ALLOCATING SRB %d
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
rb_id
);
}
/***************************************************************************************************/
break
;
...
...
@@ -374,6 +390,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_KEY_NOT_EXISTS
)
{
rlc_union_p
=
rrc_rlc_add_rlc
(
ctxt_pP
,
...
...
@@ -489,7 +506,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
rlc_union_t
*
rlc_union_p
=
NULL
;
#if defined(Rel10) || defined(Rel14)
rlc_mbms_id_t
*
mbms_id_p
=
NULL
;
#endif
#endif
rrc_rlc_remove_rlc
#ifdef OAI_EMU
CHECK_CTXT_ARGS
(
ctxt_pP
)
...
...
@@ -548,6 +565,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
}
key_lcid
=
RLC_COLL_KEY_LCID_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
lcid
,
srb_flagP
);
h_lcid_rc
=
hashtable_get
(
rlc_coll_p
,
key_lcid
,
(
void
**
)
&
rlc_union_p
);
}
else
{
h_lcid_rc
=
HASH_TABLE_KEY_NOT_EXISTS
;
}
...
...
@@ -632,8 +650,20 @@ rlc_union_t* rrc_rlc_add_rlc (
{
key
=
RLC_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
key_lcid
=
RLC_COLL_KEY_LCID_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
chan_idP
,
srb_flagP
);
/*
printf("*******RLC_COLL_KEY_LCID_VALUE*********\n");
printf("module_id : %d\n",ctxt_pP->module_id);
printf("rnti : %d\n",ctxt_pP->rnti);
printf("enb_flag : %d\n",ctxt_pP->enb_flag );
printf("channel_id : %d\n",chan_idP );
printf("srb_flag : %d\n",srb_flagP);
printf("***************************************\n");
printf("key_lcid %d\n",key_lcid);
*/
}
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
...
...
openair2/RRC/LITE/L2_interface.c
View file @
143e765c
...
...
@@ -604,6 +604,16 @@ rrc_data_ind(
sdu_sizeP
,
ctxt_pP
->
rnti
);
}
/*
printf("....in rrc_data_ind....\n");
printf("module_id : %d\n",ctxt_pP->module_id);
printf("frame : %d\n",ctxt_pP->frame);
printf("DCCH_index : %d\n",DCCH_index);
printf("Srb_id : %d\n",Srb_id);
printf("sdu_sizeP : %d\n",sdu_sizeP);
printf("rnti : %d\n",ctxt_pP->rnti);
*/
#if defined(ENABLE_ITTI)
{
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
View file @
143e765c
...
...
@@ -944,7 +944,6 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
SRB_ToAddModList_NB_r13_t
**
SRB_configList_NB_IoT
,
//for both SRB1bis and SRB1
struct
PhysicalConfigDedicated_NB_r13
**
physicalConfigDedicated_NB_IoT
)
{
asn_enc_rval_t
enc_rval
;
uint8_t
ecause
=
0
;
...
...
openair2/RRC/LITE/proto_NB_IoT.h
View file @
143e765c
...
...
@@ -35,7 +35,6 @@
#include "rlc.h"
#include "extern_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
/*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/
uint8_t
*
generate_msg4_NB_IoT
(
rrc_eNB_carrier_data_NB_IoT_t
*
carrier
);
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
143e765c
This diff is collapsed.
Click to expand it.
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