MacCb macCb;
+MacDuStatsIndFunc macDuStatsIndOpts[] =
+{
+ packDuMacStatsInd, /* packing for loosely coupled */
+ DuProcMacStatsInd, /* packing for tightly coupled */
+ packDuMacStatsInd /* packing for light weight loosly coupled */
+};
+
+
/*******************************************************************
*
* @brief Sends DL BO Info to SCH
return(SchMessageRouter(&pst, (void *)crcInd));
}
+/*******************************************************************
+ *
+ * @brief Sends UL CQI Indication to SCH
+ *
+ * @details
+ *
+ * Function : sendUlCqiIndMacToSch
+ *
+ * Functionality:
+ * Sends Ul Cqi Indication to SCH
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ****************************************************************/
+uint8_t sendUlCqiIndMacToSch(SchUlCqiInd *ulCqiInd)
+{
+ Pst pst;
+
+ FILL_PST_MAC_TO_SCH(pst, EVENT_UL_CQI_TO_SCH);
+ return(SchMessageRouter(&pst, (void *)ulCqiInd));
+}
+
+/*******************************************************************
+ *
+ * @brief Sends DL CQI Indication to SCH
+ *
+ * @details
+ *
+ * Function : sendDlCqiIndMacToSch
+ *
+ * Functionality:
+ * Sends Dl Cqi Indication to SCH
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ****************************************************************/
+uint8_t sendDlCqiIndMacToSch(SchDlCqiInd *dlCqiInd)
+{
+ Pst pst;
+
+ FILL_PST_MAC_TO_SCH(pst, EVENT_DL_CQI_TO_SCH);
+ return(SchMessageRouter(&pst, (void *)dlCqiInd));
+}
+
+/*******************************************************************
+ *
+ * @brief Sends Power Headroom Indication to SCH
+ *
+ * @details
+ *
+ * Function : sendPhrIndToSch
+ *
+ * Functionality:
+ * Sends Phr Indication to SCH
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ****************************************************************/
+uint8_t sendPhrIndToSch(SchPwrHeadroomInd *macPhrInd)
+{
+ Pst pst;
+
+ FILL_PST_MAC_TO_SCH(pst, EVENT_PHR_IND_TO_SCH);
+ return(SchMessageRouter(&pst, (void *)macPhrInd));
+}
+
/*******************************************************************
*
* @brief Processes CRC Indication from PHY
* RFAILED - failure
*
* ****************************************************************/
-uint8_t buildAndSendHarqInd(HarqInfoF0F1 *harqInfo, uint8_t crnti, uint16_t cellIdx, SlotTimingInfo *slotInd)
+uint8_t buildAndSendHarqInd(HarqInfoF0F1 *harqInfo, uint16_t crnti, uint16_t cellIdx, SlotTimingInfo *slotInd)
{
uint16_t harqCounter=0;
Pst pst;
* RFAILED - failure
*
* ****************************************************************/
-uint8_t buildAndSendSrInd(UciInd *macUciInd, uint8_t crnti)
+uint8_t buildAndSendSrInd(UciInd *macUciInd, uint16_t crnti)
{
uint16_t cellIdx;
Pst pst;
return ret;
}
+/**
+ * @brief Mac process the statistics indication received from sch.
+ *
+ * @details
+ *
+ * Function : MacProcSchStatsInd
+ *
+ * This function process the statistics indication received from sch
+ *
+ * @param[in] Pst *pst
+ * @param[in] SchStatsInd *schStatsInd
+ * @return int
+ * -# ROK
+ **/
+uint8_t MacProcSchStatsInd(Pst *pst, SchStatsInd *schStatsInd)
+{
+ uint8_t statsIdx = 0;
+ Pst indPst;
+ MacStatsInd *macStatsInd;
+
+#ifdef DEBUG_PRINT
+ DU_LOG("\nDEBUG --> MAC : MacProcSchStatsInd: Received Statistics Indication from SCH");
+#endif
+
+ if(schStatsInd == NULLP)
+ {
+ DU_LOG("\nERROR --> MAC : MacProcSchStatsInd: NULL pointer :schStatsInd");
+ return RFAILED;
+ }
+
+ MAC_ALLOC_SHRABL_BUF(macStatsInd, sizeof(MacStatsInd));
+ if(macStatsInd == NULLP)
+ {
+ DU_LOG("\nERROR --> MAC : Failed to allocate memory in MacProcSchStatsInd");
+ return RFAILED;
+ }
+
+ macStatsInd->subscriptionId = schStatsInd->subscriptionId;
+ macStatsInd->groupId = schStatsInd->groupId;
+
+ for(statsIdx = 0; statsIdx < schStatsInd->numStats; statsIdx++)
+ {
+ switch(schStatsInd->measuredStatsList[statsIdx].type)
+ {
+ case SCH_DL_TOTAL_PRB_USAGE:
+ {
+ macStatsInd->measuredStatsList[statsIdx].type = MAC_DL_TOTAL_PRB_USAGE;
+ break;
+ }
+ case SCH_UL_TOTAL_PRB_USAGE:
+ {
+ macStatsInd->measuredStatsList[statsIdx].type = MAC_UL_TOTAL_PRB_USAGE;
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> MAC : MacProcSchStatsInd: Invalid measurement type [%d]", \
+ schStatsInd->measuredStatsList[statsIdx].type);
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, macStatsInd, sizeof(MacStatsInd));
+ return RFAILED;
+ }
+ }
+ macStatsInd->measuredStatsList[statsIdx].value = schStatsInd->measuredStatsList[statsIdx].value;
+ }
+ macStatsInd->numStats = schStatsInd->numStats;
+
+ memset(&indPst, 0, sizeof(Pst));
+ FILL_PST_MAC_TO_DUAPP(indPst, EVENT_MAC_STATISTICS_IND);
+ return (*macDuStatsIndOpts[indPst.selector])(&indPst, macStatsInd);
+}
+
/**********************************************************************
End of file
**********************************************************************/