+/*******************************************************************
+ *
+ * @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)
+ {
+ case UCI_IND_PUSCH:
+ break;
+ case UCI_IND_PUCCH_F0F1:
+ {
+ UciPucchF0F1 *pduInfo = NULLP;
+ macUciInd->pdus[pduIdx].pduSize = fapiUciInd->uciPdu[pduIdx].pduSize;
+ pduInfo = &macUciInd->pdus[pduIdx].uci.uciPucchF0F1;
+ ret = fillUciIndPucchF0F1(pduInfo, &fapiUciInd->uciPdu[pduIdx].uci.uciPucchF0F1);
+ }
+ break;
+ case UCI_IND_PUCCH_F2F3F4:
+ break;
+ default:
+ DU_LOG("\nERROR --> LWR_MAC: Invalid Pdu Type %d at procmacUciInd()", macUciInd->pdus[pduIdx].pduType);
+ ret = RFAILED;
+ break;
+ }
+ }
+ if(!ret)
+ {
+ FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_UCI_IND_TO_MAC);
+ ret = (*sendUciIndOpts[pst.selector])(&pst, macUciInd);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> LWR_MAC: Failed sending UCI Ind to MAC");
+ }
+ return ret;
+}