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
f4049a9f
Commit
f4049a9f
authored
Nov 04, 2021
by
David Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
c7f083b1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
87 deletions
+8
-87
common/utils/LOG/log.h
common/utils/LOG/log.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+0
-7
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+2
-46
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+1
-6
openair2/RRC/LTE/defs_NB_IoT.h
openair2/RRC/LTE/defs_NB_IoT.h
+1
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-2
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+1
-1
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+1
-23
No files found.
common/utils/LOG/log.h
View file @
f4049a9f
...
...
@@ -426,7 +426,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
# define LOG_W(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'W', __VA_ARGS__); while (0)
# define LOG_A(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'A', __VA_ARGS__); while (0)
/* logs intended for analysis */
# define LOG_I(COMPONENT, ...) do if (1) logMinimal(COMPONENT, 'I', __VA_ARGS__); while (0)
# define LOG_D(COMPONENT, ...) do if (
1
) logMinimal(COMPONENT, 'D', __VA_ARGS__); while (0)
# define LOG_D(COMPONENT, ...) do if (
0
) logMinimal(COMPONENT, 'D', __VA_ARGS__); while (0)
# define LOG_T(COMPONENT, ...) do if (0) logMinimal(COMPONENT, 'T', __VA_ARGS__); while (0)
# define LOG_M(FILE, VECTOR, DATA, LEN, DEC, FORMAT) ((void) 0)
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
f4049a9f
...
...
@@ -682,7 +682,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
offset
=
pucch_pdu
->
start_symbol_index
*
gNB
->
frame_parms
.
ofdm_symbol_size
+
(
gNB
->
frame_parms
.
first_carrier_offset
+
pucch_pdu
->
prb_start
*
12
);
power_rxF
=
signal_energy_nodc
(
&
gNB
->
common_vars
.
rxdataF
[
0
][
offset
],
12
);
LOG_D
(
PHY
,
"frame %d, slot %d: PUCCH signal energy %d
\n
"
,
frame_rx
,
slot_rx
,
power_rxF
);
LOG_D
(
PHY
,
"num_ucis = %d *expecting 0 since it is index in array also (case 0)
\n
"
,
num_ucis
);
nr_decode_pucch0
(
gNB
,
frame_rx
,
...
...
@@ -692,11 +691,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
+=
1
;
pucch
->
active
=
0
;
if
(((
uci_pdu_format0
->
pduBitmap
>>
1
)
&
0x01
)){
LOG_I
(
NR_PHY
,
"uci_01->harq->num_harq with uci_pdu %p
\n
"
,
uci_pdu_format0
);
LOG_I
(
NR_PHY
,
"uci_01->harq->num_harq with uci_pdu %p harq %p
\n
"
,
uci_pdu_format0
,
uci_pdu_format0
->
harq
);
LOG_I
(
NR_PHY
,
"uci_01->harq->num_harq %u
\n
"
,
uci_pdu_format0
->
harq
->
num_harq
);
}
break
;
case
2
:
num_ucis
=
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
;
...
...
@@ -706,7 +700,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_type
=
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
);
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu_format2
=
&
gNB
->
uci_pdu_list
[
num_ucis
].
pucch_pdu_format_2_3_4
;
LOG_D
(
PHY
,
"num_ucis = %d in case 1
\n
"
,
num_ucis
);
nr_decode_pucch2
(
gNB
,
slot_rx
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
f4049a9f
...
...
@@ -3422,7 +3422,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
case
DL_SCH_LCID_DCCH1
:
// check if LCID is valid at current time.
default:
if
(
get_softmodem_params
()
->
nsa
)
{
{
// check if LCID is valid at current time.
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
;
...
...
@@ -3472,50 +3472,6 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
break
;
}
else
{
// check if LCID is valid at current time.
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
//mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8;
mac_subheader_len
=
3
;
mac_sdu_len
=
((
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L1
&
0x7f
)
<<
8
)
|
((
uint16_t
)((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
&
0xff
);
}
else
{
mac_sdu_len
=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
}
LOG_D
(
MAC
,
"[UE %d] Frame %d : DLSCH -> DL-DTCH %d (gNB %d, %d bytes)
\n
"
,
module_idP
,
frameP
,
rx_lcid
,
gNB_index
,
mac_sdu_len
);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_T
(
MAC
,
"[UE %d] First 32 bytes of DLSCH :
\n
"
,
module_idP
);
for
(
i
=
0
;
i
<
32
;
i
++
)
LOG_T
(
MAC
,
"%x."
,
(
pduP
+
mac_subheader_len
)[
i
]);
LOG_T
(
MAC
,
"
\n
"
);
#endif
if
(
rx_lcid
<
NB_RB_MAX
&&
rx_lcid
>=
DL_SCH_LCID_DCCH
)
{
mac_rlc_data_ind
(
module_idP
,
mac
->
crnti
,
gNB_index
,
frameP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
rx_lcid
,
(
char
*
)
(
pduP
+
mac_subheader_len
),
mac_sdu_len
,
1
,
NULL
);
}
else
{
LOG_E
(
MAC
,
"[UE %d] Frame %d : unknown LCID %d (gNB %d)
\n
"
,
module_idP
,
frameP
,
rx_lcid
,
gNB_index
);
}
break
;
}
}
pduP
+=
(
mac_subheader_len
+
mac_ce_len
+
mac_sdu_len
);
pdu_len
-=
(
mac_subheader_len
+
mac_ce_len
+
mac_sdu_len
);
...
...
@@ -3695,7 +3651,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t
if
((
mac
->
crnti
==
ra
->
t_crnti
)
&&
(
get_softmodem_params
()
->
nsa
))
{
LOG_
D
(
MAC
,
"Discarding the received RAR.
\n
"
);
LOG_
I
(
MAC
,
"Discarding the received RAR.
\n
"
);
return
-
1
;
}
while
(
1
)
{
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
f4049a9f
...
...
@@ -433,12 +433,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
UL_info
->
frame
,
UL_info
->
slot
,
module_id
,
CC_id
,
gnb_rach_ind_queue
.
num_items
,
gnb_rx_ind_queue
.
num_items
,
gnb_crc_ind_queue
.
num_items
);
/*
LOG_I(MAC, "uci_01->harq->num_harq %u with uci_pdu %p harq %p\n",
UL_info->uci_ind.uci_list->pucch_pdu_format_0_1.harq->num_harq,
&UL_info->uci_ind.uci_list->pucch_pdu_format_0_1,
UL_info->uci_ind.uci_list->pucch_pdu_format_0_1.harq);
*/
handle_nr_rach
(
UL_info
);
handle_nr_uci
(
UL_info
);
...
...
openair2/RRC/LTE/defs_NB_IoT.h
View file @
f4049a9f
...
...
@@ -148,7 +148,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
//Measurement Report not supported in NB-IoT
#define PAYLOAD_SIZE_MAX 1024
#define RRC_BUF_SIZE
819
2
#define RRC_BUF_SIZE
51
2
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x20
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
f4049a9f
...
...
@@ -1033,8 +1033,7 @@ void fill_initial_SpCellConfig(rnti_t rnti,
// one symbol (13)
NR_PUCCH_Resource_t
*
pucchres0
=
calloc
(
1
,
sizeof
(
*
pucchres0
));
pucchres0
->
pucch_ResourceId
=
0
;
pucchres0
->
startingPRB
=
0
;
//(8+rnti) % curr_bwp;
//pucchres0->startingPRB = (8+rnti) % curr_bwp;
pucchres0
->
startingPRB
=
(
8
+
rnti
)
%
curr_bwp
;
LOG_D
(
NR_RRC
,
"pucchres0->startPRB %ld rnti %d curr_bwp %d
\n
"
,
pucchres0
->
startingPRB
,
rnti
,
curr_bwp
);
pucchres0
->
intraSlotFrequencyHopping
=
NULL
;
pucchres0
->
secondHopPRB
=
NULL
;
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
f4049a9f
...
...
@@ -945,7 +945,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
long
*
delay
[
8
];
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
delay
[
i
]
=
calloc
(
1
,
sizeof
(
*
delay
[
i
]));
*
delay
[
i
]
=
(
i
<
6
)
?
(
i
+
2
)
:
0
;
//TODO: Needs to check to use i + 6;
*
delay
[
i
]
=
(
i
<
6
)
?
(
i
+
2
)
:
0
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
dl_DataToUL_ACK
->
list
,
delay
[
i
]);
}
pucch_Config
->
spatialRelationInfoToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
spatialRelationInfoToAddModList
));
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
f4049a9f
...
...
@@ -248,18 +248,8 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR
if
(
NR_UE_rrc_inst
[
module_id
].
radio_bearer_config
==
NULL
){
NR_UE_rrc_inst
[
module_id
].
radio_bearer_config
=
rrcReconfiguration
->
criticalExtensions
.
choice
.
rrcReconfiguration
->
radioBearerConfig
;
}
else
{
//protocol_ctxt_t ctxt;
//NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
//PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_id, ENB_FLAG_YES, mac->crnti, 0, 0, 0);
struct
NR_RadioBearerConfig
*
RadioBearerConfig
=
rrcReconfiguration
->
criticalExtensions
.
choice
.
rrcReconfiguration
->
radioBearerConfig
;
//xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void*)RadioBearerConfig);
LOG_D
(
NR_RRC
,
"Calling fill_default_rbconfig_ue at %d with: e_rab_id = %ld, drbID = %ld, cipher_algo = %ld, key = %ld
\n
"
,
__LINE__
,
RadioBearerConfig
->
drb_ToAddModList
->
list
.
array
[
0
]
->
cnAssociation
->
choice
.
eps_BearerIdentity
,
RadioBearerConfig
->
drb_ToAddModList
->
list
.
array
[
0
]
->
drb_Identity
,
RadioBearerConfig
->
securityConfig
->
securityAlgorithmConfig
->
cipheringAlgorithm
,
*
RadioBearerConfig
->
securityConfig
->
keyToUse
);
//nr_rrc_ue_process_RadioBearerConfig(&ctxt, 0, RadioBearerConfig);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
struct
NR_RadioBearerConfig
*
RadioBearerConfig
=
rrcReconfiguration
->
criticalExtensions
.
choice
.
rrcReconfiguration
->
radioBearerConfig
;
xer_fprint
(
stdout
,
&
asn_DEF_NR_RadioBearerConfig
,
(
const
void
*
)
RadioBearerConfig
);
}
}
...
...
@@ -414,18 +404,6 @@ void process_nsa_message(NR_UE_RRC_INST_t *rrc, nsa_message_t nsa_message_type,
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_RadioBearerConfig
,
(
const
void
*
)
RadioBearerConfig
);
}
#if 0
protocol_ctxt_t ctxt;
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_id, ENB_FLAG_YES, mac->crnti, 0, 0, 0);
xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void*)RadioBearerConfig);
LOG_D(NR_RRC, "Calling fill_default_rbconfig_ue at %d with: e_rab_id = %ld, drbID = %ld, cipher_algo = %ld, key = %ld \n",
__LINE__, RadioBearerConfig->drb_ToAddModList->list.array[0]->cnAssociation->choice.eps_BearerIdentity,
RadioBearerConfig->drb_ToAddModList->list.array[0]->drb_Identity,
RadioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm,
*RadioBearerConfig->securityConfig->keyToUse);
nr_rrc_ue_process_RadioBearerConfig(&ctxt, 0, RadioBearerConfig);
#endif
}
break
;
...
...
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