- DU_LOG("\nMAC: Memory failed in macSendUlCcchInd");
- return RFAILED;
- }
-
- ulCcchIndInfo->cellId = cellId;
- ulCcchIndInfo->crnti = crnti;
- ulCcchIndInfo->ulCcchMsg = rrcContainer;
-
- /* Fill Pst */
- pst.selector = DU_MAC_LWLC;
- pst.srcEnt = ENTRG;
- pst.dstEnt = ENTDUAPP;
- pst.dstInst = 0;
- pst.srcInst = macCb.macInst;
- pst.dstProcId = rgCb[pst.srcInst].rgInit.procId;
- pst.srcProcId = rgCb[pst.srcInst].rgInit.procId;
- pst.region = MAC_MEM_REGION;
- pst.pool = MAC_POOL;
- pst.event = EVENT_MAC_UL_CCCH_IND;
- pst.route = 0;
- pst.prior = 0;
- pst.intfVer = 0;
-
- if(MacDuAppUlCcchInd(&pst, ulCcchIndInfo) != ROK)
- {
- DU_LOG("\nMAC: Failed to send UL CCCH Ind to DU APP");
- MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo->ulCcchMsg,
- strlen((const char*)ulCcchIndInfo->ulCcchMsg));
- MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo, sizeof(UlCcchIndInfo));
- ret = RFAILED;
- }
- return ret;
+ DU_LOG("\nERROR --> MAC: Memory failed in macProcUlCcchInd");
+ return RFAILED;
+ }
+
+ ulCcchIndInfo->cellId = cellId;
+ ulCcchIndInfo->crnti = crnti;
+ ulCcchIndInfo->ulCcchMsgLen = rrcContSize;
+ ulCcchIndInfo->ulCcchMsg = rrcContainer;
+
+ /* Fill Pst */
+ FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_UL_CCCH_IND);
+
+ if(MacDuAppUlCcchInd(&pst, ulCcchIndInfo) != ROK)
+ {
+ DU_LOG("\nERROR --> MAC: Failed to send UL CCCH Ind to DU APP");
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo->ulCcchMsg, ulCcchIndInfo->ulCcchMsgLen);
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, ulCcchIndInfo, sizeof(UlCcchIndInfo));
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes received short BSR
+ *
+ * @details
+ *
+ * Function : macProcShortBsr
+ *
+ * Functionality:
+ * MAC sends Short BSR to SCH
+ *
+ * @params[in] cell ID
+ * crnti
+ * lcg ID
+ * buffer size
+ *
+ *
+ * ****************************************************************/
+uint8_t macProcShortBsr(uint16_t cellId, uint16_t crnti, uint8_t lcgId, uint32_t bufferSize)
+{
+ Pst pst;
+ UlBufferStatusRptInd bsrInd;
+
+ memset(&pst, 0, sizeof(Pst));
+ memset(&bsrInd, 0, sizeof(UlBufferStatusRptInd));
+
+ bsrInd.cellId = cellId;
+ bsrInd.crnti = crnti;
+ bsrInd.bsrType = SHORT_BSR;
+ bsrInd.numLcg = 1; /* short bsr reports one lcg at a time */
+ bsrInd.dataVolInfo[0].lcgId = lcgId;
+ bsrInd.dataVolInfo[0].dataVol = bufferSize;
+
+ FILL_PST_MAC_TO_SCH(pst, EVENT_SHORT_BSR);
+ return(*macSchBsrOpts[pst.selector])(&pst, &bsrInd);