From 528b3d3a09d7486a0c549820bac601db60fde18e Mon Sep 17 00:00:00 2001 From: "lal.harshita" Date: Wed, 11 Nov 2020 18:53:31 +0530 Subject: [PATCH] Added FAPI header to P7 messages[Issue-ID: ODUHIGH-254] Change-Id: Iafb8a3ef0543f251df070c7f768f04855337a467 Signed-off-by: lal.harshita --- src/5gnrmac/lwr_mac.h | 6 + src/5gnrmac/lwr_mac_fsm.c | 307 +- src/5gnrmac/lwr_mac_handle_phy.c | 4 + src/5gnrmac/lwr_mac_phy.c | 35 +- src/5gnrmac/lwr_mac_phy.h | 3 +- src/5gnrmac/mac_msg_hdl.c | 9 +- src/5gnrmac/rg_lim.c | 156 - src/5gnrmac/rg_lmm.c | 16 +- src/5gnrmac/rg_ptli.c | 508 -- src/5gnrmac/rg_tom.c | 2 +- src/5gnrsch/rg_sch_lmm.c | 20 +- src/5gnrsch/rg_sch_tom.c | 10 +- src/5gnrsch/rg_sch_utl.c | 204 - src/cm/tfu.c | 14996 ------------------------------------- src/cm/tfu.h | 164 - src/cm/tfu.x | 1972 ----- src/phy_stub/l1_bdy1.c | 36 +- 17 files changed, 279 insertions(+), 18169 deletions(-) delete mode 100755 src/cm/tfu.c diff --git a/src/5gnrmac/lwr_mac.h b/src/5gnrmac/lwr_mac.h index 18b341adb..e1c075eb6 100644 --- a/src/5gnrmac/lwr_mac.h +++ b/src/5gnrmac/lwr_mac.h @@ -26,6 +26,12 @@ #define LWR_MAC_ALLOC(_datPtr, _size) MAC_ALLOC(_datPtr, _size); #endif +#ifdef INTEL_WLS_MEM +#define LWR_MAC_FREE(_datPtr, _size) WLS_MEM_FREE(_datPtr, _size); +#else +#define LWR_MAC_FREE(_datPtr, _size) MAC_FREE(_datPtr, _size); +#endif + typedef enum { PHY_STATE_IDLE, diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index a6da25ca0..9efc6ffc3 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -1314,17 +1314,36 @@ uint8_t lwr_mac_procParamReqEvt(void *msg) { #ifdef INTEL_FAPI /* startGuardTimer(); */ - uint32_t msgLen = 0; //Length of message Body - fapi_param_req_t *paramReq = NULL; + fapi_param_req_t *paramReq = NULL; + fapi_msg_header_t *msgHeader; + p_fapi_api_queue_elem_t paramReqElem; + p_fapi_api_queue_elem_t headerElem; - LWR_MAC_ALLOC(paramReq, sizeof(fapi_param_req_t)); + LWR_MAC_ALLOC(paramReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_param_req_t))); if(paramReq != NULL) { - fillMsgHeader(¶mReq->header, FAPI_PARAM_REQUEST, msgLen); + FILL_FAPI_LIST_ELEM(paramReqElem, NULLP, FAPI_PARAM_REQUEST, 1, \ + sizeof(fapi_tx_data_req_t)); + paramReq = (fapi_param_req_t *)(paramReqElem +1); + memset(paramReq, 0, sizeof(fapi_param_req_t)); + fillMsgHeader(¶mReq->header, FAPI_PARAM_REQUEST, sizeof(fapi_param_req_t)); + + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for param req header"); + LWR_MAC_FREE(paramReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_param_req_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, paramReqElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 1; + msgHeader->handle = 0; DU_LOG("\nLWR_MAC: Sending Param Request to Phy"); - LwrMacSendToPhy(paramReq->header.msg_id, \ - sizeof(fapi_param_req_t), (void *)paramReq); + LwrMacSendToL1(headerElem); } else { @@ -1939,6 +1958,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) if(!cfgReqQElem) { DU_LOG("\nLWR_MAC: Memory allocation failed for config req"); + LWR_MAC_ALLOC(vendorMsgQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } FILL_FAPI_LIST_ELEM(cfgReqQElem, vendorMsgQElem, FAPI_CONFIG_REQUEST, 1, \ @@ -2075,6 +2095,8 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) if(!headerElem) { DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in config req"); + LWR_MAC_ALLOC(cfgReqQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_config_req_t))); + LWR_MAC_ALLOC(vendorMsgQElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } FILL_FAPI_LIST_ELEM(headerElem, cfgReqQElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ @@ -2084,7 +2106,7 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) msgHeader->handle = 0; DU_LOG("\nLWR_MAC: Sending Config Request to Phy"); - LwrMacSendToFapi(headerElem); + LwrMacSendToL1(headerElem); #endif return ROK; @@ -2194,6 +2216,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) if(!startReqElem) { DU_LOG("\nLWR_MAC: Memory allocation failed for start req"); + LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } FILL_FAPI_LIST_ELEM(startReqElem, vendorMsgElem, FAPI_START_REQUEST, 1, \ @@ -2208,6 +2231,8 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) if(!headerElem) { DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in config req"); + LWR_MAC_ALLOC(startReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_start_req_t))); + LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } FILL_FAPI_LIST_ELEM(headerElem, startReqElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ @@ -2218,7 +2243,7 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) /* Send to PHY */ DU_LOG("\nLWR_MAC: Sending Start Request to Phy"); - LwrMacSendToFapi(headerElem); + LwrMacSendToL1(headerElem); #endif return ROK; } /* lwr_mac_procStartReqEvt */ @@ -2243,21 +2268,62 @@ uint8_t lwr_mac_procStartReqEvt(void *msg) uint8_t lwr_mac_procStopReqEvt(void *msg) { #ifdef INTEL_FAPI - uint32_t msgLen = 0; - fapi_stop_req_t *stopReq = NULLP; - LWR_MAC_ALLOC(stopReq, sizeof(fapi_stop_req_t)); - if(stopReq != NULLP) + SlotIndInfo *slotInfo; + fapi_msg_header_t *msgHeader; + fapi_stop_req_t *stopReq; + fapi_vendor_msg_t *vendorMsg; + p_fapi_api_queue_elem_t headerElem; + p_fapi_api_queue_elem_t stopReqElem; + p_fapi_api_queue_elem_t vendorMsgElem; + + slotInfo = (SlotIndInfo *)msg; + + /* Allocte And fill Vendor msg */ + LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); + if(!vendorMsgElem) { - memset(stopReq, 0, sizeof(fapi_stop_req_t)); - fillMsgHeader(&stopReq->header, FAPI_STOP_REQUEST, msgLen); - DU_LOG("\nLOWER MAC: Sending Stop Request to PHY"); - LwrMacSendToPhy(stopReq->header.msg_id, sizeof(fapi_stop_req_t), (void *)stopReq); + DU_LOG("\nLWR_MAC: Memory allocation failed for vendor msg in stop req"); + return RFAILED; } - else + FILL_FAPI_LIST_ELEM(vendorMsgElem, NULLP, FAPI_VENDOR_MESSAGE, 1, sizeof(fapi_vendor_msg_t)); + vendorMsg = (fapi_vendor_msg_t *)(vendorMsgElem + 1); + fillMsgHeader(&vendorMsg->header, FAPI_VENDOR_MESSAGE, sizeof(fapi_vendor_msg_t)); + vendorMsg->stop_req_vendor.sfn = slotInfo->sfn; + vendorMsg->stop_req_vendor.slot = slotInfo->slot; + + /* Fill FAPI stop req */ + LWR_MAC_ALLOC(stopReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_stop_req_t))); + if(!stopReqElem) { - DU_LOG("\nLOWER MAC: Failed to allocate memory for Stop Request"); + DU_LOG("\nLWR_MAC: Memory allocation failed for stop req"); + LWR_MAC_FREE(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); return RFAILED; } + FILL_FAPI_LIST_ELEM(stopReqElem, vendorMsgElem, FAPI_STOP_REQUEST, 1, \ + sizeof(fapi_stop_req_t)); + stopReq = (fapi_stop_req_t *)(stopReqElem + 1); + memset(stopReq, 0, sizeof(fapi_stop_req_t)); + fillMsgHeader(&stopReq->header, FAPI_STOP_REQUEST, sizeof(fapi_stop_req_t)); + + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for header in stop req"); + LWR_MAC_FREE(stopReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_stop_req_t))); + LWR_MAC_FREE(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, stopReqElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 2; /* Stop req msg and vendor specific msg */ + msgHeader->handle = 0; + + /* Send to PHY */ + DU_LOG("\nLWR_MAC: Sending Stop Request to Phy"); + LwrMacSendToL1(headerElem); + #endif return ROK; } @@ -3032,8 +3098,10 @@ uint8_t fillSib1TxDataReq(fapi_tx_pdu_desc_t *pduDesc,MacCellCfg *macCellCfg, pduLen += sizeof(fapi_uint8_ptr_tlv_t); /* only 1 TLV is present */ pduDesc[pduIndex].pdu_length = pduLen; -#ifndef INTEL_WLS_MEM - MAC_FREE(sib1TxdataValue,macCellCfg->sib1Cfg.sib1PduLen); +#ifdef INTEL_WLS_MEM + addWlsBlockToFree(sib1TxdataValue, macCellCfg->sib1Cfg.sib1PduLen, (slotIndIdx-1)); +#else + LWR_MAC_FREE(sib1TxdataValue, macCellCfg->sib1Cfg.sib1PduLen); #endif return ROK; @@ -3086,8 +3154,10 @@ uint8_t fillRarTxDataReq(fapi_tx_pdu_desc_t *pduDesc, RarInfo *rarInfo, /* TODO: The pointer value which was stored, needs to be free-ed at PHY * * But since we did not implement WLS, this has to be done here */ -#ifndef INTEL_WLS_MEM - MAC_FREE(rarTxdataValue,rarInfo->rarPduLen); +#ifdef INTEL_WLS_MEM + addWlsBlockToFree(rarTxdataValue, rarInfo->rarPduLen, (slotIndIdx-1)); +#else + LWR_MAC_FREE(rarTxdataValue, rarInfo->rarPduLen); #endif return ROK; @@ -3140,8 +3210,10 @@ uint8_t fillDlMsgTxDataReq(fapi_tx_pdu_desc_t *pduDesc, DlMsgInfo *dlMsgInfo, /* TODO: The pointer value which was stored, needs to be free-ed at PHY * * But since we did not implement WLS, this has to be done here */ -#ifndef INTEL_WLS_MEM - MAC_FREE(dedMsgTxDataValue, dlMsgInfo->dlMsgPduLen); +#ifdef INTEL_WLS_MEM + addWlsBlockToFree(dedMsgTxDataValue, dlMsgInfo->dlMsgPduLen, (slotIndIdx-1)); +#else + LWR_MAC_FREE(dedMsgTxDataValue, dlMsgInfo->dlMsgPduLen); #endif return ROK; @@ -3173,15 +3245,15 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) uint8_t numPduEncoded = 0; uint16_t cellIdx; uint16_t pduIndex = 0; - uint32_t msgLen = 0; - fapi_dl_tti_req_t *dlTtiReq = NULLP; SlotIndInfo dlTtiReqTimingInfo; - MacDlSlot *currDlSlot = NULLP; MacCellCfg macCellCfg; - memset(&macCellCfg, 0, sizeof(MacCellCfg)); RntiType rntiType; + fapi_dl_tti_req_t *dlTtiReq = NULLP; + fapi_msg_header_t *msgHeader; + p_fapi_api_queue_elem_t dlTtiElem; + p_fapi_api_queue_elem_t headerElem; if(lwrMacCb.phyState == PHY_STATE_RUNNING) { @@ -3193,10 +3265,32 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) currDlSlot = &macCb.macCell[cellIdx]->dlSlot[dlTtiReqTimingInfo.slot]; nPdu = calcDlTtiReqPduCount(&currDlSlot->dlInfo); - LWR_MAC_ALLOC(dlTtiReq, sizeof(fapi_dl_tti_req_t)); - if(dlTtiReq != NULLP) + + LWR_MAC_ALLOC(dlTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_dl_tti_req_t))); + if(dlTtiElem) { + FILL_FAPI_LIST_ELEM(dlTtiElem, NULLP, FAPI_DL_TTI_REQUEST, 1, \ + sizeof(fapi_dl_tti_req_t)); + + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for header in DL TTI req"); + LWR_MAC_FREE(dlTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_dl_tti_req_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, dlTtiElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 1; + msgHeader->handle = 0; + + /* Fill Dl TTI Request */ + dlTtiReq = (fapi_dl_tti_req_t *)(dlTtiElem +1); memset(dlTtiReq, 0, sizeof(fapi_dl_tti_req_t)); + fillMsgHeader(&dlTtiReq->header, FAPI_DL_TTI_REQUEST, sizeof(fapi_dl_tti_req_t)); + dlTtiReq->sfn = dlTtiReqTimingInfo.sfn; dlTtiReq->slot = dlTtiReqTimingInfo.slot; dlTtiReq->nPdus = calcDlTtiReqPduCount(&currDlSlot->dlInfo); /* get total Pdus */ @@ -3299,25 +3393,20 @@ uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo) } } - msgLen = sizeof(fapi_dl_tti_req_t) - sizeof(fapi_msg_t); - fillMsgHeader(&dlTtiReq->header, FAPI_DL_TTI_REQUEST, msgLen); #ifdef ODU_SLOT_IND_DEBUG_LOG DU_LOG("\nLWR_MAC: Sending DL TTI Request"); #endif - LwrMacSendToPhy(dlTtiReq->header.msg_id, sizeof(fapi_dl_tti_req_t), \ - (void *)dlTtiReq); + LwrMacSendToL1(headerElem); /* send Tx-DATA req message */ sendTxDataReq(currTimingInfo, &currDlSlot->dlInfo); } else { - msgLen = sizeof(fapi_dl_tti_req_t) - sizeof(fapi_msg_t); - fillMsgHeader(&dlTtiReq->header, FAPI_DL_TTI_REQUEST, msgLen); #ifdef ODU_SLOT_IND_DEBUG_LOG DU_LOG("\nLWR_MAC: Sending DL TTI Request"); #endif - LwrMacSendToPhy(dlTtiReq->header.msg_id, sizeof(fapi_dl_tti_req_t), (void *)dlTtiReq); + LwrMacSendToL1(headerElem); } memset(currDlSlot, 0, sizeof(MacDlSlot)); return ROK; @@ -3359,10 +3448,11 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) #ifdef INTEL_FAPI uint8_t nPdu = 0; uint16_t cellIdx; - uint32_t msgLen = 0; uint16_t pduIndex = 0; - uint32_t txDataReqMsgSize = 0; - fapi_tx_data_req_t *txDataReq = NULLP; + fapi_tx_data_req_t *txDataReq; + fapi_msg_header_t *msgHeader; + p_fapi_api_queue_elem_t txDataElem; + p_fapi_api_queue_elem_t headerElem; GET_CELL_IDX(currTimingInfo.cellId, cellIdx); @@ -3370,28 +3460,19 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) nPdu = calcTxDataReqPduCount(dlInfo); if(nPdu > 0) { - txDataReqMsgSize = sizeof(fapi_tx_data_req_t); - if(dlInfo->brdcstAlloc.sib1Trans) - { - txDataReqMsgSize += macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen; - } - if(dlInfo->rarAlloc != NULLP) - { - txDataReqMsgSize += dlInfo->rarAlloc->rarInfo.rarPduLen; - } - if(dlInfo->dlMsgAlloc != NULLP) - { - txDataReqMsgSize += dlInfo->dlMsgAlloc->dlMsgInfo.dlMsgPduLen; - } - - LWR_MAC_ALLOC(txDataReq, txDataReqMsgSize); - if(txDataReq == NULLP) + LWR_MAC_ALLOC(txDataElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_tx_data_req_t))); + if(txDataElem == NULLP) { DU_LOG("\nLWR_MAC: Failed to allocate memory for TX data Request"); return RFAILED; } - memset(txDataReq, 0, txDataReqMsgSize); + FILL_FAPI_LIST_ELEM(txDataElem, NULLP, FAPI_TX_DATA_REQUEST, 1, \ + sizeof(fapi_tx_data_req_t)); + txDataReq = (fapi_tx_data_req_t *)(txDataElem +1); + memset(txDataReq, 0, sizeof(fapi_tx_data_req_t)); + fillMsgHeader(&txDataReq->header, FAPI_TX_DATA_REQUEST, sizeof(fapi_tx_data_req_t)); + txDataReq->sfn = currTimingInfo.sfn; txDataReq->slot = currTimingInfo.slot; if(dlInfo->brdcstAlloc.sib1Trans) @@ -3424,11 +3505,22 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) dlInfo->dlMsgAlloc = NULLP; } - msgLen = txDataReqMsgSize - sizeof(fapi_msg_t); - fillMsgHeader(&txDataReq->header, FAPI_TX_DATA_REQUEST, msgLen); + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for TxDataReq header"); + LWR_MAC_FREE(txDataElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_tx_data_req_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, txDataElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 1; + msgHeader->handle = 0; + DU_LOG("\nLWR_MAC: Sending TX DATA Request"); - LwrMacSendToPhy(txDataReq->header.msg_id, txDataReqMsgSize, \ - (void *)txDataReq); + LwrMacSendToL1(headerElem); } #endif return ROK; @@ -3687,14 +3779,13 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) #ifdef INTEL_FAPI uint16_t cellIdx; uint8_t pduIdx = -1; - uint32_t msgLen = 0; - uint32_t msgSize = 0; - - fapi_ul_tti_req_t *ulTtiReq = NULLP; SlotIndInfo ulTtiReqTimingInfo; - MacUlSlot *currUlSlot = NULLP; MacCellCfg macCellCfg; + fapi_ul_tti_req_t *ulTtiReq = NULLP; + fapi_msg_header_t *msgHeader; + p_fapi_api_queue_elem_t ulTtiElem; + p_fapi_api_queue_elem_t headerElem; if(lwrMacCb.phyState == PHY_STATE_RUNNING) { @@ -3703,14 +3794,16 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) /* add PHY delta */ ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,PHY_DELTA); - currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % MAX_SLOT_SUPPORTED]; - msgSize = sizeof(fapi_ul_tti_req_t); - LWR_MAC_ALLOC(ulTtiReq, msgSize); - if(ulTtiReq != NULLP) + LWR_MAC_ALLOC(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t))); + if(ulTtiElem) { - memset(ulTtiReq, 0, msgSize); + FILL_FAPI_LIST_ELEM(ulTtiElem, NULLP, FAPI_UL_TTI_REQUEST, 1, \ + sizeof(fapi_ul_tti_req_t)); + ulTtiReq = (fapi_ul_tti_req_t *)(ulTtiElem +1); + memset(ulTtiReq, 0, sizeof(fapi_ul_tti_req_t)); + fillMsgHeader(&ulTtiReq->header, FAPI_UL_TTI_REQUEST, sizeof(fapi_ul_tti_req_t)); ulTtiReq->sfn = ulTtiReqTimingInfo.sfn; ulTtiReq->slot = ulTtiReqTimingInfo.slot; ulTtiReq->nPdus = getnPdus(ulTtiReq, currUlSlot); @@ -3737,12 +3830,24 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) fillPucchPdu(&ulTtiReq->pdus[pduIdx], &macCellCfg, currUlSlot); } } - msgLen = sizeof(fapi_ul_tti_req_t) - sizeof(fapi_msg_t); - fillMsgHeader(&ulTtiReq->header, FAPI_UL_TTI_REQUEST, msgLen); + + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for UL TTI req header"); + LWR_MAC_FREE(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, ulTtiElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 1; + msgHeader->handle = 0; #ifdef ODU_SLOT_IND_DEBUG_LOG DU_LOG("\nLWR_MAC: Sending UL TTI Request"); -#endif - LwrMacSendToPhy(ulTtiReq->header.msg_id, msgSize, (void *)ulTtiReq); +#endif + LwrMacSendToL1(headerElem); memset(currUlSlot, 0, sizeof(MacUlSlot)); return ROK; @@ -3978,15 +4083,14 @@ uint8_t fillUlDciPdcchPdu(fapi_dci_pdu_t *ulDciReqPdu, DlSchedInfo *dlInfo, uint uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) { #ifdef INTEL_FAPI - uint8_t cellIdx; - uint8_t numPduEncoded = 0; - uint32_t msgLen = 0; - uint32_t msgSize = 0; - - fapi_ul_dci_req_t *ulDciReq = NULLP; - SlotIndInfo ulDciReqTimingInfo; - - MacDlSlot *currDlSlot = NULLP; + uint8_t cellIdx; + uint8_t numPduEncoded = 0; + SlotIndInfo ulDciReqTimingInfo; + MacDlSlot *currDlSlot = NULLP; + fapi_ul_dci_req_t *ulDciReq; + fapi_msg_header_t *msgHeader; + p_fapi_api_queue_elem_t ulDciElem; + p_fapi_api_queue_elem_t headerElem; if(lwrMacCb.phyState == PHY_STATE_RUNNING) { @@ -3996,11 +4100,15 @@ uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) if(currDlSlot->dlInfo.ulGrant != NULLP) { - msgSize = sizeof(fapi_ul_dci_req_t); - LWR_MAC_ALLOC(ulDciReq, msgSize); - if(ulDciReq != NULLP) + LWR_MAC_ALLOC(ulDciElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_dci_req_t))); + if(ulDciElem) { - memset(ulDciReq, 0, msgSize); + FILL_FAPI_LIST_ELEM(ulDciElem, NULLP, FAPI_UL_DCI_REQUEST, 1, \ + sizeof(fapi_ul_dci_req_t)); + ulDciReq = (fapi_ul_dci_req_t *)(ulDciElem +1); + memset(ulDciReq, 0, sizeof(fapi_ul_dci_req_t)); + fillMsgHeader(&ulDciReq->header, FAPI_UL_DCI_REQUEST, sizeof(fapi_ul_dci_req_t)); + ulDciReq->sfn = ulDciReqTimingInfo.sfn; ulDciReq->slot = ulDciReqTimingInfo.slot; ulDciReq->numPdus = 1; // No. of PDCCH PDUs @@ -4012,12 +4120,25 @@ uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) /* free UL GRANT at SCH */ MAC_FREE(currDlSlot->dlInfo.ulGrant, sizeof(DciInfo)); currDlSlot->dlInfo.ulGrant = NULLP; - /* send UL DCI to PHY */ - msgLen = sizeof(fapi_ul_dci_req_t) - sizeof(fapi_msg_t); - fillMsgHeader(&ulDciReq->header, FAPI_UL_DCI_REQUEST, msgLen); - LwrMacSendToPhy(ulDciReq->header.msg_id, sizeof(fapi_ul_dci_req_t), (void *)ulDciReq); - } + /* Fill message header */ + LWR_MAC_ALLOC(headerElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_msg_header_t))); + if(!headerElem) + { + DU_LOG("\nLWR_MAC: Memory allocation failed for UL DCI req header"); + LWR_MAC_FREE(ulDciElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_dci_req_t))); + return RFAILED; + } + FILL_FAPI_LIST_ELEM(headerElem, ulDciElem, FAPI_VENDOR_MSG_HEADER_IND, 1, \ + sizeof(fapi_msg_header_t)); + msgHeader = (fapi_msg_header_t *)(headerElem + 1); + msgHeader->num_msg = 1; + msgHeader->handle = 0; +#ifdef ODU_SLOT_IND_DEBUG_LOG + DU_LOG("\nLWR_MAC: Sending UL DCI Request"); +#endif + LwrMacSendToL1(headerElem); + } } else { diff --git a/src/5gnrmac/lwr_mac_handle_phy.c b/src/5gnrmac/lwr_mac_handle_phy.c index ff6588cc7..db000be47 100644 --- a/src/5gnrmac/lwr_mac_handle_phy.c +++ b/src/5gnrmac/lwr_mac_handle_phy.c @@ -338,6 +338,10 @@ uint8_t procRxDataInd(fapi_rx_data_indication_t *fapiRxDataInd) MAC_ALLOC_SHRABL_BUF(pdu->pduData, pdu->pduLength); memcpy(pdu->pduData, fapiRxDataInd->pdus[pduIdx].pduData, pdu->pduLength); +#ifdef INTEL_WLS_MEM + /* Free WLS memory allocated for Rx PDU */ + WLS_MEM_FREE(fapiRxDataInd->pdus[pduIdx].pduData, LWR_MAC_WLS_BUF_SIZE); +#endif } /* Fill post and sent to MAC */ diff --git a/src/5gnrmac/lwr_mac_phy.c b/src/5gnrmac/lwr_mac_phy.c index 1b6d0c968..a02195c0f 100644 --- a/src/5gnrmac/lwr_mac_phy.c +++ b/src/5gnrmac/lwr_mac_phy.c @@ -29,6 +29,7 @@ #include "lwr_mac_fsm.h" #include "mac_utils.h" #include "lwr_mac_utils.h" +#include "lwr_mac.h" #ifdef INTEL_FAPI #include "fapi.h" #include "fapi_vendor_extension.h" @@ -253,41 +254,13 @@ void LwrMacRecvPhyMsg() #endif /* INTEL_WLS_MEM */ -/******************************************************************* - * - * @brief Sends message to PHY Stub - * - * @details - * - * Function : LwrMacSendToPhy - * Functionality: - * -Sends message to PHY Stub - * -Once super header and vendor specific message is - * implemented for all FAPI messages, this function - * can be deleted. LwrMacSendToFapi() should be used. - * - * @params[in] Message Type - * Message Length - * Messaga Pointer - * - * @return void - * - * *****************************************************************/ - -uint8_t LwrMacSendToPhy(uint8_t msgType, uint32_t msgLen, void *msg) -{ - l1ProcessFapiRequest(msgType, msgLen, msg); - return ROK; -} /* LwrMacSendToPhy */ - - /******************************************************************* * * @brief Send FAPI messages to Intel PHY/Phy stub * * @details * - * Function : LwrMacSendToFapi + * Function : LwrMacSendToL1 * * Functionality: Send FAPI messages to Intel PHY/Phy stub * @@ -296,7 +269,7 @@ uint8_t LwrMacSendToPhy(uint8_t msgType, uint32_t msgLen, void *msg) * RFAILED - failure * * ****************************************************************/ -uint8_t LwrMacSendToFapi(void *msg) +uint8_t LwrMacSendToL1(void *msg) { uint8_t ret = ROK; #ifdef INTEL_FAPI @@ -372,7 +345,7 @@ uint8_t LwrMacSendToFapi(void *msg) } else { - MAC_FREE(currMsg, msgLen); + LWR_MAC_FREE(currMsg, msgLen); } currMsg = nextMsg; } diff --git a/src/5gnrmac/lwr_mac_phy.h b/src/5gnrmac/lwr_mac_phy.h index 42de32c22..ee1d65f81 100644 --- a/src/5gnrmac/lwr_mac_phy.h +++ b/src/5gnrmac/lwr_mac_phy.h @@ -68,8 +68,7 @@ void LwrMacRecvPhyMsg(); void LwrMacStartWlsRcvr(); #endif /* INTEL_WLS_MEM */ -uint8_t LwrMacSendToFapi(void *msg); -uint8_t LwrMacSendToPhy(uint8_t msgType, uint32_t msgLen, void *msg); +uint8_t LwrMacSendToL1(void *msg); #endif /********************************************************************** diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index 8658ac67c..9ff644bb1 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -457,8 +457,15 @@ uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo) uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo) { #ifdef INTEL_FAPI + uint16_t cellIdx; + SlotIndInfo slotInfo; + DU_LOG("\nMAC : Sending cell stop request to Lower Mac"); - sendToLowerMac(FAPI_STOP_REQUEST, 0, cellStopInfo); + GET_CELL_IDX(cellStopInfo->cellId, cellIdx); + slotInfo.cellId = cellStopInfo->cellId; + slotInfo.sfn = macCb.macCell[cellIdx]->currTime.sfn; + slotInfo.slot = macCb.macCell[cellIdx]->currTime.slot; + sendToLowerMac(FAPI_STOP_REQUEST, 0, &slotInfo); #endif MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellStopInfo, \ diff --git a/src/5gnrmac/rg_lim.c b/src/5gnrmac/rg_lim.c index 6f0286d4e..9ce6360a3 100755 --- a/src/5gnrmac/rg_lim.c +++ b/src/5gnrmac/rg_lim.c @@ -66,103 +66,6 @@ static Void rgLIMUtlFreeDatReqEvnt ARGS((TfuDatReqInfo *datReq, #endif /* forward references */ -/** - * @brief This API is invoked to send TFU SAP bind request to PHY. - * - * @details - * - * Function : rgLIMTfuBndReq - * - * This API is invoked to send TFU SAP bind request to PHY. It fills in - * the Pst structure, spId and suId values and invokes bind request - * primitive at TFU. - * - * @param[in] Inst inst - * @param[in] SuId suId - * @param[in] SpId spId - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgLIMTfuBndReq -( -Inst inst, -SuId suId, -SpId spId -) -#else -S16 rgLIMTfuBndReq(inst,suId, spId) -Inst inst; -SuId suId; -SpId spId; -#endif -{ - S16 ret; - RgLowSapCb *tfuSap; - Pst pst; - - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgCb[inst].tfuSap); - memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst)); - if((ret = RgLiTfuBndReq (&pst, suId, spId)) != ROK) - { - RLOG0(L_ERROR,"Call to RgLiTfuBndReq() failed"); - } - return (ret); -} /* rgLIMTfuBndReq */ - - -/** - * @brief This API is invoked to send TFU SAP unbind request to PHY. - * - * @details - * - * Function : rgLIMTfuBndReq - * - * This API is invoked to send TFU SAP unbind request to PHY. It fills in - * the Pst structure and spId value and invokes unbind request - * primitive at TFU. - * - * @param[in] Inst inst - * @param[in] SpId spId - * @param[in] Reason reason - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgLIMTfuUbndReq -( -Inst inst, -SpId spId, -Reason reason -) -#else -S16 rgLIMTfuUbndReq(inst,spId, reason) -Inst inst; -SpId spId; -Reason reason; -#endif -{ - S16 ret; - RgLowSapCb *tfuSap; - Pst pst; - - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgCb[inst].tfuSap); - memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst)); - if((ret = RgLiTfuUbndReq (&pst, tfuSap->sapCfg.spId, reason)) != ROK) - { - RLOG0(L_ERROR,"Call to RgLiTfuUbndReq() failed"); - } - return (ret); - -} /* rgLIMTfuUbndReq */ - - /** * @brief Bind confirm API for TFU SAP * @@ -442,65 +345,6 @@ static Void rgLIMUtlFreeDatReqEvnt(datReq, error) return; } /* end of rgLIMUtlFreeDatReqEvnt*/ #endif -/** - * @brief This API is invoked to send Data to PHY. - * - * @details - * - * Function : rgLIMTfuDatReq - * - * This API is invoked to send Data to PHY. It - * fills in the Pst structure, spId value and invokes Data - * request primitive at TFU. - * - * @param[in] Inst inst - * @param[in] TfuDatReqInfo *datReq - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgLIMTfuDatReq -( -Inst inst, -TfuDatReqInfo *datReq -) -#else -S16 rgLIMTfuDatReq(inst,datReq) -Inst inst; -TfuDatReqInfo *datReq; -#endif -{ - S16 ret; - RgLowSapCb *tfuSap; - - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgCb[inst].tfuSap); - -#ifndef NO_ERRCLS - if (tfuSap->sapSta.sapState != LRG_BND) - { - RLOG_ARG1(L_ERROR,DBG_CELLID,datReq->cellId,"Lower SAP not bound (%d)", - tfuSap->sapSta.sapState); -#ifdef RG_UNUSED - /* This case will never be hit if sap is not bound then we dont get TTI */ - rgLIMUtlFreeDatReqEvnt(datReq, TRUE); -#endif - return RFAILED; - } -#endif - - tfuSap->sapSts.numPduTxmit += datReq->pdus.count; - - /* Using existing pst - for optimization */ - if((ret = RgLiTfuDatReq (&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, - datReq)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_CELLID,datReq->cellId,"Call to RgLiTfuDatReq() failed"); - } - return (ret); -} /* rgLIMTfuDatReq*/ #ifdef L2_OPTMZ /** diff --git a/src/5gnrmac/rg_lmm.c b/src/5gnrmac/rg_lmm.c index 60b589f80..b346b7442 100755 --- a/src/5gnrmac/rg_lmm.c +++ b/src/5gnrmac/rg_lmm.c @@ -989,7 +989,7 @@ Inst inst; /* Unbind the TFU Sap */ if(rgCb[inst].tfuSap.sapSta.sapState == LRG_WAIT_BNDCFM) { - rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND); + //rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND); if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE) { rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap); @@ -998,7 +998,7 @@ Inst inst; } if(rgCb[inst].tfuSap.sapSta.sapState == LRG_BND) { - rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND); + //rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND); rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND; } @@ -1226,8 +1226,8 @@ Pst *cfmPst; cfm->cfm.reason = LCM_REASON_NOT_APPL; RgMiLrgCntrlCfm(cfmPst, cfm); - rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId, - rgCb[inst].tfuSap.sapCfg.spId); + //rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId, + //rgCb[inst].tfuSap.sapCfg.spId); RETVOID; } break; @@ -1243,7 +1243,7 @@ Pst *cfmPst; } else { - rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT); + //rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT); if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE) { rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap); @@ -1259,7 +1259,7 @@ Pst *cfmPst; if ((rgCb[inst].tfuSap.sapSta.sapState == LRG_WAIT_BNDCFM) || (rgCb[inst].tfuSap.sapSta.sapState == LRG_BND)) { - rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT); + //rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT); if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE) { rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap); @@ -1548,8 +1548,8 @@ S16 tmrEvnt; /* Timer Event */ } /* Send bind request */ - rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId, - rgCb[inst].tfuSap.sapCfg.spId); + //rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId, + //rgCb[inst].tfuSap.sapCfg.spId); } break; default: diff --git a/src/5gnrmac/rg_ptli.c b/src/5gnrmac/rg_ptli.c index a1b4dab7f..95d39550d 100755 --- a/src/5gnrmac/rg_ptli.c +++ b/src/5gnrmac/rg_ptli.c @@ -144,208 +144,6 @@ S16 PtLiTfuDelDatReq ARGS((Pst * pst, SpId spId, TfuDelDatReqInfo * datReq)); #endif /*L2_OPTMZ*/ #endif /*--#ifdef PTRGLITFU--*/ -/** @brief This API is used to send a Bind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED - */ -static const TfuBndReq RgLiTfuBndReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuBndReq, -#else - PtLiTfuBndReq, -#endif -#ifdef TF - TfUiTfuBndReq, -#else - PtLiTfuBndReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuBndReq -#else - PtLiTfuBndReq -#endif -}; - -/** @brief This API is used to send a Bind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED - */ -static const TfuSchBndReq RgLiTfuSchBndReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuSchBndReq, -#else - PtLiTfuSchBndReq, -#endif -#ifdef TF - TfUiTfuSchBndReq, -#else - PtLiTfuSchBndReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuSchBndReq -#else - PtLiTfuSchBndReq -#endif -}; - -/** @brief This API is used to send an Unbind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED - */ -static const TfuUbndReq RgLiTfuUbndReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuUbndReq, -#else - PtLiTfuUbndReq, -#endif -#ifdef TF - TfUiTfuUbndReq, -#else - PtLiTfuUbndReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuUbndReq -#else - PtLiTfuUbndReq -#endif -}; - -/** @brief This API is used to send an Unbind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED - */ -static const TfuSchUbndReq RgLiTfuSchUbndReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuSchUbndReq, -#else - PtLiTfuSchUbndReq, -#endif -#ifdef TF - TfUiTfuSchUbndReq, -#else - PtLiTfuSchUbndReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuSchUbndReq -#else - PtLiTfuSchUbndReq -#endif -}; - -/** @brief This primitive is sent from Scheduler to PHY. - * @details This primitive provides PHY with all the information required by - * PHY to decode transmissions from the UE on either PUCCH or PUSCH. - * -# On PUCCH UE can transmit the following - * -# SR - * -# HARQ feedback - * -# CQI report - * -# HARQ + CQI - * -# HARQ + SR - * -# On PUSCH UE can transmit the following - * -# Data - * -# Data + CQI - * -# Data + HARQ Feedback - * This primitive carries all the information for the expected subframe for all - * the UEs that have been scheduled to transmit. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param recpReq Pointer to the TfuRecpReqInfo structure. - * @return ROK/RFAILED - */ -static const TfuRecpReq RgLiTfuRecpReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuRecpReq, -#else - PtLiTfuRecpReq, -#endif -#ifdef TF - TfUiTfuRecpReq, -#else - PtLiTfuRecpReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuRecpReq -#else - PtLiTfuRecpReq -#endif -}; - -/** @brief This Primitive is sent from Scheduler to PHY. It provides PHY with - * all the control information - * @details This primitive carries the information sent on the following - * channels - - * -# PDCCH - * -# PHICH - * -# PCFICH - * - * @param pst - * @param spId - * @param cntrlReq pointer to TfuCntrlReqInfo - * @return ROK/RFAILED - */ -static const TfuCntrlReq RgLiTfuCntrlReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuCntrlReq, -#else - PtLiTfuCntrlReq, -#endif -#ifdef TF - TfUiTfuCntrlReq, -#else - PtLiTfuCntrlReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuCntrlReq -#else - PtLiTfuCntrlReq -#endif -}; - -/** @brief This Primitive carries the Data PDUs from MAC to PHY for - * transmission. - * @details The data being sent in this primitive is meant to be transmitted on - * the downlink channel PDSCH and PBCH (if present). To facilitate physical - * layer processing, requisite control information is also sent along with the - * data. - * @sa TfUiTfuCntrlReq - * @param pst - * @param spId - * @param tfuDatReq pointer to TfuDatReqInfo - * @return - */ -static const TfuDatReq RgLiTfuDatReqMt[RG_MAX_TFU_PROV] = -{ -#ifdef LCRGLITFU - cmPkTfuDatReq, -#else - PtLiTfuDatReq, -#endif -#ifdef TF - TfUiTfuDatReq, -#else - PtLiTfuDatReq, -#endif -#ifdef LWLCRGLITFU - cmPkTfuDatReq -#else - PtLiTfuDatReq -#endif -}; - #ifdef L2_OPTMZ /** @brief This Primitive carries cellId and UeId for which datReq need to be deleted. * @details This primitive is used to send delDatReq to CL to delete the PDUs of @@ -381,312 +179,6 @@ static const TfuDelDatReq RgLiTfuDelDatReqMt[RG_MAX_TFU_PROV] = #ifdef RG - -/*********************************************************** -* -* Func : RgLiTfuBndReq -* -* -* Desc : This API is used to send a Bind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuBndReq -( -Pst * pst, -SuId suId, -SpId spId -) -#else -S16 RgLiTfuBndReq(pst, suId, spId) -Pst * pst; -SuId suId; -SpId spId; -#endif -{ - - return ((*RgLiTfuBndReqMt[pst->selector])(pst, suId, spId)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuSchBndReq -* -* -* Desc : This API is used to send a Bind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuSchBndReq -( -Pst * pst, -SuId suId, -SpId spId -) -#else -S16 RgLiTfuSchBndReq(pst, suId, spId) -Pst * pst; -SuId suId; -SpId spId; -#endif -{ - - return ((*RgLiTfuSchBndReqMt[pst->selector])(pst, suId, spId)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuUbndReq -* -* -* Desc : This API is used to send an Unbind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuUbndReq -( -Pst * pst, -SpId spId, -Reason reason -) -#else -S16 RgLiTfuUbndReq(pst, spId, reason) -Pst * pst; -SpId spId; -Reason reason; -#endif -{ - - return ((*RgLiTfuUbndReqMt[pst->selector])(pst, spId, reason)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuSchUbndReq -* -* -* Desc : This API is used to send an Unbind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuSchUbndReq -( -Pst * pst, -SpId spId, -Reason reason -) -#else -S16 RgLiTfuSchUbndReq(pst, spId, reason) -Pst * pst; -SpId spId; -Reason reason; -#endif -{ - - return ((*RgLiTfuSchUbndReqMt[pst->selector])(pst, spId, reason)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuRecpReq -* -* -* Desc : This primitive is sent from Scheduler to PHY. - * @details This primitive provides PHY with all the information required by - * PHY to decode transmissions from the UE on either PUCCH or PUSCH. - * -# On PUCCH UE can transmit the following - * -# SR - * -# HARQ feedback - * -# CQI report - * -# HARQ + CQI - * -# HARQ + SR - * -# On PUSCH UE can transmit the following - * -# Data - * -# Data + CQI - * -# Data + HARQ Feedback - * This primitive carries all the information for the expected subframe for all - * the UEs that have been scheduled to transmit. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param recpReq Pointer to the TfuRecpReqInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuRecpReq -( -Pst * pst, -SpId spId, -TfuRecpReqInfo * recpReq -) -#else -S16 RgLiTfuRecpReq(pst, spId, recpReq) -Pst * pst; -SpId spId; -TfuRecpReqInfo * recpReq; -#endif -{ - - return ((*RgLiTfuRecpReqMt[pst->selector])(pst, spId, recpReq)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuCntrlReq -* -* -* Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with - * all the control information - * @details This primitive carries the information sent on the following - * channels - - * -# PDCCH - * -# PHICH - * -# PCFICH - * - * @param pst - * @param spId - * @param cntrlReq pointer to TfuCntrlReqInfo - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuCntrlReq -( -Pst * pst, -SpId spId, -TfuCntrlReqInfo * cntrlReq -) -#else -S16 RgLiTfuCntrlReq(pst, spId, cntrlReq) -Pst * pst; -SpId spId; -TfuCntrlReqInfo * cntrlReq; -#endif -{ - - return ((*RgLiTfuCntrlReqMt[pst->selector])(pst, spId, cntrlReq)); - -} - - - -/*********************************************************** -* -* Func : RgLiTfuDatReq -* -* -* Desc : This Primitive carries the Data PDUs from MAC to PHY for - * transmission. - * @details The data being sent in this primitive is meant to be transmitted on - * the downlink channel PDSCH and PBCH (if present). To facilitate physical - * layer processing, requisite control information is also sent along with the - * data. - * @sa TfUiTfuCntrlReq - * @param pst - * @param spId - * @param tfuDatReq pointer to TfuDatReqInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 RgLiTfuDatReq -( -Pst * pst, -SpId spId, -TfuDatReqInfo * datReq -) -#else -S16 RgLiTfuDatReq(pst, spId, datReq) -Pst * pst; -SpId spId; -TfuDatReqInfo * datReq; -#endif -{ - - return ((*RgLiTfuDatReqMt[pst->selector])(pst, spId, datReq)); - -} - #ifdef L2_OPTMZ /*********************************************************** diff --git a/src/5gnrmac/rg_tom.c b/src/5gnrmac/rg_tom.c index 37c88bd5a..ba4d25def 100755 --- a/src/5gnrmac/rg_tom.c +++ b/src/5gnrmac/rg_tom.c @@ -454,7 +454,7 @@ S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) if((datInfo->pdus.count) || (datInfo->bchDat.pres == TRUE)) { /* sending the data to Phy */ - if (rgLIMTfuDatReq(inst,datInfo) != ROK) + //if (rgLIMTfuDatReq(inst,datInfo) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to send data info for cell"); } diff --git a/src/5gnrsch/rg_sch_lmm.c b/src/5gnrsch/rg_sch_lmm.c index c1504c597..8f257b7f2 100755 --- a/src/5gnrsch/rg_sch_lmm.c +++ b/src/5gnrsch/rg_sch_lmm.c @@ -359,7 +359,7 @@ Inst inst; /* Unbind all the TFU SAP */ if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM) { - rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND); + //rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND); if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE) { rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR, (PTR)&rgSchCb[inst].tfuSap[idx]); @@ -368,7 +368,7 @@ Inst inst; } if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND) { - rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND); + //rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND); rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_UNBND; } /* Free the memory held by the cell associated with this SAP */ @@ -626,8 +626,8 @@ Pst *cfmPst; * Request to TFU */ RgMiLrgSchCntrlCfm(cfmPst, cfm); - rgSCHUtlTfuBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg.suId, - rgSchCb[inst].tfuSap[idx].sapCfg.spId); + //rgSCHUtlTfuBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg.suId, + // rgSchCb[inst].tfuSap[idx].sapCfg.spId); return; } break; @@ -643,8 +643,8 @@ Pst *cfmPst; } else { - rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, - TFU_UBNDREQ_MNGMT); + //rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, + // TFU_UBNDREQ_MNGMT); if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE) { rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR, @@ -661,8 +661,8 @@ Pst *cfmPst; if ((rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM) || (rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND)) { - rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, - TFU_UBNDREQ_MNGMT); + //rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, + // TFU_UBNDREQ_MNGMT); if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE) { rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR, @@ -966,8 +966,8 @@ S16 tmrEvnt; /* Timer Event */ } /* Send bind request */ - rgSCHUtlTfuBndReq((uint8_t)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START), - tfuSap->sapCfg.suId, tfuSap->sapCfg.spId); + //rgSCHUtlTfuBndReq((uint8_t)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START), + //tfuSap->sapCfg.suId, tfuSap->sapCfg.spId); } break; default: diff --git a/src/5gnrsch/rg_sch_tom.c b/src/5gnrsch/rg_sch_tom.c index c32ee2e22..ef373dcd3 100755 --- a/src/5gnrsch/rg_sch_tom.c +++ b/src/5gnrsch/rg_sch_tom.c @@ -2863,7 +2863,7 @@ RgSchErrInfo *err; return ret; } /* sending the RecpReq to Phy */ - if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK) + //if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info for cell"); } @@ -2943,7 +2943,7 @@ RgSchErrInfo *err; return ret; } /* sending the RecpReq to Phy */ - if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK) + //if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomUtlPrcUlTddSpclSf() Unable to send " "Cntrl info for cell"); @@ -3078,8 +3078,8 @@ if(0 == cntrlInfo->dlMpdcchLst.count) #endif /* Now always sending down a cntrl req */ /* sending the cntrl data to Phy */ - if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo) - != ROK) + //if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo) + //!= ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info " "for cell"); @@ -8105,7 +8105,7 @@ RgSchErrInfo *err; if (cntrlInfo->ulPdcchLst.count || cntrlInfo->phichLst.count) #endif { - if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo) + //if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info for" diff --git a/src/5gnrsch/rg_sch_utl.c b/src/5gnrsch/rg_sch_utl.c index 22092d80a..30a9142b2 100755 --- a/src/5gnrsch/rg_sch_utl.c +++ b/src/5gnrsch/rg_sch_utl.c @@ -4655,98 +4655,6 @@ uint8_t idx; return (cell->sc.apis->rgSCHNextHqFdbkAlloc(cell, alloc, idx)); } -/*********************************** -***********************************/ -/** - * @brief This API is invoked to send TFU SAP bind request to PHY. - * - * @details - * - * Function : rgSCHUtlTfuBndReq - * - * This API is invoked to send TFU SAP bind request to PHY from scheduler - * isntance. It fills in the Pst structure, spId and suId values and - * invokes bind request primitive at TFU. - * - * @param[in] Inst instId - * @param[in] SuId suId - * @param[in] SpId spId - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgSCHUtlTfuBndReq -( -Inst instId, -SuId suId, -SpId spId -) -#else -S16 rgSCHUtlTfuBndReq(instId, suId, spId) -Inst instId; -SuId suId; -SpId spId; -#endif -{ - S16 ret; - RgSchLowSapCb *tfuSap; - Pst pst; - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgSchCb[instId].tfuSap[suId]); - memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst)); - if((ret = RgLiTfuSchBndReq (&pst, suId, spId)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlTfuBndReq() Call to RgLiTfuBndReq()" - " failed"); - } - return (ret); -} /* rgSCHUtlTfuBndReq */ - -/** - * @brief This API is invoked to send TFU SAP unbind request to PHY. - * - * @details - * - * Function : rgSCHUtlTfuUBndReq - * This API is invoked to send TFU SAP unbind request to PHY from Scheduler - * isntance. It fills in the Pst structure and spId value and invokes - * unbind request primitive at TFU. - * - * @param[in] SpId spId - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgSCHUtlTfuUBndReq -( -Inst inst, -RgSchLowSapCfgInfo sapCfg, -Reason reason -) -#else -S16 rgSCHUtlTfuUBndReq(inst, sapCfg, reason) -Inst inst; -RgSchLowSapCfgInfo sapCfg; -Reason reason; -#endif -{ - S16 ret; - Pst pst; - - /* Get the lower SAP control block from the layer control block. */ - memcpy (&pst, &(sapCfg.sapPst), sizeof(Pst)); - if((ret = RgLiTfuSchUbndReq (&pst, sapCfg.spId, reason)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuUBndReq() Call to" - " RgLiTfuUbndReq() failed"); - } - return (ret); - -} /* rgSCHUtlTfuUBndReq */ - /*********************************************************** * * Func : rgSCHUtlResetSfAlloc @@ -7253,62 +7161,6 @@ TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq; } /* rgSCHUtlTfuGrpPwrCntrlReq */ #endif -/** - * @brief This API is invoked to send Control Info to PHY. - * - * @details - * - * Function : rgSCHUtlTfuCntrlReq - * - * This API is invoked to send Control Info to PHY. It - * fills in the Pst structure, spId value and invokes Cntrl - * request primitive at TFU. - * - * @param[in] TfuCntrlReqInfo *cntrlReq - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgSCHUtlTfuCntrlReq -( -Inst inst, -S16 sapId, -TfuCntrlReqInfo *cntrlReq -) -#else -S16 rgSCHUtlTfuCntrlReq(inst, sapId, cntrlReq) -Inst inst; -S16 sapId; -TfuCntrlReqInfo *cntrlReq; -#endif -{ - S16 ret; - RgSchLowSapCb *tfuSap; - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgSchCb[inst].tfuSap[sapId]); - -#ifndef NO_ERRCLS - if (tfuSap->sapSta.sapState != LRG_BND) - { - RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuCntrlReq() Lower SAP not bound (%d) ", - tfuSap->sapSta.sapState); - RGSCH_FREE_MEM(cntrlReq); - return RFAILED; - } -#endif - - /* Using local variable for pst is unnecessary - for optimization */ - if((ret = RgLiTfuCntrlReq(&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, - cntrlReq)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuCntrlReq() Call to RgLiTfuCntrlReq() failed"); - } - return (ret); -} /* rgSCHUtlTfuCntrlReq*/ - - /* FOR ACK NACK REP */ /** @@ -7377,62 +7229,6 @@ RgSchUeCb *ue; return ROK; } -/** - * @brief This API is invoked to send Reception Request Info to PHY. - * - * @details - * - * Function : rgSCHUtlTfuRecpReq - * - * This API is invoked to send Reception Request Info to PHY. It - * fills in the Pst structure, spId value and invokes Reception - * request primitive at TFU. - * - * @param[in] TfuRecpReqInfo *recpReq - * @return S16 - * -# ROK - * -# RFAILED - **/ -#ifdef ANSI -S16 rgSCHUtlTfuRecpReq -( -Inst inst, -S16 sapId, -TfuRecpReqInfo *recpReq -) -#else -S16 rgSCHUtlTfuRecpReq(inst, sapId, recpReq) -Inst inst; -S16 sapId; -TfuRecpReqInfo *recpReq; -#endif -{ - S16 ret; - RgSchLowSapCb *tfuSap; - - - /* Get the lower SAP control block from the layer control block. */ - tfuSap = &(rgSchCb[inst].tfuSap[sapId]); - -#ifndef NO_ERRCLS - if (tfuSap->sapSta.sapState != LRG_BND) - { - RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuRecpReq() Lower SAP not bound (%d) ", - tfuSap->sapSta.sapState); - RGSCH_FREE_MEM(recpReq); - return RFAILED; - } -#endif - - /* Using local variable for pst is unnecessary - for optimization */ - if((ret = RgLiTfuRecpReq(&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, - recpReq)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuRecpReq() Call to RgLiTfuRecpReq() failed"); - } - return (ret); -} /* rgSCHUtlTfuRecpReq */ - /** @brief This function Validates the SAP information received along with the * primitive from the lower layer. * diff --git a/src/cm/tfu.c b/src/cm/tfu.c deleted file mode 100755 index 6727b4b96..000000000 --- a/src/cm/tfu.c +++ /dev/null @@ -1,14996 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ -*******************************************************************************/ - - -/************************************************************************ - - Name: LTE-MAC layer - - Type: C source file - - Desc: C source code for pack/unpack of TFU interface primitives. - - File: tfu.c - -**********************************************************************/ - -/** @file tfu.c -@brief This file contains the packing/unpacking code for the TFU interface - primitives. -*/ - -/* header include files (.h) */ -#include "common_def.h" -#include "tfu.h" /* RGU Interface defines */ - -/* header/extern include files (.x) */ -#include "tfu.x" /* RGU Interface includes */ - -#include "du_app_mac_inf.h" -//#include "mac_sch_interface.h" - -#if (defined(LCTFU)) - - -/*********************************************************** -* -* Func : cmPkTfuBndReq -* -* -* Desc : This API is used to send a Bind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuBndReq -( -Pst * pst, -SuId suId, -SpId spId -) -#else -S16 cmPkTfuBndReq(pst, suId, spId) -Pst * pst; -SuId suId; -SpId spId; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU001, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU002, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU003, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUBNDREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuBndReq -* -* -* Desc : This API is used to send a Bind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuBndReq -( -TfuBndReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuBndReq(func, pst, mBuf) -TfuBndReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - SpId spId; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU004, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU005, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, spId)); -} - - -/*********************************************************** -* -* Func : cmPkTfuBndCfm -* -* -* Desc : This API is used to receive a Bind Confirm from PHY to MAC. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuBndCfm -( -Pst * pst, -SuId suId, -uint8_t status -) -#else -S16 cmPkTfuBndCfm(pst, suId, status) -Pst * pst; -SuId suId; -uint8_t status; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU006, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduUnpackUInt8(status, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU007, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU008, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUBNDCFM; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuBndCfm -* -* -* Desc : This API is used to receive a Bind Confirm from PHY to MAC. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuBndCfm -( -TfuBndCfm func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuBndCfm(func, pst, mBuf) -TfuBndCfm func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - uint8_t status; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU009, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduPackUInt8(&status, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU010, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, status)); -} - - -/*********************************************************** -* -* Func : cmPkTfuUbndReq -* -* -* Desc : This API is used to send an Unbind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUbndReq -( -Pst * pst, -SpId spId, -Reason reason -) -#else -S16 cmPkTfuUbndReq(pst, spId, reason) -Pst * pst; -SpId spId; -Reason reason; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU011, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SPkS16(reason, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU012, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU013, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUUBNDREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuUbndReq -* -* -* Desc : This API is used to send an Unbind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUbndReq -( -TfuUbndReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUbndReq(func, pst, mBuf) -TfuUbndReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - Reason reason; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU014, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SUnpkS16(&reason, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU015, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, reason)); -} - - -/*********************************************************** -* -* Func : cmPkTfuSchBndReq -* -* -* Desc : This API is used to send a Bind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSchBndReq -( -Pst * pst, -SuId suId, -SpId spId -) -#else -S16 cmPkTfuSchBndReq(pst, suId, spId) -Pst * pst; -SuId suId; -SpId spId; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU016, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU017, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU018, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUSCHBNDREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuSchBndReq -* -* -* Desc : This API is used to send a Bind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSchBndReq -( -TfuSchBndReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSchBndReq(func, pst, mBuf) -TfuSchBndReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - SpId spId; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU019, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU020, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, spId)); -} - - -/*********************************************************** -* -* Func : cmPkTfuSchBndCfm -* -* -* Desc : This API is used to receive a Bind Confirm from PHY to Scheduler. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSchBndCfm -( -Pst * pst, -SuId suId, -uint8_t status -) -#else -S16 cmPkTfuSchBndCfm(pst, suId, status) -Pst * pst; -SuId suId; -uint8_t status; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU021, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduUnpackUInt8(status, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU022, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU023, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUSCHBNDCFM; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuSchBndCfm -* -* -* Desc : This API is used to receive a Bind Confirm from PHY to Scheduler. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSchBndCfm -( -TfuSchBndCfm func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSchBndCfm(func, pst, mBuf) -TfuSchBndCfm func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - uint8_t status; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU024, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduPackUInt8(&status, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU025, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, status)); -} - - -/*********************************************************** -* -* Func : cmPkTfuSchUbndReq -* -* -* Desc : This API is used to send an Unbind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSchUbndReq -( -Pst * pst, -SpId spId, -Reason reason -) -#else -S16 cmPkTfuSchUbndReq(pst, spId, reason) -Pst * pst; -SpId spId; -Reason reason; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU026, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SPkS16(reason, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU027, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU028, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUSCHUBNDREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuSchUbndReq -* -* -* Desc : This API is used to send an Unbind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSchUbndReq -( -TfuSchUbndReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSchUbndReq(func, pst, mBuf) -TfuSchUbndReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - Reason reason; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU029, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SUnpkS16(&reason, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU030, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, reason)); -} - - -/*********************************************************** -* -* Func : cmPkTfuRaReqInd -* -* -* Desc : This API is used to indication Random Access Request reception from - * PHY to Scheduler. - * @details This primitive is used by physical layer to indicate the reception - * of a Random Access Request from a set of UEs. The information passed consists - * of the RA-RNTI and the list of preambles received. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param raReqInd Pointer to the TfuRaReqIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRaReqInd -( -Pst * pst, -SuId suId, -TfuRaReqIndInfo * raReqInd -) -#else -S16 cmPkTfuRaReqInd(pst, suId, raReqInd) -Pst * pst; -SuId suId; -TfuRaReqIndInfo * raReqInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU031, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(raReqInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU032, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(raReqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)raReqInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(raReqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU033, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(raReqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(raReqInd); - } - - //pst->event = (Event) EVTTFURAREQIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRaReqInd -* -* -* Desc : This API is used to indication Random Access Request reception from - * PHY to Scheduler. - * @details This primitive is used by physical layer to indicate the reception - * of a Random Access Request from a set of UEs. The information passed consists - * of the RA-RNTI and the list of preambles received. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param raReqInd Pointer to the TfuRaReqIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRaReqInd -( -TfuRaReqInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRaReqInd(func, pst, mBuf) -TfuRaReqInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuRaReqIndInfo *raReqInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU034, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuRaReqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&raReqInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU035, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) { - TFU_FREE_MEM(raReqInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU036, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&raReqInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(raReqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, raReqInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuRecpReq -* -* -* Desc : This primitive is sent from Scheduler to PHY. - * @details This primitive provides PHY with all the information required by - * PHY to decode transmissions from the UE on either PUCCH or PUSCH. - * -# On PUCCH UE can transmit the following - * -# SR - * -# HARQ feedback - * -# CQI report - * -# HARQ + CQI - * -# HARQ + SR - * -# On PUSCH UE can transmit the following - * -# Data - * -# Data + CQI - * -# Data + HARQ Feedback - * This primitive carries all the information for the expected subframe for all - * the UEs that have been scheduled to transmit. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param recpReq Pointer to the TfuRecpReqInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRecpReq -( -Pst * pst, -SpId spId, -TfuRecpReqInfo * recpReq -) -#else -S16 cmPkTfuRecpReq(pst, spId, recpReq) -Pst * pst; -SpId spId; -TfuRecpReqInfo * recpReq; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU037, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuRecpReqInfo(recpReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU038, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)recpReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU039, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(recpReq); - } - - //pst->event = (Event) EVTTFURECPREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRecpReq -* -* -* Desc : This primitive is sent from Scheduler to PHY. - * @details This primitive provides PHY with all the information required by - * PHY to decode transmissions from the UE on either PUCCH or PUSCH. - * -# On PUCCH UE can transmit the following - * -# SR - * -# HARQ feedback - * -# CQI report - * -# HARQ + CQI - * -# HARQ + SR - * -# On PUSCH UE can transmit the following - * -# Data - * -# Data + CQI - * -# Data + HARQ Feedback - * This primitive carries all the information for the expected subframe for all - * the UEs that have been scheduled to transmit. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param recpReq Pointer to the TfuRecpReqInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRecpReq -( -TfuRecpReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRecpReq(func, pst, mBuf) -TfuRecpReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuRecpReqInfo *recpReq; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU040, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuRecpReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&recpReq)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU041, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&recpReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuRecpReqInfo(recpReq, (Ptr)&recpReq->memCp, mBuf) != ROK) { - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU042, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR*)&recpReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(recpReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, recpReq)); -} - - -/*********************************************************** -* -* Func : cmPkTfuUlCqiInd -* -* -* Desc : This API is used to indicate CQI reporting from PHY to Scheduler - * @details This primitive carries an estimate of the uplink Channel quality - * index (CQI) for a list of UEs. This is an extimate of the uplink channel - * quality i.e. the transmission from UE as calculated at the Physical layer at - * the eNodeB. - * It carries a list of subband CQIs for each UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUlCqiInd -( -Pst * pst, -SuId suId, -TfuUlCqiIndInfo * ulCqiInd -) -#else -S16 cmPkTfuUlCqiInd(pst, suId, ulCqiInd) -Pst * pst; -SuId suId; -TfuUlCqiIndInfo * ulCqiInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU043, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(ulCqiInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuUlCqiIndInfo(ulCqiInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU044, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(ulCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)ulCqiInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(ulCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU045, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(ulCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(ulCqiInd); - } - - //pst->event = (Event) EVTTFUULCQIIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuUlCqiInd -* -* -* Desc : This API is used to indicate CQI reporting from PHY to Scheduler - * @details This primitive carries an estimate of the uplink Channel quality - * index (CQI) for a list of UEs. This is an extimate of the uplink channel - * quality i.e. the transmission from UE as calculated at the Physical layer at - * the eNodeB. - * It carries a list of subband CQIs for each UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUlCqiInd -( -TfuUlCqiInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUlCqiInd(func, pst, mBuf) -TfuUlCqiInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuUlCqiIndInfo *ulCqiInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU046, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuUlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&ulCqiInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU047, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuUlCqiIndInfo(ulCqiInd, (Ptr)&ulCqiInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(ulCqiInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU048, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&ulCqiInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(ulCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, ulCqiInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuHqInd -* -* -* Desc : This Primitive carries the HARQ Feedback from PHY to scheduler - * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE - * could successfully recieve the data transmitted by the eNodeB, else a NACK is - * sent. This feedback is utilized by MAC for further scheduling, for instance - * it could schedule an adaptive retransmission of the same data. - * @param pst - * @param spId - * @param tfuHqInd pointer to TfuHqIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuHqInd -( -Pst * pst, -SpId spId, -TfuHqIndInfo * hqInd -) -#else -S16 cmPkTfuHqInd(pst, spId, hqInd) -Pst * pst; -SpId spId; -TfuHqIndInfo * hqInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU049, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(hqInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuHqIndInfo(hqInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU050, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(hqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)hqInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(hqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU051, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(hqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(hqInd); - } - - //pst->event = (Event) EVTTFUHQIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuHqInd -* -* -* Desc : This Primitive carries the HARQ Feedback from PHY to scheduler - * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE - * could successfully recieve the data transmitted by the eNodeB, else a NACK is - * sent. This feedback is utilized by MAC for further scheduling, for instance - * it could schedule an adaptive retransmission of the same data. - * @param pst - * @param spId - * @param tfuHqInd pointer to TfuHqIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuHqInd -( -TfuHqInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuHqInd(func, pst, mBuf) -TfuHqInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuHqIndInfo *hqInd; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU052, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuHqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&hqInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU053, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuHqIndInfo(hqInd, (Ptr)&hqInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(hqInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU054, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&hqInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(hqInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, hqInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuSrInd -* -* -* Desc : This Primitive carries the SR Indication from PHY to scheduler. - * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request - * for Uplink (UL) grant. This primitive carries a list of SRs for a number of - * UEs received in the indicated subframe. - * @param pst - * @param spId - * @param tfqSrInd pointer to TfuSrIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrInd -( -Pst * pst, -SpId spId, -TfuSrIndInfo * srInd -) -#else -S16 cmPkTfuSrInd(pst, spId, srInd) -Pst * pst; -SpId spId; -TfuSrIndInfo * srInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU055, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(srInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuSrIndInfo(srInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU056, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(srInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)srInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(srInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU057, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(srInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(srInd); - } - - //pst->event = (Event) EVTTFUSRIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuSrInd -* -* -* Desc : This Primitive carries the SR Indication from PHY to scheduler. - * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request - * for Uplink (UL) grant. This primitive carries a list of SRs for a number of - * UEs received in the indicated subframe. - * @param pst - * @param spId - * @param tfqSrInd pointer to TfuSrIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrInd -( -TfuSrInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrInd(func, pst, mBuf) -TfuSrInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuSrIndInfo *srInd; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU058, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuSrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU059, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuSrIndInfo(srInd, (Ptr)&srInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(srInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU060, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&srInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(srInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, srInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiInd -* -* -* Desc : This API is used to indicate the reception of CQI report from PHY to - * Scheduler, also carries the RI. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiInd -( -Pst * pst, -SuId suId, -TfuDlCqiIndInfo * dlCqiInd -) -#else -S16 cmPkTfuDlCqiInd(pst, suId, dlCqiInd) -Pst * pst; -SuId suId; -TfuDlCqiIndInfo * dlCqiInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU061, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(dlCqiInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuDlCqiIndInfo(dlCqiInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU062, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(dlCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)dlCqiInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(dlCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU063, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(dlCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(dlCqiInd); - } - //pst->event = (Event) EVTTFUDLCQIIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiInd -* -* -* Desc : This API is used to indicate the reception of CQI report from PHY to - * Scheduler, also carries the RI. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiInd -( -TfuDlCqiInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiInd(func, pst, mBuf) -TfuDlCqiInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuDlCqiIndInfo *dlCqiInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU064, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuDlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&dlCqiInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU065, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuDlCqiIndInfo(dlCqiInd, (Ptr)&dlCqiInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(dlCqiInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU066, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&dlCqiInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(dlCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, dlCqiInd)); -} - - -#ifdef TFU_UPGRADE - - -/*********************************************************** -* -* Func : cmPkTfuRawCqiInd -* -* -* Desc : This Primitive is used to convey the Raw CQI information - * transmitted by the UE. - * @details Raw CQI report is the actual bits transmitted by the UE when - * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI - * etc. shall be done by MAC. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param cqiInd Pointer to the TfuRawCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRawCqiInd -( -Pst * pst, -SuId suId, -TfuRawCqiIndInfo * rawCqiInd -) -#else -S16 cmPkTfuRawCqiInd(pst, suId, rawCqiInd) -Pst * pst; -SuId suId; -TfuRawCqiIndInfo * rawCqiInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU067, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(rawCqiInd); - return RFAILED; - } - cmPkTfuRawCqiIndInfo(rawCqiInd, mBuf); - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU068, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(rawCqiInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - TFU_FREE_MEM(rawCqiInd); - //pst->event = (Event) EVTTFURAWCQIIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRawCqiInd -* -* -* Desc : This Primitive is used to convey the Raw CQI information - * transmitted by the UE. - * @details Raw CQI report is the actual bits transmitted by the UE when - * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI - * etc. shall be done by MAC. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param cqiInd Pointer to the TfuRawCqiIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRawCqiInd -( -TfuRawCqiInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRawCqiInd(func, pst, mBuf) -TfuRawCqiInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuRawCqiIndInfo *rawCqiInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU069, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuRawCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&rawCqiInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU070, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - cmUnpkTfuRawCqiIndInfo(rawCqiInd, (Ptr)&rawCqiInd->memCp, mBuf); - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, rawCqiInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuSrsInd -* -* -* Desc : This Primitive is used to convey the information derived by the - * physical layer from the SRS transmission from the UE. - * @details This primitive carries information derived from the SRS transmission - * from the UE. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param srsInd Pointer to the TfuSrIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrsInd -( -Pst * pst, -SuId suId, -TfuSrsIndInfo * srsInd -) -#else -S16 cmPkTfuSrsInd(pst, suId, srsInd) -Pst * pst; -SuId suId; -TfuSrsIndInfo * srsInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU071, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(srsInd); - return RFAILED; - } - cmPkTfuSrsIndInfo(srsInd, mBuf); - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU072, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(srsInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - TFU_FREE_MEM(srsInd); - //pst->event = (Event) EVTTFUSRSIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuSrsInd -* -* -* Desc : This Primitive is used to convey the information derived by the - * physical layer from the SRS transmission from the UE. - * @details This primitive carries information derived from the SRS transmission - * from the UE. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param srsInd Pointer to the TfuSrIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrsInd -( -TfuSrsInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrsInd(func, pst, mBuf) -TfuSrsInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuSrsIndInfo *srsInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU073, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuSrsIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srsInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU074, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - cmUnpkTfuSrsIndInfo(srsInd, (Ptr)&srsInd->memCp, mBuf); - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, srsInd)); -} -#endif - - - -/*********************************************************** -* -* Func : cmPkTfuDatInd -* -* -* Desc : This Primitive carries the Data PDUs from PHY to MAC. - * @details The uplink Data i.e. the data transmitted by the UEs received by the - * physical layer at the eNodeB in the subframe (indicated by the timingInfo), - * is relayed to MAC using this primitive. - * @param pst - * @param spId - * @param tfuDatInd pointer to TfuDatIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatInd -( -Pst * pst, -SpId spId, -TfuDatIndInfo * datInd -) -#else -S16 cmPkTfuDatInd(pst, spId, datInd) -Pst * pst; -SpId spId; -TfuDatIndInfo * datInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU075, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU076, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if(oduPackPointer((PTR)datInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(datInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU077, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(datInd); - } - - //pst->event = (Event) EVTTFUDATIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuDatInd -* -* -* Desc : This Primitive carries the Data PDUs from PHY to MAC. - * @details The uplink Data i.e. the data transmitted by the UEs received by the - * physical layer at the eNodeB in the subframe (indicated by the timingInfo), - * is relayed to MAC using this primitive. - * @param pst - * @param spId - * @param tfuDatInd pointer to TfuDatIndInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatInd -( -TfuDatInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatInd(func, pst, mBuf) -TfuDatInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuDatIndInfo *datInd; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU078, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuDatIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&datInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU079, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuDatIndInfo(datInd, (Ptr)&datInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(datInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU080, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if(oduUnpackPointer((PTR *)&datInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(datInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, datInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuCrcInd -* -* -* Desc : This API is used by the Physical layer to indicate if the CRC Check - * on the PUSCH Data was successful or not. - * @details This primitive carries CRC indication for a list of UEs. This - * is utilized in the scenario where MAC requested the reception of uplink data - * for a particular UE. On reception of the PUSCH data, the CRC check on it - * failed. This CRC failure is indicated to MAC, which would utillize this - * information for further scheduling. - * Physical layer would indicate failure or success for each PUSCH transmission. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param crcInd Pointer to the TfuCrcIndInfo. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCrcInd -( -Pst * pst, -SuId suId, -TfuCrcIndInfo * crcIndInfo -) -#else -S16 cmPkTfuCrcInd(pst, suId, crcIndInfo) -Pst * pst; -SuId suId; -TfuCrcIndInfo * crcIndInfo; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU081, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(crcIndInfo); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuCrcIndInfo(crcIndInfo, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU082, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(crcIndInfo); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)crcIndInfo, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(crcIndInfo); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU083, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(crcIndInfo); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(crcIndInfo); - } - - //pst->event = (Event) EVTTFUCRCIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuCrcInd -* -* -* Desc : This API is used by the Physical layer to indicate if the CRC Check - * on the PUSCH Data was successful or not. - * @details This primitive carries CRC indication for a list of UEs. This - * is utilized in the scenario where MAC requested the reception of uplink data - * for a particular UE. On reception of the PUSCH data, the CRC check on it - * failed. This CRC failure is indicated to MAC, which would utillize this - * information for further scheduling. - * Physical layer would indicate failure or success for each PUSCH transmission. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param crcInd Pointer to the TfuCrcIndInfo. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCrcInd -( -TfuCrcInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCrcInd(func, pst, mBuf) -TfuCrcInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuCrcIndInfo *crcIndInfo; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU084, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuCrcIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&crcIndInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU085, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuCrcIndInfo(crcIndInfo, (Ptr)&crcIndInfo->memCp, mBuf) != ROK) { - TFU_FREE_MEM(crcIndInfo); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU086, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&crcIndInfo, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(crcIndInfo); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, crcIndInfo)); -} - - -/*********************************************************** -* -* Func : cmPkTfuTimingAdvInd -* -* -* Desc : This API is used to indicate a Timing Advance from PHY to Scheduler . - * @details This primitive carries timing advance information for a number of - * UEs that may need timing advance. Timing advance information is an estimate - * of the timing adjustment that a UE would need to apply in order to be - * synchronized in uplink. This estimate is to be calculated by physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTimingAdvInd -( -Pst * pst, -SuId suId, -TfuTimingAdvIndInfo * timingAdvInd -) -#else -S16 cmPkTfuTimingAdvInd(pst, suId, timingAdvInd) -Pst * pst; -SuId suId; -TfuTimingAdvIndInfo * timingAdvInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU087, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(timingAdvInd); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuTimingAdvIndInfo(timingAdvInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU088, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(timingAdvInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)timingAdvInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(timingAdvInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU089, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(timingAdvInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(timingAdvInd); - } - - //pst->event = (Event) EVTTFUTIMINGADVIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuTimingAdvInd -* -* -* Desc : This API is used to indicate a Timing Advance from PHY to Scheduler . - * @details This primitive carries timing advance information for a number of - * UEs that may need timing advance. Timing advance information is an estimate - * of the timing adjustment that a UE would need to apply in order to be - * synchronized in uplink. This estimate is to be calculated by physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuTimingAdvInd -( -TfuTimingAdvInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuTimingAdvInd(func, pst, mBuf) -TfuTimingAdvInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuTimingAdvIndInfo *timingAdvInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU090, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuTimingAdvIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&timingAdvInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU091, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuTimingAdvIndInfo(timingAdvInd, (Ptr)&timingAdvInd->memCp, mBuf) != ROK) { - TFU_FREE_MEM(timingAdvInd); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU092, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&timingAdvInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(timingAdvInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, timingAdvInd)); -} - - -/*********************************************************** -* -* Func : cmPkTfuDatReq -* -* -* Desc : This Primitive carries the Data PDUs from MAC to PHY for - * transmission. - * @details The data being sent in this primitive is meant to be transmitted on - * the downlink channel PDSCH and PBCH (if present). To facilitate physical - * layer processing, requisite control information is also sent along with the - * data. - * @sa TfUiTfuCntrlReq - * @param pst - * @param spId - * @param tfuDatReq pointer to TfuDatReqInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatReq -( -Pst * pst, -SpId spId, -TfuDatReqInfo * datReq -) -#else -S16 cmPkTfuDatReq(pst, spId, datReq) -Pst * pst; -SpId spId; -TfuDatReqInfo * datReq; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU093, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datReq); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuDatReqInfo(datReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU094, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if(oduPackPointer((PTR)datReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(datReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU095, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(datReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(datReq); - } - - //pst->event = (Event) EVTTFUDATREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuDatReq -* -* -* Desc : This Primitive carries the Data PDUs from MAC to PHY for - * transmission. - * @details The data being sent in this primitive is meant to be transmitted on - * the downlink channel PDSCH and PBCH (if present). To facilitate physical - * layer processing, requisite control information is also sent along with the - * data. - * @sa TfUiTfuCntrlReq - * @param pst - * @param spId - * @param tfuDatReq pointer to TfuDatReqInfo - * @return -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatReq -( -TfuDatReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatReq(func, pst, mBuf) -TfuDatReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuDatReqInfo *datReq; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU096, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuDatReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&datReq)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU097, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuDatReqInfo(datReq, (Ptr)&datReq->memCp, mBuf) != ROK) { - TFU_FREE_MEM(datReq); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU098, (ErrVal)0, "Unpacking failed"); -#endif - return RFAILED; - } - } - else if (pst->selector == ODU_SELECTOR_LWLC) - { - if(oduUnpackPointer((PTR *)&datReq, mBuf) != ROK) - { - TFU_FREE_MEM(datReq); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Un-Packing failed"); -#endif - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, datReq)); -} - - -/*********************************************************** -* -* Func : cmPkTfuCntrlReq -* -* -* Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with - * all the control information - * @details This primitive carries the information sent on the following - * channels - - * -# PDCCH - * -# PHICH - * -# PCFICH - * - * @param pst - * @param spId - * @param cntrlReq pointer to TfuCntrlReqInfo - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCntrlReq -( -Pst * pst, -SpId spId, -TfuCntrlReqInfo * cntrlReq -) -#else -S16 cmPkTfuCntrlReq(pst, spId, cntrlReq) -Pst * pst; -SpId spId; -TfuCntrlReqInfo * cntrlReq; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU099, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(cntrlReq); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuCntrlReqInfo(cntrlReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU100, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(cntrlReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)cntrlReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(cntrlReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU101, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(cntrlReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(cntrlReq); - } - - //pst->event = (Event) EVTTFUCNTRLREQ; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuCntrlReq -* -* -* Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with - * all the control information - * @details This primitive carries the information sent on the following - * channels - - * -# PDCCH - * -# PHICH - * -# PCFICH - * - * @param pst - * @param spId - * @param cntrlReq pointer to TfuCntrlReqInfo - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCntrlReq -( -TfuCntrlReq func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCntrlReq(func, pst, mBuf) -TfuCntrlReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - TfuCntrlReqInfo *cntrlReq; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU102, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuCntrlReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&cntrlReq)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU103, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuCntrlReqInfo(cntrlReq, (Ptr)&cntrlReq->memCp, mBuf) != ROK) { - TFU_FREE_MEM(cntrlReq); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU104, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&cntrlReq, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(cntrlReq); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, spId, cntrlReq)); -} - - - -/*********************************************************** -* -* Func : cmPkTfuTtiInd -* -* -* Desc : This API is the TTI indication from PHY to MAC . - * @details This primitive provides the timing information (SFN and subframe) - * which is currently running on the physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ttiInd Pointer to the TfuTtiIndInfo. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTtiInd -( -Pst * pst, -SuId suId, -TfuTtiIndInfo * ttiInd -) -#else -S16 cmPkTfuTtiInd(pst, suId, ttiInd) -Pst * pst; -SuId suId; -TfuTtiIndInfo * ttiInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU105, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU106, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)ttiInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - - /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/ - SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU107, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU108, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - //pst->event = (Event) EVENT_SLOT_IND_TO_MAC; - return (SPstTsk(pst,mBuf)); -} - -#if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) -/*********************************************************** - * - * Func : cmPkTfuNonRtInd - * - * - * Desc : This API is the Non-Rt indication from CL to MAC . - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @return ROK/RFAILED - * - * - * Ret : S16 - * - * Notes: - * - * File : - * -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuNonRtInd -( -Pst * pst, -SuId suId -) -#else -S16 cmPkTfuNonRtInd(pst, suId) -Pst * pst; -SuId suId; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU105, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU107, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - //pst->event = (Event) EVTTFUNONRTIND; - return (SPstTsk(pst,mBuf)); -} - -/*********************************************************** -* -* Func : cmUnpkTfuNonRtInd -* -* -* Desc : This API is the Non Rt indication from PHY to MAC . -* @param pst Pointer to the post structure. -* @param suId SAP ID of the service user. -* @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuNonRtInd -( -TfuNonRtInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuNonRtInd(func, pst, mBuf) -TfuNonRtInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU109, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId)); -} - -#endif - - -/*********************************************************** -* -* Func : cmPkTfuPucchDeltaPwr -* -* -* Desc : This Primitive is used to convey PUCCH Delta power calculated by the - * Physical layer. - * This information is utilized by Scheduler for power control. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param Pointer to the TfuPucchDeltaPwrIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPucchDeltaPwr -( -Pst * pst, -SuId suId, -TfuPucchDeltaPwrIndInfo * pucchDeltaPwr -) -#else -S16 cmPkTfuPucchDeltaPwr(pst, suId, pucchDeltaPwr) -Pst * pst; -SuId suId; -TfuPucchDeltaPwrIndInfo * pucchDeltaPwr; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU119, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)pucchDeltaPwr, sizeof(TfuPucchDeltaPwrIndInfo)); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU120, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(pucchDeltaPwr); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)pucchDeltaPwr, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - TFU_FREE_MEM(pucchDeltaPwr); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU121, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(pucchDeltaPwr); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - TFU_FREE_MEM(pucchDeltaPwr); - } - //pst->event = (Event) EVTTFUPUCCHDELPWR; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuPucchDeltaPwr -* -* -* Desc : This Primitive is used to convey PUCCH Delta power calculated by the - * Physical layer. - * This information is utilized by Scheduler for power control. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param Pointer to the TfuPucchDeltaPwrIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPucchDeltaPwr -( -TfuPucchDeltaPwrInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPucchDeltaPwr(func, pst, mBuf) -TfuPucchDeltaPwrInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuPucchDeltaPwrIndInfo *pucchDeltaPwr; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU122, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuPucchDeltaPwrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&pucchDeltaPwr)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU123, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, (Ptr)&pucchDeltaPwr->memCp, mBuf) != ROK) { - TFU_FREE_MEM(pucchDeltaPwr); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU124, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&pucchDeltaPwr, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - TFU_FREE_MEM(pucchDeltaPwr); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, pucchDeltaPwr)); -} - -#ifdef TFU_5GTF - -/*********************************************************** -* -* Func : cmPkTfuRbAssignA1Val324 -* -* -* Desc : This structure contains the information needed to convey RIV value 324. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRbAssignA1Val324 -( -TfuRbAssignA1Val324 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRbAssignA1Val324(param, mBuf) -TfuRbAssignA1Val324 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf); -#ifdef UL_ADPT_DBG - printf("cmPkTfuRbAssignA1Val324 param->ndi %d mcs %d param->hqProcId %d \n",param->ndi,param->mcs,param->hqProcId); -#endif - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuRbAssignB1Val324 -* -* -* Desc : This structure contains the information needed to convey RIV value 324. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRbAssignB1Val324 -( -TfuRbAssignB1Val324 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRbAssignB1Val324(param, mBuf) -TfuRbAssignB1Val324 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->bmiHqAckNack, mBuf); - CMCHKPK(oduUnpackUInt8, param->RV, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuRbAssignVal326 -* -* -* Desc : This structure contains the information needed to convey RIV value 326. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRbAssignVal326 -( -TfuRbAssignVal326 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRbAssignVal326(param, mBuf) -TfuRbAssignVal326 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->CyclicShiftInd, mBuf); - CMCHKPK(oduUnpackUInt8, param->OCCInd, mBuf); - CMCHKPK(oduUnpackUInt8, param->FreqBandIdx, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRbAssignA1Val324 -* -* -* Desc : This structure contains the information needed to convey RIV value 324. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRbAssignA1Val324 -( -TfuRbAssignA1Val324 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRbAssignA1Val324(param, mBuf) -TfuRbAssignA1Val324 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRbAssignB1Val324 -* -* -* Desc : This structure contains the information needed to convey RIV value 324. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRbAssignB1Val324 -( -TfuRbAssignB1Val324 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRbAssignB1Val324(param, mBuf) -TfuRbAssignB1Val324 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->RV, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->bmiHqAckNack, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmUnpkTfuRbAssignVal326 -* -* -* Desc : This structure contains the information needed to convey RIV value 326. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRbAssignVal326 -( -TfuRbAssignVal326 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRbAssignVal326(param, mBuf) -TfuRbAssignVal326 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->FreqBandIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->OCCInd, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CyclicShiftInd, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormatA1A2Info -* -* -* Desc : This structure contains the information needed to convey DCI format A1/A2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormatA1A2Info -( -TfuDciFormatA1Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormatA1A2Info(param, mBuf) -TfuDciFormatA1Info *param; -Buffer *mBuf; -#endif -{ - - - //printf("5GTF_DBG: cmPkTfuDciFormatA1Info() called by eNB\n"); - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->UL_PCRS, mBuf); - CMCHKPK(oduUnpackUInt8, param->PMI, mBuf); - CMCHKPK(oduUnpackUInt8, param->SCID, mBuf); - - CMCHKPK(oduUnpackUInt8, param->REMapIdx_DMRS_PCRS_numLayers, mBuf); - CMCHKPK(oduUnpackUInt8, param->SRS_Symbol, mBuf); - CMCHKPK(oduUnpackUInt8, param->SRS_Config, mBuf); - CMCHKPK(oduUnpackUInt8, param->beamSwitch, mBuf); - CMCHKPK(oduUnpackUInt8, param->uciOnxPUSCH, mBuf); - - CMCHKPK(oduUnpackUInt8, param->numBSI_Reports, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_ProcInd, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSI_BRRS_Indicator, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_SymbIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_TxTiming, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSI_BSI_BRI_Req, mBuf); - - if(param->RBAssign <= TFU_RIV_324) - { - CMCHKPK(cmPkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf); - } - else if (param->RBAssign == TFU_RIV_326) - { - CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->symbIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf); - CMCHKPK(oduUnpackUInt16, param->RBAssign, mBuf); - CMCHKPK(oduUnpackUInt8, param->xPUSCH_TxTiming, mBuf); - CMCHKPK(oduUnpackUInt8, param->xPUSCHRange, mBuf); - CMCHKPK(oduUnpackUInt8, param->formatType, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuDciFormatB1B2Info -* -* -* Desc : This structure contains the information needed to convey DCI format B1/B2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormatB1B2Info -( -TfuDciFormatB1Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormatB1B2Info(param, mBuf) -TfuDciFormatB1Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->DL_PCRS, mBuf); - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->SCID, mBuf); - - CMCHKPK(oduUnpackUInt8, param->AntPorts_numLayers, mBuf); - CMCHKPK(oduUnpackUInt8, param->SRS_Symbol, mBuf); - CMCHKPK(oduUnpackUInt8, param->SRS_Config, mBuf); - CMCHKPK(oduUnpackUInt8, param->beamSwitch, mBuf); - CMCHKPK(oduUnpackUInt8, param->freqResIdx_xPUCCH, mBuf); - - CMCHKPK(oduUnpackUInt8, param->xPUCCH_TxTiming, mBuf); - - CMCHKPK(oduUnpackUInt8, param->numBSI_Reports, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_ProcInd, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSI_BRRS_Indicator, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_SymbIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_TxTiming, mBuf); - CMCHKPK(oduUnpackUInt8, param->CSI_BSI_BRI_Req, mBuf); - - if(param->RBAssign <= TFU_RIV_324) - { - CMCHKPK(cmPkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf); - } - else if (param->RBAssign == TFU_RIV_326) - { - CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->symbIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf); - CMCHKPK(oduUnpackUInt16, param->RBAssign, mBuf); - CMCHKPK(oduUnpackUInt8, param->xPDSCHRange, mBuf); - CMCHKPK(oduUnpackUInt8, param->formatType, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormatA1A2Info -* -* -* Desc : This structure contains the information needed to convey DCI format A1/A2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormatA1A2Info -( -TfuDciFormatA1Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormatA1A2Info(param, mBuf) -TfuDciFormatA1Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->formatType, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->xPUSCHRange, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->xPUSCH_TxTiming, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->RBAssign, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->symbIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - - if(param->RBAssign <= TFU_RIV_324) - { - CMCHKUNPK(cmUnpkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf); - } - else if(param->RBAssign == TFU_RIV_326) - { - CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf); - } - - CMCHKUNPK(oduPackUInt8, ¶m->CSI_BSI_BRI_Req, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_TxTiming, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_SymbIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSI_BRRS_Indicator, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_ProcInd, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numBSI_Reports, mBuf); - - CMCHKUNPK(oduPackUInt8, ¶m->uciOnxPUSCH, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->beamSwitch, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SRS_Config, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SRS_Symbol, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->REMapIdx_DMRS_PCRS_numLayers, mBuf); - - CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->PMI, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->UL_PCRS, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - - return ROK; -} - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormatB1B2Info -* -* -* Desc : This structure contains the information needed to convey DCI format B1/B2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormatB1B2Info -( -TfuDciFormatB1Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormatB1B2Info(param, mBuf) -TfuDciFormatB1Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->formatType, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->xPDSCHRange, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->RBAssign, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->symbIdx, mBuf); - - if(param->RBAssign <= TFU_RIV_324) - { - CMCHKUNPK(cmUnpkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf); - } - else if (param->RBAssign == TFU_RIV_326) - { - CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf); - } - - CMCHKUNPK(oduPackUInt8, ¶m->CSI_BSI_BRI_Req, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_TxTiming, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_SymbIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSI_BRRS_Indicator, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_ProcInd, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numBSI_Reports, mBuf); - - CMCHKUNPK(oduPackUInt8, ¶m->xPUCCH_TxTiming, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->freqResIdx_xPUCCH, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->beamSwitch, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SRS_Config, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SRS_Symbol, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->AntPorts_numLayers, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->DL_PCRS, mBuf); - - return ROK; -} - - -#endif /* TFU_5GTF */ - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat0Info -* -* -* Desc : This structure contains the information needed to convey DCI format 0. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat0Info -( -TfuDciFormat0Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat0Info(param, mBuf) -TfuDciFormat0Info *param; -Buffer *mBuf; -#endif -{ - - - /* tfu_c_001.main_3: Adding pack for hqProcId */ - CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->txAntenna, mBuf); - CMCHKPK(oduUnpackUInt8, param->numCqiBit, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiReq, mBuf); - CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - CMCHKPK(oduUnpackUInt8, param->ulIdx, mBuf); - -#endif - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf); -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - CMCHKPK(oduUnpackUInt32, param->riv, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->numRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat0Info -* -* -* Desc : This structure contains the information needed to convey DCI format 0. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat0Info -( -TfuDciFormat0Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat0Info(param, mBuf) -TfuDciFormat0Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf); -#ifdef TFU_UPGRADE - CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf); -#endif /* TFU_UPGRADE */ - CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->ulIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiReq, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numCqiBit, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->txAntenna, mBuf); - /* tfu_c_001.main_3: Adding unpack for hqProcId */ - CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuAllocMapOrRiv -* -* -* Desc : This Structure could either contain a resource allocation bit map OR a - * RIV Value as defined in 213 - 7.1.6. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuAllocMapOrRiv -( -TfuAllocMapOrRiv *param, -Buffer *mBuf -) -#else -S16 cmPkTfuAllocMapOrRiv(param, mBuf) -TfuAllocMapOrRiv *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - switch(param->type) { - /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */ -#ifdef TFU_RESMAP_CHANGE - case UnKnown: - CMCHKPK(cmPkTfuAllocMap, ¶m->u.allocMap, mBuf); - break; - -#endif - - /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */ -#ifndef TFU_RESMAP_CHANGE - case TFU_ALLOC_TYPE_MAP: - for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->u.resAllocMap[i], mBuf); - } - break; - -#endif - case TFU_ALLOC_TYPE_RIV: - CMCHKPK(oduUnpackUInt32, param->u.riv, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuAllocMapOrRiv -* -* -* Desc : This Structure could either contain a resource allocation bit map OR a - * RIV Value as defined in 213 - 7.1.6. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuAllocMapOrRiv -( -TfuAllocMapOrRiv *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuAllocMapOrRiv(param, mBuf) -TfuAllocMapOrRiv *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_ALLOC_TYPE_RIV: - CMCHKUNPK(oduPackUInt32, ¶m->u.riv, mBuf); - break; - - /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */ -#ifndef TFU_RESMAP_CHANGE - case TFU_ALLOC_TYPE_MAP: - for (i=0; iu.resAllocMap[i], mBuf); - } - break; - -#endif - - /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */ -#ifdef TFU_RESMAP_CHANGE - case UnKnown: - CMCHKUNPK(cmUnpkTfuAllocMap, ¶m->u.allocMap, mBuf); - break; - -#endif - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1AllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1Info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1AllocInfo -( -TfuDciFormat1AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1AllocInfo(param, mBuf) -TfuDciFormat1AllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1AllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1Info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1AllocInfo -( -TfuDciFormat1AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1AllocInfo(param, mBuf) -TfuDciFormat1AllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf); - for (i=0; iresAllocMap[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1Info -* -* -* Desc : This structure contains the information needed to convey DCI format 1. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1Info -( -TfuDciFormat1Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1Info(param, mBuf) -TfuDciFormat1Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1Info -* -* -* Desc : This structure contains the information needed to convey DCI format 1. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1Info -( -TfuDciFormat1Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1Info(param, mBuf) -TfuDciFormat1Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat2AAllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 2A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat2AInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat2AAllocInfo -( -TfuDciFormat2AAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat2AAllocInfo(param, mBuf) -TfuDciFormat2AAllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->transSwap, mBuf); - CMCHKPK(oduUnpackUInt8, param->precoding, mBuf); - - for (i=1; i >= 0; i--) { - CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat2AAllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 2A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat2AInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat2AAllocInfo -( -TfuDciFormat2AAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat2AAllocInfo(param, mBuf) -TfuDciFormat2AAllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf); - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=0; iresAllocMap[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=0; i<=1; i++) { - CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf); - } - - CMCHKUNPK(oduPackUInt8, ¶m->precoding, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->transSwap, mBuf); - return ROK; -} - -#ifdef EMTC_ENABLE -/*********************************************************** -* -* Func : cmPkTfuDciFormat6AAllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 6-1A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat61aInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat6AAllocInfo -( -TfuDciFormat61AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat6AAllocInfo(param, mBuf) -TfuDciFormat61AllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt32, param->riv, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat6AAllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 6-1A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat61aInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat6AAllocInfo -( -TfuDciFormat61AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat6AAllocInfo(param, mBuf) -TfuDciFormat61AllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - printf("In cmUnpkTfuDciFormat6AAllocInfo :: Passed \n"); - return ROK; -} -#endif - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat2AInfo -* -* -* Desc : This structure contains the information carried by DCI format 2A. - * @details It carries the allocation information and other control information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat2AInfo -( -TfuDciFormat2AInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat2AInfo(param, mBuf) -TfuDciFormat2AInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat2AInfo -* -* -* Desc : This structure contains the information carried by DCI format 2A. - * @details It carries the allocation information and other control information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat2AInfo -( -TfuDciFormat2AInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat2AInfo(param, mBuf) -TfuDciFormat2AInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat2AllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 2. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat2Info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat2AllocInfo -( -TfuDciFormat2AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat2AllocInfo(param, mBuf) -TfuDciFormat2AllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=1; i >= 0; i--) { - CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - - CMCHKPK(oduUnpackUInt8, param->precoding, mBuf); - CMCHKPK(oduUnpackUInt8, param->transSwap, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf); - } - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat2AllocInfo -* -* -* Desc : This structure contains only the allocation information, that is part - * of DCI format 2. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat2Info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat2AllocInfo -( -TfuDciFormat2AllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat2AllocInfo(param, mBuf) -TfuDciFormat2AllocInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf); - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=0; iresAllocMap[i], mBuf); - } - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKUNPK(oduPackUInt8, ¶m->transSwap, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->precoding, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - for (i=0; i<=1; i++) { - CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf); - } - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat2Info -* -* -* Desc : This structure contains the information carried by DCI format 2. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data must - * also carry some control information, essentially, allocation information - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat2Info -( -TfuDciFormat2Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat2Info(param, mBuf) -TfuDciFormat2Info *param; -Buffer *mBuf; -#endif -{ - - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat2Info -* -* -* Desc : This structure contains the information carried by DCI format 2. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data must - * also carry some control information, essentially, allocation information - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat2Info -( -TfuDciFormat2Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat2Info(param, mBuf) -TfuDciFormat2Info *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat3Info -* -* -* Desc : This structure contains the information carried in DCI format 3. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat3Info -( -TfuDciFormat3Info *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat3Info(param, mBuf) -TfuDciFormat3Info *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->isPucch, mBuf); - for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->tpcCmd[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat3Info -* -* -* Desc : This structure contains the information carried in DCI format 3. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat3Info -( -TfuDciFormat3Info *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat3Info(param, mBuf) -TfuDciFormat3Info *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=0; itpcCmd[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->isPucch, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat3AInfo -* -* -* Desc : This structure contains the information carried by DCI format 3A. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat3AInfo -( -TfuDciFormat3AInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat3AInfo(param, mBuf) -TfuDciFormat3AInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - CMCHKPK(oduUnpackUInt8, param->isPucch, mBuf); - for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->tpcCmd[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat3AInfo -* -* -* Desc : This structure contains the information carried by DCI format 3A. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat3AInfo -( -TfuDciFormat3AInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat3AInfo(param, mBuf) -TfuDciFormat3AInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=0; itpcCmd[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->isPucch, mBuf); - return ROK; -} - -#ifdef EMTC_ENABLE - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat60aInfo -* -* -* Desc : This structure contains the information that is carried in DCI - * format 6-0A -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -************************************************************/ - -#ifdef ANSI -static S16 cmPkTfuDciFormat60aInfo -( -TfuDciFormat60aInfo *param, -Buffer *mBuf -) -#else -static S16 cmPkTfuDciFormat60aInfo(param, mBuf) -TfuDciFormat60aInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->dciRep, mBuf); - CMCHKPK(oduUnpackUInt8, param->isSrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiReq, mBuf); -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - CMCHKPK(oduUnpackUInt8, param->ulIdx, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->rep, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt32, param->riv, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - return ROK; -} -/*********************************************************** -* -* Func : cmPkTfuPdcchOrderInfoEmtc -* -* -* Desc : This structure contains the information that is carried in DCI - * format 6-1A in the case of a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -static S16 cmPkTfuPdcchOrderInfoEmtc -( -TfuPdcchOrderInfoEmtc *param, -Buffer *mBuf -) -#else -static S16 cmPkTfuPdcchOrderInfoEmtc(param, mBuf) -TfuPdcchOrderInfoEmtc *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->ceLevel, mBuf); - CMCHKPK(oduUnpackUInt8, param->prachMaskIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->preambleIdx, mBuf); - CMCHKPK(oduUnpackUInt32, param->riv, mBuf); - return ROK; -} - -/*********************************************************** -* -* Func : cmPkTfudciformat61aPdsch -* -* -* Desc : This structure contains the information carried in DCI format 6-1A - * when it is NOT used for a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -static S16 cmPkTfudciformat61aPdsch -( -Tfudciformat61aPdsch *param, -Buffer *mBuf -) -#else -static S16 cmPkTfudciformat61aPdsch(param, mBuf) -Tfudciformat61aPdsch *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->isTBMsg4, mBuf); - CMCHKPK(oduUnpackUInt8, param->dciRep, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqAckOffst, mBuf); - CMCHKPK(oduUnpackUInt8, param->pmiCfm, mBuf); - CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf); - CMCHKPK(oduUnpackUInt8, param->isSrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->antPortAndScrId, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->rep, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat61aInfo -* -* -* Desc : This structure contains the information needed to convey DCI format 6-1A. - * @details Format can possibly carry PDSCH allocation or information needed for - * a PDCCH order, used to initiate a RACH procedure in cases where UE looses - * sync with eNodeB. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat61aInfo -( -TfuDciFormat61aInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat61aInfo(param, mBuf) -TfuDciFormat61aInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->isPdcchOrder) { - case FALSE: - CMCHKPK(cmPkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf); - break; - case TRUE: - CMCHKPK(cmPkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt8, param->isPdcchOrder, mBuf); - - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat60aInfo -* -* -* Desc : This structure contains the information that is carried in DCI - * format 6-0A. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -* **********************************************************/ - -#ifdef ANSI -static S16 cmUnpkTfuDciFormat60aInfo -( -TfuDciFormat60aInfo *param, -Buffer *mBuf -) -#else -static S16 cmUnpkTfuDciFormat60aInfo(param, mBuf) -TfuDciFormat60aInfo *param; -Buffer *mBuf; -#endif -{ - - - printf("In cmUnpkTfuDciFormat60aInfo :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rep, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->ulIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); -#endif - CMCHKUNPK(oduPackUInt8, ¶m->cqiReq, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isSrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dciRep, mBuf); - printf("In cmUnpkTfuDciFormat60aInfo :: Exit \n"); - return ROK; -} -/*********************************************************** -* -* Func : cmUnpkTfuPdcchOrderInfoEmtc -* -* -* Desc : This structure contains the information that is carried in DCI - * format 6-1A in the case of a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -static S16 cmUnpkTfuPdcchOrderInfoEmtc -( -TfuPdcchOrderInfoEmtc *param, -Buffer *mBuf -) -#else -static S16 cmUnpkTfuPdcchOrderInfoEmtc(param, mBuf) -TfuPdcchOrderInfoEmtc *param; -Buffer *mBuf; -#endif -{ - - - printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Entry \n"); - CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->preambleIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->prachMaskIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ceLevel, mBuf); - printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Passed \n"); - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat61aInfo -* -* -* Desc : This structure contains the information carried by DCI format 6-1A. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat61aInfo -( -TfuDciFormat61aInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat61aInfo(param, mBuf) -TfuDciFormat61aInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isPdcchOrder, mBuf); - printf("1. cmUnpkTfuDciFormat61aInfo :: isPdcchOrder %d \n", param->isPdcchOrder); - switch(param->isPdcchOrder) { - case TRUE: - CMCHKUNPK(cmUnpkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf); - break; - case FALSE: - CMCHKUNPK(cmUnpkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} -#endif - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1dAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1D. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1dInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1dAllocInfo -( -TfuDciFormat1dAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1dAllocInfo(param, mBuf) -TfuDciFormat1dAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->nGap2, mBuf); - CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1dAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1D. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1dInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1dAllocInfo -( -TfuDciFormat1dAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1dAllocInfo(param, mBuf) -TfuDciFormat1dAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->nGap2, mBuf); - CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1dInfo -* -* -* Desc : This structure contains the information carried by DCI format 1D. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1dInfo -( -TfuDciFormat1dInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1dInfo(param, mBuf) -TfuDciFormat1dInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->dlPwrOffset, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1dInfo -* -* -* Desc : This structure contains the information carried by DCI format 1D. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1dInfo -( -TfuDciFormat1dInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1dInfo(param, mBuf) -TfuDciFormat1dInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->dlPwrOffset, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1cInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1C. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1CInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1cInfo -( -TfuDciFormat1cInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1cInfo(param, mBuf) -TfuDciFormat1cInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->iTbs, mBuf); - CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->nGap2, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1cInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1C. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1CInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1cInfo -( -TfuDciFormat1cInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1cInfo(param, mBuf) -TfuDciFormat1cInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTknUInt8, ¶m->nGap2, mBuf); - CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->iTbs, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1bAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1 B. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1BInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1bAllocInfo -( -TfuDciFormat1bAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1bAllocInfo(param, mBuf) -TfuDciFormat1bAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->pmiCfm, mBuf); - CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->nGap2, mBuf); - CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1bAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1 B. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1BInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1bAllocInfo -( -TfuDciFormat1bAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1bAllocInfo(param, mBuf) -TfuDciFormat1bAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->nGap2, mBuf); - CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pmiCfm, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPdcchOrderInfo -* -* -* Desc : This structure contains the information that is carried in DCI - * format 1A in the case of a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPdcchOrderInfo -( -TfuPdcchOrderInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPdcchOrderInfo(param, mBuf) -TfuPdcchOrderInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->prachMaskIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->preambleIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPdcchOrderInfo -* -* -* Desc : This structure contains the information that is carried in DCI - * format 1A in the case of a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPdcchOrderInfo -( -TfuPdcchOrderInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPdcchOrderInfo(param, mBuf) -TfuPdcchOrderInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->preambleIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->prachMaskIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1aAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1AInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1aAllocInfo -( -TfuDciFormat1aAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1aAllocInfo(param, mBuf) -TfuDciFormat1aAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->nGap2, mBuf); - CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1aAllocInfo -* -* -* Desc : This structure contains only the allocation information, thats part - * of DCI format 1A. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink Data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat1AInfo -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1aAllocInfo -( -TfuDciFormat1aAllocInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1aAllocInfo(param, mBuf) -TfuDciFormat1aAllocInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->nGap2, mBuf); - CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfudciformat1aPdsch -* -* -* Desc : This structure contains the information carried in DCI format 1A - * when it is NOT used for a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfudciformat1aPdsch -( -Tfudciformat1aPdsch *param, -Buffer *mBuf -) -#else -S16 cmPkTfudciformat1aPdsch(param, mBuf) -Tfudciformat1aPdsch *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKPK(cmPkTknUInt8, ¶m->dai, mBuf); - -#endif - CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfudciformat1aPdsch -* -* -* Desc : This structure contains the information carried in DCI format 1A - * when it is NOT used for a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfudciformat1aPdsch -( -Tfudciformat1aPdsch *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfudciformat1aPdsch(param, mBuf) -Tfudciformat1aPdsch *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(cmUnpkTknUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - return ROK; -} - -#ifdef EMTC_ENABLE - - -/*********************************************************** -* -* Func : cmUnpkTfudciformat61aPdsch -* -* -* Desc : This structure contains the information carried in DCI format 6-1A - * when it is NOT used for a PDCCH order. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfudciformat61aPdsch -( -Tfudciformat61aPdsch *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfudciformat61aPdsch(param, mBuf) -Tfudciformat61aPdsch *param; -Buffer *mBuf; -#endif -{ - - - printf("1. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf); - printf("2. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - printf("3. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->rep, mBuf); - printf("4. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - printf("5. cmUnpkTfudciformat61aPdsch :: Entry \n"); -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - printf("6. cmUnpkTfudciformat61aPdsch :: Entry \n"); -#endif - CMCHKUNPK(oduPackUInt8, ¶m->antPortAndScrId, mBuf); - printf("7. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->isSrs, mBuf); - printf("8. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf); - printf("9. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->pmiCfm, mBuf); - printf("10. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->harqAckOffst, mBuf); - printf("11. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->dciRep, mBuf); - printf("12. cmUnpkTfudciformat61aPdsch :: Entry \n"); - CMCHKUNPK(oduPackUInt8, ¶m->isTBMsg4, mBuf); - printf("1. cmUnpkTfudciformat61aPdsch :: Passed \n"); - return ROK; -} -/*********************************************************** - * - * Func : cmUnpkTfuDirectIndication - * - * - * Desc : This structure contains the information that is carried in DCI - * format 6-2 in the case of a Direct information indication. - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -static S16 cmUnpkTfuDirectIndication -( - TfuDirectIndication *param, - Buffer *mBuf - ) -#else -static S16 cmUnpkTfuDirectIndication(param, mBuf) - TfuDirectIndication *param; - Buffer *mBuf; -#endif -{ - - CMCHKUNPK(oduPackUInt8, ¶m->directInd, mBuf); - - - - return ROK; -} -/*********************************************************** - * - * Func : cmUnpkTfuDciFormat62AllocInfo - * - * - * Desc : This structure contains only the allocation information, that is part - * of DCI format 6-2. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat62Info - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat62AllocInfo -( - TfuDciFormat62AllocInfo *param, - Buffer *mBuf - ) -#else -S16 cmUnpkTfuDciFormat62AllocInfo(param, mBuf) - TfuDciFormat62AllocInfo *param; - Buffer *mBuf; -#endif -{ - CMCHKUNPK(oduPackUInt8, ¶m->riv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - - return ROK; -} - -/*********************************************************** - * - * Func : cmUnpkTfudciformat62Pdsch - * - * - * Desc : This structure contains the information carried in DCI format 6-2 - * when It is used for Paging message. - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -static S16 cmUnpkTfudciformat62Pdsch -( - Tfudciformat62Pdsch *param, - Buffer *mBuf - ) -#else -static S16 cmUnpkTfudciformat62Pdsch(param, mBuf) - Tfudciformat62Pdsch *param; - Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->repNum, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dciSubRepNum, mBuf); - return ROK; -} - - -/*********************************************************** - * - * Func : cmUnpkTfuDciFormat62Info - * - * - * Desc : This structure contains the information needed to convey DCI format 6-2. - * @details Format can possibly carry PDSCH allocation or information needed for - * a Direct information Indication. - * - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat62Info -( - TfuDciFormat62Info *param, - Buffer *mBuf - ) -#else -S16 cmUnpkTfuDciFormat62Info(param, mBuf) - TfuDciFormat62Info *param; - Buffer *mBuf; -#endif -{ - - CMCHKUNPK(oduPackUInt8, ¶m->isPaging, mBuf); - switch(param->isPaging) { - case FALSE: - CMCHKUNPK(cmUnpkTfuDirectIndication, ¶m->t.directIndication, mBuf); - break; - case TRUE: - CMCHKUNPK(cmUnpkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf); - break; - default : - return RFAILED; - } - - - return ROK; -} - - - - - - - - - - - - -/*********************************************************** - * - * Func : cmPkTfuDirectIndication - * - * - * Desc : This structure contains the information that is carried in DCI - * format 6-2 in the case of a Direct information indication. - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -static S16 cmPkTfuDirectIndication -( - TfuDirectIndication *param, - Buffer *mBuf - ) -#else -static S16 cmPkTfuDirectIndication(param, mBuf) - TfuDirectIndication *param; - Buffer *mBuf; -#endif -{ - - CMCHKPK(oduUnpackUInt8, param->directInd, mBuf); - - - return ROK; -} - - - -/*********************************************************** - * - * Func : cmPkTfuDciFormat62AllocInfo - * - * - * Desc : This structure contains only the allocation information, that is part - * of DCI format 6-2. - * @details Allocation information also contains parameters necessary - * for Physical layer to process Downlink data. This structure accompanies the - * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive. - * @sa TfuDciFormat62Info - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat62AllocInfo -( - TfuDciFormat62AllocInfo *param, - Buffer *mBuf - ) -#else -S16 cmPkTfuDciFormat62AllocInfo(param, mBuf) - TfuDciFormat62AllocInfo *param; - Buffer *mBuf; -#endif -{ - - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->riv, mBuf); - - return ROK; -} - - - -/*********************************************************** - * - * Func : cmPkTfudciformat62Pdsch - * - * - * Desc : This structure contains the information carried in DCI format 6-2 - * when It is used for Paging message. - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -static S16 cmPkTfudciformat62Pdsch -( - Tfudciformat62Pdsch *param, - Buffer *mBuf - ) -#else -static S16 cmPkTfudciformat62Pdsch(param, mBuf) - Tfudciformat62Pdsch *param; - Buffer *mBuf; -#endif -{ - - CMCHKPK(oduUnpackUInt8, param->dciSubRepNum, mBuf); - CMCHKPK(oduUnpackUInt8, param->repNum, mBuf); - CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf); - return ROK; -} - - - - -/*********************************************************** - * - * Func : cmPkTfuDciFormat62Info - * - * - * Desc : This structure contains the information needed to convey DCI format 6-2. - * @details Format can possibly carry PDSCH allocation or information needed for - * a Direct information Indication. - * - * - * - * Ret : S16 - * - * Notes: - * - * File : - * - **********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat62Info -( - TfuDciFormat62Info *param, - Buffer *mBuf - ) -#else -S16 cmPkTfuDciFormat62Info(param, mBuf) - TfuDciFormat62Info *param; - Buffer *mBuf; -#endif -{ - - switch(param->isPaging) { - case TRUE: - CMCHKPK(cmPkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf); - break; - case FALSE: - CMCHKPK(cmPkTfuDirectIndication, ¶m->t.directIndication, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt8, param->isPaging, mBuf); - - return ROK; -} - - - - - - -#endif - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1aInfo -* -* -* Desc : This structure contains the information needed to convey DCI format 1A. - * @details Format can possibly carry PDSCH allocation or information needed for - * a PDCCH order, used to initiate a RACH procedure in cases where UE looses - * sync with eNodeB. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1aInfo -( -TfuDciFormat1aInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1aInfo(param, mBuf) -TfuDciFormat1aInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->isPdcchOrder) { - case FALSE: - CMCHKPK(cmPkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf); - break; - case TRUE: - CMCHKPK(cmPkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt8, param->isPdcchOrder, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1aInfo -* -* -* Desc : This structure contains the information needed to convey DCI format 1A. - * @details Format can possibly carry PDSCH allocation or information needed for - * a PDCCH order, used to initiate a RACH procedure in cases where UE looses - * sync with eNodeB. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1aInfo -( -TfuDciFormat1aInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1aInfo(param, mBuf) -TfuDciFormat1aInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isPdcchOrder, mBuf); - switch(param->isPdcchOrder) { - case TRUE: - CMCHKUNPK(cmUnpkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf); - break; - case FALSE: - CMCHKUNPK(cmUnpkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormat1bInfo -* -* -* Desc : This structure contains the information needed to convey DCI format 1A. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormat1bInfo -( -TfuDciFormat1bInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormat1bInfo(param, mBuf) -TfuDciFormat1bInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf); - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->dai, mBuf); - -#endif - CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormat1bInfo -* -* -* Desc : This structure contains the information needed to convey DCI format 1A. - * @details Allocation information is separated from the other control - * information carried in this format. This separation is needed as Data shall - * also carry some control information, essentially allocation information, - * along with it, in order to aid physical layer processing of the data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormat1bInfo -( -TfuDciFormat1bInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormat1bInfo(param, mBuf) -TfuDciFormat1bInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf); - -#endif - CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciInfo -* -* -* Desc : This structure contains the information needed to convey the possible DCI - * formats. The following are the supported formats - - * -# Format 0 - used for PUSCH scheduling - * -# Format 1 - used for PDSCH scheduling - * -# Format 1A - used for compact scheduling of PDSCH or RA procedure - * intitiated by a PDCCH order. - * -# Format 1B - used for compact scheduling of PDSCH with precoding - * information. - * -# Format 1C - used for very compact scheduling of PDSCH. - * -# Format 1D - used for compact scheduling for PDSCH with precoding - * information with power offset. - * -# Format 2 - used for PDSCH Scheduling - * -# Format 2A - used for PDSCH Scheduling - * -# Format 3 - used for power control - * -# Format 3A - used for power control -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciInfo -( -TfuDciInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciInfo(param, mBuf) -TfuDciInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->dciFormat) { -#ifdef TFU_5GTF - case TFU_DCI_FORMAT_B1: - CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf); - break; - case TFU_DCI_FORMAT_B2: - CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf); - break; - case TFU_DCI_FORMAT_A1: - CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf); - break; - case TFU_DCI_FORMAT_A2: - CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf); - break; -#endif -#ifdef EMTC_ENABLE - case TFU_DCI_FORMAT_6_2: - CMCHKPK(cmPkTfuDciFormat62Info, ¶m->u.format62Info, mBuf); - break; - case TFU_DCI_FORMAT_6_1A: - CMCHKPK(cmPkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf); - break; - case TFU_DCI_FORMAT_6_0A: - CMCHKPK(cmPkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf); - break; -#endif - case TFU_DCI_FORMAT_3A: - CMCHKPK(cmPkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf); - break; - case TFU_DCI_FORMAT_3: - CMCHKPK(cmPkTfuDciFormat3Info, ¶m->u.format3Info, mBuf); - break; - case TFU_DCI_FORMAT_2A: - CMCHKPK(cmPkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf); - break; - case TFU_DCI_FORMAT_2: - CMCHKPK(cmPkTfuDciFormat2Info, ¶m->u.format2Info, mBuf); - break; - case TFU_DCI_FORMAT_1D: - CMCHKPK(cmPkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf); - break; - case TFU_DCI_FORMAT_1C: - CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf); - break; - case TFU_DCI_FORMAT_1B: - CMCHKPK(cmPkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf); - break; - case TFU_DCI_FORMAT_1A: - CMCHKPK(cmPkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf); - break; - case TFU_DCI_FORMAT_1: - CMCHKPK(cmPkTfuDciFormat1Info, ¶m->u.format1Info, mBuf); - break; - case TFU_DCI_FORMAT_0: - CMCHKPK(cmPkTfuDciFormat0Info, ¶m->u.format0Info, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->dciFormat, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciInfo -* -* -* Desc : This structure contains the information needed to convey the possible DCI - * formats. The following are the supported formats - - * -# Format 0 - used for PUSCH scheduling - * -# Format 1 - used for PDSCH scheduling - * -# Format 1A - used for compact scheduling of PDSCH or RA procedure - * intitiated by a PDCCH order. - * -# Format 1B - used for compact scheduling of PDSCH with precoding - * information. - * -# Format 1C - used for very compact scheduling of PDSCH. - * -# Format 1D - used for compact scheduling for PDSCH with precoding - * information with power offset. - * -# Format 2 - used for PDSCH Scheduling - * -# Format 2A - used for PDSCH Scheduling - * -# Format 3 - used for power control - * -# Format 3A - used for power control -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciInfo -( -TfuDciInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciInfo(param, mBuf) -TfuDciInfo *param; -Buffer *mBuf; -#endif -{ - - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->dciFormat, mBuf); - switch(param->dciFormat) { - case TFU_DCI_FORMAT_0: - CMCHKUNPK(cmUnpkTfuDciFormat0Info, ¶m->u.format0Info, mBuf); - break; - case TFU_DCI_FORMAT_1: - CMCHKUNPK(cmUnpkTfuDciFormat1Info, ¶m->u.format1Info, mBuf); - break; - case TFU_DCI_FORMAT_1A: - CMCHKUNPK(cmUnpkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf); - break; - case TFU_DCI_FORMAT_1B: - CMCHKUNPK(cmUnpkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf); - break; - case TFU_DCI_FORMAT_1C: - CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf); - break; - case TFU_DCI_FORMAT_1D: - CMCHKUNPK(cmUnpkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf); - break; - case TFU_DCI_FORMAT_2: - CMCHKUNPK(cmUnpkTfuDciFormat2Info, ¶m->u.format2Info, mBuf); - break; - case TFU_DCI_FORMAT_2A: - CMCHKUNPK(cmUnpkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf); - break; - case TFU_DCI_FORMAT_3: - CMCHKUNPK(cmUnpkTfuDciFormat3Info, ¶m->u.format3Info, mBuf); - break; - case TFU_DCI_FORMAT_3A: - CMCHKUNPK(cmUnpkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf); - break; -#ifdef EMTC_ENABLE - case TFU_DCI_FORMAT_6_0A: - CMCHKUNPK(cmUnpkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf); - printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat); - break; - case TFU_DCI_FORMAT_6_1A: - CMCHKUNPK(cmUnpkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf); - printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat); - break; - case TFU_DCI_FORMAT_6_2: - CMCHKUNPK(cmUnpkTfuDciFormat62Info, ¶m->u.format62Info, mBuf); - break; - -#endif -#ifdef TFU_5GTF - case TFU_DCI_FORMAT_A1: - CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf); - break; - case TFU_DCI_FORMAT_A2: - CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf); - break; - case TFU_DCI_FORMAT_B1: - CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf); - break; - case TFU_DCI_FORMAT_B2: - CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf); - break; -#endif - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSubbandInfo -* -* -* Desc : This structure contains the information needed to convey the start and size - * of the subband in the CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSubbandInfo -( -TfuSubbandInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandInfo(param, mBuf) -TfuSubbandInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->numRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSubbandInfo -* -* -* Desc : This structure contains the information needed to convey the start and size - * of the subband in the CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSubbandInfo -( -TfuSubbandInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandInfo(param, mBuf) -TfuSubbandInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf); - return ROK; -} - - - - -/*********************************************************** -* -* Func : cmPkTfuSubbandCqiInfo -* -* -* Desc : This structure is used to convey the subbannd CQI reported. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSubbandCqiInfo -( -TfuSubbandCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandCqiInfo(param, mBuf) -TfuSubbandCqiInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf); - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSubbandCqiInfo -* -* -* Desc : This structure is used to convey the subbannd CQI reported. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSubbandCqiInfo -( -TfuSubbandCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandCqiInfo(param, mBuf) -TfuSubbandCqiInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPdcchCceInfo -* -* -* Desc : This structure conveys the CCE information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPdcchCceInfo -( -TfuPdcchCceInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPdcchCceInfo(param, mBuf) -TfuPdcchCceInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf); - CMCHKPK(oduUnpackUInt8, param->cceIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPdcchCceInfo -* -* -* Desc : This structure conveys the CCE information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPdcchCceInfo -( -TfuPdcchCceInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPdcchCceInfo(param, mBuf) -TfuPdcchCceInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cceIdx, mBuf); - CMCHKUNPK(cmUnpkLteAggrLvl,(uint32_t *)¶m->aggrLvl, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPucchMode10 -* -* -* Desc : This structure maps to the CQI mode 10. The report could either - * convey a Rank index or a wideband CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPucchMode10 -( -TfuCqiPucchMode10 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPucchMode10(param, mBuf) -TfuCqiPucchMode10 *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RPT_CQI: - CMCHKPK(oduUnpackUInt8, param->u.cqi, mBuf); - break; - case TFU_RPT_RI: - CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPucchMode10 -* -* -* Desc : This structure maps to the CQI mode 10. The report could either - * convey a Rank index or a wideband CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPucchMode10 -( -TfuCqiPucchMode10 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPucchMode10(param, mBuf) -TfuCqiPucchMode10 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RPT_RI: - CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf); - break; - case TFU_RPT_CQI: - CMCHKUNPK(oduPackUInt8, ¶m->u.cqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode11Cqi -* -* -* Desc : This structure contains a wideband CQI, PMI and optionally a - * wideband differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode11Cqi -( -TfuCqiMode11Cqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode11Cqi(param, mBuf) -TfuCqiMode11Cqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTknUInt8, ¶m->wideDiffCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->pmi, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode11Cqi -* -* -* Desc : This structure contains a wideband CQI, PMI and optionally a - * wideband differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode11Cqi -( -TfuCqiMode11Cqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode11Cqi(param, mBuf) -TfuCqiMode11Cqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->wideDiffCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPucchMode11 -* -* -* Desc : This structure maps to the CQI mode 11. The report could either - * convey a Rank index or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPucchMode11 -( -TfuCqiPucchMode11 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPucchMode11(param, mBuf) -TfuCqiPucchMode11 *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RPT_CQI: - CMCHKPK(cmPkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf); - break; - case TFU_RPT_RI: - CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPucchMode11 -* -* -* Desc : This structure maps to the CQI mode 11. The report could either - * convey a Rank index or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPucchMode11 -( -TfuCqiPucchMode11 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPucchMode11(param, mBuf) -TfuCqiPucchMode11 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RPT_RI: - CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf); - break; - case TFU_RPT_CQI: - CMCHKUNPK(cmUnpkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode20SubCqi -* -* -* Desc : This structure contains the SubBand CQI for mode 2-0. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode20SubCqi -( -TfuCqiMode20SubCqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode20SubCqi(param, mBuf) -TfuCqiMode20SubCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->l, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode20SubCqi -* -* -* Desc : This structure contains the SubBand CQI for mode 2-0. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode20SubCqi -( -TfuCqiMode20SubCqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode20SubCqi(param, mBuf) -TfuCqiMode20SubCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->l, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode20Cqi -* -* -* Desc : This structure contains Mode20 CQI report. It could either be a - * wideband CQI or a sub-band CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode20Cqi -( -TfuCqiMode20Cqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode20Cqi(param, mBuf) -TfuCqiMode20Cqi *param; -Buffer *mBuf; -#endif -{ - - - switch(param->isWideband) { - case FALSE: - CMCHKPK(cmPkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf); - break; - case TRUE: - CMCHKPK(oduUnpackUInt8, param->u.wideCqi, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt8, param->isWideband, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode20Cqi -* -* -* Desc : This structure contains Mode20 CQI report. It could either be a - * wideband CQI or a sub-band CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode20Cqi -( -TfuCqiMode20Cqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode20Cqi(param, mBuf) -TfuCqiMode20Cqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isWideband, mBuf); - switch(param->isWideband) { - case TRUE: - CMCHKUNPK(oduPackUInt8, ¶m->u.wideCqi, mBuf); - break; - case FALSE: - CMCHKUNPK(cmUnpkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPucchMode20 -* -* -* Desc : This structure maps to CQI mode 20. The report either contains a - * Rank Index or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPucchMode20 -( -TfuCqiPucchMode20 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPucchMode20(param, mBuf) -TfuCqiPucchMode20 *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RPT_CQI: - CMCHKPK(cmPkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf); - break; - case TFU_RPT_RI: - CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPucchMode20 -* -* -* Desc : This structure maps to CQI mode 20. The report either contains a - * Rank Index or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPucchMode20 -( -TfuCqiPucchMode20 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPucchMode20(param, mBuf) -TfuCqiPucchMode20 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RPT_RI: - CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf); - break; - case TFU_RPT_CQI: - CMCHKUNPK(cmUnpkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode21SubCqi -* -* -* Desc : This structure contains the sub-band CQI report for mode 2-1. - * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode21SubCqi -( -TfuCqiMode21SubCqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode21SubCqi(param, mBuf) -TfuCqiMode21SubCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTknUInt8, ¶m->diffCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->l, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode21SubCqi -* -* -* Desc : This structure contains the sub-band CQI report for mode 2-1. - * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode21SubCqi -( -TfuCqiMode21SubCqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode21SubCqi(param, mBuf) -TfuCqiMode21SubCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->l, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->diffCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode21WideCqi -* -* -* Desc : This structure contains the wideband CQI report for mode 2-1. - * It carries a wideband CQI, PMI and optionally a differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode21WideCqi -( -TfuCqiMode21WideCqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode21WideCqi(param, mBuf) -TfuCqiMode21WideCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTknUInt8, ¶m->diffCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->pmi, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode21WideCqi -* -* -* Desc : This structure contains the wideband CQI report for mode 2-1. - * It carries a wideband CQI, PMI and optionally a differential CQI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode21WideCqi -( -TfuCqiMode21WideCqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode21WideCqi(param, mBuf) -TfuCqiMode21WideCqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->diffCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiMode21Cqi -* -* -* Desc : This structure conveys CQI report for mode 2-1. The reported value - * could either be wideband or sub-band. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiMode21Cqi -( -TfuCqiMode21Cqi *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiMode21Cqi(param, mBuf) -TfuCqiMode21Cqi *param; -Buffer *mBuf; -#endif -{ - - - switch(param->isWideband) { - case FALSE: - CMCHKPK(cmPkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf); - break; - case TRUE: - CMCHKPK(cmPkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt8, param->isWideband, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiMode21Cqi -* -* -* Desc : This structure conveys CQI report for mode 2-1. The reported value - * could either be wideband or sub-band. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiMode21Cqi -( -TfuCqiMode21Cqi *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiMode21Cqi(param, mBuf) -TfuCqiMode21Cqi *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->isWideband, mBuf); - switch(param->isWideband) { - case TRUE: - CMCHKUNPK(cmUnpkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf); - break; - case FALSE: - CMCHKUNPK(cmUnpkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPucchMode21 -* -* -* Desc : This structure maps to the CQI reporting mode 2-1. The report either - * conveys a Rank Indicator or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPucchMode21 -( -TfuCqiPucchMode21 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPucchMode21(param, mBuf) -TfuCqiPucchMode21 *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RPT_CQI: - CMCHKPK(cmPkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf); - break; - case TFU_RPT_RI: - CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPucchMode21 -* -* -* Desc : This structure maps to the CQI reporting mode 2-1. The report either - * conveys a Rank Indicator or a CQI report. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPucchMode21 -( -TfuCqiPucchMode21 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPucchMode21(param, mBuf) -TfuCqiPucchMode21 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RPT_RI: - CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf); - break; - case TFU_RPT_CQI: - CMCHKUNPK(cmUnpkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiPucch -* -* -* Desc : This structure conveys the Downlink CQI reported on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiPucch -( -TfuDlCqiPucch *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiPucch(param, mBuf) -TfuDlCqiPucch *param; -Buffer *mBuf; -#endif -{ - - - switch(param->mode) { - case TFU_PUCCH_CQI_MODE21: - CMCHKPK(cmPkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE20: - CMCHKPK(cmPkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE11: - CMCHKPK(cmPkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE10: - CMCHKPK(cmPkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->mode, mBuf); - CMCHKPK(oduUnpackUInt8, param->cellIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiPucch -* -* -* Desc : This structure conveys the Downlink CQI reported on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiPucch -( -TfuDlCqiPucch *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiPucch(param, mBuf) -TfuDlCqiPucch *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cellIdx, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->mode, mBuf); - switch(param->mode) { - case TFU_PUCCH_CQI_MODE10: - CMCHKUNPK(cmUnpkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE11: - CMCHKUNPK(cmUnpkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE20: - CMCHKUNPK(cmUnpkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf); - break; - case TFU_PUCCH_CQI_MODE21: - CMCHKUNPK(cmUnpkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSubbandMode12 -* -* -* Desc : This structure carries subband information and PMI, in the CQI - * reporting format 1-2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSubbandMode12 -( -TfuSubbandMode12 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandMode12(param, mBuf) -TfuSubbandMode12 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf); - CMCHKPK(oduUnpackUInt8, param->pmi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSubbandMode12 -* -* -* Desc : This structure carries subband information and PMI, in the CQI - * reporting format 1-2. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSubbandMode12 -( -TfuSubbandMode12 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandMode12(param, mBuf) -TfuSubbandMode12 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf); - CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPuschMode12 -* -* -* Desc : This structure conveys information present in CQI reporting mode 1-2 received - * over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPuschMode12 -( -TfuCqiPuschMode12 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPuschMode12(param, mBuf) -TfuCqiPuschMode12 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) { - CMCHKPK(cmPkTfuSubbandMode12, ¶m->subbandArr[i], mBuf); - } - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->cqiIdx[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPuschMode12 -* -* -* Desc : This structure conveys information present in CQI reporting mode 1-2 received - * over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPuschMode12 -( -TfuCqiPuschMode12 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPuschMode12(param, mBuf) -TfuCqiPuschMode12 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - for (i=0; icqiIdx[i], mBuf); - } - for (i=0; isubbandArr[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPuschMode20 -* -* -* Desc : This structure conveys information present in CQI reporting mode 2-0 received - * over PUSCH. This mode is for UE selected sub-band feedback. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPuschMode20 -( -TfuCqiPuschMode20 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPuschMode20(param, mBuf) -TfuCqiPuschMode20 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) { - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - CMCHKPK(oduUnpackUInt8, param->wideBandCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPuschMode20 -* -* -* Desc : This structure conveys information present in CQI reporting mode 2-0 received - * over PUSCH. This mode is for UE selected sub-band feedback. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPuschMode20 -( -TfuCqiPuschMode20 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPuschMode20(param, mBuf) -TfuCqiPuschMode20 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - for (i=0; isubbandArr[i], mBuf); - } - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuCqiPuschMode22 -* -* -* Desc : This structure conveys information present in CQI reporting mode 2-2 received - * over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPuschMode22 -( -TfuCqiPuschMode22 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPuschMode22(param, mBuf) -TfuCqiPuschMode22 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - - for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) { - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - CMCHKPK(oduUnpackUInt8, param->wideBandPmi, mBuf); - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->wideBandCqi[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->pmi, mBuf); - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->cqi[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPuschMode22 -* -* -* Desc : This structure conveys information present in CQI reporting mode 2-2 received - * over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPuschMode22 -( -TfuCqiPuschMode22 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPuschMode22(param, mBuf) -TfuCqiPuschMode22 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=0; icqi[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf); - for (i=0; iwideBandCqi[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->wideBandPmi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - - for (i=0; isubbandArr[i], mBuf); - } - - return ROK; -} - - -#ifdef ANSI -S16 cmPkTfuSubbandMode30 -( -TfuSubbandMode30 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandMode30(param, mBuf) -TfuSubbandMode30 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqi, mBuf); - return ROK; -} - - -#ifdef ANSI -S16 cmUnpkTfuSubbandMode30 -( -TfuSubbandMode30 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandMode30(param, mBuf) -TfuSubbandMode30 *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf); - CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPuschMode30 -* -* -* Desc : This structure conveys information present in CQI reporting mode 3-0 - * received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPuschMode30 -( -TfuCqiPuschMode30 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPuschMode30(param, mBuf) -TfuCqiPuschMode30 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) { - CMCHKPK(cmPkTfuSubbandMode30, ¶m->subbandArr[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - CMCHKPK(oduUnpackUInt8, param->wideBandCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPuschMode30 -* -* -* Desc : This structure conveys information present in CQI reporting mode 3-0 - * received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPuschMode30 -( -TfuCqiPuschMode30 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPuschMode30(param, mBuf) -TfuCqiPuschMode30 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - for (i=0; isubbandArr[i], mBuf); - } - return ROK; -} - - -#ifdef ANSI -S16 cmPkTfuSubbandMode31 -( -TfuSubbandMode31 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandMode31(param, mBuf) -TfuSubbandMode31 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf); - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->cqi[i], mBuf); - } - return ROK; -} - - -#ifdef ANSI -S16 cmUnpkTfuSubbandMode31 -( -TfuSubbandMode31 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandMode31(param, mBuf) -TfuSubbandMode31 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=0; icqi[i], mBuf); - } - CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCqiPuschMode31 -* -* -* Desc : This structure conveys information present in CQI reporting mode 3-1 - * received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCqiPuschMode31 -( -TfuCqiPuschMode31 *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCqiPuschMode31(param, mBuf) -TfuCqiPuschMode31 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=param->numSubband-1; i >= 0; i--) { - CMCHKPK(cmPkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf); - } - - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->wideBandCqi[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->pmi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCqiPuschMode31 -* -* -* Desc : This structure conveys information present in CQI reporting mode 3-1 - * received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCqiPuschMode31 -( -TfuCqiPuschMode31 *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCqiPuschMode31(param, mBuf) -TfuCqiPuschMode31 *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf); - for (i=0; iwideBandCqi[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - for (i=0; inumSubband; i++) { - CMCHKUNPK(cmUnpkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf); - } - - -/* tfu_c_001.main_4 - Changes for MIMO feature addition */ -/* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */ - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiPusch -* -* -* Desc : This structure conveys Downlink CQI information (mode and corresponding - * CQI) received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiPusch -( -TfuDlCqiPusch *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiPusch(param, mBuf) -TfuDlCqiPusch *param; -Buffer *mBuf; -#endif -{ - - - switch(param->mode) { - case TFU_PUSCH_CQI_MODE_31: - CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_30: - CMCHKPK(cmPkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_22: - CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_20: - CMCHKPK(cmPkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_12: - CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf); - break; - default : - return RFAILED; - } - - CMCHKPK(cmPkTknUInt8, ¶m->ri, mBuf); - CMCHKPK(oduUnpackUInt32, param->mode, mBuf); - - CMCHKPK(oduUnpackUInt8, param->cellIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiPusch -* -* -* Desc : This structure conveys Downlink CQI information (mode and corresponding - * CQI) received over PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiPusch -( -TfuDlCqiPusch *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiPusch(param, mBuf) -TfuDlCqiPusch *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->cellIdx, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->mode, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->ri, mBuf); - switch(param->mode) { - case TFU_PUSCH_CQI_MODE_12: - CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_20: - CMCHKUNPK(cmUnpkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_22: - CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_30: - CMCHKUNPK(cmUnpkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_31: - CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiInfo -* -* -* Desc : This structure contains CQI information received over PUCCH or PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiInfo -( -uint8_t selector, -TfuDlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiInfo(selector, param, mBuf) -uint8_t selector; -TfuDlCqiInfo *param; -Buffer *mBuf; -#endif -{ - uint32_t idx; - - - switch(selector) { - case FALSE: - for (idx = 0; idx < param->pusch.numOfCells; idx++) - { - CMCHKPK(cmPkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->pusch.numOfCells, mBuf); - break; - case TRUE: - CMCHKPK(cmPkTfuDlCqiPucch, ¶m->pucchCqi, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiInfo -* -* -* Desc : This structure contains CQI information received over PUCCH or PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiInfo -( -uint8_t selector, -TfuDlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiInfo(selector, param, mBuf) -uint8_t selector; -TfuDlCqiInfo *param; -Buffer *mBuf; -#endif -{ - - uint8_t idx; - - switch(selector) { - case TRUE: - CMCHKUNPK(cmUnpkTfuDlCqiPucch, ¶m->pucchCqi, mBuf); - break; - case FALSE: - CMCHKUNPK(oduPackUInt8, ¶m->pusch.numOfCells, mBuf); - for (idx = param->pusch.numOfCells; idx > 0; idx--) - { - CMCHKUNPK(cmUnpkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx-1], mBuf); - } - break; - default : - return RFAILED; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuRecpReqInfo -* -* -* Desc : This structure is sent from Scheduler to PHY. This includes params - * needed by PHY to decode the following - * 1. DATA on PUSCH - * 2. HARQ Feedback on PUCCH - * 3. CQI Report - * 4. RI Report - * 5. SR Indications. - * This structure carries the reception information for all the scheduled UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRecpReqInfo -( -TfuRecpReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRecpReqInfo(param, mBuf) -TfuRecpReqInfo *param; -Buffer *mBuf; -#endif -{ - CmLList *node; - uint32_t count; - TfuUeRecpReqInfo *tfuUeRecpReqInfo; - - - /*ccpu00116923 - ADD - SRS present support*/ - /*tfu_c_001.main_7 - ADD - SRS present field inclusion */ -#ifdef TFU_UPGRADE - CMCHKPK(oduUnpackUInt8, param->srsPres, mBuf); -#endif - count = param->ueRecpReqLst.count; - node = param->ueRecpReqLst.last; - while (node) { - tfuUeRecpReqInfo = (TfuUeRecpReqInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf); - cmLListDelFrm(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk); - tfuUeRecpReqInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRecpReqInfo -* -* -* Desc : This structure is sent from Scheduler to PHY. This includes params - * needed by PHY to decode the following - * 1. DATA on PUSCH - * 2. HARQ Feedback on PUCCH - * 3. CQI Report - * 4. RI Report - * 5. SR Indications. - * This structure carries the reception information for all the scheduled UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRecpReqInfo -( -TfuRecpReqInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRecpReqInfo(param, memCp, mBuf) -TfuRecpReqInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuUeRecpReqInfo *tfuUeRecpReqInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->ueRecpReqLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntueRecpReqLst, &tfuUeRecpReqInfo->lnk); - tfuUeRecpReqInfo->lnk.node = (PTR)tfuUeRecpReqInfo; - } - /*ccpu00116923 - ADD - SRS present support*/ - /*tfu_c_001.main_7 - ADD - SRS present field inclusion */ -#ifdef TFU_UPGRADE - CMCHKUNPK(oduPackUInt8, ¶m->srsPres, mBuf); -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPdcchInfo -* -* -* Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI - * formats. This information is associated with an RNTI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPdcchInfo -( -TfuPdcchInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPdcchInfo(param, mBuf) -TfuPdcchInfo *param; -Buffer *mBuf; -#endif -{ - -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt8, param->grpId, mBuf); - CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf); -#endif /* TFU_5GTF */ - CMCHKPK(cmPkTfuDciInfo, ¶m->dci, mBuf); - CMCHKPK(oduUnpackUInt8, param->dciNumOfBits, mBuf); - CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf); - CMCHKPK(oduUnpackUInt16, param->nCce, mBuf); -#ifdef LTEMAC_SPS - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - CMCHKPK(oduUnpackUInt8, param->isSpsRnti, mBuf); -#endif - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPdcchInfo -* -* -* Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI - * formats. This information is associated with an RNTI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPdcchInfo -( -TfuPdcchInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPdcchInfo(param, mBuf) -TfuPdcchInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); -#ifdef LTEMAC_SPS - CMCHKUNPK(oduPackUInt8, ¶m->isSpsRnti, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); -#endif - CMCHKUNPK(oduPackUInt16, ¶m->nCce, mBuf); - CMCHKUNPK(cmUnpkLteAggrLvl, (uint32_t*)¶m->aggrLvl, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dciNumOfBits, mBuf); - CMCHKUNPK(cmUnpkTfuDciInfo, ¶m->dci, mBuf); -#ifdef TFU_5GTF - CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->grpId, mBuf); -#endif /* TFU_5GTF */ - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPhichInfo -* -* -* Desc : This structure contains one PHICH information. In order to locate the - * resources to be used for PHICH the following information is provided along - * with the feedback - - * -# rbStart - * -# nDmrs -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPhichInfo -( -TfuPhichInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPhichInfo(param, mBuf) -TfuPhichInfo *param; -Buffer *mBuf; -#endif -{ - -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - CMCHKPK(oduUnpackUInt16, param->txPower, mBuf); -#endif -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->iPhich, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->isAck, mBuf); - CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPhichInfo -* -* -* Desc : This structure contains one PHICH information. In order to locate the - * resources to be used for PHICH the following information is provided along - * with the feedback - - * -# rbStart - * -# nDmrs -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPhichInfo -( -TfuPhichInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPhichInfo(param, mBuf) -TfuPhichInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isAck, mBuf); -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->iPhich, mBuf); -#endif -#ifdef TFU_UPGRADE - CMCHKUNPK(oduPackUInt16, ¶m->txPower, mBuf); -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCntrlReqInfo -* -* -* Desc : This structure is sent from Scheduler to PHY. This includes all the - * control information to be sent to the UE. - * -# PDCCH Physical Downlink Control Channel - * -# PHICH Physical HARQ Indicator Channel - * -# PCFICH Physical Control Format Indicator Channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCntrlReqInfo -( -TfuCntrlReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCntrlReqInfo(param, mBuf) -TfuCntrlReqInfo *param; -Buffer *mBuf; -#endif -{ - - TfuPdcchInfo *tfuPdcchInfo; - TfuPhichInfo *tfuPhichInfo; - CmLList *node; - uint32_t count; - -#ifdef EMTC_ENABLE - count = param->dlMpdcchLst.count; - node = param->dlMpdcchLst.last; - while (node) { - tfuPdcchInfo = (TfuPdcchInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf); - cmLListDelFrm(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - count = param->ulMpdcchLst.count; - node = param->ulMpdcchLst.last; - while (node) { - tfuPdcchInfo = (TfuPdcchInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf); - cmLListDelFrm(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); -#endif -#ifdef LTEMAC_SPS /* SPS_NEW_CHGS */ - CMCHKPK(oduPackBool, param->isSPSOcc, mBuf); -#endif - count = param->phichLst.count; - node = param->phichLst.last; - while (node) { - tfuPhichInfo = (TfuPhichInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuPhichInfo, tfuPhichInfo, mBuf); - cmLListDelFrm(¶m->phichLst, &tfuPhichInfo->lnk); - tfuPhichInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - count = param->dlPdcchLst.count; - node = param->dlPdcchLst.last; - while (node) { - tfuPdcchInfo = (TfuPdcchInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf); - cmLListDelFrm(¶m->dlPdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - count = param->ulPdcchLst.count; - node = param->ulPdcchLst.last; - while (node) { - tfuPdcchInfo = (TfuPdcchInfo *)node->node; - node=node->prev; -#ifdef UL_ADPT_DBG - printf("ulPdcchLst count %d time[ %d %d] \n",count,param->ulTiming.sfn,param->ulTiming.subframe); -#endif - CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf); - cmLListDelFrm(¶m->ulPdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(oduUnpackUInt8, param->cfi, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->dlTiming, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->ulTiming, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCntrlReqInfo -* -* -* Desc : This structure is sent from Scheduler to PHY. This includes all the - * control information to be sent to the UE. - * -# PDCCH Physical Downlink Control Channel - * -# PHICH Physical HARQ Indicator Channel - * -# PCFICH Physical Control Format Indicator Channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCntrlReqInfo -( -TfuCntrlReqInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCntrlReqInfo(param, memCp, mBuf) -TfuCntrlReqInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - TfuPdcchInfo *tfuPdcchInfo; - uint32_t count, loopCnt; - TfuPhichInfo *tfuPhichInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->ulTiming, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->dlTiming, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cfi, mBuf); - cmLListInit(¶m->ulPdcchLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntulPdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo; - } - cmLListInit(¶m->dlPdcchLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntdlPdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo; - } - cmLListInit(¶m->phichLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntphichLst, &tfuPhichInfo->lnk); - tfuPhichInfo->lnk.node = (PTR)tfuPhichInfo; - } - -#ifdef LTEMAC_SPS /* SPS_NEW_CHGS */ - CMCHKUNPK(oduUnpackBool, ¶m->isSPSOcc, mBuf); -#endif -#ifdef EMTC_ENABLE - cmLListInit(¶m->ulMpdcchLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntulMpdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo; - } - cmLListInit(¶m->dlMpdcchLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - printf("4. cmUnpkTfuCntrlReqInfo :: count %ld \n", count); - for (loopCnt=0; loopCntdlMpdcchLst, &tfuPdcchInfo->lnk); - tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo; - printf("5. cmUnpkTfuCntrlReqInfo :: Failed \n"); - } -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPdschDciInfo -* -* -* Desc : This structure Carries the control information that would be needed - * by the Physical layer to process the data to be sent on PDSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPdschDciInfo -( -TfuPdschDciInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPdschDciInfo(param, mBuf) -TfuPdschDciInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->format) { -#ifdef TFU_5GTF - case TFU_DCI_FORMAT_B1: - /* - if (param->u.formatB1Info.RBAssign <= 324) - { - printf("DCI Format: [B1] RBAssign: [%d] MCS: [%d]", - param->u.formatB1Info.RBAssign, - param->u.formatB1Info.u.rbAssignB1Val324.mcs); - } - */ - CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf); - break; - case TFU_DCI_FORMAT_B2: - /* - if (param->u.formatB2Info.RBAssign <= 324) - { - printf("DCI Format: [B2] RBAssign: [%d] MCS: [%d]", - param->u.formatB2Info.RBAssign, - param->u.formatB2Info.u.rbAssignB1Val324.mcs); - } - */ - CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf); - break; - case TFU_DCI_FORMAT_A1: - CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf); - break; - case TFU_DCI_FORMAT_A2: - CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf); - break; -#endif -#ifdef EMTC_ENABLE - case TFU_DCI_FORMAT_6_2: - CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_6_1A: - CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf); - break; -#endif - case TFU_DCI_FORMAT_2A: - CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_2: - CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1D: - CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1C: - CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1B: - CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1A: - CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1: - CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->format, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPdschDciInfo -* -* -* Desc : This structure Carries the control information that would be needed - * by the Physical layer to process the data to be sent on PDSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPdschDciInfo -( -TfuPdschDciInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPdschDciInfo(param, mBuf) -TfuPdschDciInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->format, mBuf); - switch(param->format) { - case TFU_DCI_FORMAT_1: - CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1A: - CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1B: - CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1C: - CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_1D: - CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_2: - CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_2A: - CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf); - break; -#ifdef EMTC_ENABLE - case TFU_DCI_FORMAT_6_1A: - CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf); - break; - case TFU_DCI_FORMAT_6_2: - CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf); - break; -#endif -#ifdef TFU_5GTF - case TFU_DCI_FORMAT_A1: - CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf); - break; - case TFU_DCI_FORMAT_A2: - CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf); - break; - case TFU_DCI_FORMAT_B1: - CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf); - break; - case TFU_DCI_FORMAT_B2: - CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf); - break; -#endif - default : - return RFAILED; - } - return ROK; -} -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -/*********************************************************** -* -* Func : cmPkTfuBfVectorInfo -* -* -* Desc : This structure conveys the BeamForming Vector -* Information that hold relevance to Tx Mode 7 -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuBfVectorInfo -( -TfuBfVectorInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuBfVectorInfo(param, mBuf) -TfuBfVectorInfo *param; -Buffer *mBuf; -#endif -{ - S32 idx, idx2; - for(idx=TFU_MAX_DL_SUBBAND-1;idx>=0; idx--) - { - for (idx2=param->numPhyAnt -1; idx2 >= 0; idx2--) { - CMCHKPK(oduUnpackUInt16, param->bfValue[idx2], mBuf);} - CMCHKPK(oduUnpackUInt8, param->numPhyAnt, mBuf); - CMCHKPK(oduUnpackUInt8, param->sbIndex, mBuf); - } - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkTfuBfVectorInfo -* -* -* Desc : This structure conveys the BeamForming Vector -* Information that hold relevance to Tx Mode 7 -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuBfVectorInfo -( - TfuBfVectorInfo *param, - Buffer *mBuf -) -#else -S16 cmUnpkTfuBfVectorInfo(param, mBuf) - TfuBfVectorInfo *param; - Buffer *mBuf; -#endif -{ - S32 idx, idx2; - for(idx=0;idxsbIndex, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numPhyAnt, mBuf); - for (idx2=0; idx2 numPhyAnt; idx2++) { - CMCHKUNPK(oduPackUInt16, ¶m->bfValue[idx2], mBuf);} - } - - return ROK; -} -#endif - -/*********************************************************** -* -* Func : cmPkTfuDatReqPduInfo -* -* -* Desc : Pack Function for Tfu Dat Req PDU. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatReqPduInfo -( -TfuDatReqPduInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDatReqPduInfo(param, mBuf) -TfuDatReqPduInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - uint8_t tbMask = 0; -#ifdef L2_OPTMZ - uint32_t lchIdx, pduIdx; -#endif - - - /* LTE_ADV_FLAG_REMOVED_START */ - CMCHKPK(oduUnpackUInt8, param->isEnbSFR, mBuf); - /* LTE_ADV_FLAG_REMOVED_END */ - - /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - CMCHKPK(oduUnpackUInt16, param->txPwrOffset, mBuf); - if(param->transMode == TFU_UE_TM_7) - { - CMCHKPK(cmPkTfuBfVectorInfo, param->bfVector, mBuf); - CMCHKPK(oduUnpackUInt8, param->numBfVectors, mBuf); - CMCHKPK(oduUnpackUInt8, param->numBfPrbPerSb, mBuf); - } - CMCHKPK(oduUnpackUInt8, param->deltaPowOffIdx, mBuf); - /* LTE_ADV_FLAG_REMOVED_START */ - CMCHKPK(oduUnpackUInt8, param->pa, mBuf); - /* LTE_ADV_FLAG_REMOVED_END */ - CMCHKPK(oduUnpackUInt8, param->numLayers, mBuf); -#endif - CMCHKPK(oduPackBool, param->isTApres, mBuf); - CMCHKPK(cmPkTknUInt32, ¶m->doa, mBuf); - CMCHKPK(oduUnpackUInt32, param->transMode, mBuf); - CMCHKPK(cmPkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf); - CMCHKPK(oduUnpackUInt8, param->puschRptUsd, mBuf); - for (i = 0; i < TFU_MAX_TB; i++) - { -#ifndef L2_OPTMZ - if (param->mBuf[i] != NULLP) - { - tbMask = tbMask | (1 << i); - } -#else /* L2_OPTMZ */ - for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++) - { - for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu; - pduIdx++) - { - if (param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] != NULLP) - { - tbMask = tbMask | (1 << i); - } - } - } -#endif /* L2_OPTMZ */ - } - /* tfu_c_001.main_2: Packing should consider nmbOfTBs.*/ - for (i=TFU_MAX_TB - 1; i >= 0; i--) { -#ifndef L2_OPTMZ - if (param->mBuf[i] != NULLP) - { - CMCHKPK(cmPkBuffer, ¶m->mBuf[i], mBuf); - } -#else - // CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macPad, mBuf); - for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++) - { - for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu; - pduIdx++) - { - CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx], - mBuf); - - } - CMCHKPK(oduUnpackUInt32, param->tbInfo[i].lchInfo[lchIdx].numPdu, mBuf); - } - CMCHKPK(oduUnpackUInt32, param->tbInfo[i].numLch, mBuf); - CMCHKPK(oduUnpackUInt32, param->tbInfo[i].padSize, mBuf); - CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macCes, mBuf); - CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macHdr, mBuf); - CMCHKPK(cmPkMsgLen, param->tbInfo[i].tbSize, mBuf); - CMCHKPK(oduPackBool, param->tbInfo[i].tbPres, mBuf); -#endif - } - CMCHKPK(oduUnpackUInt8, tbMask, mBuf); - CMCHKPK(oduUnpackUInt8, param->nmbOfTBs, mBuf); - CMCHKPK(cmPkTfuPdschDciInfo, ¶m->dciInfo, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDatReqPduInfo -* -* -* Desc : UnPack function for Tfu Dat req pdu . -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatReqPduInfo -( -TfuDatReqPduInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatReqPduInfo(param, mBuf) -TfuDatReqPduInfo *param; -Buffer *mBuf; -#endif -{ - - uint8_t i; - uint8_t tbMask = 0; -#ifdef L2_OPTMZ - uint32_t lchIdx, pduIdx; -#endif - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(cmUnpkTfuPdschDciInfo, ¶m->dciInfo, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nmbOfTBs, mBuf); - - CMCHKUNPK(oduPackUInt8, &tbMask, mBuf); - for (i=0; imBuf[i], mBuf); - } - else - { - param->mBuf[i] = NULLP; - } -#else /* L2_OPTMZ*/ - CMCHKUNPK(oduUnpackBool, ¶m->tbInfo[i].tbPres, mBuf); - CMCHKUNPK(cmUnpkMsgLen, ¶m->tbInfo[i].tbSize, mBuf); - CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macHdr, mBuf); - CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macCes, mBuf); - CMCHKUNPK(oduPackUInt32, ¶m->tbInfo[i].padSize, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->tbInfo[i].numLch, mBuf); - for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++) - { - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->tbInfo[i].lchInfo[lchIdx].numPdu, - mBuf); - for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu; - pduIdx++) - { - if (tbMask & (1<tbInfo[i].lchInfo[lchIdx].\ - mBuf[pduIdx], mBuf); - } - else - { - param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] = NULLP; - } - } - } - //CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macPad, mBuf); -#endif /* L2_OPTMZ*/ - } - - CMCHKUNPK(oduPackUInt8, ¶m->puschRptUsd, mBuf); - CMCHKUNPK(cmUnpkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->transMode, mBuf); - CMCHKUNPK(cmUnpkTknUInt32, ¶m->doa, mBuf); - CMCHKUNPK(oduUnpackBool, ¶m->isTApres, mBuf); -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - CMCHKUNPK(oduPackUInt8, ¶m->numLayers, mBuf); - /* LTE_ADV_FLAG_REMOVED_START */ - CMCHKUNPK(oduPackUInt8, ¶m->pa, mBuf); - /* LTE_ADV_FLAG_REMOVED_END */ - CMCHKUNPK(oduPackUInt8, ¶m->deltaPowOffIdx, mBuf); - if(param->transMode == TFU_UE_TM_7) - { - CMCHKUNPK(oduPackUInt8, ¶m->numBfPrbPerSb, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numBfVectors, mBuf); - CMCHKUNPK(cmUnpkTfuBfVectorInfo, param->bfVector, mBuf); - } - CMCHKUNPK(oduPackUInt16, ¶m->txPwrOffset, mBuf); -#endif - - /* LTE_ADV_FLAG_REMOVED_START */ - CMCHKUNPK(oduPackUInt8, ¶m->isEnbSFR, mBuf); - /* LTE_ADV_FLAG_REMOVED_END */ - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDatReqInfo -* -* -* Desc : This structure contains the Data PDUs - * @details This structure contains Data meant to be sent on both PBCH and - * PDSCH. Control information necessary for processing of the data is sent along - * with the Data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatReqInfo -( -TfuDatReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDatReqInfo(param, mBuf) -TfuDatReqInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuDatReqPduInfo *tfuDatReqPduInfo; - - - count = param->pdus.count; - node = param->pdus.last; - while (node) { - tfuDatReqPduInfo = (TfuDatReqPduInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf); - cmLListDelFrm(¶m->pdus, &tfuDatReqPduInfo->lnk); - tfuDatReqPduInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkTknBuf, ¶m->bchDat, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDatReqInfo -* -* -* Desc : This structure contains the Data PDUs - * @details This structure contains Data meant to be sent on both PBCH and - * PDSCH. Control information necessary for processing of the data is sent along - * with the Data. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatReqInfo -( -TfuDatReqInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatReqInfo(param, memCp, mBuf) -TfuDatReqInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuDatReqPduInfo *tfuDatReqPduInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKUNPK(cmUnpkTknBuf, ¶m->bchDat, &mBuf); - cmLListInit(¶m->pdus); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntpdus, &tfuDatReqPduInfo->lnk); - tfuDatReqPduInfo->lnk.node = (PTR)tfuDatReqPduInfo; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDatInfo -* -* -* Desc : This structure contains the Data PDU and the RNTI of the UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatInfo -( -TfuDatInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDatInfo(param, mBuf) -TfuDatInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkBuffer, ¶m->mBuf, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDatInfo -* -* -* Desc : This structure contains the Data PDU and the RNTI of the UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatInfo -( -TfuDatInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatInfo(param, mBuf) -TfuDatInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDatIndInfo -* -* -* Desc : This structure contains the Data PDUs received at Physical Layer. - * @details All the PDUs received by Physical layer in one subframe are clubbed - * together into a single data structure and sent to MAC for processing. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDatIndInfo -( -TfuDatIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDatIndInfo(param, mBuf) -TfuDatIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuDatInfo *tfuDatInfo; - - -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf); -#endif /* TFU_5GTF */ - count = param->datIndLst.count; - node = param->datIndLst.last; - while (node) { - tfuDatInfo = (TfuDatInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuDatInfo, tfuDatInfo, mBuf); - cmLListDelFrm(¶m->datIndLst, &tfuDatInfo->lnk); - tfuDatInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDatIndInfo -* -* -* Desc : This structure contains the Data PDUs received at Physical Layer. - * @details All the PDUs received by Physical layer in one subframe are clubbed - * together into a single data structure and sent to MAC for processing. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDatIndInfo -( -TfuDatIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDatIndInfo(param, memCp, mBuf) -TfuDatIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuDatInfo *tfuDatInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->datIndLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntdatIndLst, &tfuDatInfo->lnk); - tfuDatInfo->lnk.node = (PTR)tfuDatInfo; - } -#ifdef TFU_5GTF - CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf); -#endif /* TFU_5GTF */ - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSrInfo -* -* -* Desc : This structure contains the SR indication for a UE, identified by - * the given RNTI. The structure also contains a PUCCH Delta power, that is - * calculated by the physical layer, and is used by the scheduler for Power - * control of the UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrInfo -( -TfuSrInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSrInfo(param, mBuf) -TfuSrInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSrInfo -* -* -* Desc : This structure contains the SR indication for a UE, identified by - * the given RNTI. The structure also contains a PUCCH Delta power, that is - * calculated by the physical layer, and is used by the scheduler for Power - * control of the UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrInfo -( -TfuSrInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrInfo(param, mBuf) -TfuSrInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSrIndInfo -* -* -* Desc : This structure contains all the Scheduling Requests (SR) indications - * received in a subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrIndInfo -( -TfuSrIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSrIndInfo(param, mBuf) -TfuSrIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuSrInfo *tfuSrInfo; - - - count = param->srLst.count; - node = param->srLst.last; - while (node) { - tfuSrInfo = (TfuSrInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuSrInfo, tfuSrInfo, mBuf); - cmLListDelFrm(¶m->srLst, &tfuSrInfo->lnk); - tfuSrInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSrIndInfo -* -* -* Desc : This structure contains all the Scheduling Requests (SR) indications - * received in a subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrIndInfo -( -TfuSrIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrIndInfo(param, memCp, mBuf) -TfuSrIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuSrInfo *tfuSrInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->srLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntsrLst, &tfuSrInfo->lnk); - tfuSrInfo->lnk.node = (PTR)tfuSrInfo; - } - return ROK; -} - -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -/*********************************************************** -* -* Func : cmPkTfuHqInfo -* -* -* Desc : This structure contains the HARQ feedback for a single UE. - * @details RNTI is present to identify the UE. - * For FDD a single feedback is present. - * For TDD HARQ multiplexing a list of HARQ feedbacks is present. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuHqInfo -( -TfuHqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuHqInfo(param, mBuf) -TfuHqInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->isPusch, mBuf); - for (i=TFU_MAX_HARQ_FDBKS-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt32, param->isAck[i], mBuf); - } -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->M, mBuf); -#endif/*TFU_TDD*/ - CMCHKPK(oduUnpackUInt8, param->noOfTbs, mBuf); -/* ACC-TDD ccpu00130520 */ - CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -/*********************************************************** -* -* Func : cmUnpkTfuHqInfo -* -* -* Desc : This structure contains the HARQ feedback for a single UE. - * @details RNTI is present to identify the UE. - * For FDD a single feedback is present. - * For TDD HARQ multiplexing a list of HARQ feedbacks is present. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuHqInfo -( -TfuHqInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuHqInfo(param, mBuf) -TfuHqInfo *param; -Buffer *mBuf; -#endif -{ - S32 i; - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); -/* ACC-TDD ccpu00130520 */ - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->hqFdbkMode, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->noOfTbs, mBuf); -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->M, mBuf); -#endif - for (i=0; iisAck[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->isPusch, mBuf); - return ROK; -} - - - - - -/*********************************************************** -* -* Func : cmPkTfuHqIndInfo -* -* -* Desc : This structure contains a list of HARQ feedback for a number of UEs. - * @details All the HARQ feedback received in the subframe are clubbed together - * in this data structure and given to the scheduler for processing. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuHqIndInfo -( -TfuHqIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuHqIndInfo(param, mBuf) -TfuHqIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuHqInfo *tfuHqInfo; - - - count = param->hqIndLst.count; - node = param->hqIndLst.last; - while (node) { - tfuHqInfo = (TfuHqInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuHqInfo, tfuHqInfo, mBuf); - cmLListDelFrm(¶m->hqIndLst, &tfuHqInfo->lnk); - tfuHqInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuHqIndInfo -* -* -* Desc : This structure contains a list of HARQ feedback for a number of UEs. - * @details All the HARQ feedback received in the subframe are clubbed together - * in this data structure and given to the scheduler for processing. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuHqIndInfo -( -TfuHqIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuHqIndInfo(param, memCp, mBuf) -TfuHqIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuHqInfo *tfuHqInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->hqIndLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCnthqIndLst, &tfuHqInfo->lnk); - tfuHqInfo->lnk.node = (PTR)tfuHqInfo; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUlCqiInfo -* -* -* Desc : This structure conveys the Uplink CQI information for a single subband. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUlCqiInfo -( -TfuUlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUlCqiInfo(param, mBuf) -TfuUlCqiInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUlCqiInfo -* -* -* Desc : This structure conveys the Uplink CQI information for a single subband. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUlCqiInfo -( -TfuUlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUlCqiInfo(param, mBuf) -TfuUlCqiInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUlCqiRpt -* -* -* Desc : This structure contains the UL CQI estimated by the physical layer. - * @details The report could be wideband CQI or subBand CQI or both. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUlCqiRpt -( -TfuUlCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUlCqiRpt(param, mBuf) -TfuUlCqiRpt *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=TFU_MAX_UL_SUBBAND-1; i >= 0; i--) { - CMCHKPK(cmPkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf); - CMCHKPK(oduUnpackUInt8, param->wideCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->isTxPort0, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUlCqiRpt -* -* -* Desc : This structure contains the UL CQI estimated by the physical layer. - * @details The report could be wideband CQI or subBand CQI or both. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUlCqiRpt -( -TfuUlCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUlCqiRpt(param, mBuf) -TfuUlCqiRpt *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isTxPort0, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->wideCqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf); - for (i=0; iulCqiInfoArr[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUlCqiIndInfo -* -* -* Desc : This structure conveys the Uplink CQI information. - * @details Uplink CQI is calculated by the physical layer, and is this - * information is provided to the scheduler. - * This data structure clubs together the UL CQI estimates for all the UEs that - * have been scheduled in the subframe for uplink transmission. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUlCqiIndInfo -( -TfuUlCqiIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUlCqiIndInfo(param, mBuf) -TfuUlCqiIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuUlCqiRpt *tfuUlCqiRpt; - - - count = param->ulCqiRpt.count; - node = param->ulCqiRpt.last; - while (node) { - tfuUlCqiRpt = (TfuUlCqiRpt *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuUlCqiRpt, tfuUlCqiRpt, mBuf); - cmLListDelFrm(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk); - tfuUlCqiRpt->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUlCqiIndInfo -* -* -* Desc : This structure conveys the Uplink CQI information. - * @details Uplink CQI is calculated by the physical layer, and is this - * information is provided to the scheduler. - * This data structure clubs together the UL CQI estimates for all the UEs that - * have been scheduled in the subframe for uplink transmission. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUlCqiIndInfo -( -TfuUlCqiIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUlCqiIndInfo(param, memCp, mBuf) -TfuUlCqiIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuUlCqiRpt *tfuUlCqiRpt; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->ulCqiRpt); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntulCqiRpt, &tfuUlCqiRpt->lnk); - tfuUlCqiRpt->lnk.node = (PTR)tfuUlCqiRpt; - } - return ROK; -} - - - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiRpt -* -* -* Desc : This structure contains the DL CQI report for a single UE. - * @details The report could either be reported on PUCCH or PUSCH, a flag - * conveys this information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiRpt -( -TfuDlCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiRpt(param, mBuf) -TfuDlCqiRpt *param; -Buffer *mBuf; -#endif -{ - - - if (cmPkTfuDlCqiInfo(param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK) - return RFAILED; - CMCHKPK(oduUnpackUInt8, param->isPucchInfo, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiRpt -* -* -* Desc : This structure contains the DL CQI report for a single UE. - * @details The report could either be reported on PUCCH or PUSCH, a flag - * conveys this information. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiRpt -( -TfuDlCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiRpt(param, mBuf) -TfuDlCqiRpt *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isPucchInfo, mBuf); - if (cmUnpkTfuDlCqiInfo (param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK) - return RFAILED; - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDlCqiIndInfo -* -* -* Desc : This structure contains a list of Downlink CQI reports transmitted by - * UEs. - * @details This structure clubs together DL CQI reports for a number of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiIndInfo -( -TfuDlCqiIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiIndInfo(param, mBuf) -TfuDlCqiIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuDlCqiRpt *tfuDlCqiRpt; - - - count = param->dlCqiRptsLst.count; - node = param->dlCqiRptsLst.last; - while (node) { - tfuDlCqiRpt = (TfuDlCqiRpt *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuDlCqiRpt, tfuDlCqiRpt, mBuf); - cmLListDelFrm(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk); - tfuDlCqiRpt->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiIndInfo -* -* -* Desc : This structure contains a list of Downlink CQI reports transmitted by - * UEs. - * @details This structure clubs together DL CQI reports for a number of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiIndInfo -( -TfuDlCqiIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiIndInfo(param, memCp, mBuf) -TfuDlCqiIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuDlCqiRpt *tfuDlCqiRpt; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->dlCqiRptsLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntdlCqiRptsLst, &tfuDlCqiRpt->lnk); - tfuDlCqiRpt->lnk.node = (PTR)tfuDlCqiRpt; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCrcInfo -* -* -* Desc : This structure contains the CRC indication for a single - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCrcInfo -( -TfuCrcInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCrcInfo(param, mBuf) -TfuCrcInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTknUInt8, ¶m->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->isFailure, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCrcInfo -* -* -* Desc : This structure contains the CRC indication for a single - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCrcInfo -( -TfuCrcInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCrcInfo(param, mBuf) -TfuCrcInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isFailure, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->rv, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuCrcIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the - * CRC Indication from PHY to MAC. - * @details This structure clubs together all the CRC indications for - * a single subframe and conveys this information to the scheduler. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuCrcIndInfo -( -TfuCrcIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuCrcIndInfo(param, mBuf) -TfuCrcIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuCrcInfo *tfuCrcIndInfo; - - -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf); -#endif /* TFU_5GTF */ - count = param->crcLst.count; - node = param->crcLst.last; - while (node) { - tfuCrcIndInfo = (TfuCrcInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuCrcInfo, tfuCrcIndInfo, mBuf); - cmLListDelFrm(¶m->crcLst, &tfuCrcIndInfo->lnk); - tfuCrcIndInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuCrcIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the - * CRC Indication from PHY to MAC. - * @details This structure clubs together all the CRC indications for - * a single subframe and conveys this information to the scheduler. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuCrcIndInfo -( -TfuCrcIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuCrcIndInfo(param, memCp, mBuf) -TfuCrcIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuCrcInfo *tfuCrcIndInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->crcLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntcrcLst, &tfuCrcIndInfo->lnk); - tfuCrcIndInfo->lnk.node = (PTR)tfuCrcIndInfo; - } -#ifdef TFU_5GTF - CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf); -#endif /* TFU_5GTF */ - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuTimingAdvInfo -* -* -* Desc : This structure contains the timing advance information for a single - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTimingAdvInfo -( -TfuTimingAdvInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuTimingAdvInfo(param, mBuf) -TfuTimingAdvInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->timingAdv, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuTimingAdvInfo -* -* -* Desc : This structure contains the timing advance information for a single - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuTimingAdvInfo -( -TfuTimingAdvInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuTimingAdvInfo(param, mBuf) -TfuTimingAdvInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->timingAdv, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuTimingAdvIndInfo -* -* -* Desc : This structure contains information that is passed as part of the Timing - * Advance indication from PHY to MAC. - * @details This structure clubs together timing advances for a number of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTimingAdvIndInfo -( -TfuTimingAdvIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuTimingAdvIndInfo(param, mBuf) -TfuTimingAdvIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuTimingAdvInfo *tfuTimingAdvInfo; - - - count = param->timingAdvLst.count; - node = param->timingAdvLst.last; - while (node) { - tfuTimingAdvInfo = (TfuTimingAdvInfo *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf); - cmLListDelFrm(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk); - tfuTimingAdvInfo->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuTimingAdvIndInfo -* -* -* Desc : This structure contains information that is passed as part of the Timing - * Advance indication from PHY to MAC. - * @details This structure clubs together timing advances for a number of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuTimingAdvIndInfo -( -TfuTimingAdvIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuTimingAdvIndInfo(param, memCp, mBuf) -TfuTimingAdvIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuTimingAdvInfo *tfuTimingAdvInfo; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->timingAdvLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCnttimingAdvLst, &tfuTimingAdvInfo->lnk); - tfuTimingAdvInfo->lnk.node = (PTR)tfuTimingAdvInfo; - } - return ROK; -} - -/*CA dev Start*/ -/*********************************************************** -* -* Func : cmPkTfuTtiCellInfo -* -* -* Desc : This structure contains information that is -* passed as a part of the TTI indication sent -* from CL to MAC and SCH -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTtiCellInfo -( -TfuTtiCellInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuTtiCellInfo(param, mBuf) -TfuTtiCellInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->ulBlankSf, mBuf); - CMCHKPK(oduUnpackUInt8, param->dlBlankSf, mBuf); - CMCHKPK(oduUnpackUInt8, param->schTickDelta, mBuf); - CMCHKPK(oduPackBool, param->isDummyTti, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} -/*CA dev End*/ - -/*********************************************************** -* -* Func : cmPkTfuTtiIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the TTI - * indication sent from PHY to MAC. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuTtiIndInfo -( -TfuTtiIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuTtiIndInfo(param, mBuf) -TfuTtiIndInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - /*CA dev Start*/ - for (i=(param->numCells-1); i >= 0; i--) { - CMCHKPK(cmPkTfuTtiCellInfo, ¶m->cells[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numCells, mBuf); - /*CA dev End*/ - return ROK; -} - -/* CA dev Start */ -/*********************************************************** -* -* Func : cmUnpkTfuTtiCellInfo -* -* -* Desc : This structure contains information that is -* passed as a part of the TTI indication sent -* from CL to MAC and SCH -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuTtiCellInfo -( -TfuTtiCellInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuTtiCellInfo(param, mBuf) -TfuTtiCellInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKUNPK(oduUnpackBool, ¶m->isDummyTti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->schTickDelta, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->dlBlankSf, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ulBlankSf, mBuf); - return ROK; -} -/* CA dev End */ - - -/*********************************************************** -* -* Func : cmPkTfuRaReqInfo -* -* -* Desc : This structure contains the information for a single Random Access Request. - * @details The information present in this structure is for a single preamble. - * Associated with each preamble are fields that the physical layer calculates - * based on the reception of the Random Access Request. These are the following - * -# Timing Advance - * -# TPC - * -# CQI (optional). -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRaReqInfo -( -TfuRaReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRaReqInfo(param, mBuf) -TfuRaReqInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiPres, mBuf); - CMCHKPK(oduUnpackUInt8, param->tpc, mBuf); - CMCHKPK(oduUnpackUInt16, param->ta, mBuf); - CMCHKPK(oduUnpackUInt8, param->rapId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRaReqInfo -* -* -* Desc : This structure contains the information for a single Random Access Request. - * @details The information present in this structure is for a single preamble. - * Associated with each preamble are fields that the physical layer calculates - * based on the reception of the Random Access Request. These are the following - * -# Timing Advance - * -# TPC - * -# CQI (optional). -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRaReqInfo -( -TfuRaReqInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRaReqInfo(param, mBuf) -TfuRaReqInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->rapId, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->ta, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->tpc, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiPres, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuRachInfo -* -* -* Desc : This structure contains RACH request information for a single - * RA-RNTI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRachInfo -( - CmMemListCp memCp, -TfuRachInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRachInfo(memCp, param, mBuf) - CmMemListCp memCp; -TfuRachInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i= (param->numRaReqInfo - 1); i >= 0; i--) { - CMCHKPK(cmPkTfuRaReqInfo, &(param->raReqInfoArr[i]), mBuf); - } -#ifdef PRACH_5GTF - CMCHKPK(oduUnpackUInt16, param->nPwrFactor, mBuf); - CMCHKPK(oduUnpackUInt8, param->nPRACHSymbIndex, mBuf); - CMCHKPK(oduUnpackUInt8, param->nf1Value, mBuf); - CMCHKPK(oduUnpackUInt8, param->nCyclicShift, mBuf); - CMCHKPK(oduUnpackUInt8, param->nRootSeq, mBuf); - CMCHKPK(oduUnpackUInt8, param->nPRACHConfiguration, mBuf); - CMCHKPK(oduUnpackUInt8, param->nPreambleFormat, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->numRaReqInfo, mBuf); - CMCHKPK(cmPkLteRnti, param->raRnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRachInfo -* -* -* Desc : This structure contains RACH request information for a single - * RA-RNTI. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRachInfo -( -CmMemListCp memCp, -TfuRachInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRachInfo(memCp, param, mBuf) -CmMemListCp memCp; -TfuRachInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(cmUnpkLteRnti, ¶m->raRnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRaReqInfo, mBuf); -#ifdef PRACH_5GTF - CMCHKUNPK(oduUnpackUInt8, param->nPreambleFormat, mBuf); - CMCHKUNPK(oduUnpackUInt8, param->nPRACHConfiguration, mBuf); - CMCHKUNPK(oduUnpackUInt8, param->nRootSeq, mBuf); - CMCHKUNPK(oduUnpackUInt8, param->nCyclicShift, mBuf); - CMCHKUNPK(oduUnpackUInt8, param->nf1Value, mBuf); - CMCHKUNPK(oduUnpackUInt8, param->nPRACHSymbIndex, mBuf); - CMCHKUNPK(oduUnpackUInt16, param->nPwrFactor, mBuf); -#endif - if (cmGetMem (&(memCp), (sizeof(TfuRaReqInfo) * param->numRaReqInfo), - (Ptr *)¶m->raReqInfoArr) != ROK) - { - return RFAILED; - } - for (i=0; inumRaReqInfo; i++) { - CMCHKUNPK(cmUnpkTfuRaReqInfo, ¶m->raReqInfoArr[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuRaReqIndInfo -* -* -* Desc : This structure contains the list of Random Access Requests received in a - * single TTI. - * @details Random Access Request is associated with a RA-RNTI, which remains - * common for all the Random access requests within a subframe. This structure - * thus carries the RA-RNTI and a list of Random Access Request information. - * This information consists of the following - * -# preamble-id - this corresponds to the Index of the Preamble choosen by the - * UE. - * -# Timing Advance - this corresponds to the timing adjustment that the UE - * needs to be uplink synchronized. This value is calculated by physical layer. - * -# tpc - this is the power control command that the physical layer calculates - * from the received RA request. This value is transmitted in the RA Response - * sent out by MAC. - * -# CQI - this is the Channel quality index of the UL channel estimated by the - * physical layer. This aids MAC in the scheduling of this UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRaReqIndInfo -( -TfuRaReqIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRaReqIndInfo(param, mBuf) -TfuRaReqIndInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i= (param->nmbOfRaRnti-1); i >= 0; i--) - { - if (ROK != cmPkTfuRachInfo(param->memCp, - &(param->rachInfoArr[i]), mBuf)) - { - return RFAILED; - } - } - CMCHKPK(oduUnpackUInt8, param->nmbOfRaRnti, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRaReqIndInfo -* -* -* Desc : This structure contains the list of Random Access Requests received in a - * single TTI. - * @details Random Access Request is associated with a RA-RNTI, which remains - * common for all the Random access requests within a subframe. This structure - * thus carries the RA-RNTI and a list of Random Access Request information. - * This information consists of the following - * -# preamble-id - this corresponds to the Index of the Preamble choosen by the - * UE. - * -# Timing Advance - this corresponds to the timing adjustment that the UE - * needs to be uplink synchronized. This value is calculated by physical layer. - * -# tpc - this is the power control command that the physical layer calculates - * from the received RA request. This value is transmitted in the RA Response - * sent out by MAC. - * -# CQI - this is the Channel quality index of the UL channel estimated by the - * physical layer. This aids MAC in the scheduling of this UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRaReqIndInfo -( -TfuRaReqIndInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRaReqIndInfo(param, mBuf) -TfuRaReqIndInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nmbOfRaRnti, mBuf); - if (cmGetMem (&(param->memCp), (sizeof(TfuRachInfo) * param->nmbOfRaRnti), - (Ptr *)¶m->rachInfoArr) != ROK) - { - return RFAILED; - } - for (i=0; inmbOfRaRnti; i++) - { - if (ROK != cmUnpkTfuRachInfo(param->memCp, ¶m->rachInfoArr[i], mBuf)) - { - return RFAILED; - } - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPucchDeltaPwr -* -* -* Desc : This structure contains PUCCH Delta power for a single UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPucchDeltaPwrInfo -( -TfuPucchDeltaPwr *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPucchDeltaPwrInfo(param, mBuf) -TfuPucchDeltaPwr *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(SPkS8, param->pucchDeltaPwr, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPucchDeltaPwr -* -* -* Desc : This structure contains PUCCH Delta power for a single UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPucchDeltaPwrInfo -( -TfuPucchDeltaPwr *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPucchDeltaPwrInfo(param, mBuf) -TfuPucchDeltaPwr *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(SUnpkS8, ¶m->pucchDeltaPwr, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuPucchDeltaPwrIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the - * PUCCH Delta power indication from PHY to SCH. - * @details This structure clubs together PUCCH Delta power values for a number - * of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuPucchDeltaPwrIndInfo -( -TfuPucchDeltaPwrIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuPucchDeltaPwrIndInfo(param, mBuf) -TfuPucchDeltaPwrIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuPucchDeltaPwr *tfuPucchDeltaPwr; - - - count = param->pucchDeltaPwrLst.count; - node = param->pucchDeltaPwrLst.last; - while (node) { - tfuPucchDeltaPwr = (TfuPucchDeltaPwr *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf); - cmLListDelFrm(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk); - tfuPucchDeltaPwr->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuPucchDeltaPwrIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the - * PUCCH Delta power indication from PHY to SCH. - * @details This structure clubs together PUCCH Delta power values for a number - * of UEs. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuPucchDeltaPwrIndInfo -( -TfuPucchDeltaPwrIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuPucchDeltaPwrIndInfo(param, memCp, mBuf) -TfuPucchDeltaPwrIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuPucchDeltaPwr *tfuPucchDeltaPwr; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->pucchDeltaPwrLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntpucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk); - tfuPucchDeltaPwr->lnk.node = (PTR)tfuPucchDeltaPwr; - } - return ROK; -} - -#ifdef ANSI -S16 cmPkBuffer -( -Buffer **param, -Buffer *mBuf -) -#else -S16 cmPkBuffer(param, mBuf) -Buffer **param; -Buffer *mBuf; -#endif -{ - MsgLen msgLen=0; - if (SFndLenMsg(*param, &msgLen) != ROK) - return RFAILED; - if (SCatMsg(mBuf, *param, M1M2) != ROK) - return RFAILED; - TFU_FREE_MSG(*param); - *param = NULLP; - CMCHKPK(cmPkMsgLen, msgLen, mBuf); - return ROK; -} -#ifdef ANSI -S16 cmUnpkBuffer -( -Buffer **param, -Buffer *mBuf -) -#else -S16 cmUnpkBuffer(param, mBuf) -Buffer **param; -Buffer *mBuf; -#endif -{ - MsgLen msgLen=0, totalMsgLen=0; - CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - return RFAILED; - if (SSegMsg(mBuf, totalMsgLen-msgLen, param) != ROK) - return RFAILED; - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkTfuDoaInd -* -* -* Desc : This API is used to indicate DOA(Direction Of Arrival) - * identifier for one or more UEs. - * It carries a DOA for each UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param doaInd Pointer to the TfuDoaIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDoaInd -( -Pst * pst, -SuId suId, -TfuDoaIndInfo * doaInd -) -#else -S16 cmPkTfuDoaInd(pst, suId, doaInd) -Pst * pst; -SuId suId; -TfuDoaIndInfo * doaInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU125, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)doaInd, sizeof(TfuDoaIndInfo)); - return RFAILED; - } - cmPkTfuDoaIndInfo(doaInd, mBuf); - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU126, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MEM(doaInd); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - TFU_FREE_MEM(doaInd); - //pst->event = (Event) EVTTFUDOAIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuDoaInd -* -* -* Desc : This API is used to indicate DOA(Direction Of Arrival) - * identifier for one or more UEs. - * It carries a DOA for each UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param doaInd Pointer to the TfuDoaIndInfo structure. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDoaInd -( -TfuDoaInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDoaInd(func, pst, mBuf) -TfuDoaInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuDoaIndInfo *doaInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU127, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - { - Mem sMem; - sMem.region = pst->region; - sMem.pool = pst->pool; - if ((cmAllocEvnt(sizeof(TfuDoaIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&doaInd)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU128, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - cmUnpkTfuDoaIndInfo(doaInd, (Ptr)&doaInd->memCp, mBuf); - TFU_FREE_MSG(mBuf); - return ((*func)(pst, suId, doaInd)); -} - - - -/*********************************************************** -* -* Func : cmPkTfuDciFormatTbInfo -* -* -* Desc : This structure contains the TB level DCI signalling - * parameters in case of DCI formats 2 and 2A -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDciFormatTbInfo -( -TfuDciFormatTbInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDciFormatTbInfo(param, mBuf) -TfuDciFormatTbInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDciFormatTbInfo -* -* -* Desc : This structure contains the TB level DCI signalling - * parameters in case of DCI formats 2 and 2A -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDciFormatTbInfo -( -TfuDciFormatTbInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDciFormatTbInfo(param, mBuf) -TfuDciFormatTbInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSubbandDlCqiInfo -* -* -* Desc : This structure is used to convey the subbannd CQI reported. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSubbandDlCqiInfo -( -TfuSubbandDlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSubbandDlCqiInfo(param, mBuf) -TfuSubbandDlCqiInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - for (i=TFU_MAX_TB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->cqiIdx[i], mBuf); - } - CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSubbandDlCqiInfo -* -* -* Desc : This structure is used to convey the subbannd CQI reported. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSubbandDlCqiInfo -( -TfuSubbandDlCqiInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSubbandDlCqiInfo(param, mBuf) -TfuSubbandDlCqiInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf); - for (i=0; icqiIdx[i], mBuf); - } - return ROK; -} - -/*********************************************************** -* -* Func : cmPkTfuDlCqiPuschInfo -* -* -* Desc : This structure conveys explicitly the PMI information in case - * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDlCqiPuschInfo -( -TfuDlCqiPuschInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDlCqiPuschInfo(param, mBuf) -TfuDlCqiPuschInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->mode) { - case TFU_PUSCH_CQI_MODE_31: - CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_22: - CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_12: - CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->mode, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDlCqiPuschInfo -* -* -* Desc : This structure conveys explicitly the PMI information in case - * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDlCqiPuschInfo -( -TfuDlCqiPuschInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDlCqiPuschInfo(param, mBuf) -TfuDlCqiPuschInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->mode, mBuf); - switch(param->mode) { - case TFU_PUSCH_CQI_MODE_12: - CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_22: - CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf); - break; - case TFU_PUSCH_CQI_MODE_31: - CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - -/*********************************************************** -* -* Func : cmPkTfuDoaRpt -* -* -* Desc : This structure contains the DOA estimated by the physical layer. - * @details DOA for a given UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDoaRpt -( -TfuDoaRpt *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDoaRpt(param, mBuf) -TfuDoaRpt *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt32, param->doa, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDoaRpt -* -* -* Desc : This structure contains the DOA estimated by the physical layer. - * @details DOA for a given UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDoaRpt -( -TfuDoaRpt *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDoaRpt(param, mBuf) -TfuDoaRpt *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt32, ¶m->doa, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuDoaIndInfo -* -* -* Desc : This structure conveys the DOA(Direction Of Arrival) indicator. - * @details DOA is calculated by the physical layer, and this - * information is provided to the scheduler. - * This data structure clubs together the DOAs for all the UEs - * calculated by PHY in this subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuDoaIndInfo -( -TfuDoaIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuDoaIndInfo(param, mBuf) -TfuDoaIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuDoaRpt *tfuDoaRpt; - - count = param->doaRpt.count; - node = param->doaRpt.last; - while (node) { - tfuDoaRpt = (TfuDoaRpt *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuDoaRpt, tfuDoaRpt, mBuf); - cmLListDelFrm(¶m->doaRpt, &tfuDoaRpt->lnk); - tfuDoaRpt->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuDoaIndInfo -* -* -* Desc : This structure conveys the DOA(Direction Of Arrival) indicator. - * @details DOA is calculated by the physical layer, and this - * information is provided to the scheduler. - * This data structure clubs together the DOAs for all the UEs - * calculated by PHY in this subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuDoaIndInfo -( -TfuDoaIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuDoaIndInfo(param, memCp, mBuf) -TfuDoaIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuDoaRpt *tfuDoaRpt; - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - cmLListInit(¶m->doaRpt); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntdoaRpt, &tfuDoaRpt->lnk); - tfuDoaRpt->lnk.node = (PTR)tfuDoaRpt; - } - return ROK; -} - - -/* tfu_c_001.main_7. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - - -/*********************************************************** -* -* Func : cmPkTfuSrsRpt -* -* -* Desc : This structure conveys the Uplink SRS indication of a UE. - * @details Uplink SRS from each UE is received by the physical layer, and this - * information is provided to the scheduler. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrsRpt -( -TfuSrsRpt *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSrsRpt(param, mBuf) -TfuSrsRpt *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->wideCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->wideCqiPres, mBuf); - for (i=TFU_MAX_UL_RB-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->snr[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - CMCHKPK(oduUnpackUInt8, param->numRbs, mBuf); - CMCHKPK(oduUnpackUInt16, param->ta, mBuf); - CMCHKPK(oduUnpackUInt16, param->dopEst, mBuf); - CMCHKPK(cmPkLteRnti, param->ueId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSrsRpt -* -* -* Desc : This structure conveys the Uplink SRS indication of a UE. - * @details Uplink SRS from each UE is received by the physical layer, and this - * information is provided to the scheduler. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrsRpt -( -TfuSrsRpt *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrsRpt(param, mBuf) -TfuSrsRpt *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->dopEst, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->ta, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRbs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - for (i=0; isnr[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->wideCqiPres, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->wideCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuSrsIndInfo -* -* -* Desc : This structure conveys the Uplink SRS indication. - * @details Uplink SRS is received by the physical layer, and this - * information is provided to the scheduler. - * This data structure clubs together the UL SRS indications of all the UEs - * in the subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuSrsIndInfo -( -TfuSrsIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuSrsIndInfo(param, mBuf) -TfuSrsIndInfo *param; -Buffer *mBuf; -#endif -{ - - CmLList *node; - uint32_t count; - TfuSrsRpt *tfuSrsRpt; - - - count = param->srsRpt.count; - node = param->srsRpt.last; - while (node) { - tfuSrsRpt = (TfuSrsRpt *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuSrsRpt, tfuSrsRpt, mBuf); - cmLListDelFrm(¶m->srsRpt, &tfuSrsRpt->lnk); - tfuSrsRpt->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuSrsIndInfo -* -* -* Desc : This structure conveys the Uplink SRS indication. - * @details Uplink SRS is received by the physical layer, and this - * information is provided to the scheduler. - * This data structure clubs together the UL SRS indications of all the UEs - * in the subframe. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuSrsIndInfo -( -TfuSrsIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuSrsIndInfo(param, memCp, mBuf) -TfuSrsIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuSrsRpt *tfuSrsRpt; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->srsRpt); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntsrsRpt, &tfuSrsRpt->lnk); - tfuSrsRpt->lnk.node = (PTR)tfuSrsRpt; - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuRawCqiRpt -* -* -* Desc : This structure contains the Raw CQI information i.e. the CQI report - * as transmitted by the UE. - * @details These bits shall be interpretted by MAC to derive the following - * -# Wideband CQI - * -# Subband CQI - * -# PMI - * -# RI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRawCqiRpt -( -TfuRawCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRawCqiRpt(param, mBuf) -TfuRawCqiRpt *param; -Buffer *mBuf; -#endif -{ - -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt32, param->uciPayload, mBuf); -#else - S32 i; - for (i=CM_LTE_MAX_CELLS-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->ri[i], mBuf); - } - for (i=TFU_MAX_CQI_BYTES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->cqiBits[i], mBuf); - } -#endif - CMCHKPK(oduUnpackUInt8, param->numBits, mBuf); - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRawCqiRpt -* -* -* Desc : This structure contains the Raw CQI information i.e. the CQI report - * as transmitted by the UE. - * @details These bits shall be interpretted by MAC to derive the following - * -# Wideband CQI - * -# Subband CQI - * -# PMI - * -# RI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRawCqiRpt -( -TfuRawCqiRpt *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRawCqiRpt(param, mBuf) -TfuRawCqiRpt *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numBits, mBuf); -#ifndef TFU_5GTF - S32 i; - for (i=0; icqiBits[i], mBuf); - } - for (i=0; iri[i], mBuf); - } -#else - CMCHKUNPK(oduPackUInt32, ¶m->uciPayload, mBuf); -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuRawCqiIndInfo -* -* -* Desc : This structure contains the Raw CQI reports received for the - * transmitting UEs in a single subframe. - * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose - * interpretation is upto the MAC layer. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuRawCqiIndInfo -( -TfuRawCqiIndInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuRawCqiIndInfo(param, mBuf) -TfuRawCqiIndInfo *param; -Buffer *mBuf; -#endif -{ - - uint32_t count; - TfuRawCqiRpt *tfuRawCqiRpt; - CmLList *node; - - - count = param->rawCqiRpt.count; - node = param->rawCqiRpt.last; - while (node) { - tfuRawCqiRpt = (TfuRawCqiRpt *)node->node; - node=node->prev; - CMCHKPK(cmPkTfuRawCqiRpt, tfuRawCqiRpt, mBuf); - cmLListDelFrm(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk); - tfuRawCqiRpt->lnk.node = (PTR)NULLP; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuRawCqiIndInfo -* -* -* Desc : This structure contains the Raw CQI reports received for the - * transmitting UEs in a single subframe. - * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose - * interpretation is upto the MAC layer. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuRawCqiIndInfo -( -TfuRawCqiIndInfo *param, -Ptr memCp, -Buffer *mBuf -) -#else -S16 cmUnpkTfuRawCqiIndInfo(param, memCp, mBuf) -TfuRawCqiIndInfo *param; -Ptr memCp; -Buffer *mBuf; -#endif -{ - - uint32_t count, loopCnt; - TfuRawCqiRpt *tfuRawCqiRpt; - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - cmLListInit(¶m->rawCqiRpt); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCntrawCqiRpt, &tfuRawCqiRpt->lnk); - tfuRawCqiRpt->lnk.node = (PTR)tfuRawCqiRpt; - } - return ROK; -} - - -#ifdef TFU_TDD - -#ifdef TFU_TDD - - -/*********************************************************** -* -* Func : cmPkTfuUePucchHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of harq information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchHqRecpInfo -( -TfuUePucchHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchHqRecpInfo(param, mBuf) -TfuUePucchHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKPK(oduUnpackUInt8, param->a, mBuf); - for (i=TFU_MAX_HQ_RES-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt16, param->hqRes[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->pucchResCnt, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf); - CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of harq information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchHqRecpInfo -( -TfuUePucchHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf) -TfuUePucchHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - - S32 i; - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->hqFdbkMode, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pucchResCnt, mBuf); - for (i=0; ihqRes[i], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->a, mBuf); - return ROK; -} - - -#endif - -#endif - -#ifndef TFU_TDD /* else of TFU_TDD */ - -#ifndef TFU_TDD /* else of TFU_TDD */ - - -/*********************************************************** -* -* Func : cmPkTfuUePucchHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of harq information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchHqRecpInfo -( -TfuUePucchHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchHqRecpInfo(param, mBuf) -TfuUePucchHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - -#ifdef LTE_ADV - S32 idx; - for (idx=(TFU_MAX_HQ_RES-1); idx >= 0; idx--) { - CMCHKPK(oduUnpackUInt16, param->hqRes[idx], mBuf); - } -#else - CMCHKPK(oduUnpackUInt16, param->hqRes[0], mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->pucchResCnt, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf); - CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of harq information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchHqRecpInfo -( -TfuUePucchHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf) -TfuUePucchHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->hqFdbkMode, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pucchResCnt, mBuf); -#ifdef LTE_ADV - S32 idx; - for (idx=0; idxhqRes[idx], mBuf); - } -#else - CMCHKUNPK(oduPackUInt16, ¶m->hqRes[0], mBuf); -#endif - - return ROK; -} - - -#endif - -#endif - - -/*********************************************************** -* -* Func : cmPkTfuUePucchSrRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of SR information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchSrRecpInfo -( -TfuUePucchSrRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchSrRecpInfo(param, mBuf) -TfuUePucchSrRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt16, param->n1PucchIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchSrRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of SR information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchSrRecpInfo -( -TfuUePucchSrRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchSrRecpInfo(param, mBuf) -TfuUePucchSrRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt16, ¶m->n1PucchIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePucchCqiRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of CQI information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchCqiRecpInfo -( -TfuUePucchCqiRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchCqiRecpInfo(param, mBuf) -TfuUePucchCqiRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->cqiPmiSz, mBuf); - CMCHKPK(oduUnpackUInt16, param->n2PucchIdx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchCqiRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of CQI information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchCqiRecpInfo -( -TfuUePucchCqiRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchCqiRecpInfo(param, mBuf) -TfuUePucchCqiRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt16, ¶m->n2PucchIdx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSz, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePucchSrsRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of SRS information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchSrsRecpInfo -( -TfuUePucchSrsRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchSrsRecpInfo(param, mBuf) -TfuUePucchSrsRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt32, param->srsCyclicShft, mBuf); - CMCHKPK(oduUnpackUInt16, param->srsCfgIdx, mBuf); - CMCHKPK(oduUnpackUInt8, param->transComb, mBuf); - CMCHKPK(oduUnpackUInt32, param->srsHopBw, mBuf); - CMCHKPK(oduUnpackUInt8, param->nRrc, mBuf); - CMCHKPK(oduUnpackUInt32, param->srsBw, mBuf); - return ROK; -} - -#ifdef TFU_5GTF -#ifdef ANSI -S16 cmPkTfuUePucchUciRecpInfo -( -TfuUePucchUciRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchUciRecpInfo(param, mBuf) -TfuUePucchUciRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->SCID, mBuf); - CMCHKPK(oduUnpackUInt8, param->pucchIndex, mBuf); - CMCHKPK(oduUnpackUInt8, param->numBits, mBuf); - return ROK; -} -#endif - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchSrsRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of SRS information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchSrsRecpInfo -( -TfuUePucchSrsRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchSrsRecpInfo(param, mBuf) -TfuUePucchSrsRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->srsBw, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nRrc, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->srsHopBw, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->transComb, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->srsCfgIdx, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->srsCyclicShft, mBuf); - return ROK; -} - -#ifdef TFU_5GTF -/*********************************************************** -* -* Func : cmPkTfuUePucchBsiBriRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of BSI_BRI information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchBsiBriRecpInfo -( -TfuUePucchBsiBriRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchBsiBriRecpInfo(param, mBuf) -TfuUePucchBsiBriRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt8, param->briRpt, mBuf); - CMCHKPK(oduUnpackUInt8, param->bsiRpt, mBuf); - CMCHKPK(oduUnpackUInt8, param->SCID, mBuf); - CMCHKPK(oduUnpackUInt8, param->pucchIndex, mBuf); - CMCHKPK(oduUnpackUInt8, param->puschFlag, mBuf); - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchBsiBriRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of BSI_BRI information on PUCCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchBsiBriRecpInfo -( -TfuUePucchBsiBriRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchBsiBriRecpInfo(param, mBuf) -TfuUePucchBsiBriRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->puschFlag, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pucchIndex, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->bsiRpt, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->briRpt, mBuf); - return ROK; -} -#endif - -#ifdef TFU_5GTF -#ifdef ANSI -S16 cmUnpkTfuUePucchUciRecpInfo -( -TfuUePucchUciRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchUciRecpInfo(param, mBuf) -TfuUePucchUciRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->numBits, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->pucchIndex, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf); - - return ROK; -} -#endif - - -/*********************************************************** -* -* Func : cmPkTfuUePucchRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UCI on PUCCH. This may contain the following: - * -# HARQ - * -# SR - * -# SRS - * -# CQI - * -# HARQ+SR - * -# HARQ+SRS - * -# HARQ+CQI - * -# HARQ+SR+SRS - * -# HARQ+SR+CQI - * -# SR+SRS - * -# SR+CQI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchRecpReq -( -TfuUePucchRecpReq *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchRecpReq(param, mBuf) -TfuUePucchRecpReq *param; -Buffer *mBuf; -#endif -{ - - -#ifdef TFU_5GTF - CMCHKPK(cmPkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf); - CMCHKPK(cmPkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf); -#endif /* TFU_5GTF */ - CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf); - CMCHKPK(cmPkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf); - CMCHKPK(cmPkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf); - CMCHKPK(cmPkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf); - CMCHKPK(oduUnpackUInt32, param->uciInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UCI on PUCCH. This may contain the following: - * -# HARQ - * -# SR - * -# SRS - * -# CQI - * -# HARQ+SR - * -# HARQ+SRS - * -# HARQ+CQI - * -# HARQ+SR+SRS - * -# HARQ+SR+CQI - * -# SR+SRS - * -# SR+CQI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchRecpReq -( -TfuUePucchRecpReq *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchRecpReq(param, mBuf) -TfuUePucchRecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->uciInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf); -#ifdef TFU_5GTF - CMCHKUNPK(cmUnpkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf); -#endif /* TFU_5GTF */ - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUeUlSchRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on ULSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUeUlSchRecpInfo -( -TfuUeUlSchRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUeUlSchRecpInfo(param, mBuf) -TfuUeUlSchRecpInfo *param; -Buffer *mBuf; -#endif -{ - -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf); - CMCHKPK(oduUnpackUInt8, param->uciWoTBFlag, mBuf); - CMCHKPK(oduUnpackUInt8, param->PMI, mBuf); - CMCHKPK(oduUnpackUInt8, param->SCID, mBuf); - CMCHKPK(oduUnpackUInt8, param->nAntPortLayer, mBuf); - CMCHKPK(oduUnpackUInt8, param->xPUSCHRange, mBuf); - CMCHKPK(oduUnpackUInt8, param->numRbg, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbgStart, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->nSrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->crntTxNb, mBuf); - CMCHKPK(oduUnpackUInt8, param->txMode, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf); - CMCHKPK(oduUnpackUInt32, param->modType, mBuf); - CMCHKPK(oduUnpackUInt8, param->numRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - CMCHKPK(oduUnpackUInt16, param->size, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUeUlSchRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on ULSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUeUlSchRecpInfo -( -TfuUeUlSchRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUeUlSchRecpInfo(param, mBuf) -TfuUeUlSchRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->modType, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->txMode, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->crntTxNb, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nSrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); -#ifdef TFU_5GTF - CMCHKUNPK(oduPackUInt8, ¶m->rbgStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRbg, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->xPUSCHRange, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nAntPortLayer, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->PMI, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->uciWoTBFlag, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf); -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePuschCqiRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of CQI_RI info on PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePuschCqiRecpInfo -( -TfuUePuschCqiRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePuschCqiRecpInfo(param, mBuf) -TfuUePuschCqiRecpInfo *param; -Buffer *mBuf; -#endif -{ - - uint32_t idx = 0; - - CMCHKPK(oduUnpackUInt8, param->riBetaOff, mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiBetaOff, mBuf); - for (idx = 0; idx < param->cCNum; idx++) - { - CMCHKPK(cmPkTknUInt8, ¶m->riSz[idx], mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiPmiSzRn1[idx], mBuf); - CMCHKPK(oduUnpackUInt8, param->cqiPmiSzR1[idx], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->cCNum, mBuf); - CMCHKPK(oduUnpackUInt8, param->reportType, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePuschCqiRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of CQI_RI info on PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePuschCqiRecpInfo -( -TfuUePuschCqiRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePuschCqiRecpInfo(param, mBuf) -TfuUePuschCqiRecpInfo *param; -Buffer *mBuf; -#endif -{ - - uint32_t idx; - - CMCHKUNPK(oduPackUInt8, ¶m->reportType, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cCNum, mBuf); - for (idx = param->cCNum; idx > 0; idx--) - { - CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSzR1[idx-1], mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSzRn1[idx-1], mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->riSz[idx-1], mBuf); - } - CMCHKUNPK(oduPackUInt8, ¶m->cqiBetaOff, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->riBetaOff, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePuschHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of Harq info on PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePuschHqRecpInfo -( -TfuUePuschHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePuschHqRecpInfo(param, mBuf) -TfuUePuschHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - -#ifdef TFU_TDD - CMCHKPK(oduUnpackUInt8, param->ulDai, mBuf); - CMCHKPK(oduUnpackUInt8, param->nBundled, mBuf); - CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf); -#endif - CMCHKPK(oduUnpackUInt8, param->hqBetaOff, mBuf); - CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePuschHqRecpInfo -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of Harq info on PUSCH. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePuschHqRecpInfo -( -TfuUePuschHqRecpInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePuschHqRecpInfo(param, mBuf) -TfuUePuschHqRecpInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hqBetaOff, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->hqFdbkMode, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nBundled, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ulDai, mBuf); -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePuschRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on PUSCH. This may contain the following: - * -# Data - * -# Data + SRS - * -# Data + HARQ - * -# Data + HARQ + SRS - * -# Data + CQI/RI - * -# Data + CQI/RI + SRS - * -# Data + CQI/RI + HARQ - * -# Data + CQI/RI + HARQ + SRS -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePuschRecpReq -( -TfuUePuschRecpReq *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePuschRecpReq(param, mBuf) -TfuUePuschRecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkTknUInt8, ¶m->initialNumRbs, mBuf); - CMCHKPK(cmPkTknUInt8, ¶m->initialNSrs, mBuf); - CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf); - CMCHKPK(cmPkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf); - CMCHKPK(cmPkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf); - CMCHKPK(cmPkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf); - CMCHKPK(oduUnpackUInt32, param->rcpInfo, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePuschRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on PUSCH. This may contain the following: - * -# Data - * -# Data + SRS - * -# Data + HARQ - * -# Data + HARQ + SRS - * -# Data + CQI/RI - * -# Data + CQI/RI + SRS - * -# Data + CQI/RI + HARQ - * -# Data + CQI/RI + HARQ + SRS -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePuschRecpReq -( -TfuUePuschRecpReq *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePuschRecpReq(param, mBuf) -TfuUePuschRecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->rcpInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf); - CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->initialNSrs, mBuf); - CMCHKUNPK(cmUnpkTknUInt8, ¶m->initialNumRbs, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUeRecpReqInfo -* -* -* Desc : This structure is a Per UE reception request for either PUCCH or PUSCH - * data. This contains information needed by PHY to decode the data sent by the - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUeRecpReqInfo -( -TfuUeRecpReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUeRecpReqInfo(param, mBuf) -TfuUeRecpReqInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RECP_REQ_PUSCH: - CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf); - break; - case TFU_RECP_REQ_PUCCH: - CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); -#ifdef TFU_5GTF - CMCHKPK(oduUnpackUInt8, param->groupId, mBuf); -#endif /* TFU_5GTF */ - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUeRecpReqInfo -* -* -* Desc : This structure is a Per UE reception request for either PUCCH or PUSCH - * data. This contains information needed by PHY to decode the data sent by the - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUeRecpReqInfo -( -TfuUeRecpReqInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUeRecpReqInfo(param, mBuf) -TfuUeRecpReqInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); -#ifdef TFU_5GTF - CMCHKUNPK(oduPackUInt8, ¶m->groupId, mBuf); -#endif /* TFU_5GTF */ - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RECP_REQ_PUCCH: - CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf); - break; - case TFU_RECP_REQ_PUSCH: - CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} -#endif /* TFU_UPGRADE */ -#ifndef TFU_UPGRADE /* TFU_UPGRADE */ -/*********************************************************** -* -* Func : cmPkTfuUePucchRecpReq -* -* -* Desc : This structure is sent from Scheduler to PHY in order to request the - * reception of an UEs data on PUCCH. This may contain the following: - * -# HARQ-ACK - * -# Scheduling Request (SR) - * -# HARQ-ACK and SR - * -# CQI - * -# CQI and HARQ-ACK -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePucchRecpReq -( -TfuUePucchRecpReq *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePucchRecpReq(param, mBuf) -TfuUePucchRecpReq *param; -Buffer *mBuf; -#endif -{ - -#ifdef TFU_TDD - S32 i; -#endif - - -#ifdef TFU_TDD - for (i=TFU_MAX_M-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->p[i], mBuf); - } - for (i=TFU_MAX_M-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->m[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->M, mBuf); - CMCHKPK(oduUnpackUInt8, param->multCnt, mBuf); - -#endif - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - switch(param->hqType) { - case TFU_HQ_RECP_REQ_N1PUCCH: - CMCHKPK(oduUnpackUInt16, param->t.n1Pucch, mBuf); - break; - -#ifdef TFU_TDD - case TFU_HQ_RECP_REQ_NORMAL: - for (i=TFU_MAX_M-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt16, param->t.nCce[i], mBuf); - } - break; - -#endif - -#ifndef TFU_TDD - case TFU_HQ_RECP_REQ_NORMAL: - CMCHKPK(oduUnpackUInt16, param->t.nCce, mBuf); - break; - -#endif - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->hqType, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePucchRecpReq -* -* -* Desc : This structure is sent from Scheduler to PHY in order to request the - * reception of an UEs data on PUCCH. This may contain the following: - * -# HARQ-ACK - * -# Scheduling Request (SR) - * -# HARQ-ACK and SR - * -# CQI - * -# CQI and HARQ-ACK -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePucchRecpReq -( -TfuUePucchRecpReq *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePucchRecpReq(param, mBuf) -TfuUePucchRecpReq *param; -Buffer *mBuf; -#endif -{ - -#ifdef TFU_TDD - S32 i; -#endif - - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->hqType, mBuf); - switch(param->hqType) { - -#ifndef TFU_TDD - case TFU_HQ_RECP_REQ_NORMAL: - CMCHKUNPK(oduPackUInt16, ¶m->t.nCce, mBuf); - break; - -#endif - -#ifdef TFU_TDD - case TFU_HQ_RECP_REQ_NORMAL: - for (i=0; it.nCce[i], mBuf); - } - break; - -#endif - case TFU_HQ_RECP_REQ_N1PUCCH: - CMCHKUNPK(oduPackUInt16, ¶m->t.n1Pucch, mBuf); - break; - default : - return RFAILED; - } - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - -#ifdef TFU_TDD - CMCHKUNPK(oduPackUInt8, ¶m->multCnt, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->M, mBuf); - for (i=0; im[i], mBuf); - } - for (i=0; ip[i], mBuf); - } - -#endif - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUeMsg3RecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data sent as MSG3 for Random access. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUeMsg3RecpReq -( -TfuUeMsg3RecpReq *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUeMsg3RecpReq(param, mBuf) -TfuUeMsg3RecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt32, param->modType, mBuf); - CMCHKPK(oduUnpackUInt16, param->size, mBuf); - /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/ - CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf); - CMCHKPK(oduUnpackUInt8, param->ulDelay, mBuf); - CMCHKPK(oduUnpackUInt8, param->expCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->numRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUeMsg3RecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data sent as MSG3 for Random access. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUeMsg3RecpReq -( -TfuUeMsg3RecpReq *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUeMsg3RecpReq(param, mBuf) -TfuUeMsg3RecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->expCqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ulDelay, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf); - /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/ - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->modType, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUePuschRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on PUSCH. This may contain the following: - * -# Data - * -# Data + CQI and RI - * -# Data + CQI and HARQ -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUePuschRecpReq -( -TfuUePuschRecpReq *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUePuschRecpReq(param, mBuf) -TfuUePuschRecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(oduUnpackUInt32, param->modType, mBuf); - CMCHKPK(oduUnpackUInt16, param->size, mBuf); - CMCHKPK(oduUnpackUInt32, param->mode, mBuf); - CMCHKPK(oduUnpackUInt8, param->expHarq, mBuf); - CMCHKPK(oduUnpackUInt8, param->expCqi, mBuf); - CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf); - CMCHKPK(oduUnpackUInt8, param->rv, mBuf); - CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf); - CMCHKPK(oduUnpackUInt8, param->ndi, mBuf); - CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf); - CMCHKPK(oduUnpackUInt8, param->mcs, mBuf); - CMCHKPK(oduUnpackUInt8, param->numRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf); - CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUePuschRecpReq -* -* -* Desc : This structure is sent from scheduler to PHY in order to request the - * reception of UEs data on PUSCH. This may contain the following: - * -# Data - * -# Data + CQI and RI - * -# Data + CQI and HARQ -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUePuschRecpReq -( -TfuUePuschRecpReq *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUePuschRecpReq(param, mBuf) -TfuUePuschRecpReq *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->expCqi, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->expHarq, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->mode, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->modType, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkTfuUeRecpReqInfo -* -* -* Desc : This structure is a Per UE reception request for either PUCCH or PUSCH - * data. This contains information needed by PHY to decode the data sent by the - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuUeRecpReqInfo -( -TfuUeRecpReqInfo *param, -Buffer *mBuf -) -#else -S16 cmPkTfuUeRecpReqInfo(param, mBuf) -TfuUeRecpReqInfo *param; -Buffer *mBuf; -#endif -{ - - - switch(param->type) { - case TFU_RECP_REQ_PUSCH: - CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf); - break; - case TFU_RECP_REQ_MSG3: - CMCHKPK(cmPkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf); - break; - case TFU_RECP_REQ_PUCCH: - CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf); - break; - default : - return RFAILED; - } - CMCHKPK(oduUnpackUInt32, param->type, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkTfuUeRecpReqInfo -* -* -* Desc : This structure is a Per UE reception request for either PUCCH or PUSCH - * data. This contains information needed by PHY to decode the data sent by the - * UE. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuUeRecpReqInfo -( -TfuUeRecpReqInfo *param, -Buffer *mBuf -) -#else -S16 cmUnpkTfuUeRecpReqInfo(param, mBuf) -TfuUeRecpReqInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt32, (uint32_t *)¶m->type, mBuf); - switch(param->type) { - case TFU_RECP_REQ_PUCCH: - CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf); - break; - case TFU_RECP_REQ_MSG3: - CMCHKUNPK(cmUnpkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf); - break; - case TFU_RECP_REQ_PUSCH: - CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf); - break; - default : - return RFAILED; - } - return ROK; -} - - -#endif /* ifndef TFU_UPGRADE */ -/*LAA: Packing and Unpacking*/ - -/*********************************************************** -* -* Func : cmPkTfuErrIndInfo -* -* -* Desc : This structure contains information that is passed as a part of -* the ERR indication sent from PHY to MAC. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -static S16 cmPkTfuErrIndInfo -( -TfuErrIndInfo *param, -Buffer *mBuf -) -#else -static S16 cmPkTfuErrIndInfo(param, mBuf) -TfuErrIndInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} -/*********************************************************** -* -* Func : cmUnpkTfuErrIndInfo -* -* -* Desc : This structure contains information that is passed as a part of the ERR - * indication sent from PHY to MAC. -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -static S16 cmUnpkTfuErrIndInfo -( -TfuErrIndInfo *param, -Buffer *mBuf -) -#else -static S16 cmUnpkTfuErrIndInfo(param, mBuf) -TfuErrIndInfo *param; -Buffer *mBuf; -#endif -{ - - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf); - return ROK; -} - -/*********************************************************** -* -* Func : cmPkTfuErrInd -* -* - * This API is invoked by PHY to send ERROR INDICATION to scheduler - * Currently invoked in the cases when the Unlicensed SCell transmission - * fails. - * This API contains the Cell and subframe information for which the - * transmission failed. - * - * @param[in] Pst *pst - * @param[in] SuId suId - * @param[in] TfuErrIndInfo *errIndInfo - * @return S16 - * -# ROK - * -# RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmPkTfuErrInd -( -Pst * pst, -SuId suId, -TfuErrIndInfo * errInd -) -#else -S16 cmPkTfuErrInd(pst, suId, errInd) -Pst * pst; -SuId suId; -TfuErrIndInfo * errInd; -#endif -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU105, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LC) { - if (cmPkTfuErrIndInfo(errInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU106, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduPackPointer((PTR)errInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed"); -#endif - - /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/ - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU107, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - if (SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU108, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - //pst->event = (Event) EVTTFUERRIND; - return (SPstTsk(pst,mBuf)); -} - - -/*********************************************************** -* -* Func : cmUnpkTfuErrInd -* -* - * This API is invoked by PHY to send ERROR INDICATION to scheduler - * Currently invoked in the cases when the Unlicensed SCell transmission - * fails. - * This API contains the Cell and subframe information for which the - * transmission failed. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param errInd Pointer to the TfuErrIndInfo. - * @return ROK/RFAILED -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 cmUnpkTfuErrInd -( -TfuErrInd func, -Pst *pst, -Buffer *mBuf -) -#else -S16 cmUnpkTfuErrInd(func, pst, mBuf) -TfuErrInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - TfuErrIndInfo *errInd; - - - if (SUnpkS16(&suId, mBuf) != ROK) { - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU109, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (pst->selector != ODU_SELECTOR_LWLC) { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&errInd, sizeof(TfuErrIndInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU110, (ErrVal)0, "Packing failed"); -#endif - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkTfuErrIndInfo(errInd, mBuf) != ROK) { - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - TFU_FREE_MSG(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFU111, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - else if(pst->selector == ODU_SELECTOR_LWLC) - { - if (oduUnpackPointer((PTR *)&errInd, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - TFU_FREE_MSG(mBuf); - return RFAILED; - } - } - TFU_FREE_MSG(mBuf); - /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */ - (*func)(pst, suId, errInd); - SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)); - return ROK; - -} -#endif /* if defined(LCTFU) */ - -/********************************************************************** - End of file - **********************************************************************/ diff --git a/src/cm/tfu.h b/src/cm/tfu.h index 554f9034a..8aa418012 100755 --- a/src/cm/tfu.h +++ b/src/cm/tfu.h @@ -87,39 +87,6 @@ #define TFU_MAX_HARQ_FDBKS TFU_MAX_TB /*For Rel8/Rel9 UE*/ #endif/*LTE_ADV*/ - -/* Event corresponding to each primitive at this interface */ -#if 0 -#define EVTTFUBNDREQ 1 /*!< Bind Request */ -#define EVTTFUBNDCFM 2 /*!< Bind Confirm */ -#define EVTTFUUBNDREQ 3 /*!< Unbind Request */ -#define EVTTFUSCHBNDREQ 4 /*!< Bind Request */ -#define EVTTFUSCHBNDCFM 5 /*!< Bind Confirm */ -#define EVTTFUSCHUBNDREQ 6 /*!< Unbind Request */ -#define EVTTFURAREQIND 7 /*!< Random access request indication. */ -#define EVTTFURECPREQ 8 /*!< Reception Request. */ -#define EVTTFUULCQIIND 9 /*!< Uplink CQI indication.*/ -#define EVTTFUHQIND 10 /*!< HARQ Feedback indication. */ -#define EVTTFUDLCQIIND 11 /*!< Downlink CQI indication. */ -#define EVTTFUSRIND 12 /*!< Scheduling Request indication.*/ -#define EVTTFUDATIND 13 /*!< Data indication.*/ -#define EVTTFUCRCIND 14 /*!< CRC indication. */ -#define EVTTFUTIMINGADVIND 15 /*!< Timing advance indication.*/ -#define EVTTFUDATREQ 16 /*!< Data Request.*/ -#define EVTTFUCNTRLREQ 19 /*!< Control Request.*/ -#define EVTTFUPUCCHDELPWR 20 /*!< PUCCH Delta power. */ -#define EVTTFUDOAIND 21 /*!< PUCCH Delta power. */ -/* tfu_h_001.main_6. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -#define EVTTFURAWCQIIND 22 -#define EVTTFUSRSIND 23 -#endif -#if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) -#define EVTTFUNONRTIND 24 /*!< Non-RT indication.*/ -#endif -#define EVTTFUERRIND 25 /*!< TFU Error Indication */ -/** @} */ -#endif /* selector(coupling) values */ #define TFU_MAX_ALLOC_BYTES 4 /* pack unpack error code */ @@ -132,136 +99,6 @@ #define TFU_HQFDB_DTX 4 #define TFU_HQFDB_INVALID 0xFF -/*tfu_h_001.main_7 - DEL - ERR Codes*/ -#define ETFU001 (ERRTFU + 1) /* tfu.c: 162 */ -#define ETFU002 (ERRTFU + 2) /* tfu.c: 170 */ -#define ETFU003 (ERRTFU + 3) /* tfu.c: 179 */ -#define ETFU004 (ERRTFU + 4) /* tfu.c: 232 */ -#define ETFU005 (ERRTFU + 5) /* tfu.c: 241 */ -#define ETFU006 (ERRTFU + 6) /* tfu.c: 290 */ -#define ETFU007 (ERRTFU + 7) /* tfu.c: 298 */ -#define ETFU008 (ERRTFU + 8) /* tfu.c: 307 */ -#define ETFU009 (ERRTFU + 9) /* tfu.c: 360 */ -#define ETFU010 (ERRTFU + 10) /* tfu.c: 369 */ -#define ETFU011 (ERRTFU + 11) /* tfu.c: 418 */ -#define ETFU012 (ERRTFU + 12) /* tfu.c: 426 */ -#define ETFU013 (ERRTFU + 13) /* tfu.c: 435 */ -#define ETFU014 (ERRTFU + 14) /* tfu.c: 488 */ -#define ETFU015 (ERRTFU + 15) /* tfu.c: 497 */ -#define ETFU016 (ERRTFU + 16) /* tfu.c: 546 */ -#define ETFU017 (ERRTFU + 17) /* tfu.c: 554 */ -#define ETFU018 (ERRTFU + 18) /* tfu.c: 563 */ -#define ETFU019 (ERRTFU + 19) /* tfu.c: 616 */ -#define ETFU020 (ERRTFU + 20) /* tfu.c: 625 */ -#define ETFU021 (ERRTFU + 21) /* tfu.c: 674 */ -#define ETFU022 (ERRTFU + 22) /* tfu.c: 682 */ -#define ETFU023 (ERRTFU + 23) /* tfu.c: 691 */ -#define ETFU024 (ERRTFU + 24) /* tfu.c: 744 */ -#define ETFU025 (ERRTFU + 25) /* tfu.c: 753 */ -#define ETFU026 (ERRTFU + 26) /* tfu.c: 802 */ -#define ETFU027 (ERRTFU + 27) /* tfu.c: 810 */ -#define ETFU028 (ERRTFU + 28) /* tfu.c: 819 */ -#define ETFU029 (ERRTFU + 29) /* tfu.c: 872 */ -#define ETFU030 (ERRTFU + 30) /* tfu.c: 881 */ -#define ETFU031 (ERRTFU + 31) /* tfu.c: 934 */ -#define ETFU032 (ERRTFU + 32) /* tfu.c: 944 */ -#define ETFU033 (ERRTFU + 33) /* tfu.c: 956 */ -#define ETFU034 (ERRTFU + 34) /* tfu.c:1018 */ -#define ETFU035 (ERRTFU + 35) /* tfu.c:1030 */ -#define ETFU036 (ERRTFU + 36) /* tfu.c:1045 */ -#define ETFU037 (ERRTFU + 37) /* tfu.c:1108 */ -#define ETFU038 (ERRTFU + 38) /* tfu.c:1118 */ -#define ETFU039 (ERRTFU + 39) /* tfu.c:1130 */ -#define ETFU040 (ERRTFU + 40) /* tfu.c:1202 */ -#define ETFU041 (ERRTFU + 41) /* tfu.c:1214 */ -#define ETFU042 (ERRTFU + 42) /* tfu.c:1229 */ -#define ETFU043 (ERRTFU + 43) /* tfu.c:1283 */ -#define ETFU044 (ERRTFU + 44) /* tfu.c:1293 */ -#define ETFU045 (ERRTFU + 45) /* tfu.c:1305 */ -#define ETFU046 (ERRTFU + 46) /* tfu.c:1368 */ -#define ETFU047 (ERRTFU + 47) /* tfu.c:1380 */ -#define ETFU048 (ERRTFU + 48) /* tfu.c:1396 */ -#define ETFU049 (ERRTFU + 49) /* tfu.c:1450 */ -#define ETFU050 (ERRTFU + 50) /* tfu.c:1460 */ -#define ETFU051 (ERRTFU + 51) /* tfu.c:1472 */ -#define ETFU052 (ERRTFU + 52) /* tfu.c:1534 */ -#define ETFU053 (ERRTFU + 53) /* tfu.c:1546 */ -#define ETFU054 (ERRTFU + 54) /* tfu.c:1562 */ -#define ETFU055 (ERRTFU + 55) /* tfu.c:1615 */ -#define ETFU056 (ERRTFU + 56) /* tfu.c:1625 */ -#define ETFU057 (ERRTFU + 57) /* tfu.c:1637 */ -#define ETFU058 (ERRTFU + 58) /* tfu.c:1698 */ -#define ETFU059 (ERRTFU + 59) /* tfu.c:1710 */ -#define ETFU060 (ERRTFU + 60) /* tfu.c:1726 */ -#define ETFU061 (ERRTFU + 61) /* tfu.c:1777 */ -#define ETFU062 (ERRTFU + 62) /* tfu.c:1787 */ -#define ETFU063 (ERRTFU + 63) /* tfu.c:1799 */ -#define ETFU064 (ERRTFU + 64) /* tfu.c:1857 */ -#define ETFU065 (ERRTFU + 65) /* tfu.c:1869 */ -#define ETFU066 (ERRTFU + 66) /* tfu.c:1885 */ -#define ETFU067 (ERRTFU + 67) /* tfu.c:1944 */ -#define ETFU068 (ERRTFU + 68) /* tfu.c:1954 */ -#define ETFU069 (ERRTFU + 69) /* tfu.c:2014 */ -#define ETFU070 (ERRTFU + 70) /* tfu.c:2026 */ -#define ETFU071 (ERRTFU + 71) /* tfu.c:2082 */ -#define ETFU072 (ERRTFU + 72) /* tfu.c:2092 */ -#define ETFU073 (ERRTFU + 73) /* tfu.c:2151 */ -#define ETFU074 (ERRTFU + 74) /* tfu.c:2163 */ -#define ETFU075 (ERRTFU + 75) /* tfu.c:2221 */ -#define ETFU076 (ERRTFU + 76) /* tfu.c:2231 */ -#define ETFU077 (ERRTFU + 77) /* tfu.c:2243 */ -#define ETFU078 (ERRTFU + 78) /* tfu.c:2304 */ -#define ETFU079 (ERRTFU + 79) /* tfu.c:2316 */ -#define ETFU080 (ERRTFU + 80) /* tfu.c:2332 */ -#define ETFU081 (ERRTFU + 81) /* tfu.c:2389 */ -#define ETFU082 (ERRTFU + 82) /* tfu.c:2399 */ -#define ETFU083 (ERRTFU + 83) /* tfu.c:2411 */ -#define ETFU084 (ERRTFU + 84) /* tfu.c:2476 */ -#define ETFU085 (ERRTFU + 85) /* tfu.c:2488 */ -#define ETFU086 (ERRTFU + 86) /* tfu.c:2504 */ -#define ETFU087 (ERRTFU + 87) /* tfu.c:2558 */ -#define ETFU088 (ERRTFU + 88) /* tfu.c:2568 */ -#define ETFU089 (ERRTFU + 89) /* tfu.c:2580 */ -#define ETFU090 (ERRTFU + 90) /* tfu.c:2642 */ -#define ETFU091 (ERRTFU + 91) /* tfu.c:2654 */ -#define ETFU092 (ERRTFU + 92) /* tfu.c:2670 */ -#define ETFU093 (ERRTFU + 93) /* tfu.c:2726 */ -#define ETFU094 (ERRTFU + 94) /* tfu.c:2736 */ -#define ETFU095 (ERRTFU + 95) /* tfu.c:2748 */ -#define ETFU096 (ERRTFU + 96) /* tfu.c:2812 */ -#define ETFU097 (ERRTFU + 97) /* tfu.c:2824 */ -#define ETFU098 (ERRTFU + 98) /* tfu.c:2840 */ -#define ETFU099 (ERRTFU + 99) /* tfu.c:2897 */ -#define ETFU100 (ERRTFU + 100) /* tfu.c:2907 */ -#define ETFU101 (ERRTFU + 101) /* tfu.c:2919 */ -#define ETFU102 (ERRTFU + 102) /* tfu.c:2984 */ -#define ETFU103 (ERRTFU + 103) /* tfu.c:2996 */ -#define ETFU104 (ERRTFU + 104) /* tfu.c:3012 */ -#define ETFU105 (ERRTFU + 105) /* tfu.c:3065 */ -#define ETFU106 (ERRTFU + 106) /* tfu.c:3075 */ -#define ETFU107 (ERRTFU + 107) /* tfu.c:3087 */ -#define ETFU108 (ERRTFU + 108) /* tfu.c:3098 */ -#define ETFU109 (ERRTFU + 109) /* tfu.c:3155 */ -#define ETFU110 (ERRTFU + 110) /* tfu.c:3164 */ -#define ETFU111 (ERRTFU + 111) /* tfu.c:3179 */ -#define ETFU112 (ERRTFU + 112) /* tfu.c:3231 */ -#define ETFU113 (ERRTFU + 113) /* tfu.c:3241 */ -#define ETFU114 (ERRTFU + 114) /* tfu.c:3253 */ -#define ETFU115 (ERRTFU + 115) /* tfu.c:3264 */ -#define ETFU116 (ERRTFU + 116) /* tfu.c:3320 */ -#define ETFU117 (ERRTFU + 117) /* tfu.c:3329 */ -#define ETFU118 (ERRTFU + 118) /* tfu.c:3344 */ -#define ETFU119 (ERRTFU + 119) /* tfu.c:3396 */ -#define ETFU120 (ERRTFU + 120) /* tfu.c:3406 */ -#define ETFU121 (ERRTFU + 121) /* tfu.c:3418 */ -#define ETFU122 (ERRTFU + 122) /* tfu.c:3477 */ -#define ETFU123 (ERRTFU + 123) /* tfu.c:3489 */ -#define ETFU124 (ERRTFU + 124) /* tfu.c:3504 */ -#define ETFU125 (ERRTFU + 125) /* tfu.c:10783 */ -#define ETFU126 (ERRTFU + 126) /* tfu.c:10793 */ -#define ETFU127 (ERRTFU + 127) /* tfu.c:10850 */ -#define ETFU128 (ERRTFU + 128) /* tfu.c:10862 */ - #define TFU_PERIODIC_CQI_TYPE 0 #define TFU_APERIODIC_CQI_TYPE 1 @@ -283,7 +120,6 @@ } \ } - #endif /* __TFU_H__ */ /********************************************************************30** diff --git a/src/cm/tfu.x b/src/cm/tfu.x index e8745b864..735d774cc 100755 --- a/src/cm/tfu.x +++ b/src/cm/tfu.x @@ -2503,1978 +2503,6 @@ typedef struct tfuDelDatReqInfo } TfuDelDatReqInfo; #endif -typedef S16 (*TfuBndReq) ARGS(( - Pst* pst, - SuId suId, - SpId spId)); -typedef S16 (*TfuBndCfm) ARGS(( - Pst* pst, - SuId suId, - uint8_t status)); -typedef S16 (*TfuUbndReq) ARGS(( - Pst* pst, - SpId spId, - Reason reason)); - -typedef S16 (*TfuSchBndReq) ARGS(( - Pst* pst, - SuId suId, - SpId spId)); -typedef S16 (*TfuSchBndCfm) ARGS(( - Pst* pst, - SuId suId, - uint8_t status)); -typedef S16 (*TfuSchUbndReq) ARGS(( - Pst* pst, - SpId spId, - Reason reason)); - -typedef S16 (*TfuRaReqInd) ARGS(( - Pst * pst, - SuId suId, - TfuRaReqIndInfo *raReqInd)); - -typedef S16 (*TfuRecpReq) ARGS(( - Pst * pst, - SpId spId, - TfuRecpReqInfo *recpReq)); - -typedef S16 (*TfuUlCqiInd) ARGS(( - Pst * pst, - SuId suId, - TfuUlCqiIndInfo * ulCqiInd)); - -typedef S16 (*TfuDoaInd) ARGS(( - Pst * pst, - SuId suId, - TfuDoaIndInfo * doaInd)); -typedef S16 (*TfuHqInd) ARGS(( - Pst * pst, - SuId suId, - TfuHqIndInfo * hqInd)); - -typedef S16 (*TfuSrInd) ARGS(( - Pst * pst, - SuId suId, - TfuSrIndInfo * srInd)); - -typedef S16 (*TfuDlCqiInd) ARGS(( - Pst * pst, - SuId suId, - TfuDlCqiIndInfo * dlCqiInd)); -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -typedef S16 (*TfuRawCqiInd) ARGS(( - Pst *pst, - SuId suId, - TfuRawCqiIndInfo *rawCqiInd)); - -typedef S16 (*TfuSrsInd) ARGS(( - Pst *pst, - SuId suId, - TfuSrsIndInfo *srsInd)); -#endif /* TFU_UPGRADE */ - -typedef S16 (*TfuDatInd) ARGS(( - Pst * pst, - SuId suId, - TfuDatIndInfo * datInd)); - -typedef S16 (*TfuCrcInd) ARGS(( - Pst * pst, - SuId suId, - TfuCrcIndInfo * crcInd)); - -typedef S16 (*TfuTimingAdvInd) ARGS(( - Pst * pst, - SuId suId, - TfuTimingAdvIndInfo * timingAdvInd)); - -typedef S16 (*TfuDatReq) ARGS(( - Pst * pst, - SpId spId, - TfuDatReqInfo * datReq)); - -#ifdef L2_OPTMZ -typedef S16 (*TfuDelDatReq) ARGS(( - Pst * pst, - SpId spId, - TfuDelDatReqInfo * datReq)); -#endif - -typedef S16 (*TfuCntrlReq) ARGS(( - Pst *pst, - SpId spId, - TfuCntrlReqInfo *cntrlReq)); -/* CA dev Start */ -typedef S16 (*TfuTtiCell) ARGS(( - Pst * pst, - SuId suId, - TfuTtiCellInfo * ttiInd)); -/* CA dev End */ -typedef S16 (*TfuTtiInd) ARGS(( - Pst * pst, - SlotIndInfo * slotInd)); - -#if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) -typedef S16 (*TfuNonRtInd) ARGS(( - Pst * pst, - SuId suId)); -#endif - -typedef S16 (*TfuSchTtiInd) ARGS(( - Pst * pst, -// SuId suId, - SlotIndInfo* slotInd)); - -typedef S16 (*TfuPucchDeltaPwrInd) ARGS(( - Pst * pst, - SuId suId, - TfuPucchDeltaPwrIndInfo * pucchDeltaPwr)); - -/*LAA: Error Indication on LAA SCell*/ -typedef S16 (*TfuErrInd) ARGS(( - Pst * pst, - SuId suId, - TfuErrIndInfo * errInd)); - -/** @brief This API is used to send a Bind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED - */ -S16 TfUiTfuBndReq ARGS((Pst *pst, SuId suId, SpId spId)); - -/** @brief This API is used to send a Bind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param spId SAP ID of the service provider. - * @return ROK/RFAILED - */ -S16 TfUiTfuSchBndReq ARGS((Pst *pst, SuId suId, SpId spId)); - - -/** @brief This API is used to receive a Bind Confirm from PHY to MAC. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED - */ -S16 TfUiTfuBndCfm ARGS((Pst *pst, SuId suId, uint8_t status)); - -/** @brief This API is used to receive a Bind Confirm from PHY to Scheduler. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param status Status of the bind request. - * @return ROK/RFAILED - */ -S16 TfUiTfuSchBndCfm ARGS((Pst *pst, SuId suId, uint8_t status)); - - -/** @brief This API is used to send an Unbind Request from MAC to PHY. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED - */ -S16 TfUiTfuUbndReq ARGS((Pst *pst, SpId spId, Reason reason)); - -/** @brief This API is used to send an Unbind Request from Scheduler to PHY. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param reason Reason for Unbind request. - * @return ROK/RFAILED - */ -S16 TfUiTfuSchUbndReq ARGS((Pst *pst, SpId spId, Reason reason)); - - -/** @brief This API is used to indication Random Access Request reception from - * PHY to Scheduler. - * @details This primitive is used by physical layer to indicate the reception - * of a Random Access Request from a set of UEs. The information passed consists - * of the RA-RNTI and the list of preambles received. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param raReqInd Pointer to the TfuRaReqIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuRaReqInd ARGS((Pst *pst, SuId suId, TfuRaReqIndInfo - *raReqInd)); - - -/** @brief This primitive is sent from Scheduler to PHY. - * @details This primitive provides PHY with all the information required by - * PHY to decode transmissions from the UE on either PUCCH or PUSCH. - * -# On PUCCH, UE can transmit the following: - * -# SR - * -# HARQ feedback - * -# CQI report - * -# HARQ + CQI - * -# HARQ + SR - * -# On PUSCH, UE can transmit the following: - * -# Data - * -# Data + CQI - * -# Data + HARQ Feedback - * This primitive carries all the information for the expected subframe for all - * the UEs that are scheduled to transmit. - * @param pst Pointer to the post structure. - * @param spId SAP ID of the service provider. - * @param recpReq Pointer to the TfuRecpReqInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuRecpReq ARGS((Pst *pst, SpId spId, TfuRecpReqInfo *recpReq)); - - /** @brief This primitive is sent from Scheduler to PHY. It provides PHY with - * all the control information. - * @details This primitive carries the information sent on the following - * channels: - * -# PDCCH - * -# PHICH - * -# PCFICH - * - * @param pst - * @param spId - * @param cntrlReq pointer to TfuCntrlReqInfo - * @return ROK/RFAILED - */ -S16 TfUiTfuCntrlReq ARGS((Pst *pst, SpId spId, TfuCntrlReqInfo *cntrlReq)); - - /** @brief This primitive carries the Data PDUs from MAC to PHY for transmission. - * @details The data being sent in this primitive is meant to be transmitted on - * the downlink channel PDSCH and PBCH (if present). To facilitate physical - * layer processing, requisite control information is also sent along with the - * data. - * @sa TfUiTfuCntrlReq - * @param pst - * @param spId - * @param datReq pointer to TfuDatReqInfo - * @return - */ -S16 TfUiTfuDatReq ARGS((Pst *pst, SpId spId, TfuDatReqInfo *datReq)); - -#ifdef L2_OPTMZ -/** @brief This primitive carries the cellId and UeId for which datReq need to - * deleted in CL. - * @details This primitive is used to delete datReq PDUs present in CL for - * which got changed or similar other scenarios. These scenarios are possible - * only when L2_OPTMZ flag is enabled. - * @sa TfUiTfuDelDatReq - * @param pst - * @param spId - * @param datReq pointer to TfuDelDatReqInfo - * @return - */ - -S16 TfUiTfuDelDatReq ARGS((Pst *pst, SpId spId, TfuDelDatReqInfo *datReq)); -#endif - -/** @brief This Primitive carries the Data PDUs from PHY to MAC. - * @details The Uplink Data, that is, the data transmitted by the UEs received by the - * physical layer at the eNodeB in the subframe (indicated by the timingInfo), - * is relayed to MAC using this primitive. - * @param pst - * @param suId - * @param datInd pointer to TfuDatIndInfo - * @return - */ -S16 TfUiTfuDatInd ARGS((Pst *pst, SuId suId, TfuDatIndInfo *datInd)); - -/** @brief This primitive carries the HARQ Feedback from PHY to Scheduler. - * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE - * can successfully recieve the data transmitted by the eNodeB, else a NACK is - * sent. This feedback is utilized by MAC for further scheduling, for instance - * it can schedule an adaptive retransmission of the same data. - * @param pst - * @param suId - * @param hqInd pointer to TfuHqIndInfo - * @return - */ -S16 TfUiTfuHqInd ARGS((Pst *pst, SuId suId, TfuHqIndInfo *hqInd)); - -/** @brief This primitive carries the SR Indication from PHY to Scheduler. - * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request - * for Uplink (UL) grant. This primitive carries a list of SRs for a number of - * UEs received in the indicated subframe. - * @param pst - * @param suId - * @param srInd pointer to TfuSrIndInfo - * @return - */ -S16 TfUiTfuSrInd ARGS((Pst *pst, SuId suId, TfuSrIndInfo *srInd)); - -/** @brief This API is used to indicate CQI reporting from PHY to Scheduler. - * @details This primitive carries an estimate of the Uplink Channel Quality - * Index (CQI) for a list of UEs. This is an estimate of the uplink channel - * quality, that is, the transmission from UE as calculated at the Physical layer at - * the eNodeB. - * It carries a list of sub-band CQIs for each UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuUlCqiInd ARGS((Pst *pst, SuId suId, - TfuUlCqiIndInfo *ulCqiInd)); - -/** @brief This API is used by the Physical layer to indicate if the CRC Check - * on the PUSCH Data is successful or not. - * @details This primitive carries CRC indication for a list of UEs. This - * is utilized in the scenario where MAC requested the reception of Uplink data - * for a particular UE. On reception of the PUSCH data, the CRC check on it - * failed. This CRC failure is indicated to MAC, which utillizes this - * information for further scheduling. - * Physical layer indicates failure or success for each PUSCH transmission. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param crcIndInfo Pointer to the TfuCrcIndInfo. - * @return ROK/RFAILED - */ -S16 TfUiTfuCrcInd ARGS((Pst *pst, SuId suId, - TfuCrcIndInfo *crcIndInfo)); - -/** @brief This API is used to indicate a Timing Advance from PHY to Scheduler. - * @details This primitive carries timing advance information for a number of - * UEs that may need timing advance. Timing advance information is an estimate - * of the timing adjustment that an UE needs to apply in order to be - * synchronized in Uplink. This estimate is to be calculated by physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuTimingAdvInd ARGS((Pst *pst, SuId suId, - TfuTimingAdvIndInfo *timingAdvInd)); - -/* CA dev Start */ -/** @brief This API is the TTI indication from CL to MAC and SCH - * @details This primitive provides the timing information (SFN and subframe) - * which is currently running on the physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ttiInd Pointer to the TfuTtiCellInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuTtiCell ARGS((Pst *pst, SuId suId, - TfuTtiCellInfo *ttiInd)); -/* CA dev End */ - -/** @brief This API is the TTI indication from CL to MAC and SCH - * @details This primitive provides the timing information (SFN and subframe) - * which is currently running on the physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ttiInd Pointer to the TfuTtiIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuTtiInd ARGS((Pst *pst, SuId suId, - TfuTtiIndInfo *ttiInd)); - -/** @brief This API is the TTI indication from PHY to Scheduler. - * @details This primitive provides the timing information (SFN and subframe) - * which is currently running on the physical layer. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param ttiInd Pointer to the TfuTtiIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuSchTtiInd ARGS((Pst *pst, SuId suId, - TfuTtiIndInfo *ttiInd)); - - -/** @brief This API is used to indicate the reception of CQI report from PHY to - * Scheduler and also carries the Rank Index information. - * @details This primitive carries the CQI (Channel Quality Index) report - * for the downlink channel, sent by the UE. It is also used to report RI and - * PMI. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuDlCqiInd ARGS((Pst *pst, SuId suId, - TfuDlCqiIndInfo *dlCqiInd)); -/** @brief This API is used to indicate the calculated DOA value report from PHY to - * Scheduler. - * @details This primitive carries the DOA(Direction of arrival) report - * calculated at PHYSICAL LAYER, for an UE. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param doaInd Pointer to the TfuDoaIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuDoaInd ARGS((Pst *pst, SuId suId, - TfuDoaIndInfo *doaInd)); - - -/** @brief This primitive is used to convey PUCCH Delta Power calculated by the - * Physical layer. - * @details This primitive is used to convey PUCCH Delta Power calculated by the - * Physical layer. This information is utilized by the scheduler to perform - * power control for the UEs. - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param pucchDeltaPwr Pointer to the TfuPucchDeltaPwrIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuPucchDeltaPwrInd ARGS((Pst *pst, SuId suId, - TfuPucchDeltaPwrIndInfo *pucchDeltaPwr)); - -/** @brief LAA:This primitive carries the Error Indication from PHY to Scheduler. - * This primitive is invoked when the transmission on the unlicensed Scell - * fails. - * @param pst - * @param suId - * @param errInd pointer to TfuErrIndInfo - * @return - */ - -S16 TfUiTfuErrInd ARGS((Pst *pst, SuId suId, - TfuErrIndInfo *errInd)); -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE - -/** @brief This primitive is used to convey the information derived by the - * physical layer from the SRS transmission from the UE. - * @details This primitive carries information derived from the SRS transmission - * from the UE. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param srsInd Pointer to the TfuSrIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuSrsInd ARGS((Pst *pst, SuId suId, - TfuSrsIndInfo *srsInd)); - - -/** @brief This primitive is used to convey the Raw CQI information - * transmitted by the UE. - * @details Raw CQI report is the actual bits transmitted by the UE when - * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI - * and so on, are done by MAC. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param cqiInd Pointer to the TfuRawCqiIndInfo structure. - * @return ROK/RFAILED - */ -S16 TfUiTfuRawCqiInd ARGS((Pst *pst, SuId suId, - TfuRawCqiIndInfo *cqiInd)); - -#endif /* TFU_UPGRADE */ - -#ifdef RG -S16 RgLiTfuBndReq ARGS(( - Pst* pst, - SuId suId, - SpId spId -)); -S16 RgLiTfuBndCfm ARGS(( - Pst* pst, - SuId suId, - uint8_t status -)); -S16 RgLiTfuUbndReq ARGS(( - Pst* pst, - SpId spId, - Reason reason -)); - -S16 RgLiTfuSchBndReq ARGS(( - Pst* pst, - SuId suId, - SpId spId -)); -S16 RgLiTfuSchBndCfm ARGS(( - Pst* pst, - SuId suId, - uint8_t status -)); -S16 RgLiTfuSchUbndReq ARGS(( - Pst* pst, - SpId spId, - Reason reason -)); - -S16 RgLiTfuRaReqInd ARGS(( - Pst * pst, - SpId spId, - TfuRaReqIndInfo * raReq -)); - - -S16 RgLiTfuRecpReq ARGS(( - Pst * pst, - SpId spId, - TfuRecpReqInfo * recpReq -)); - -S16 RgLiTfuUlCqiInd ARGS(( - Pst * pst, - SuId suId, - TfuUlCqiIndInfo * ulCqiInd -)); - -S16 RgLiTfuDoaInd ARGS(( - Pst * pst, - SuId suId, - TfuDoaIndInfo * doaInd -)); - -S16 RgLiTfuHqInd ARGS(( - Pst * pst, - SuId suId, - TfuHqIndInfo * hqInd -)); - -S16 RgLiTfuSrInd ARGS(( - Pst * pst, - SuId suId, - TfuSrIndInfo * srInd -)); - -S16 RgLiTfuDlCqiInd ARGS(( - Pst * pst, - SuId suId, - TfuDlCqiIndInfo * dlCqiInd -)); - -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -S16 RgLiTfuRawCqiInd ARGS(( - Pst *pst, - SuId suId, - TfuRawCqiIndInfo *rawCqiInd - )); -S16 RgLiTfuSrsInd ARGS(( - Pst *pst, - SuId suId, - TfuSrsIndInfo *srsIndInfo - )); -#endif -S16 RgLiTfuDatInd ARGS(( - Pst * pst, - SuId suId, - TfuDatIndInfo * datInd -)); - -S16 RgLiTfuCrcInd ARGS(( - Pst * pst, - SuId suId, - TfuCrcIndInfo * crcInd -)); - -S16 RgLiTfuTimingAdvInd ARGS(( - Pst * pst, - SuId suId, - TfuTimingAdvIndInfo * timingAdvInd -)); - -S16 RgLiTfuDatReq ARGS(( - Pst * pst, - SpId spId, - TfuDatReqInfo * datReq -)); - -S16 RgLiTfuCntrlReq ARGS(( - Pst * pst, - SpId spId, - TfuCntrlReqInfo * cntrlReq -)); - -S16 RgLiTfuTtiInd ARGS(( - Pst * pst, - SuId suId, - TfuTtiIndInfo * ttiInd -)); - -#if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) -S16 RgLiTfuNonRtInd ARGS(( - Pst * pst, - SuId suId -)); -#endif - -S16 RgLiTfuPucchDeltaPwrInd ARGS(( - Pst * pst, - SuId suId, - TfuPucchDeltaPwrIndInfo *pucchDeltaPwr - )); -#endif - -/** @brief LAA:This primitive carries the Error Indication from PHY to Scheduler. - * This primitive is invoked when the transmission on the unlicensed Scell - * fails. - * @param pst - * @param suId - * @param errInd pointer to TfuErrIndInfo - * @return - */ -S16 RgLiTfuErrInd ARGS((Pst *pst, SuId suId, TfuErrIndInfo *errInd)); - -#ifdef L2_OPTMZ -/** @brief This primitive carries the cellId and UeId for which datReq need to - * deleted in CL. - * @details This primitive is used to delete datReq PDUs present in CL for - * which got changed or similar other scenarios. These scenarios are possible - * only when L2_OPTMZ flag is enabled. - * @sa TfUiTfuDelDatReq - * @param pst - * @param spId - * @param datReq pointer to TfuDelDatReqInfo - * @return - */ -S16 RgLiTfuDelDatReq ARGS((Pst *pst, SuId suId, TfuDelDatReqInfo *delDatReq)); -#endif - -#if (defined(LCTFU)) -/** @brief This API is used to send a Bind Request from MAC to PHY. - */ -#ifdef TFU_5GTF -S16 cmPkTfuRbAssignA1Val324 ARGS(( -TfuRbAssignA1Val324 *param, -Buffer *mBuf -)); -S16 cmPkTfuRbAssignB1Val324 ARGS(( -TfuRbAssignB1Val324 *param, -Buffer *mBuf -)); -S16 cmPkTfuRbAssignVal326 ARGS(( -TfuRbAssignVal326 *param, -Buffer *mBuf -)); -S16 cmUnpkTfuRbAssignA1Val324 ARGS(( -TfuRbAssignA1Val324 *param, -Buffer *mBuf -)); -S16 cmUnpkTfuRbAssignB1Val324 ARGS(( -TfuRbAssignB1Val324 *param, -Buffer *mBuf -)); -S16 cmUnpkTfuRbAssignVal326 ARGS(( -TfuRbAssignVal326 *param, -Buffer *mBuf -)); -S16 cmPkTfuDciFormatA1A2Info ARGS(( -TfuDciFormatA1Info *param, -Buffer *mBuf -)); -S16 cmPkTfuDciFormatB1B2Info ARGS(( -TfuDciFormatB1Info *param, -Buffer *mBuf -)); -S16 cmUnpkTfuDciFormatA1A2Info ARGS(( -TfuDciFormatA1Info *param, -Buffer *mBuf -)); -S16 cmUnpkTfuDciFormatB1B2Info ARGS(( -TfuDciFormatB1Info *param, -Buffer *mBuf -)); -#endif /* TFU_5GTF */ - -S16 cmPkTfuBndReq ARGS(( - Pst* pst, - SuId suId, - SpId spId -)); -/** @brief This API is used to send a Bind Request from MAC to PHY. - */ -S16 cmUnpkTfuBndReq ARGS(( - TfuBndReq func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to receive a Bind Confirm from PHY to MAC. - */ -S16 cmPkTfuBndCfm ARGS(( - Pst* pst, - SuId suId, - uint8_t status -)); -/** @brief This API is used to receive a Bind Confirm from PHY to MAC. - */ -S16 cmUnpkTfuBndCfm ARGS(( - TfuBndCfm func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to send an Unbind Request from MAC to PHY. - */ -S16 cmPkTfuUbndReq ARGS(( - Pst* pst, - SpId spId, - Reason reason -)); -/** @brief This API is used to send an Unbind Request from MAC to PHY. - */ -S16 cmUnpkTfuUbndReq ARGS(( - TfuUbndReq func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to send a Bind Request from SCH to PHY. - */ -S16 cmPkTfuSchBndReq ARGS(( - Pst* pst, - SuId suId, - SpId spId -)); -/** @brief This API is used to send a Bind Request from SCH to PHY. - */ -S16 cmUnpkTfuSchBndReq ARGS(( - TfuSchBndReq func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to receive a Bind Confirm from PHY to SCH. - */ -S16 cmPkTfuSchBndCfm ARGS(( - Pst* pst, - SuId suId, - uint8_t status -)); -/** @brief This API is used to receive a Bind Confirm from PHY to SCH. - */ -S16 cmUnpkTfuSchBndCfm ARGS(( - TfuSchBndCfm func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to send an Unbind Request from SCH to PHY. - */ -S16 cmPkTfuSchUbndReq ARGS(( - Pst* pst, - SpId spId, - Reason reason -)); -/** @brief This API is used to send an Unbind Request from SCH to PHY. - */ -S16 cmUnpkTfuSchUbndReq ARGS(( - TfuSchUbndReq func, - Pst* pst, - Buffer *mBuf -)); -/** @brief This API is used to indication Random Access Request reception from - * PHY to MAC. - */ -S16 cmPkTfuRaReqInd ARGS(( - Pst * pst, - SuId suId, - TfuRaReqIndInfo * raReqInd -)); -/** @brief This API is used to indication Random Access Request reception from - * PHY to MAC. - */ -S16 cmUnpkTfuRaReqInd ARGS(( - TfuRaReqInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indication Random Access Request reception from - * PHY to MAC. - */ -S16 cmPkTfuRecpReq ARGS(( - Pst * pst, - SpId spId, - TfuRecpReqInfo * recpReq -)); -/** @brief This API is used to indication Random Access Request reception from - * PHY to MAC. - */ -S16 cmUnpkTfuRecpReq ARGS(( - TfuRecpReq func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate CQI reporting from PHY to MAC. - */ -S16 cmPkTfuUlCqiInd ARGS(( - Pst * pst, - SuId suId, - TfuUlCqiIndInfo * ulCqiInd -)); -/** @brief This API is used to indicate CQI reporting from PHY to MAC. - */ -S16 cmUnpkTfuUlCqiInd ARGS(( - TfuUlCqiInd func, - Pst * pst, - Buffer *mBuf -)); - -S16 cmPkTfuHqInd ARGS(( - Pst * pst, - SuId suId, - TfuHqIndInfo * hqInd -)); - -S16 cmUnpkTfuHqInd ARGS(( - TfuHqInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate a SR reception from PHY to MAC. - */ -S16 cmPkTfuSrInd ARGS(( - Pst * pst, - SuId suId, - TfuSrIndInfo * srInd -)); -/** @brief This API is used to indicate a SR reception from PHY to MAC. - */ -S16 cmUnpkTfuSrInd ARGS(( - TfuSrInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate the reception of CQI report from PHY to - * MAC. - */ -S16 cmPkTfuDlCqiInd ARGS(( - Pst * pst, - SuId suId, - TfuDlCqiIndInfo * dlCqiInd -)); -/** @brief This API is used to indicate the reception of CQI report from PHY to - * MAC. - */ -S16 cmUnpkTfuDlCqiInd ARGS(( - TfuDlCqiInd func, - Pst * pst, - Buffer *mBuf -)); - -/** @brief This API is used to indicate the Calculated DOA value report from PHY to - * MAC.*/ -S16 cmUnpkTfuDoaInd ARGS(( - TfuDoaInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate the calculated DOA Value report from PHY to - * MAC. - */ -S16 cmPkTfuDoaInd ARGS(( - Pst * pst, - SuId suId, - TfuDoaIndInfo * doaInd - )); - -/** @brief This API is used to indicate Data Reception from PHY to MAC. - */ -S16 cmPkTfuDatInd ARGS(( - Pst * pst, - SuId suId, - TfuDatIndInfo * datInd -)); -/** @brief This API is used to indicate Data Reception from PHY to MAC. - */ -S16 cmUnpkTfuDatInd ARGS(( - TfuDatInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate Decode failure from PHY to MAC. - */ -S16 cmPkTfuCrcInd ARGS(( - Pst * pst, - SuId suId, - TfuCrcIndInfo * crcInd -)); -/** @brief This API is used to indicate Decode failure from PHY to MAC. - */ -S16 cmUnpkTfuCrcInd ARGS(( - TfuCrcInd func, - Pst * pst, - Buffer *mBuf -)); - -S16 cmPkTfuCntrlReq ARGS(( - Pst * pst, - SpId spId, - TfuCntrlReqInfo * cntrlReq -)); - -S16 cmUnpkTfuCntrlReq ARGS(( - TfuCntrlReq func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to indicate a Timing Advance from PHY to MAC. - */ -S16 cmPkTfuTimingAdvInd ARGS(( - Pst * pst, - SuId suId, - TfuTimingAdvIndInfo * timingAdvInd -)); -/** @brief This API is used to indicate a Timing Advance from PHY to MAC. - */ -S16 cmUnpkTfuTimingAdvInd ARGS(( - TfuTimingAdvInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This API is used to send Data Request from MAC to PHY. - */ -S16 cmPkTfuDatReq ARGS(( - Pst * pst, - SpId spId, - TfuDatReqInfo * datReq -)); -/** @brief This API is used to send Data Request from MAC to PHY. - */ -S16 cmUnpkTfuDatReq ARGS(( - TfuDatReq func, - Pst * pst, - Buffer *mBuf -)); -/* CA dev Start */ -/** @brief This API is the TTI indication from CL to MAC and SCH. - */ -S16 cmPkTfuTtiCell ARGS(( - Pst * pst, - SuId suId, - TfuTtiCellInfo * ttiInd -)); -/** @brief This API is the TTI indication from CL to MAC and SCH. - */ -S16 cmUnpkTfuTtiCell ARGS(( - TfuTtiCell func, - Pst * pst, - Buffer *mBuf -)); -/* CA dev End */ - -/** @brief This API is the TTI indication from PHY to MAC. - */ -S16 cmPkTfuTtiInd ARGS(( - Pst * pst, - SuId suId, - TfuTtiIndInfo * ttiInd -)); -/** @brief This API is the TTI indication from PHY to MAC. - */ -S16 cmUnpackSlotInd ARGS(( - TfuTtiInd func, - Pst * pst, - Buffer *mBuf -)); - -#if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) -/** @brief This API is the non-rt indication from PHY to MAC. - */ -S16 cmPkTfuNonRtInd ARGS(( - Pst * pst, - SuId suId -)); - -/** @brief This API is the non-rt indication from PHY to MAC. - */ -S16 cmUnpkTfuNonRtInd ARGS(( - TfuNonRtInd func, - Pst * pst, - Buffer *mBuf -)); -#endif - -/** @brief This API is the TTI indication from PHY to SCH. - */ -S16 cmPkTfuSchTtiInd ARGS(( - Pst * pst, - SuId suId, - TfuTtiIndInfo * ttiInd -)); -/** @brief This API is used to convey the PUCCH delta power from PHY to SCH. - */ -S16 cmPkTfuPucchDeltaPwrInd ARGS(( - Pst * pst, - SuId suId, - TfuPucchDeltaPwrIndInfo * pucchDeltaPwr -)); -/** @brief This API is used to indicate Decode failure from PHY to MAC. - */ -S16 cmUnpkTfuPucchDeltaPwrInd ARGS(( - TfuPucchDeltaPwrInd func, - Pst * pst, - Buffer *mBuf -)); - - -#ifdef TFU_PHASE_2 -/** @brief This API is used to send Group Power Control Request from MAC to PHY. - */ -S16 cmPkTfuGrpPwrCntrlReq ARGS(( - Pst * pst, - SpId spId, - TfuGrpPwrCntrlReqInfo * grpPwrCntrlReq -)); -/** @brief This API is used to send Group Power Control Request from MAC to PHY. - */ -S16 cmUnpkTfuGrpPwrCntrlReq ARGS(( - TfuGrpPwrCntrlReq func, - Pst * pst, - Buffer *mBuf -)); -#endif -S16 cmPkTfuDciFormat0Info ARGS(( - TfuDciFormat0Info *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat0Info ARGS(( - TfuDciFormat0Info *param, - Buffer *mBuf -)); -S16 cmPkTfuAllocMapOrRiv ARGS(( - TfuAllocMapOrRiv *param, - Buffer *mBuf -)); -S16 cmUnpkTfuAllocMapOrRiv ARGS(( - TfuAllocMapOrRiv *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1AllocInfo ARGS(( - TfuDciFormat1AllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1AllocInfo ARGS(( - TfuDciFormat1AllocInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1Info ARGS(( - TfuDciFormat1Info *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1Info ARGS(( - TfuDciFormat1Info *param, - Buffer *mBuf -)); - -S16 cmPkTfuDciFormatTbInfo ARGS(( - TfuDciFormatTbInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormatTbInfo ARGS(( - TfuDciFormatTbInfo *param, - Buffer *mBuf -)); -/** @} */ -S16 cmPkTfuDciFormat2AAllocInfo ARGS(( - TfuDciFormat2AAllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat2AAllocInfo ARGS(( - TfuDciFormat2AAllocInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat2AInfo ARGS(( - TfuDciFormat2AInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat2AInfo ARGS(( - TfuDciFormat2AInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat2AllocInfo ARGS(( - TfuDciFormat2AllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat2AllocInfo ARGS(( - TfuDciFormat2AllocInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat2Info ARGS(( - TfuDciFormat2Info *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat2Info ARGS(( - TfuDciFormat2Info *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat3Info ARGS(( - TfuDciFormat3Info *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat3Info ARGS(( - TfuDciFormat3Info *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat3AInfo ARGS(( - TfuDciFormat3AInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat3AInfo ARGS(( - TfuDciFormat3AInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1dAllocInfo ARGS(( - TfuDciFormat1dAllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1dAllocInfo ARGS(( - TfuDciFormat1dAllocInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1dInfo ARGS(( - TfuDciFormat1dInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1dInfo ARGS(( - TfuDciFormat1dInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1cInfo ARGS(( - TfuDciFormat1cInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1cInfo ARGS(( - TfuDciFormat1cInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1bAllocInfo ARGS(( - TfuDciFormat1bAllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1bAllocInfo ARGS(( - TfuDciFormat1bAllocInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuPdcchOrderInfo ARGS(( - TfuPdcchOrderInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPdcchOrderInfo ARGS(( - TfuPdcchOrderInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1aAllocInfo ARGS(( - TfuDciFormat1aAllocInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1aAllocInfo ARGS(( - TfuDciFormat1aAllocInfo *param, - Buffer *mBuf -)); -/*tfu_x_001.main_6 - Added for SPS support*/ -S16 cmPkTfudciformat1aPdsch ARGS(( - Tfudciformat1aPdsch *param, - Buffer *mBuf -)); -S16 cmUnpkTfudciformat1aPdsch ARGS(( - Tfudciformat1aPdsch *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1aInfo ARGS(( - TfuDciFormat1aInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1aInfo ARGS(( - TfuDciFormat1aInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciFormat1bInfo ARGS(( - TfuDciFormat1bInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciFormat1bInfo ARGS(( - TfuDciFormat1bInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDciInfo ARGS(( - TfuDciInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDciInfo ARGS(( - TfuDciInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuSubbandInfo ARGS(( - TfuSubbandInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandInfo ARGS(( - TfuSubbandInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuSubbandDlCqiInfo ARGS(( - TfuSubbandDlCqiInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandDlCqiInfo ARGS(( - TfuSubbandDlCqiInfo *param, - Buffer *mBuf -)); -/** @} */ -S16 cmPkTfuSubbandCqiInfo ARGS(( - TfuSubbandCqiInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandCqiInfo ARGS(( - TfuSubbandCqiInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuPdcchCceInfo ARGS(( - TfuPdcchCceInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPdcchCceInfo ARGS(( - TfuPdcchCceInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPucchMode10 ARGS(( - TfuCqiPucchMode10 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPucchMode10 ARGS(( - TfuCqiPucchMode10 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode11Cqi ARGS(( - TfuCqiMode11Cqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode11Cqi ARGS(( - TfuCqiMode11Cqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPucchMode11 ARGS(( - TfuCqiPucchMode11 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPucchMode11 ARGS(( - TfuCqiPucchMode11 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode20SubCqi ARGS(( - TfuCqiMode20SubCqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode20SubCqi ARGS(( - TfuCqiMode20SubCqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode20Cqi ARGS(( - TfuCqiMode20Cqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode20Cqi ARGS(( - TfuCqiMode20Cqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPucchMode20 ARGS(( - TfuCqiPucchMode20 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPucchMode20 ARGS(( - TfuCqiPucchMode20 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode21SubCqi ARGS(( - TfuCqiMode21SubCqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode21SubCqi ARGS(( - TfuCqiMode21SubCqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode21WideCqi ARGS(( - TfuCqiMode21WideCqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode21WideCqi ARGS(( - TfuCqiMode21WideCqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiMode21Cqi ARGS(( - TfuCqiMode21Cqi *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiMode21Cqi ARGS(( - TfuCqiMode21Cqi *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPucchMode21 ARGS(( - TfuCqiPucchMode21 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPucchMode21 ARGS(( - TfuCqiPucchMode21 *param, - Buffer *mBuf -)); -S16 cmPkTfuDlCqiPucch ARGS(( - TfuDlCqiPucch *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiPucch ARGS(( - TfuDlCqiPucch *param, - Buffer *mBuf -)); -S16 cmPkTfuSubbandMode12 ARGS(( - TfuSubbandMode12 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandMode12 ARGS(( - TfuSubbandMode12 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPuschMode12 ARGS(( - TfuCqiPuschMode12 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPuschMode12 ARGS(( - TfuCqiPuschMode12 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPuschMode20 ARGS(( - TfuCqiPuschMode20 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPuschMode20 ARGS(( - TfuCqiPuschMode20 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPuschMode22 ARGS(( - TfuCqiPuschMode22 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPuschMode22 ARGS(( - TfuCqiPuschMode22 *param, - Buffer *mBuf -)); -S16 cmPkTfuSubbandMode30 ARGS(( - TfuSubbandMode30 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandMode30 ARGS(( - TfuSubbandMode30 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPuschMode30 ARGS(( - TfuCqiPuschMode30 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPuschMode30 ARGS(( - TfuCqiPuschMode30 *param, - Buffer *mBuf -)); -S16 cmPkTfuSubbandMode31 ARGS(( - TfuSubbandMode31 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSubbandMode31 ARGS(( - TfuSubbandMode31 *param, - Buffer *mBuf -)); -S16 cmPkTfuCqiPuschMode31 ARGS(( - TfuCqiPuschMode31 *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCqiPuschMode31 ARGS(( - TfuCqiPuschMode31 *param, - Buffer *mBuf -)); -S16 cmPkTfuDlCqiPusch ARGS(( - TfuDlCqiPusch *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiPusch ARGS(( - TfuDlCqiPusch *param, - Buffer *mBuf -)); - -S16 cmPkTfuDlCqiPuschInfo ARGS(( - TfuDlCqiPuschInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiPuschInfo ARGS(( - TfuDlCqiPuschInfo *param, - Buffer *mBuf -)); - -S16 cmPkTfuDoaRpt ARGS(( - TfuDoaRpt *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDoaRpt ARGS(( - TfuDoaRpt *param, - Buffer *mBuf -)); -S16 cmPkTfuDoaIndInfo ARGS(( - TfuDoaIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDoaIndInfo ARGS(( - TfuDoaIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); - -S16 cmPkTfuDlCqiInfo ARGS(( - uint8_t selector, - TfuDlCqiInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiInfo ARGS(( - uint8_t selector, - TfuDlCqiInfo *param, - Buffer *mBuf -)); - - -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifndef TFU_UPGRADE -S16 cmPkTfuUeMsg3RecpReq ARGS(( - TfuUeMsg3RecpReq *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUeMsg3RecpReq ARGS(( - TfuUeMsg3RecpReq *param, - Buffer *mBuf -)); -#endif - - -/*tfu_x_001.main_8 - ADD - Prototype for TfuUePuschRecpReq Pk/Unpk functions */ -S16 cmPkTfuUePuschRecpReq ARGS(( - TfuUePuschRecpReq *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePuschRecpReq ARGS(( - TfuUePuschRecpReq *param, - Buffer *mBuf -)); -S16 cmPkTfuUePucchRecpReq ARGS(( - TfuUePucchRecpReq *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchRecpReq ARGS(( - TfuUePucchRecpReq *param, - Buffer *mBuf -)); - -S16 cmPkTfuRecpReqInfo ARGS(( - TfuRecpReqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRecpReqInfo ARGS(( - TfuRecpReqInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuPdcchInfo ARGS(( - TfuPdcchInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPdcchInfo ARGS(( - TfuPdcchInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuPhichInfo ARGS(( - TfuPhichInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPhichInfo ARGS(( - TfuPhichInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuCntrlReqInfo ARGS(( - TfuCntrlReqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCntrlReqInfo ARGS(( - TfuCntrlReqInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuPdschDciInfo ARGS(( - TfuPdschDciInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPdschDciInfo ARGS(( - TfuPdschDciInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDatReqPduInfo ARGS(( - TfuDatReqPduInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDatReqPduInfo ARGS(( - TfuDatReqPduInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDatReqInfo ARGS(( - TfuDatReqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDatReqInfo ARGS(( - TfuDatReqInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuDatInfo ARGS(( - TfuDatInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDatInfo ARGS(( - TfuDatInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuDatIndInfo ARGS(( - TfuDatIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDatIndInfo ARGS(( - TfuDatIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuSrInfo ARGS(( - TfuSrInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSrInfo ARGS(( - TfuSrInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuSrIndInfo ARGS(( - TfuSrIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSrIndInfo ARGS(( - TfuSrIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuHqInfo ARGS(( - TfuHqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuHqInfo ARGS(( - TfuHqInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuHqIndInfo ARGS(( - TfuHqIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuHqIndInfo ARGS(( - TfuHqIndInfo *param, - Ptr memCpm, - Buffer *mBuf -)); -S16 cmPkTfuUlCqiInfo ARGS(( - TfuUlCqiInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUlCqiInfo ARGS(( - TfuUlCqiInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUlCqiRpt ARGS(( - TfuUlCqiRpt *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUlCqiRpt ARGS(( - TfuUlCqiRpt *param, - Buffer *mBuf -)); -S16 cmPkTfuUlCqiIndInfo ARGS(( - TfuUlCqiIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUlCqiIndInfo ARGS(( - TfuUlCqiIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuDlCqiRpt ARGS(( - TfuDlCqiRpt *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiRpt ARGS(( - TfuDlCqiRpt *param, - Buffer *mBuf -)); -S16 cmPkTfuDlCqiIndInfo ARGS(( - TfuDlCqiIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuDlCqiIndInfo ARGS(( - TfuDlCqiIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuPucchDeltaPwr ARGS(( - Pst * pst, - SuId suId, - TfuPucchDeltaPwrIndInfo * pucchDeltaPwr)); - -S16 cmPkTfuPucchDeltaPwrInfo ARGS(( - TfuPucchDeltaPwr *param, - Buffer *mBuf -)); - -S16 cmUnpkTfuPucchDeltaPwr ARGS(( - TfuPucchDeltaPwrInd func, - Pst * pst, - Buffer *mBuf -)); -S16 cmUnpkTfuPucchDeltaPwrInfo ARGS(( - TfuPucchDeltaPwr *param, - Buffer *mBuf -)); - -S16 cmPkTfuCrcInfo ARGS(( - TfuCrcInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCrcInfo ARGS(( - TfuCrcInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuCrcIndInfo ARGS(( - TfuCrcIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuCrcIndInfo ARGS(( - TfuCrcIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); - -S16 cmPkTfuPucchDeltaPwrIndInfo ARGS(( - TfuPucchDeltaPwrIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuPucchDeltaPwrIndInfo ARGS(( - TfuPucchDeltaPwrIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuTimingAdvInfo ARGS(( - TfuTimingAdvInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuTimingAdvInfo ARGS(( - TfuTimingAdvInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuTimingAdvIndInfo ARGS(( - TfuTimingAdvIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuTimingAdvIndInfo ARGS(( - TfuTimingAdvIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -/* CA dev Start */ -S16 cmPkTfuTtiCellInfo ARGS(( - TfuTtiCellInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuTtiCellInfo ARGS(( - TfuTtiCellInfo *param, - Buffer *mBuf -)); -/* CA dev End */ -S16 cmPkTfuTtiIndInfo ARGS(( - TfuTtiIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpackSlotIndInfo ARGS(( - SlotIndInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuRaReqInfo ARGS(( - TfuRaReqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRaReqInfo ARGS(( - TfuRaReqInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuRachInfo ARGS(( - CmMemListCp memCp, - TfuRachInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRachInfo ARGS(( - CmMemListCp memCp, - TfuRachInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuRaReqIndInfo ARGS(( - TfuRaReqIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRaReqIndInfo ARGS(( - TfuRaReqIndInfo *param, - Buffer *mBuf -)); -S16 cmPkBuffer ARGS(( - Buffer **param, - Buffer *mBuf -)); -S16 cmUnpkBuffer ARGS(( - Buffer **param, - Buffer *mBuf -)); - -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -S16 cmPkTfuSrsRpt ARGS(( - TfuSrsRpt *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSrsRpt ARGS(( - TfuSrsRpt *param, - Buffer *mBuf -)); -S16 cmPkTfuSrsIndInfo ARGS(( - TfuSrsIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuSrsIndInfo ARGS(( - TfuSrsIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); -S16 cmPkTfuRawCqiRpt ARGS(( - TfuRawCqiRpt *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRawCqiRpt ARGS(( - TfuRawCqiRpt *param, - Buffer *mBuf -)); -S16 cmPkTfuRawCqiIndInfo ARGS(( - TfuRawCqiIndInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuRawCqiIndInfo ARGS(( - TfuRawCqiIndInfo *param, - Ptr memCp, - Buffer *mBuf -)); - -#ifdef TFU_TDD - -S16 cmPkTfuUePucchHqRecpInfo ARGS(( - TfuUePucchHqRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchHqRecpInfo ARGS(( - TfuUePucchHqRecpInfo *param, - Buffer *mBuf -)); - -#endif - -#ifndef TFU_TDD /* else of TFU_TDD */ - -S16 cmPkTfuUePucchHqRecpInfo ARGS(( - TfuUePucchHqRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchHqRecpInfo ARGS(( - TfuUePucchHqRecpInfo *param, - Buffer *mBuf -)); - - -#endif -S16 cmPkTfuUePucchSrRecpInfo ARGS(( - TfuUePucchSrRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchSrRecpInfo ARGS(( - TfuUePucchSrRecpInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUePucchCqiRecpInfo ARGS(( - TfuUePucchCqiRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchCqiRecpInfo ARGS(( - TfuUePucchCqiRecpInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUePucchSrsRecpInfo ARGS(( - TfuUePucchSrsRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePucchSrsRecpInfo ARGS(( - TfuUePucchSrsRecpInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUeUlSchRecpInfo ARGS(( - TfuUeUlSchRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUeUlSchRecpInfo ARGS(( - TfuUeUlSchRecpInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUePuschCqiRecpInfo ARGS(( - TfuUePuschCqiRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePuschCqiRecpInfo ARGS(( - TfuUePuschCqiRecpInfo *param, - Buffer *mBuf -)); -S16 cmPkTfuUePuschHqRecpInfo ARGS(( - TfuUePuschHqRecpInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUePuschHqRecpInfo ARGS(( - TfuUePuschHqRecpInfo *param, - Buffer *mBuf -)); - -S16 cmPkTfuBfVectorInfo ARGS (( -TfuBfVectorInfo *param, -Buffer *mBuf -)); - -S16 cmUnpkTfuBfVectorInfo ARGS (( - TfuBfVectorInfo *param, - Buffer *mBuf -)); -#endif /* TFU_UPGRADE */ -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -S16 cmPkTfuUeRecpReqInfo ARGS(( - TfuUeRecpReqInfo *param, - Buffer *mBuf -)); -S16 cmUnpkTfuUeRecpReqInfo ARGS(( - TfuUeRecpReqInfo *param, - Buffer *mBuf -)); - -/* tfu_x_001.main_8. Added changes of TFU_UPGRADE */ -#ifdef TFU_UPGRADE -/** @brief This primitive is used to convey the Raw CQI information - * transmitted by the UE. - * @details Raw CQI report is the actual bits transmitted by the UE when - * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI - * and so on, are done by MAC. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param cqiInd Pointer to the TfuRawCqiIndInfo structure. - * @return ROK/RFAILED - */ -S16 cmPkTfuRawCqiInd ARGS(( - Pst * pst, - SuId suId, - TfuRawCqiIndInfo * rawCqiInd -)); -/** @brief This primitive is used to convey the Raw CQI information - * transmitted by the UE. - * @details Raw CQI report is the actual bits transmitted by the UE when - * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI - * an so on, are done by MAC. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param cqiInd Pointer to the TfuRawCqiIndInfo structure. - * @return ROK/RFAILED - */ -S16 cmUnpkTfuRawCqiInd ARGS(( - TfuRawCqiInd func, - Pst * pst, - Buffer *mBuf -)); -/** @brief This primitive is used to convey the information derived by the - * physical layer from the SRS transmission from the UE. - * @details This primitive carries information derived from the SRS transmission - * from the UE. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param srsInd Pointer to the TfuSrIndInfo structure. - * @return ROK/RFAILED - */ -S16 cmPkTfuSrsInd ARGS(( - Pst * pst, - SuId suId, - TfuSrsIndInfo * srsInd -)); -/** @brief This primitive is used to convey the information derived by the - * physical layer from the SRS transmission from the UE. - * @details This primitive carries information derived from the SRS transmission - * from the UE. - * - * @param pst Pointer to the post structure. - * @param suId SAP ID of the service user. - * @param srsInd Pointer to the TfuSrIndInfo structure. - * @return ROK/RFAILED - */ -S16 cmUnpkTfuSrsInd ARGS(( - TfuSrsInd func, - Pst * pst, - Buffer *mBuf -)); -#endif - -/*tfu_x_001.main_6 - Added for SPS support*/ -#ifdef LTEMAC_SPS -S16 cmPkTfuAllocMap ARGS(( - TfuAllocMap *param, - Buffer *mBuf -)); -S16 cmUnpkTfuAllocMap ARGS(( - TfuAllocMap *param, - Buffer *mBuf - )); -#ifdef EMTC_ENABLE -S16 cmPkTfuDciFormat6AAllocInfo ARGS(( - TfuDciFormat61AllocInfo *param, - Buffer *mBuf - )); -S16 cmUnpkTfuDciFormat6AAllocInfo ARGS(( - TfuDciFormat61AllocInfo *param, - Buffer *mBuf - )); -S16 cmUnpkTfuDciFormat61aInfo ARGS(( - TfuDciFormat61aInfo *param, - Buffer *mBuf - )); -S16 cmUnpkTfuDciFormat62Info ARGS(( - TfuDciFormat62Info *param, - Buffer *mBuf - )); - -S16 cmUnpkTfudciformat61aPdsch ARGS(( - Tfudciformat61aPdsch *param, - Buffer *mBuf - )); -S16 cmPkTfuDciFormat61aInfo ARGS(( - TfuDciFormat61aInfo *param, - Buffer *mBuf - )); - -#endif - -#endif - -/* LTE_UNLICENSED */ -S16 cmPkTfuErrInd ARGS(( - Pst * pst, - SuId suId, - TfuErrIndInfo * errInd -)); - -S16 cmUnpkTfuErrInd ARGS(( - TfuErrInd func, - Pst * pst, - Buffer *mBuf -)); -#endif /*LCTFU*/ - - #ifdef __cplusplus } #endif diff --git a/src/phy_stub/l1_bdy1.c b/src/phy_stub/l1_bdy1.c index 1583030eb..a9183c71c 100644 --- a/src/phy_stub/l1_bdy1.c +++ b/src/phy_stub/l1_bdy1.c @@ -27,6 +27,7 @@ #include "lwr_mac_phy.h" #ifdef INTEL_FAPI #include "fapi.h" +#include "fapi_vendor_extension.h" #endif #include "lphy_stub.h" #include "lwr_mac_upr_inf.h" @@ -243,7 +244,8 @@ void l1HdlParamReq(uint32_t msgLen, void *msg) void l1HdlConfigReq(uint32_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_config_req_t *configReq = (fapi_config_req_t *)(msg +1); + p_fapi_api_queue_elem_t configReqElem = (p_fapi_api_queue_elem_t)msg; + fapi_config_req_t *configReq = (fapi_config_req_t *)(configReqElem +1); DU_LOG("\nPHY_STUB: Received Config Request in PHY"); @@ -685,8 +687,8 @@ S16 l1HdlStartReq(uint32_t msgLen, void *msg) S16 l1HdlDlTtiReq(uint16_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_dl_tti_req_t *dlTtiReq; - dlTtiReq = (fapi_dl_tti_req_t *)msg; + p_fapi_api_queue_elem_t dlTtiElem = (p_fapi_api_queue_elem_t)msg; + fapi_dl_tti_req_t *dlTtiReq = (fapi_dl_tti_req_t *)(dlTtiElem +1); uint8_t pduCount = 0; @@ -723,8 +725,7 @@ S16 l1HdlDlTtiReq(uint16_t msgLen, void *msg) } /* Free FAPI message */ - MAC_FREE(dlTtiReq, msgLen); - + MAC_FREE(msg, msgLen); #endif return ROK; } @@ -750,15 +751,16 @@ S16 l1HdlDlTtiReq(uint16_t msgLen, void *msg) S16 l1HdlTxDataReq(uint16_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_tx_data_req_t *txDataReq; - txDataReq = (fapi_tx_data_req_t *)msg; + p_fapi_api_queue_elem_t txDataElem = (p_fapi_api_queue_elem_t)msg; + fapi_tx_data_req_t *txDataReq = (fapi_tx_data_req_t *)(txDataElem +1); + DU_LOG("\nPHY STUB: TX DATA Request at sfn=%d slot=%d",txDataReq->sfn,txDataReq->slot); if(dlDedMsg) { DU_LOG("\nPHY_STUB: TxDataPdu for DED MSG sent"); dlDedMsg = false; } - MAC_FREE(txDataReq, msgLen); + MAC_FREE(msg, msgLen); #endif return ROK; } @@ -932,8 +934,8 @@ uint8_t l1BuildAndSendUciInd(uint16_t slot, uint16_t sfn, fapi_ul_pucch_pdu_t pu S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_ul_tti_req_t *ulTtiReq = NULLP; - ulTtiReq = (fapi_ul_tti_req_t *)msg; + p_fapi_api_queue_elem_t ulTtiElem = (p_fapi_api_queue_elem_t)msg; + fapi_ul_tti_req_t *ulTtiReq = (fapi_ul_tti_req_t *)(ulTtiElem +1); uint8_t numPdus = ulTtiReq->nPdus; #ifdef ODU_SLOT_IND_DEBUG_LOG @@ -979,7 +981,7 @@ S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg) l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn); } - MAC_FREE(ulTtiReq, msgLen); + MAC_FREE(msg, msgLen); #endif return ROK; } @@ -1044,18 +1046,17 @@ uint16_t l1BuildAndSendStopInd() S16 l1HdlStopReq(uint32_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_stop_req_t *stopReq = (fapi_stop_req_t *)msg; - if(lwrMacCb.phyState == PHY_STATE_RUNNING) { l1HdlSlotIndicaion(TRUE); DU_LOG("\nPHY_STUB: Slot Indication is stopped successfully"); l1BuildAndSendStopInd(); - MAC_FREE(stopReq, msgLen); + MAC_FREE(msg, msgLen); } else { DU_LOG("\nPHY_STUB: Received Stop Req in PHY State %d", lwrMacCb.phyState); + MAC_FREE(msg, msgLen); return RFAILED; } #endif @@ -1187,9 +1188,8 @@ uint8_t l1BuildAndSendMsg5(uint16_t sfn, uint16_t slot) S16 l1HdlUlDciReq(uint16_t msgLen, void *msg) { #ifdef INTEL_FAPI - fapi_ul_dci_req_t *ulDciReq = NULLP; - - ulDciReq = (fapi_ul_dci_req_t *)msg; + p_fapi_api_queue_elem_t ulDciElem = (p_fapi_api_queue_elem_t)msg; + fapi_ul_dci_req_t *ulDciReq = (fapi_ul_dci_req_t *)(ulDciElem +1); uint8_t numPdus = ulDciReq->numPdus; while(numPdus) @@ -1203,7 +1203,7 @@ S16 l1HdlUlDciReq(uint16_t msgLen, void *msg) numPdus--; } - MAC_FREE(ulDciReq, msgLen); + MAC_FREE(msg, msgLen); #endif return ROK; } -- 2.16.6