Commit b755f61e authored by Javier Morgade's avatar Javier Morgade

Add UE MCH NFAPI

parent 341bc799
......@@ -828,6 +828,40 @@ void dl_config_req_UE_MAC_bch(int sfn,
}
}
void dl_config_req_UE_MAC_mch(int sfn,
int sf,
nfapi_dl_config_request_pdu_t *mch,
int num_ue) {
DevAssert(mch->pdu_type == NFAPI_DL_CONFIG_MCH_PDU_TYPE);
for (int ue_id = 0; ue_id < num_ue; ue_id++) {
if (UE_mac_inst[ue_id].UE_mode[0] == NOT_SYNCHED){
LOG_D(MAC,
"%s(): Received MCH in NOT_SYNCHED: UE_mode: %d, sfn/sf: %d.%d\n",
__func__,
UE_mac_inst[ue_id].UE_mode[0],
sfn,
sf);
return;
} else {
const int pdu_index = mch->mch_pdu.mch_pdu_rel8.pdu_index;
if (pdu_index < 0 || pdu_index >= tx_req_num_elems) {
LOG_E(MAC,
"%s(): Problem with receiving data: "
"sfn/sf:%d.%d PDU size:%d, TX_PDU index: %d\n",
__func__,
sfn, sf, mch->pdu_size, mch->mch_pdu.mch_pdu_rel8.pdu_index);
return;
}
ue_send_mch_sdu(ue_id, 0, sfn,
tx_request_pdu_list[pdu_index].segments[0].segment_data,
tx_request_pdu_list[pdu_index].segments[0].segment_length,
0,0);
}
}
}
void hi_dci0_req_UE_MAC(int sfn,
int sf,
nfapi_hi_dci0_request_pdu_t* hi_dci0,
......@@ -1052,6 +1086,11 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,
uint8_t subframe,
uint8_t srs_present) {
}
void handle_nfapi_mch_pdu(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t *sdu) {
}
void phy_config_request(PHY_Config_t *phy_config) {
}
......
......@@ -102,6 +102,10 @@ void dl_config_req_UE_MAC_bch(int sfn,
int sf,
nfapi_dl_config_request_pdu_t *bch,
int num_ue);
void dl_config_req_UE_MAC_mch(int sfn,
int sf,
nfapi_dl_config_request_pdu_t *bch,
int num_ue);
int tx_req_UE_MAC(nfapi_tx_request_t* req);
......
......@@ -1132,6 +1132,11 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
NFAPI_SFNSF2SF(dl_config_req->sfn_sf),
pdu,
ue_num);
} else if (pdu->pdu_type == NFAPI_DL_CONFIG_MCH_PDU_TYPE) {
dl_config_req_UE_MAC_mch(NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),
NFAPI_SFNSF2SF(dl_config_req->sfn_sf),
pdu,
ue_num);
}
}
}
......
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