#include "mac.h"
#include "mac_utils.h"
-/* Function pointer for sending rach ind from MAC to SCH */
-MacSchRachIndFunc macSchRachIndOpts[]=
-{
- packMacSchRachInd, /* packing for loosely coupled */
- MacSchRachInd, /* packing for tightly coupled */
- packMacSchRachInd /* packing for light weight loosely coupled */
-};
-
-/* Function pointer for sending RACH resource request from MAC to SCH */
-MacSchRachRsrcReqFunc macSchRachRsrcReqOpts[] =
-{
- packMacSchRachRsrcReq, /* packing for loosely coupled */
- MacSchRachRsrcReq, /* packing for tightly coupled */
- packMacSchRachRsrcReq /* packing for light weight loosely coupled */
-};
-
/* Function pointer for sending RACH resource response from MAC to DU APP */
MacDuRachRsrcRspFunc macDuRachRsrcRspOpts[] =
{
packDuMacRachRsrcRsp /* packing for light weight loosly coupled */
};
-/* Function pointer for sending RACH resource release from MAC to SCH */
-MacSchRachRsrcRelFunc macSchRachRsrcRelOpts[] =
-{
- packMacSchRachRsrcRel, /* packing for loosely coupled */
- MacSchRachRsrcRel, /* packing for tightly coupled */
- packMacSchRachRsrcRel /* packing for light weight loosely coupled */
-};
-
/*******************************************************************
*
* @brief Sends RACH indication to SCH
Pst pst;
FILL_PST_MAC_TO_SCH(pst, EVENT_RACH_IND_TO_SCH);
- return(*macSchRachIndOpts[pst.selector])(&pst, rachInd);
+ return(SchMessageRouter(&pst, (void *)rachInd));
}
/*******************************************************************
/* Send RACH resource request from MAC to SCH */
FILL_PST_MAC_TO_SCH(schPst, EVENT_RACH_RESOURCE_REQUEST_TO_SCH);
- ret = (*macSchRachRsrcReqOpts[schPst.selector])(&schPst, schRachRsrcReq);
+ ret = SchMessageRouter(&schPst, (void *)schRachRsrcReq);
}
else
DU_LOG("\nERROR --> MAC : Memory allocation failed for RACH resource request to SCH");
/* Send RACH resource release from MAC to SCH */
FILL_PST_MAC_TO_SCH(schPst, EVENT_RACH_RESOURCE_RELEASE_TO_SCH);
- ret = (*macSchRachRsrcRelOpts[schPst.selector])(&schPst, schRachRsrcRel);
+ ret = SchMessageRouter(&schPst, (void *)schRachRsrcRel);
}
else
DU_LOG("\nERROR --> MAC : Memory allocation failed for RACH resource release to SCH");
if(ulSchedInfo != NULLP)
{
MacUlSlot *currUlSlot =
- &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % MAX_SLOTS];
+ &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % macCb.macCell[cellIdx]->numOfSlots];
memcpy(&currUlSlot->ulInfo, ulSchedInfo, sizeof(UlSchedInfo));
}
return ROK;