remove/replaced PRIVATE and EXTERN keywords
[o-du/l2.git] / src / 5gnrmac / mac_msg_hdl.c
index 11c4b9c..d81c29b 100644 (file)
@@ -35,7 +35,7 @@
 
 /* This file contains message handling functionality for MAC */
 
-extern MacCb  macCb;
+MacCb  macCb;
 
 uint16_t buildMacPdu(RlcData *dlData);
 #ifdef EGTP_TEST
@@ -143,12 +143,10 @@ uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd)
 {
    uint16_t     cellIdx;
    CrcIndInfo   crcIndInfo;
-
    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;
@@ -178,9 +176,7 @@ uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd)
 uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
 {
    uint16_t pduIdx;
-
    DU_LOG("\nMAC : Received Rx Data indication");
-
    /* TODO : compare the handle received in RxDataInd with handle send in PUSCH
     * PDU, which is stored in raCb */
 
@@ -210,15 +206,14 @@ uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
  * ****************************************************************/
 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;
 
    DU_LOG("\nMAC: Received DL data for sfn=%d slot=%d", \
       dlData->slotInfo.sfn, dlData->slotInfo.slot);
-
    /* Copy the pdus to be muxed into mac Dl data */
    macDlData.numPdu = dlData->numPdu;
    for(pduIdx = 0;  pduIdx < dlData->numPdu; pduIdx++)
@@ -286,7 +281,7 @@ uint8_t macProcUlData(uint16_t cellId, uint16_t rnti, SlotIndInfo slotInfo, \
 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));
@@ -383,8 +378,8 @@ uint8_t sendSchedRptToRlc(DlSchedInfo dlInfo, SlotIndInfo slotInfo)
       DU_LOG("\nMAC: Memory allocation failure in sendSchResultRepToRlc");
       return RFAILED;
    }
-   DU_LOG("\nMAC: Send scheduled result report for sfn %d slot %d", slotInfo.sfn, slotInfo.slot);
 
+   DU_LOG("\nMAC: Send scheduled result report for sfn %d slot %d", slotInfo.sfn, slotInfo.slot);
    schedRpt->cellId = dlInfo.cellId;
    schedRpt->rnti = dlInfo.dlMsgAlloc->crnti;
    schedRpt->numLc = dlInfo.dlMsgAlloc->numLc;
@@ -487,9 +482,9 @@ uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo  *cellStopInfo)
  * ****************************************************************/
 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));
 
@@ -643,7 +638,7 @@ uint8_t buildAndSendSrInd(UciInd *macUciInd, uint8_t crnti)
    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;