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
ZhouShuya
OpenXG-RAN
Commits
50207091
Commit
50207091
authored
Aug 22, 2017
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming structures and variables in file:openair2/LAYER2/MAC/defs_NB_IoT.h
parent
7daf62f8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
70 additions
and
70 deletions
+70
-70
openair2/LAYER2/MAC/defs_NB_IoT.h
openair2/LAYER2/MAC/defs_NB_IoT.h
+28
-28
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
+4
-4
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c
+2
-2
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
+7
-7
openair2/LAYER2/MAC/extern.h
openair2/LAYER2/MAC/extern.h
+2
-2
openair2/LAYER2/MAC/extern_NB_IoT.h
openair2/LAYER2/MAC/extern_NB_IoT.h
+2
-2
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+6
-6
openair2/LAYER2/MAC/vars.h
openair2/LAYER2/MAC/vars.h
+2
-2
openair2/PHY_INTERFACE/IF_Module_NB_IoT.h
openair2/PHY_INTERFACE/IF_Module_NB_IoT.h
+1
-1
openair2/RRC/LITE/L2_interface_NB_IoT.c
openair2/RRC/LITE/L2_interface_NB_IoT.c
+6
-6
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
+9
-9
No files found.
openair2/LAYER2/MAC/defs_NB_IoT.h
View file @
50207091
...
...
@@ -313,21 +313,21 @@ typedef struct {
}
UE_list_NB_IoT_t
;
/*!\brief Values of BCCH0 logical channel for MIB*/
#define BCCH0_NB 11 // MIB-NB
#define BCCH0_NB
_IoT
11 // MIB-NB
/*!\brief Values of BCCH1 logical channel for SIBs */
#define BCCH1_NB 12 // SI-SIB-NBs
#define BCCH1_NB
_IoT
12 // SI-SIB-NBs
/*!\brief Values of PCCH logical channel */
#define PCCH_NB 13 // Paging XXX not used for the moment
#define PCCH_NB
_IoT
13 // Paging XXX not used for the moment
/*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH_NB 0 // srb0 ---> XXX exactly the same as in LTE (commented for compilation purposes)
#define CCCH_NB
_IoT
0 // srb0 ---> XXX exactly the same as in LTE (commented for compilation purposes)
/*!\brief DCCH0 / SRB1bis logical channel */
#define DCCH0_NB 3 // srb1bis
#define DCCH0_NB
_IoT
3 // srb1bis
/*!\brief DCCH1 / SRB1 logical channel */
#define DCCH1_NB 1 // srb1 //XXX we redefine it for the SRB1
#define DCCH1_NB
_IoT
1 // srb1 //XXX we redefine it for the SRB1
/*!\brief DTCH0 DRB0 logical channel */
#define DTCH0_NB 4 // DRB0
#define DTCH0_NB
_IoT
4 // DRB0
/*!\brief DTCH1 DRB1 logical channel */
#define DTCH1_NB 5 // DRB1
#define DTCH1_NB
_IoT
5 // DRB1
// DLSCH LCHAN ID all the same as NB-IoT
/*!\brief DCI PDU filled by MAC for the PHY */
/*
...
...
@@ -343,7 +343,7 @@ typedef struct {
uint8_t
RAPID
:
6
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
}
__attribute__
((
__packed__
))
RA_HEADER_RAPID_NB
;
}
__attribute__
((
__packed__
))
RA_HEADER_RAPID_NB
_IoT
;
/*!\brief MAC header of Random Access Response for backoff indicator (BI) for NB-IoT*/
typedef
struct
{
...
...
@@ -351,7 +351,7 @@ typedef struct {
uint8_t
R
:
2
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
}
__attribute__
((
__packed__
))
RA_HEADER_BI_NB
;
}
__attribute__
((
__packed__
))
RA_HEADER_BI_NB
_IoT
;
/*Seems not to do the packed of RAR pdu*/
...
...
@@ -362,7 +362,7 @@ typedef struct {
uint8_t
R
:
2
;
// octet 1 MSB
uint8_t
L
:
7
;
// octet 2 LSB
uint8_t
F
:
1
;
// octet 2 MSB
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_SHORT_NB
;
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_SHORT_NB
_IoT
;
/*!\brief MAC subheader long with 15bit Length field */
typedef
struct
{
uint8_t
LCID
:
5
;
// octet 1 LSB
...
...
@@ -372,19 +372,19 @@ typedef struct {
uint8_t
F
:
1
;
// octet 2 MSB
uint8_t
L_LSB
:
8
;
uint8_t
padding
;
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_LONG_NB
;
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_LONG_NB
_IoT
;
/*!\brief MAC subheader short without length field */
typedef
struct
{
uint8_t
LCID
:
5
;
uint8_t
E
:
1
;
uint8_t
R
:
2
;
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_FIXED_NB
;
}
__attribute__
((
__packed__
))
SCH_SUBHEADER_FIXED_NB
_IoT
;
/*!\brief mac control element: short buffer status report for a specific logical channel group ID*/
typedef
struct
{
uint8_t
Buffer_size
:
6
;
// octet 1 LSB
uint8_t
LCGID
:
2
;
// octet 1 MSB
}
__attribute__
((
__packed__
))
BSR_SHORT_NB
;
}
__attribute__
((
__packed__
))
BSR_SHORT_NB
_IoT
;
/*!\TRUNCATED BSR and Long BSR is not supported in NB-IoT*/
...
...
@@ -392,20 +392,20 @@ typedef struct {
typedef
struct
{
uint8_t
TA
:
6
;
uint8_t
R
:
2
;
}
__attribute__
((
__packed__
))
TIMING_ADVANCE_CMD_NB
;
}
__attribute__
((
__packed__
))
TIMING_ADVANCE_CMD_NB
_IoT
;
/*!\brief mac control element: power headroom report */
typedef
struct
{
uint8_t
PH
:
6
;
uint8_t
R
:
2
;
}
__attribute__
((
__packed__
))
POWER_HEADROOM_CMD_NB
;
}
__attribute__
((
__packed__
))
POWER_HEADROOM_CMD_NB
_IoT
;
typedef
struct
{
uint8_t
payload
[
BCCH_PAYLOAD_SIZE_MAX
]
;
}
__attribute__
((
__packed__
))
BCCH_PDU_NB
;
uint8_t
payload
[
BCCH_PAYLOAD_SIZE_MAX
_NB_IoT
]
;
}
__attribute__
((
__packed__
))
BCCH_PDU_NB
_IoT
;
/*! \brief CCCH payload */
typedef
struct
{
uint8_t
payload
[
CCCH_PAYLOAD_SIZE_MAX_NB_IoT
]
;
}
__attribute__
((
__packed__
))
CCCH_PDU_NB
;
}
__attribute__
((
__packed__
))
CCCH_PDU_NB
_IoT
;
/*! \brief eNB template for the Random access information */
typedef
struct
{
/// Flag to indicate this process is active
...
...
@@ -448,7 +448,7 @@ typedef struct {
int16_t
timing_offset
;
/// Timeout for RRC connection
int16_t
RRC_timer
;
}
RA_TEMPLATE_NB
;
}
RA_TEMPLATE_NB
_IoT
;
/*! \brief eNB common channels */
typedef
struct
{
int
physCellId
;
...
...
@@ -465,12 +465,12 @@ typedef struct {
/// Outgoing DCI for PHY generated by eNB scheduler
DCI_PDU_NB_IoT
DCI_pdu
;
/// Outgoing BCCH pdu for PHY
BCCH_PDU_NB
BCCH_pdu
;
BCCH_PDU_NB
_IoT
BCCH_pdu
;
/// Outgoing BCCH DCI allocation
uint32_t
BCCH_alloc_pdu
;
/// Outgoing CCCH pdu for PHY
CCCH_PDU_NB
CCCH_pdu
;
RA_TEMPLATE_NB
RA_template
[
RA_PROC_MAX_NB_IoT
];
CCCH_PDU_NB
_IoT
CCCH_pdu
;
RA_TEMPLATE_NB
_IoT
RA_template
[
RA_PROC_MAX_NB_IoT
];
/// Delete VRB map for common channels
/// Delete MBSFN SubframeConfig
/// Delete number of subframe allocation pattern available for MBSFN sync area
...
...
@@ -491,7 +491,7 @@ typedef struct {
/// Delete RNTI for each CBA group
/// Delete MCS for each CBA group
// #endif
}
COMMON_channels_NB_t
;
}
COMMON_channels_NB_
IoT_
t
;
/*! \brief eNB overall statistics */
typedef
struct
{
/// num BCCH PDU per CC
...
...
@@ -549,7 +549,7 @@ typedef struct {
int
sched_decisions
;
/// missed deadlines
int
missed_deadlines
;
}
eNB_STATS_NB
;
}
eNB_STATS_NB
_IoT
;
/*! \brief top level eNB MAC structure */
typedef
struct
{
...
...
@@ -560,7 +560,7 @@ typedef struct {
/// subframe counter
sub_frame_t
subframe
;
/// Common cell resources
COMMON_channels_NB_t
common_channels
[
MAX_NUM_CCs
];
COMMON_channels_NB_
IoT_
t
common_channels
[
MAX_NUM_CCs
];
UE_list_NB_IoT_t
UE_list
;
///Delete subband bitmap configuration, no related CQI report
// / Modify CCE table used to build DCI scheduling information
...
...
@@ -568,7 +568,7 @@ typedef struct {
/// active flag for Other lcid
uint8_t
lcid_active
[
NB_RB_MAX
];
/// eNB stats
eNB_STATS_NB
eNB_stats
[
MAX_NUM_CCs
];
eNB_STATS_NB
_IoT
eNB_stats
[
MAX_NUM_CCs
];
// MAC function execution peformance profiler
/// processing time of eNB scheduler
time_stats_t
eNB_scheduler
;
...
...
@@ -587,5 +587,5 @@ typedef struct {
/// Delete processing time of eNB MCH scheduler
/// processing time of eNB ULSCH reception
time_stats_t
rx_ulsch_sdu
;
// include rlc_data_ind
}
eNB_MAC_INST_NB
;
}
eNB_MAC_INST_NB
_IoT
;
#endif
/*__LAYER2_MAC_DEFS_NB_IoT_H__ */
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
View file @
50207091
...
...
@@ -73,10 +73,10 @@ void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
{
int
CC_id
;
eNB_MAC_INST_NB
*
eNB
=
&
eNB_mac_inst_NB
[
module_idP
];
eNB_MAC_INST_NB
_IoT
*
eNB
=
&
eNB_mac_inst_NB
[
module_idP
];
RA_TEMPLATE_NB
*
RA_template
;
RA_TEMPLATE_NB
_IoT
*
RA_template
;
unsigned
char
i
,
harq_pid
,
round
;
int16_t
rrc_sdu_length
;
int
UE_id
=
-
1
;
...
...
@@ -92,7 +92,7 @@ void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
for
(
i
=
0
;
i
<
NB_RA_PROC_MAX
;
i
++
)
{
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB
->
common_channels
[
CC_id
].
RA_template
[
i
];
RA_template
=
(
RA_TEMPLATE_NB
_IoT
*
)
&
eNB
->
common_channels
[
CC_id
].
RA_template
[
i
];
if
(
RA_template
->
RA_active
==
TRUE
)
{
...
...
@@ -239,7 +239,7 @@ void NB_initiate_ra_proc(module_id_t module_idP, int CC_id,frame_t frameP, uint1
uint8_t
i
;
uint8_t
carrier_id
=
0
;
/*The index of the UL carrier associated with the NPRACH, the carrier_id of the anchor carrier is 0*/
RA_TEMPLATE_NB
*
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst_NB
[
module_idP
].
common_channels
[
CC_id
].
RA_template
[
0
];
RA_TEMPLATE_NB
_IoT
*
RA_template
=
(
RA_TEMPLATE_NB_IoT
*
)
&
eNB_mac_inst_NB
[
module_idP
].
common_channels
[
CC_id
].
RA_template
[
0
];
/*preamble index will be a subcarrier index (0-47)*/
LOG_D
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d Initiating RA procedure for preamble index %d
\n
"
,
module_idP
,
CC_id
,
frameP
,
preamble_index
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
View file @
50207091
...
...
@@ -78,7 +78,7 @@ uint8_t *NB_get_dlsch_sdu(
{
int
UE_id
;
eNB_MAC_INST_NB
*
eNB
=&
eNB_mac_inst_NB
[
module_idP
];
eNB_MAC_INST_NB
_IoT
*
eNB
=&
eNB_mac_inst_NB
[
module_idP
];
/*for SIBs*/
if
(
rntiP
==
SI_RNTI
)
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives_NB_IoT.c
View file @
50207091
...
...
@@ -107,9 +107,9 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP);
//NB_mac_phy_remove_ue(mod_idP,rntiP);
// check if this has an RA process active
RA_TEMPLATE_NB
*
RA_template
;
RA_TEMPLATE_NB
_IoT
*
RA_template
;
for
(
i
=
0
;
i
<
NB_RA_PROC_MAX
;
i
++
)
{
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst_NB
[
mod_idP
].
common_channels
[
pCC_id
].
RA_template
[
i
];
RA_template
=
(
RA_TEMPLATE_NB
_IoT
*
)
&
eNB_mac_inst_NB
[
mod_idP
].
common_channels
[
pCC_id
].
RA_template
[
i
];
if
(
RA_template
->
rnti
==
rntiP
){
RA_template
->
RA_active
=
FALSE
;
RA_template
->
generate_rar
=
0
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
View file @
50207091
...
...
@@ -83,7 +83,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
unsigned
short
rx_lengths
[
NB_RB_MAX
];
int
UE_id
=
find_UE_id
(
enb_mod_idP
,
rntiP
);
int
ii
,
j
;
eNB_MAC_INST_NB
*
eNB
=
&
eNB_mac_inst_NB
[
enb_mod_idP
];
eNB_MAC_INST_NB
_IoT
*
eNB
=
&
eNB_mac_inst_NB
[
enb_mod_idP
];
UE_list_NB_IoT_t
*
UE_list
=
&
eNB
->
UE_list
;
int
crnti_rx
=
0
;
//int old_buffer_info;
...
...
@@ -226,10 +226,10 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
T_INT
(
rx_lcids
[
i
]),
T_INT
(
rx_lengths
[
i
]),
T_BUFFER
(
payload_ptr
,
rx_lengths
[
i
]));
switch
(
rx_lcids
[
i
])
{
case
CCCH_NB
:
if
(
rx_lengths
[
i
]
>
CCCH_PAYLOAD_SIZE_MAX
)
{
case
CCCH_NB
_IoT
:
if
(
rx_lengths
[
i
]
>
CCCH_PAYLOAD_SIZE_MAX
_NB_IoT
)
{
LOG_E
(
MAC
,
"[eNB %d/%d] frame %d received CCCH of size %d (too big, maximum allowed is %d), dropping packet
\n
"
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
CCCH_PAYLOAD_SIZE_MAX
);
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
CCCH_PAYLOAD_SIZE_MAX
_NB_IoT
);
break
;
}
LOG_I
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, Received CCCH: %x.%x.%x.%x.%x.%x, Terminating RA procedure for UE rnti %x
\n
"
,
...
...
@@ -291,8 +291,8 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
break
;
/*DCCH0 is for SRB1bis, DCCH1 is for SRB1*/
case
DCCH0_NB
:
case
DCCH1_NB
:
case
DCCH0_NB
_IoT
:
case
DCCH1_NB
_IoT
:
// if(eNB_mac_inst[module_idP][CC_idP].Dcch_lchan[UE_id].Active==1){
...
...
@@ -336,7 +336,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
break
;
// all the DRBS
case
DTCH0_NB
:
case
DTCH0_NB
_IoT
:
default
:
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
...
...
openair2/LAYER2/MAC/extern.h
View file @
50207091
...
...
@@ -50,7 +50,7 @@
//NB-IoT
extern
IF_Module_t
*
if_inst
;
extern
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
extern
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
#endif
extern
const
uint32_t
BSR_TABLE
[
BSR_TABLE_SIZE
];
...
...
@@ -131,7 +131,7 @@ extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
//NB-IoT---------------------------------
extern
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
extern
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
extern
uint8_t
Is_rrc_nb_iot_registered
;
...
...
openair2/LAYER2/MAC/extern_NB_IoT.h
View file @
50207091
...
...
@@ -50,7 +50,7 @@
//NB-IoT
extern
IF_Module_t
*
if_inst
;
extern
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
extern
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
#endif
// extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
...
...
@@ -131,7 +131,7 @@ extern EMULATION_VARS *Emul_vars;
//NB-IoT---------------------------------
extern
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
extern
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
extern
uint8_t
Is_rrc_nb_iot_registered
;
...
...
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
50207091
...
...
@@ -87,7 +87,7 @@ int mac_top_init_NB()
{
module_id_t
Mod_id
,
i
,
j
;
RA_TEMPLATE_NB
*
RA_template
;
RA_TEMPLATE_NB
_IoT
*
RA_template
;
UE_TEMPLATE_NB_IoT
*
UE_template
;
int
size_bytes1
,
size_bytes2
,
size_bits1
,
size_bits2
;
int
CC_id
;
...
...
@@ -100,15 +100,15 @@ int mac_top_init_NB()
LOG_I
(
MAC
,
"[MAIN] Init function start:Nb_eNB_INST=%d
\n
"
,
NB_eNB_INST
);
if
(
NB_eNB_INST
>
0
)
{
eNB_mac_inst_NB
=
(
eNB_MAC_INST_NB
*
)
malloc16
(
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
));
eNB_mac_inst_NB
=
(
eNB_MAC_INST_NB
_IoT
*
)
malloc16
(
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB_IoT
));
if
(
eNB_mac_inst_NB
==
NULL
)
{
LOG_D
(
MAC
,
"[MAIN] can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu
\n
"
,
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
*
),
NB_eNB_INST
,
sizeof
(
eNB_MAC_INST_NB
));
LOG_D
(
MAC
,
"[MAIN] can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu
\n
"
,
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
_IoT
*
),
NB_eNB_INST
,
sizeof
(
eNB_MAC_INST_NB_IoT
));
LOG_I
(
MAC
,
"[MAC][MAIN] not enough memory for eNB
\n
"
);
exit
(
1
);
}
else
{
LOG_D
(
MAC
,
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p
\n
"
,
sizeof
(
eNB_MAC_INST
),
NB_eNB_INST
,
eNB_mac_inst_NB
);
bzero
(
eNB_mac_inst_NB
,
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
));
bzero
(
eNB_mac_inst_NB
,
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
_IoT
));
}
}
else
{
LOG_I
(
MAC
,
"No instance allocated for the MAC layer (NB-IoT)
\n
"
);
...
...
@@ -150,7 +150,7 @@ int mac_top_init_NB()
LOG_D
(
MAC
,
"[MAIN][eNB %d] CC_id %d initializing RA_template (NB-IoT)
\n
"
,
i
,
CC_id
);
LOG_D
(
MAC
,
"[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]
\n
"
,
i
);
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst_NB
[
i
].
common_channels
[
CC_id
].
RA_template
[
0
];
RA_template
=
(
RA_TEMPLATE_NB
_IoT
*
)
&
eNB_mac_inst_NB
[
i
].
common_channels
[
CC_id
].
RA_template
[
0
];
for
(
j
=
0
;
j
<
NB_RA_PROC_MAX
;
j
++
)
{
size_bytes1
=
sizeof
(
DCIN1_RAR_t
);
...
...
@@ -170,7 +170,7 @@ int mac_top_init_NB()
RA_template
[
j
].
RA_dci_fmt2
=
DCIFormatN1
;
//for MSG4
}
memset
(
&
eNB_mac_inst_NB
[
i
].
eNB_stats
,
0
,
sizeof
(
eNB_STATS_NB
));
memset
(
&
eNB_mac_inst_NB
[
i
].
eNB_stats
,
0
,
sizeof
(
eNB_STATS_NB
_IoT
));
UE_template
=
(
UE_TEMPLATE_NB_IoT
*
)
&
eNB_mac_inst_NB
[
i
].
UE_list
.
UE_template
[
CC_id
][
0
];
for
(
j
=
0
;
j
<
NUMBER_OF_UE_MAX
;
j
++
)
{
...
...
openair2/LAYER2/MAC/vars.h
View file @
50207091
...
...
@@ -43,7 +43,7 @@
#ifdef NB_IOT
//NB-IoT
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
IF_Module_t
*
if_inst
;
#endif
...
...
@@ -158,7 +158,7 @@ DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
//NB-IoT--------------------------------------
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
eNB_MAC_INST_NB
_IoT
*
eNB_mac_inst_NB
;
//should be utilized in: NB_schedule_RA,NB_rx_sdu, mac_top_init_NB,
uint8_t
Is_rrc_nb_iot_registered
;
...
...
openair2/PHY_INTERFACE/IF_Module_NB_IoT.h
View file @
50207091
...
...
@@ -15,7 +15,7 @@
#include "openair2/COMMON/platform_types.h"
#define SCH_PAYLOAD_SIZE_MAX 4096
#define BCCH_PAYLOAD_SIZE_MAX 128
#define BCCH_PAYLOAD_SIZE_MAX
_NB_IoT
128
...
...
openair2/RRC/LITE/L2_interface_NB_IoT.c
View file @
50207091
...
...
@@ -85,7 +85,7 @@ extern unsigned int pdcp_eNB_UE_instance_to_rnti_index;
extern
rnti_t
pdcp_eNB_UE_instance_to_rnti
[
NUMBER_OF_UE_MAX
];
extern
list_t
pdcp_sdu_list
;
//extern struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);
//extern eNB_MAC_INST_NB *eNB;
//extern eNB_MAC_INST_NB
_IoT
*eNB;
extern
void
rlc_tm_init
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rlc_tm_entity_t
*
const
rlcP
);
extern
void
rlc_tm_set_debug_infos
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
...
@@ -1412,10 +1412,10 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP);
mac_phy_remove_ue
(
mod_idP
,
rntiP
);
//PHY/defs.h
// check if this has an RA process active
RA_TEMPLATE_NB
*
RA_template
;
RA_TEMPLATE_NB
_IoT
*
RA_template
;
for
(
i
=
0
;
i
<
NB_RA_PROC_MAX
;
i
++
)
{
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst
[
mod_idP
].
common_channels
[
pCC_id
].
RA_template
[
i
];
RA_template
=
(
RA_TEMPLATE_NB
_IoT
*
)
&
eNB_mac_inst
[
mod_idP
].
common_channels
[
pCC_id
].
RA_template
[
i
];
if
(
RA_template
->
rnti
==
rntiP
){
RA_template
->
RA_active
=
FALSE
;
RA_template
->
generate_rar
=
0
;
...
...
@@ -1624,7 +1624,7 @@ boolean_t NB_rrc_pdcp_config_asn1_req (
if
(
srb2add_list_pP
!=
NULL
)
{
if
(
LCID
==
DCCH0_NB
)
//SRB1bis
if
(
LCID
==
DCCH0_NB
_IoT
)
//SRB1bis
{
LOG_E
(
PDCP
,
"PDCP Configuration for SRB1bis not allowed
\n
"
);
return
0
;
...
...
@@ -2650,10 +2650,10 @@ rlc_op_status_t NB_rrc_rlc_config_asn1_req (
if
(
srb2add_listP
!=
NULL
)
{
if
(
srb1bis_flag
==
SRB1BIS_FLAG_YES
){
rb_id
=
DCCH0_NB
;
//3
rb_id
=
DCCH0_NB
_IoT
;
//3
}
//srb1bis
else
{
rb_id
=
DCCH1_NB
;
//1
rb_id
=
DCCH1_NB
_IoT
;
//1
}
//srb1
lc_id
=
rb_id
;
...
...
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
View file @
50207091
...
...
@@ -588,7 +588,7 @@ rrc_eNB_generate_RRCConnectionSetup_NB(
(
RadioResourceConfigCommonSIB_NB_r13_t
*
)
NULL
,
(
PhysicalConfigDedicated_NB_r13_t
*
)
ue_context_pP
->
ue_context
.
physicalConfigDedicated_NB
,
ue_context_pP
->
ue_context
.
mac_MainConfig_NB
,
//XXX most probably is not needed since is only at UE side
DCCH0_NB
,
//LCID = 3 of SRB1bis
DCCH0_NB
_IoT
,
//LCID = 3 of SRB1bis
SRB1bis_logicalChannelConfig
);
break
;
...
...
@@ -1225,7 +1225,7 @@ rrc_eNB_generate_SecurityModeCommand_NB(
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
size
,
rrc_eNB_mui_NB
,
DCCH0_NB
);
//MP: SRB1bis
DCCH0_NB
_IoT
);
//MP: SRB1bis
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
...
...
@@ -1240,7 +1240,7 @@ rrc_eNB_generate_SecurityModeCommand_NB(
NB_rrc_data_req
(
//to PDCP
ctxt_pP
,
DCCH0_NB
,
//MP:through SRB1bis
DCCH0_NB
_IoT
,
//MP:through SRB1bis
rrc_eNB_mui_NB
++
,
SDU_CONFIRM_NO
,
size
,
...
...
@@ -1280,7 +1280,7 @@ rrc_eNB_generate_UECapabilityEnquiry_NB(
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
size
,
rrc_eNB_mui_NB
,
DCCH0_NB
);
//through SRB1bis
DCCH0_NB
_IoT
);
//through SRB1bis
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
...
...
@@ -2125,14 +2125,14 @@ rrc_eNB_decode_ccch_NB(
// SRB1bis (LCID = 3 = DCCH0)
ue_context_p
->
ue_context
.
Srb1bis
.
Active
=
1
;
ue_context_p
->
ue_context
.
Srb1bis
.
Srb_info
.
Srb_id
=
DCCH0_NB
;
ue_context_p
->
ue_context
.
Srb1bis
.
Srb_info
.
Srb_id
=
DCCH0_NB
_IoT
;
//generate RRCConnectionSetup-NB
rrc_eNB_generate_RRCConnectionSetup_NB
(
ctxt_pP
,
ue_context_p
,
CC_id
);
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
"CALLING RLC CONFIG SRB1bis and SRB1 (rbid %d, rbid %d)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH0_NB
,
DCCH1_NB
);
DCCH0_NB
_IoT
,
DCCH1_NB_IoT
);
MSC_LOG_TX_MESSAGE
(
MSC_RRC_ENB
,
...
...
@@ -2441,7 +2441,7 @@ rrc_eNB_decode_dcch_NB(
PROTOCOL_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(RRCConnectionSetupComplete-NB) ---> RRC_eNB
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH0_NB
,
//SRB1bis
DCCH0_NB
_IoT
,
//SRB1bis
sdu_sizeP
);
if
(
ul_dcch_msg_NB
->
message
.
choice
.
c1
.
choice
.
rrcConnectionSetupComplete_r13
.
criticalExtensions
.
present
==
...
...
@@ -2510,7 +2510,7 @@ rrc_eNB_decode_dcch_NB(
PROTOCOL_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(securityModeComplete-NB) ---> RRC_eNB
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH0_NB
,
//through SRB1bis
DCCH0_NB
_IoT
,
//through SRB1bis
sdu_sizeP
);
#ifdef XER_PRINT
xer_fprint
(
stdout
,
&
asn_DEF_UL_DCCH_Message_NB
,
(
void
*
)
ul_dcch_msg_NB
);
...
...
@@ -2570,7 +2570,7 @@ rrc_eNB_decode_dcch_NB(
PROTOCOL_RRC_CTXT_UE_FMT
" RLC RB %02d --- RLC_DATA_IND %d bytes "
"(securityModeFailure-NB) ---> RRC_eNB
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
DCCH0_NB
,
DCCH0_NB
_IoT
,
sdu_sizeP
);
#ifdef XER_PRINT
...
...
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