Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Ashish
openairinterface5G
Commits
04d2e40c
Commit
04d2e40c
authored
Dec 09, 2019
by
Nick Ho
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the Auth Downlink scheduling issue, UE can decode it
parent
3d4e9240
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
+22
-9
openair2/RRC/LITE/L2_interface_NB_IoT.c
openair2/RRC/LITE/L2_interface_NB_IoT.c
+10
-4
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
View file @
04d2e40c
...
...
@@ -80,7 +80,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
logical_chan_id_t
logical_channel
;
//
uint32_t
subheader_length
=
2
;
uint32_t
subheader_length
=
3
;
uint32_t
payload_offset
;
//
...
...
@@ -88,8 +88,8 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
uint32_t
search_space_end_sf
,
h_temp
,
f_temp
,
sf_temp
;
mac_rlc_status_resp_t
rlc_status
;
//Declare rlc_status
//
I_mcs = get_I_mcs(UE_info->CE_level);
I_mcs
=
6
;
I_mcs
=
get_I_mcs
(
UE_info
->
CE_level
);
//
I_mcs = 6;
I_tbs
=
I_mcs
;
//get max TBS
TBS
=
get_max_tbs
(
I_tbs
);
...
...
@@ -145,7 +145,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
memcpy
(
UE_info
->
DLSCH_pdu
.
payload
+
payload_offset
,
sdu_temp
,
mac_sdu_size
);
printf
(
"print the MAC DATA PDU including length payload
\n
"
);
printf
(
"print the MAC DATA PDU including length payload
, we have header %d byte
\n
"
,
payload_offset
);
int
y
;
for
(
y
=
0
;
y
<
mac_sdu_size
+
payload_offset
;
y
++
){
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
y
]);
...
...
@@ -509,10 +509,21 @@ uint32_t generate_dlsch_header_NB_IoT(uint8_t *pdu, uint32_t num_sdu, logical_ch
{
if
(
sdu_length
[
i
]
<
128
)
{
LOG_N
(
MAC
,
"Pack the header here
\n
"
);
/*mac_header->E=0;
mac_header->LCID = DCCH0_NB_IoT;
//mac_header->LCID = 1;
//mac_header->F2=0;
mac_header->R=0;
offset++;
mac_header+=1;*/
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
LCID
=
DCCH0_NB_IoT
;
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
F2
=
0
;
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
R
=
0
;
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
E
=
0
;
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
E
=
1
;
//((SCH_SUBHEADER_SHORT_NB_IoT*)mac_header)->E=1;
((
SCH_SUBHEADER_SHORT_NB_IoT
*
)
mac_header
)
->
F
=
0
;
...
...
@@ -520,6 +531,8 @@ uint32_t generate_dlsch_header_NB_IoT(uint8_t *pdu, uint32_t num_sdu, logical_ch
num_subheader
--
;
mac_header
+=
2
;
offset
+=
2
;
}
else
{
...
...
@@ -536,7 +549,7 @@ uint32_t generate_dlsch_header_NB_IoT(uint8_t *pdu, uint32_t num_sdu, logical_ch
}
}
}
/*
if
(
flag_end_padding
==
1
)
{
mac_header
->
LCID
=
PADDING
;
...
...
@@ -546,7 +559,7 @@ uint32_t generate_dlsch_header_NB_IoT(uint8_t *pdu, uint32_t num_sdu, logical_ch
mac_header
++
;
offset
++
;
}
*/
return
offset
;
}
void
fill_DCI_N1
(
DCIFormatN1_t
*
DCI_N1
,
UE_TEMPLATE_NB_IoT
*
UE_info
,
UE_SCHED_CTRL_NB_IoT_t
*
UE_sched_ctrl_info
)
...
...
@@ -576,7 +589,7 @@ void generate_scheduling_result_DL(uint32_t NPDCCH_sf_end, uint32_t NPDCCH_sf_st
NPDCCH_result
->
rnti
=
rnti
;
NPDCCH_result
->
output_subframe
=
NPDCCH_sf_start
;
NPDCCH_result
->
end_subframe
=
NPDCCH_sf_end
;
NPDCCH_result
->
sdu_length
=
TBS
;
NPDCCH_result
->
sdu_length
=
0
;
NPDCCH_result
->
direction
=
1
;
NPDCCH_result
->
rnti_type
=
3
;
NPDCCH_result
->
DLSCH_pdu
=
NULL
;
...
...
@@ -591,7 +604,7 @@ void generate_scheduling_result_DL(uint32_t NPDCCH_sf_end, uint32_t NPDCCH_sf_st
//NPDSCH_result->output_subframe = NPDSCH_subframe;
NPDSCH_result
->
output_subframe
=
NPDSCH_sf_start
;
NPDSCH_result
->
end_subframe
=
NPDSCH_sf_end
;
NPDSCH_result
->
sdu_length
=
TBS
;
NPDSCH_result
->
sdu_length
=
TBS
*
8
;
NPDSCH_result
->
DLSCH_pdu
=
DLSCH_pdu
;
//NPDSCH_result->DLSCH_pdu = NULL;
NPDSCH_result
->
direction
=
1
;
...
...
openair2/RRC/LITE/L2_interface_NB_IoT.c
View file @
04d2e40c
...
...
@@ -1426,13 +1426,14 @@ boolean_t pdcp_data_req_NB_IoT(
(
unsigned
char
*
)
&
pdcp_pdu_p
->
data
[
0
],
sdu_buffer_sizeP
);
#endif
/*
int x;
printf("print the data in pdcp_data_req_NB_IoT\n");
for (x=0;x<sdu_buffer_sizeP;x++){
printf("%02x ",pdcp_pdu_p->data[x]);
}
printf("\n");
*/
rlc_status
=
rlc_data_req_NB_IoT
(
ctxt_pP
,
srb_flagP
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
);
//MP: if all ok rlc_status = RLC_OP_STATUS_OK
...
...
@@ -2578,12 +2579,14 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
#ifdef DEBUG_RLC_DATA_REQ
LOG_D
(
RLC
,
"RLC_MODE_AM
\n
"
);
#endif
/*
printf("print the data in AM before new_sdu_p in rlc_data_req_NB_IoT\n");
for (x=0;x<sdu_sizeP;x++){
printf("%02x ",sdu_pP->data[x]);
}
printf("\n");
*/
new_sdu_p
=
get_free_mem_block
(
sdu_sizeP
+
sizeof
(
struct
rlc_am_data_req_alloc
),
__func__
);
if
(
new_sdu_p
!=
NULL
)
{
...
...
@@ -2596,20 +2599,23 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
((
struct
rlc_am_data_req
*
)
(
new_sdu_p
->
data
))
->
mui
=
muiP
;
((
struct
rlc_am_data_req
*
)
(
new_sdu_p
->
data
))
->
data_offset
=
sizeof
(
struct
rlc_am_data_req_alloc
);
free_mem_block
(
sdu_pP
,
__func__
);
/*
printf("print the data after new_sdu_p in rlc_data_req_NB_IoT\n");
for (x=0;x<sdu_sizeP;x++){
printf("%02x ",new_sdu_p->data[x]);
}
printf("\n");
*/
rlc_am_data_req
(
ctxt_pP
,
&
rlc_union_p
->
rlc
.
am
,
new_sdu_p
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
/*
printf("printf the data after rlc_am_data_req (in L2_interface_NB_IoT)\n");
for (x=0;x<sdu_sizeP;x++){
printf("%02x ",new_sdu_p->data[x]);
}
printf("\n");
*/
return
RLC_OP_STATUS_OK
;
}
else
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
...
...
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