Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
JIRA ID:[ODUHIGH-259, ODUHIGH-260]
[o-du/l2.git]
/
src
/
5gnrmac
/
mac_msg_hdl.c
diff --git
a/src/5gnrmac/mac_msg_hdl.c
b/src/5gnrmac/mac_msg_hdl.c
index
cc361bb
..
aef583b
100644
(file)
--- a/
src/5gnrmac/mac_msg_hdl.c
+++ b/
src/5gnrmac/mac_msg_hdl.c
@@
-35,7
+35,7
@@
/* This file contains message handling functionality for MAC */
/* This file contains message handling functionality for MAC */
-
extern
MacCb macCb;
+MacCb macCb;
uint16_t buildMacPdu(RlcData *dlData);
#ifdef EGTP_TEST
uint16_t buildMacPdu(RlcData *dlData);
#ifdef EGTP_TEST
@@
-146,13
+146,14
@@
uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd)
DU_LOG("\nMAC : Received CRC indication");
GET_CELL_IDX(crcInd->cellId, cellIdx);
/* Considering one pdu and one preamble */
DU_LOG("\nMAC : Received CRC indication");
GET_CELL_IDX(crcInd->cellId, cellIdx);
/* Considering one pdu and one preamble */
- crcIndInfo.cellId = macCb.macCell[cellIdx]->cellId;
;
+ crcIndInfo.cellId = macCb.macCell[cellIdx]->cellId;
crcIndInfo.crnti = crcInd->crcInfo[0].rnti;
crcIndInfo.timingInfo.sfn = crcInd->timingInfo.sfn;
crcIndInfo.timingInfo.slot = crcInd->timingInfo.slot;
crcIndInfo.numCrcInd = crcInd->crcInfo[0].numCb;
crcIndInfo.crcInd[0] = crcInd->crcInfo[0].cbCrcStatus[0];
crcIndInfo.crnti = crcInd->crcInfo[0].rnti;
crcIndInfo.timingInfo.sfn = crcInd->timingInfo.sfn;
crcIndInfo.timingInfo.slot = crcInd->timingInfo.slot;
crcIndInfo.numCrcInd = crcInd->crcInfo[0].numCb;
crcIndInfo.crcInd[0] = crcInd->crcInfo[0].cbCrcStatus[0];
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, crcInd, sizeof(CrcInd));
return(sendCrcIndMacToSch(&crcIndInfo));
}
return(sendCrcIndMacToSch(&crcIndInfo));
}
@@
-183,7
+184,10
@@
uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
for(pduIdx = 0; pduIdx < rxDataInd->numPdus; pduIdx++)
{
unpackRxData(rxDataInd->cellId, rxDataInd->timingInfo, &rxDataInd->pdus[pduIdx]);
for(pduIdx = 0; pduIdx < rxDataInd->numPdus; pduIdx++)
{
unpackRxData(rxDataInd->cellId, rxDataInd->timingInfo, &rxDataInd->pdus[pduIdx]);
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rxDataInd->pdus[pduIdx].pduData,\
+ rxDataInd->pdus[pduIdx].pduLength);
}
}
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rxDataInd, sizeof(RxDataInd));
return ROK;
}
return ROK;
}
@@
-206,9
+210,9
@@
uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
* ****************************************************************/
uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
{
* ****************************************************************/
uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
{
- uint8_t pduIdx;
- uint8_t *txPdu;
- uint16_t tbSize;
+ uint8_t
pduIdx;
+ uint8_t
*txPdu;
+ uint16_t
tbSize;
MacDlData macDlData;
MacDlSlot *currDlSlot = NULLP;
MacDlData macDlData;
MacDlSlot *currDlSlot = NULLP;
@@
-281,7
+285,7
@@
uint8_t macProcUlData(uint16_t cellId, uint16_t rnti, SlotIndInfo slotInfo, \
uint8_t lcId, uint16_t pduLen, uint8_t *pdu)
{
Pst pst;
uint8_t lcId, uint16_t pduLen, uint8_t *pdu)
{
Pst pst;
- RlcData *ulData;
+ RlcData
*ulData;
/* Filling RLC Ul Data*/
MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcData));
/* Filling RLC Ul Data*/
MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcData));
@@
-411,54
+415,62
@@
uint8_t sendSchedRptToRlc(DlSchedInfo dlInfo, SlotIndInfo slotInfo)
*
* @details
*
*
* @details
*
- * Function : MacProcCellStart
Req
+ * Function : MacProcCellStart
*
* Functionality:
* Handles cell start reuqest from DU APP
*
* @params[in] Post structure pointer
*
* Functionality:
* Handles cell start reuqest from DU APP
*
* @params[in] Post structure pointer
- * Cell
Start Request info pointer
+ * Cell
Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcCellStart
Req(Pst *pst, MacCellStartInfo *cellStartInfo
)
+uint8_t MacProcCellStart
(Pst *pst, OduCellId *cellId
)
{
DU_LOG("\nMAC : Handling cell start request");
{
DU_LOG("\nMAC : Handling cell start request");
- sendToLowerMac(START_REQUEST, 0, cellStartInfo);
+ gSlotCount = 0;
+ sendToLowerMac(START_REQUEST, 0, cellId);
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cell
StartInfo
, \
- sizeof(
MacCellStartInfo
));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cell
Id
, \
+ sizeof(
OduCellId
));
return ROK;
}
/*******************************************************************
*
return ROK;
}
/*******************************************************************
*
- * @brief Handles cell stop
request
from DU APP
+ * @brief Handles cell stop from DU APP
*
* @details
*
*
* @details
*
- * Function : MacProcCellSt
artReq
+ * Function : MacProcCellSt
op
*
* Functionality:
*
* Functionality:
- * Handles cell stop
request
from DU APP
+ * Handles cell stop from DU APP
*
* @params[in] Post structure pointer
*
* @params[in] Post structure pointer
- *
Mac Cell stop information
+ *
Cell Id
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcCellStop
Req(Pst *pst, MacCellStopInfo *cellStopInfo
)
+uint8_t MacProcCellStop
(Pst *pst, OduCellId *cellId
)
{
#ifdef INTEL_FAPI
{
#ifdef INTEL_FAPI
+ uint16_t cellIdx;
+ SlotIndInfo slotInfo;
+
DU_LOG("\nMAC : Sending cell stop request to Lower Mac");
DU_LOG("\nMAC : Sending cell stop request to Lower Mac");
- sendToLowerMac(FAPI_STOP_REQUEST, 0, cellStopInfo);
+ GET_CELL_IDX(cellId->cellId, cellIdx);
+ slotInfo.cellId = cellId->cellId;
+ slotInfo.sfn = macCb.macCell[cellIdx]->currTime.sfn;
+ slotInfo.slot = macCb.macCell[cellIdx]->currTime.slot;
+ sendToLowerMac(FAPI_STOP_REQUEST, 0, &slotInfo);
#endif
#endif
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cell
StopInfo
, \
- sizeof(
MacCellStopInfo
));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cell
Id
, \
+ sizeof(
OduCellId
));
return ROK;
}
return ROK;
}
@@
-482,9
+494,9
@@
uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo)
* ****************************************************************/
uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo)
{
* ****************************************************************/
uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo)
{
- uint8_t ueIdx = 0;
- uint16_t cellIdx;
- uint16_t idx;
+ uint8_t
ueIdx = 0;
+ uint16_t
cellIdx;
+ uint16_t
idx;
DlRlcBoInfo dlBoInfo;
memset(&dlBoInfo, 0, sizeof(DlRlcBoInfo));
DlRlcBoInfo dlBoInfo;
memset(&dlBoInfo, 0, sizeof(DlRlcBoInfo));
@@
-638,7
+650,7
@@
uint8_t buildAndSendSrInd(UciInd *macUciInd, uint8_t crnti)
memset(&srUciInd, 0, sizeof(SrUciIndInfo));
GET_CELL_IDX(macUciInd->cellId, cellIdx);
memset(&srUciInd, 0, sizeof(SrUciIndInfo));
GET_CELL_IDX(macUciInd->cellId, cellIdx);
- srUciInd.cellId = macCb.macCell[cellIdx]->cellId;
;
+ srUciInd.cellId = macCb.macCell[cellIdx]->cellId;
srUciInd.crnti = crnti;
srUciInd.slotInd.sfn = macUciInd->slotInd.sfn;
srUciInd.slotInd.slot = macUciInd->slotInd.slot;
srUciInd.crnti = crnti;
srUciInd.slotInd.sfn = macUciInd->slotInd.sfn;
srUciInd.slotInd.slot = macUciInd->slotInd.slot;
@@
-708,6
+720,7
@@
uint8_t FapiMacUciInd(Pst *pst, UciInd *macUciInd)
DU_LOG("\nMAC: Received Uci Ind is NULL at FapiMacUciInd()");
ret = RFAILED;
}
DU_LOG("\nMAC: Received Uci Ind is NULL at FapiMacUciInd()");
ret = RFAILED;
}
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macUciInd, sizeof(UciInd));
return ret;
}
return ret;
}