Commit cad11751 authored by Melissa Elkadi's avatar Melissa Elkadi

Get IP traffic in MAC layer and handling of RAR

Previously, we would assume every downlink in
slot 7 was an RAR; now we assume every slot 7
that occurs before the CFRA procedure is done
is an RAR. Also changed the logic in scheduler
to allow us to get nr_ue_sdus in the MAC layer.
parent 63cb61db
......@@ -1041,7 +1041,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator;
mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0;
} else {
if (!SOFTMODEM_NOS1_BIT && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] !=
if (!SOFTMODEM_NOS1_BIT || (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] !=
ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator ||
mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1)){
......
......@@ -266,6 +266,7 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_nr_tx_data_request_t *tx_data_request)
{
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
int num_pdus = tx_data_request->Number_of_PDUs;
if (num_pdus <= 0)
{
......@@ -304,7 +305,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
pdu += pdu_list->TLVs[j].length;
}
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length = length;
if (tx_data_request->Slot == 7) { //Melissa this means we have an RAR, sorta hacky though
if (tx_data_request->Slot == 7 && mac->ra.ra_state <= WAIT_RAR) { //Melissa this means we have an RAR, sorta hacky though
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR;
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment