+ crcIndInfo->ul_cqi = fapiCrcInd->crc[crcInfoIdx].ul_cqi;
+ crcIndInfo->timingAdvance = fapiCrcInd->crc[crcInfoIdx].timingAdvance;
+ crcIndInfo->rssi = fapiCrcInd->crc[crcInfoIdx].rssi;
+ }
+
+ /* Fill post and sent to MAC */
+ FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_CRC_IND_TO_MAC);
+ return (*sendCrcIndOpts[pst.selector])(&pst, crcInd);
+} /* handleCrcInd */
+
+/*******************************************************************
+ *
+ * @brief Handles Rx Data indication from PHY and sends to MAC
+ *
+ * @details
+ *
+ * Function : procRxDataInd
+ *
+ * Functionality:
+ * Handles Rx Data indication from PHY and sends to MAC
+ *
+ * @params[in] fapi_rx_data_indication_t message pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t procRxDataInd(fapi_rx_data_indication_t *fapiRxDataInd)
+{
+ Pst pst;
+ uint8_t pduIdx =0;
+ RxDataInd *rxDataInd = NULLP;
+ RxDataIndPdu *pdu = NULLP;
+
+ MAC_ALLOC_SHRABL_BUF(rxDataInd, sizeof(RxDataInd));
+ if(!rxDataInd)
+ {
+ DU_LOG("\nERROR --> LWR_MAC : Memory Allocation failed in procRxDataInd");
+ return RFAILED;
+ }
+ if(!fapiRxDataInd->numPdus)
+ {
+ DU_LOG("\nDEBUG --> LWR_MAC : No PDU in RX_Data.indication at [%d, %d]", fapiRxDataInd->sfn, fapiRxDataInd->slot);
+ return ROK;
+ }
+
+ rxDataInd->cellId = lwrMacCb.cellCb[0].cellId;
+ rxDataInd->timingInfo.sfn = fapiRxDataInd->sfn;
+ rxDataInd->timingInfo.slot = fapiRxDataInd->slot;
+ rxDataInd->numPdus = fapiRxDataInd->numPdus;
+
+ for(pduIdx = 0; pduIdx < rxDataInd->numPdus; pduIdx++)
+ {
+ pdu = &rxDataInd->pdus[pduIdx];
+ pdu->handle = fapiRxDataInd->pdus[pduIdx].handle;
+ pdu->rnti = fapiRxDataInd->pdus[pduIdx].rnti;
+ pdu->harqId = fapiRxDataInd->pdus[pduIdx].harqId;
+ pdu->pduLength = fapiRxDataInd->pdus[pduIdx].pdu_length;
+ pdu->ul_cqi = fapiRxDataInd->pdus[pduIdx].ul_cqi;
+ pdu->timingAdvance = fapiRxDataInd->pdus[pduIdx].timingAdvance;
+ pdu->rssi = fapiRxDataInd->pdus[pduIdx].rssi;
+
+ 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 */
+ FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_RX_DATA_IND_TO_MAC);
+ return (*sendRxDataIndOpts[pst.selector])(&pst, rxDataInd);
+}
+
+/*******************************************************************
+ *
+ * @brief Fills Uci Ind Pdu Info carried on Pucch Format 0/Format 1
+ *
+ * @details
+ *
+ * Function : fillUciIndPucchF0F1
+ *
+ * Functionality:
+ * Fills Uci Ind Pdu Info carried on Pucch Format 0/Format 1
+ *
+ *@params[in] UciPucchF0F1 *
+ * fapi_uci_o_pucch_f0f1_t *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t fillUciIndPucchF0F1(UciPucchF0F1 *pduInfo, fapi_uci_o_pucch_f0f1_t *fapiPduInfo)
+{
+
+ uint8_t harqIdx;
+ uint8_t ret = ROK;
+
+ pduInfo->handle = fapiPduInfo->handle;
+ pduInfo->pduBitmap = fapiPduInfo->pduBitmap;
+ pduInfo->pucchFormat = fapiPduInfo->pucchFormat;
+ pduInfo->ul_cqi = fapiPduInfo->ul_cqi;
+ pduInfo->crnti = fapiPduInfo->rnti;
+ pduInfo->timingAdvance = fapiPduInfo->timingAdvance;
+ pduInfo->rssi = fapiPduInfo->rssi;
+ if(fapiPduInfo->srInfo.srIndication)
+ {
+ pduInfo->srInfo.srIndPres = fapiPduInfo->srInfo.srIndication;
+ pduInfo->srInfo.srConfdcLevel = fapiPduInfo->srInfo.srConfidenceLevel;
+ }
+ if(fapiPduInfo->harqInfo.numHarq)
+ {
+ pduInfo->harqInfo.numHarq = fapiPduInfo->harqInfo.numHarq;
+ pduInfo->harqInfo.harqConfdcLevel = fapiPduInfo->harqInfo.harqConfidenceLevel;
+ for(harqIdx = 0; harqIdx < pduInfo->harqInfo.numHarq; harqIdx++)
+ {
+ pduInfo->harqInfo.harqValue[harqIdx] = fapiPduInfo->harqInfo.harqValue[harqIdx];
+ }
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Handles Uci indication from PHY and sends to MAC
+ *
+ * @details
+ *
+ * Function : procUciInd
+ *
+ * Functionality:
+ * Handles Uci indication from PHY and sends to MAC
+ *
+ * @params[in] fapi_uci_indication_t message pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t procUciInd(fapi_uci_indication_t *fapiUciInd)
+{
+ uint8_t pduIdx;
+ uint8_t ret = ROK;
+ Pst pst;
+ UciInd *macUciInd = NULLP;
+
+ MAC_ALLOC_SHRABL_BUF(macUciInd, sizeof(UciInd));
+ if(!macUciInd)
+ {
+ DU_LOG("\nERROR --> LWR_MAC: Memory Allocation failed in procUciInd");
+ return RFAILED;
+ }
+
+ DU_LOG("\nDEBUG --> LWR_MAC: Processing UCI Indication");
+ memset(macUciInd, 0, sizeof(UciInd));
+ macUciInd->cellId = lwrMacCb.cellCb[0].cellId;
+ macUciInd->slotInd.sfn = fapiUciInd->sfn;
+ macUciInd->slotInd.slot = fapiUciInd->slot;
+ macUciInd->numUcis = fapiUciInd->numUcis;
+
+ for(pduIdx = 0; pduIdx < macUciInd->numUcis; pduIdx++)
+ {
+ macUciInd->pdus[pduIdx].pduType = fapiUciInd->uciPdu[pduIdx].pduType;
+ switch(macUciInd->pdus[pduIdx].pduType)