+
+/*******************************************************************
+ *
+ * @brief Processes message from PHY
+ *
+ * @details
+ *
+ * Function : procPhyMessages
+ *
+ * Functionality: Processes message from PHY
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg)
+{
+#ifdef INTEL_FAPI
+ /* extract the header */
+ fapi_msg_t *header = NULLP;
+ header = (fapi_msg_t *)msg;
+
+#ifdef CALL_FLOW_DEBUG_LOG
+ callFlowFromPhyToLwrMac(header->msg_id);
+#endif
+
+ switch(header->msg_id)
+ {
+#ifdef INTEL_TIMER_MODE
+ case FAPI_VENDOR_EXT_UL_IQ_SAMPLES:
+ {
+ DU_LOG("\nDEBUG --> LWR_MAC: Received FAPI_VENDOR_EXT_UL_IQ_SAMPLES");
+ //send config req
+ uint16_t cellId = 1;
+ sendToLowerMac(CONFIG_REQUEST, 0, (void *)&cellId);
+ break;
+ }
+#endif
+ case FAPI_PARAM_RESPONSE:
+ {
+ sendToLowerMac(PARAM_RESPONSE, msgSize, msg);
+ break;
+ }
+ case FAPI_CONFIG_RESPONSE:
+ {
+ sendToLowerMac(CONFIG_RESPONSE, msgSize, msg);
+ break;
+ }
+ case FAPI_SLOT_INDICATION:
+ {
+ if(lwrMacCb.phyState == PHY_STATE_CONFIGURED)
+ {
+ DU_LOG("\nINFO --> LWR_MAC: PHY has moved to running state");
+ lwrMacCb.phyState = PHY_STATE_RUNNING;
+ lwrMacCb.cellCb[0].state = PHY_STATE_RUNNING;
+ }
+
+ fapi_slot_ind_t *slotInd = NULLP;
+ slotInd = (fapi_slot_ind_t *)msg;
+ procSlotInd(slotInd);
+ break;
+ }
+ case FAPI_ERROR_INDICATION:
+ {
+ break;
+ }
+ case FAPI_RX_DATA_INDICATION:
+ {
+ fapi_rx_data_indication_t *rxDataInd;
+ rxDataInd = (fapi_rx_data_indication_t *)msg;
+ procRxDataInd(rxDataInd);
+ break;
+ }
+ case FAPI_CRC_INDICATION:
+ {
+ fapi_crc_ind_t *crcInd;
+ crcInd = (fapi_crc_ind_t *)msg;
+ procCrcInd(crcInd);
+ break;
+ }
+ case FAPI_UCI_INDICATION:
+ {
+ fapi_uci_indication_t *phyUciInd = NULLP;
+ phyUciInd = (fapi_uci_indication_t*)msg;
+ procUciInd(phyUciInd);
+ break;
+ }
+ case FAPI_SRS_INDICATION:
+ {
+ break;
+ }
+ case FAPI_RACH_INDICATION:
+ {
+ fapi_rach_indication_t *rachInd;
+ rachInd = (fapi_rach_indication_t *)msg;
+ procRachInd(rachInd);
+ break;
+ }
+ case FAPI_STOP_INDICATION:
+ {
+ DU_LOG("\nINFO --> LWR_MAC: Handling Stop Indication");
+ procStopInd();
+ break;
+ }
+ }