#include "cm_lib.x"
#include "du_app_mac_inf.h"
+#ifdef INTEL_WLS
+#define LWR_MAC_ALLOC(_datPtr, _size) WLS_MEM_ALLOC(_datPtr, _size);
+#else
+#define LWR_MAC_ALLOC(_datPtr, _size) MAC_ALLOC(_datPtr, _size);
+#endif
+
typedef enum
{
PHY_STATE_IDLE,
uint32_t msgLen; //Length of message Body
msgLen = 0;
fapi_param_req_t *paramReq;
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(paramReq, sizeof(fapi_param_req_t));
-#else
- MAC_ALLOC(paramReq, sizeof(fapi_param_req_t));
-#endif
-
+ LWR_MAC_ALLOC(paramReq, sizeof(fapi_param_req_t));
if(paramReq != NULLP)
{
fillMsgHeader(¶mReq->header, FAPI_PARAM_REQUEST, msgLen);
DU_LOG("\nLOWER MAC: Sending Param Request to Phy");
LwrMacSendToPhy(paramReq->header.message_type_id, sizeof(fapi_param_req_t), (void *)paramReq);
- MAC_FREE(paramReq, sizeof(fapi_param_req_t));
return ROK;
}
else
}
}
MAC_FREE(cellParam, sizeof(ClCellParam));
- MAC_FREE(paramRsp, sizeof(fapi_param_resp_t));
-
sendToLowerMac(FAPI_CONFIG_REQUEST, 0, (void *)NULL);
return ROK;
}
cellParams = rgCb[inst].cell;
macCfgParams = cellParams->macCellCfg;
configReqSize = sizeof(fapi_config_req_t) + (macCfgParams.numTlv * sizeof(fapi_uint16_tlv_t));
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(configReq, configReqSize);
-#else
- MAC_ALLOC(configReq, configReqSize);
-#endif
-
+ LWR_MAC_ALLOC(configReq, configReqSize);
if(configReq != NULL)
{
configReq->number_of_tlvs = macCfgParams.numTlv;
fillTlvs(&configReq->tlvs[index++], FAPI_K1_TAG, sizeof(uint16_t), macCfgParams.prachCfg.fdm[0].k1, &msgLen);
fillTlvs(&configReq->tlvs[index++], FAPI_PRACH_ZERO_CORR_CONF_TAG , sizeof(uint8_t), macCfgParams.prachCfg.fdm[0].zeroCorrZoneCfg, &msgLen);
fillTlvs(&configReq->tlvs[index++], FAPI_NUM_UNUSED_ROOT_SEQUENCES_TAG, sizeof(uint8_t), macCfgParams.prachCfg.fdm[0].numUnusedRootSeq, &msgLen);
- //MAC_ALLOC(macCfgParams.prachCfg.fdm[0].unsuedRootSeq, \
- sizeof(uint8_t)*macCfgParams.prachCfg.fdm[0].numUnusedRootSeq);
- macCfgParams.prachCfg.fdm[0].unsuedRootSeq = (uint8_t *)malloc(sizeof(uint8_t)*macCfgParams.prachCfg.fdm[0].numUnusedRootSeq);
- fillTlvs(&configReq->tlvs[index++], FAPI_UNUSED_ROOT_SEQUENCES_TAG,
- sizeof(uint8_t), *(macCfgParams.prachCfg.fdm[0].unsuedRootSeq), &msgLen);
+ if(macCfgParams.prachCfg.fdm[0].numUnusedRootSeq)
+ {
+ LWR_MAC_ALLOC(macCfgParams.prachCfg.fdm[0].unsuedRootSeq ,
+ sizeof(uint8_t)*macCfgParams.prachCfg.fdm[0].numUnusedRootSeq);
+ fillTlvs(&configReq->tlvs[index++], FAPI_UNUSED_ROOT_SEQUENCES_TAG,\
+ sizeof(uint8_t), *(macCfgParams.prachCfg.fdm[0].unsuedRootSeq), &msgLen);
+ }
+ else
+ {
+ macCfgParams.prachCfg.fdm[0].unsuedRootSeq = NULL;
+ }
+
fillTlvs(&configReq->tlvs[index++], FAPI_SSB_PER_RACH_TAG, sizeof(uint8_t), macCfgParams.prachCfg.ssbPerRach, &msgLen);
fillTlvs(&configReq->tlvs[index++], FAPI_PRACH_MULTIPLE_CARRIERS_IN_A_BAND_TAG, sizeof(uint8_t), macCfgParams.prachCfg.prachMultCarrBand, &msgLen);
DU_LOG("\nLOWER_MAC: Sending Config Request to Phy");
/* TODO : Recheck the size / msglen to be sent to WLS_Put*/
LwrMacSendToPhy(configReq->header.message_type_id, msgLen, (void *)configReq);
- MAC_FREE(configReq, configReqSize);
return ROK;
}
else
{
if(configRsp->error_code == MSG_OK)
{
- DU_LOG("\nLOWER MAC: PHY has moved to Conigured state \n");
+ DU_LOG("\nLOWER MAC: PHY has moved to Configured state \n");
clGlobalCp.phyState = PHY_STATE_CONFIGURED;
/* TODO :
* Store config response into an intermediate struture and send to MAC
* Support LC and LWLC for sending config rsp to MAC
*/
fapiMacConfigRsp();
- MAC_FREE(configRsp, sizeof(fapi_config_resp_t));
return ROK;
}
else
#ifdef FAPI
uint32_t msgLen = 0;
fapi_start_req_t *startReq;
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(startReq, sizeof(fapi_start_req_t));
-#else
- MAC_ALLOC(startReq, sizeof(fapi_start_req_t));
-#endif
+ LWR_MAC_ALLOC(startReq, sizeof(fapi_start_req_t));
if(startReq != NULL)
{
fillMsgHeader(&startReq->header, FAPI_START_REQUEST, msgLen);
DU_LOG("\nLOWER MAC: Sending Start Request to PHY");
LwrMacSendToPhy(startReq->header.message_type_id, sizeof(fapi_start_req_t), (void *)startReq);
- MAC_FREE(startReq, sizeof(fapi_start_req_t));
return ROK;
}
else
dlTtiReqPdu->u.pdcch_pdu.shiftIndex = pdcchInfo->coreset0Cfg.shiftIndex;
dlTtiReqPdu->u.pdcch_pdu.precoderGranularity = pdcchInfo->coreset0Cfg.precoderGranularity;
dlTtiReqPdu->u.pdcch_pdu.numDlDci = pdcchInfo->numDlDci;
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(dlTtiReqPdu->u.pdcch_pdu.dlDci, sizeof(fapi_dl_dci_t));
-#else
- MAC_ALLOC(dlTtiReqPdu->u.pdcch_pdu.dlDci, sizeof(fapi_dl_dci_t));
-#endif
+ LWR_MAC_ALLOC(dlTtiReqPdu->u.pdcch_pdu.dlDci, sizeof(fapi_dl_dci_t));
if(pdcchInfo->dci.rnti == SI_RNTI)
{
fillSib1DlDciPdu(dlTtiReqPdu->u.pdcch_pdu.dlDci, pdcchInfo);
/* as of now, memory is allocated from SSI, later WLS memory needs to be taken */
pduDesc->tlvs[0].tl.tag = 1; /* pointer to be sent */
pduDesc->tlvs[0].tl.length = macCellCfg->sib1Cfg.sib1PduLen;
- MAC_ALLOC(sib1TxdataValue,macCellCfg->sib1Cfg.sib1PduLen);
+ LWR_MAC_ALLOC(sib1TxdataValue,macCellCfg->sib1Cfg.sib1PduLen);
if(sib1TxdataValue == NULLP)
{
return RFAILED;
pduDesc->pduLength = pduLen;
msgLen += pduLen;
- /* TODO: The pointer value which was stored, needs to be free-ed at PHY *
- * But since we did not implement WLS, this has to be done here */
- MAC_FREE(sib1TxdataValue,macCellCfg->sib1Cfg.sib1PduLen);
+#ifndef INTEL_WLS
+ MAC_FREE(sib1TxdataValue,macCellCfg->sib1Cfg.sib1PduLen);
+#endif
+
return ROK;
}
uint32_t pduLen = 0;
uint32_t *rarTxdataValue = NULLP;
- pduDesc->pduIndex = pduIndex;
- pduDesc->numTlvs = 1;
+ pduDesc[pduIndex].pduIndex = pduIndex;
+ pduDesc[pduIndex].numTlvs = 1;
/* fill the TLV */
/* as of now, memory is allocated from SSI, later WLS memory needs to be taken */
- pduDesc->tlvs[0].tl.tag = 1; /* pointer to be sent */
- pduDesc->tlvs[0].tl.length = rarInfo->rarPduLen;
- MAC_ALLOC(rarTxdataValue,rarInfo->rarPduLen);
+ pduDesc[pduIndex].tlvs[0].tl.tag = 1; /* pointer to be sent */
+ pduDesc[pduIndex].tlvs[0].tl.length = rarInfo->rarPduLen;
+ LWR_MAC_ALLOC(rarTxdataValue,rarInfo->rarPduLen);
if(rarTxdataValue == NULLP)
{
return RFAILED;
}
memcpy(rarTxdataValue,rarInfo->rarPdu,rarInfo->rarPduLen);
- pduDesc->tlvs[0].value = (uint32_t)rarTxdataValue;
+ pduDesc[pduIndex].tlvs[0].value = (uint32_t)rarTxdataValue;
/* The total length of the PDU description and PDU data */
pduLen += 8; /* size of PDU length 2 bytes, PDU index 2 bytes, numTLV 4 bytes */
pduLen += sizeof(fapi_uint32_tlv_t); /* only 1 TLV is present */
- pduDesc->pduLength = pduLen;
+ pduDesc[pduIndex].pduLength = pduLen;
msgLen += pduLen;
- /* TODO: The pointer value which was stored, needs to be free-ed at PHY *
- * But since we did not implement WLS, this has to be done here */
- MAC_FREE(rarTxdataValue,rarInfo->rarPduLen);
+/* TODO: The pointer value which was stored, needs to be free-ed at PHY *
+ * But since we did not implement WLS, this has to be done here
+ */
+#ifndef INTEL_WLS
+ MAC_FREE(rarTxdataValue,rarInfo->rarPduLen);
+#endif
return ROK;
}
if(dlTtiReqtimingInfo != NULLP)
{
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(dlTtiReq, sizeof(fapi_dl_tti_req_t));
-#else
- MAC_ALLOC(dlTtiReq, sizeof(fapi_dl_tti_req_t));
-#endif
+ LWR_MAC_ALLOC(dlTtiReq, sizeof(fapi_dl_tti_req_t));
if(dlTtiReq != NULLP)
{
dlTtiReq->sfn = dlTtiReqtimingInfo->sfn;
dlTtiReq->nGroup = 0;
if(dlTtiReq->nPdus > 0)
{
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(dlTtiReq->pdus, (nPdu * sizeof(fapi_dl_tti_req_pdu_t)));
-#else
- MAC_ALLOC(dlTtiReq->pdus, (nPdu * sizeof(fapi_dl_tti_req_pdu_t)));
-#endif
+ LWR_MAC_ALLOC(dlTtiReq->pdus, (nPdu * sizeof(fapi_dl_tti_req_pdu_t)));
+ if(!dlTtiReq->pdus)
+ {
+ DU_LOG("\nLOWER MAC: Memory allocation failed");
+ return RFAILED;
+ }
+
if(currDlSlot->dlInfo.isBroadcastPres)
{
if(currDlSlot->dlInfo.brdcstAlloc.ssbTrans)
/* TODO : Recheck the size / msglen to be sent to WLS_Put*/
LwrMacSendToPhy(dlTtiReq->header.message_type_id, msgLen, (void *)dlTtiReq);
- /* FREE the allocated memories */
- if(currDlSlot->dlInfo.brdcstAlloc.sib1Trans)
- {
- if(currDlSlot->dlInfo.brdcstAlloc.ssbTrans)
- {
- MAC_FREE(dlTtiReq->pdus[1].u.pdcch_pdu.dlDci,
- sizeof(fapi_dl_dci_t));
- }
- else
- {
- MAC_FREE(dlTtiReq->pdus[0].u.pdcch_pdu.dlDci,
- sizeof(fapi_dl_dci_t));
- }
- }
- if(currDlSlot->dlInfo.isRarPres)
- {
- if(currDlSlot->dlInfo.brdcstAlloc.ssbTrans)
- {
- MAC_FREE(dlTtiReq->pdus[1].u.pdcch_pdu.dlDci,
- sizeof(fapi_dl_dci_t));
- }
- else
- {
- MAC_FREE(dlTtiReq->pdus[0].u.pdcch_pdu.dlDci,
- sizeof(fapi_dl_dci_t));
- }
- }
-
- MAC_FREE(dlTtiReq->pdus, (nPdu * sizeof(fapi_dl_tti_req_pdu_t)));
-
/* send TX_Data request message */
if(currDlSlot->dlInfo.brdcstAlloc.sib1Trans)
{
msgLen = 0;
- MAC_ALLOC(txDataReq,sizeof(fapi_tx_data_req_t));
+ LWR_MAC_ALLOC(txDataReq,sizeof(fapi_tx_data_req_t));
txDataReq->sfn = dlTtiReqtimingInfo->sfn;
txDataReq->slot = dlTtiReqtimingInfo->slot;
txDataReq->numPdus = 1;
+ LWR_MAC_ALLOC(txDataReq->pduDesc, (txDataReq->numPdus * \
+ sizeof(fapi_tx_pdu_desc_t)));
fillSib1TxDataReq(
- &txDataReq->pduDesc,
+ txDataReq->pduDesc,
&rgCb[inst].cell->macCellCfg,
currDlSlot->dlInfo.brdcstAlloc.sib1Alloc.sib1PdschCfg.pduIndex,
&msgLen);
msgLen += sizeof(fapi_tx_data_req_t) - sizeof(fapi_msg_t);
fillMsgHeader(&txDataReq->header, FAPI_TX_DATA_REQUEST, msgLen);
LwrMacSendToPhy(txDataReq->header.message_type_id, msgLen,(void *)txDataReq);
- MAC_FREE(txDataReq,sizeof(fapi_tx_data_req_t));
}
if(currDlSlot->dlInfo.isRarPres)
{
msgLen = 0;
/* mux and form RAR pdu */
fillRarPdu(&currDlSlot->dlInfo.rarAlloc.rarInfo);
-
- MAC_ALLOC(txDataReq,sizeof(fapi_tx_data_req_t));
+ LWR_MAC_ALLOC(txDataReq,sizeof(fapi_tx_data_req_t));
txDataReq->sfn = dlTtiReqtimingInfo->sfn;
txDataReq->slot = dlTtiReqtimingInfo->slot;
txDataReq->numPdus = 1;
+ LWR_MAC_ALLOC(txDataReq->pduDesc, (txDataReq->numPdus * \
+ sizeof(fapi_tx_pdu_desc_t)));
fillRarTxDataReq(
- &txDataReq->pduDesc,
+ txDataReq->pduDesc,
&currDlSlot->dlInfo.rarAlloc.rarInfo,
currDlSlot->dlInfo.rarAlloc.rarPdschCfg.pduIndex,
&msgLen);
fillMsgHeader(&txDataReq->header, FAPI_TX_DATA_REQUEST, msgLen);
LwrMacSendToPhy(txDataReq->header.message_type_id, msgLen,(void *)txDataReq);
- MAC_FREE(txDataReq,sizeof(fapi_tx_data_req_t));
}
}
else
/* TODO : Recheck the size / msglen to be sent to WLS_Put*/
LwrMacSendToPhy(dlTtiReq->header.message_type_id, msgLen, (void *)dlTtiReq);
}
- MAC_FREE(dlTtiReq, sizeof(fapi_dl_tti_req_t));
return ROK;
}
else
if(currTimingInfo != NULLP)
{
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(ulTtiReq, sizeof(fapi_ul_tti_req_t));
-#else
- MAC_ALLOC(ulTtiReq, sizeof(fapi_ul_tti_req_t));
-#endif
+ LWR_MAC_ALLOC(ulTtiReq, sizeof(fapi_ul_tti_req_t));
if(ulTtiReq != NULLP)
{
ulTtiReq->sfn = currTimingInfo->sfn;
ulTtiReq->nGroup = 0;
if(ulTtiReq->nPdus > 0)
{
-#ifdef INTEL_WLS
- WLS_MEM_ALLOC(ulTtiReqPdu, (ulTtiReq->nPdus * sizeof(fapi_ul_tti_req_pdu_t)));
-#else
- MAC_ALLOC(ulTtiReqPdu, (ulTtiReq->nPdus * sizeof(fapi_ul_tti_req_pdu_t)));
-#endif
+ LWR_MAC_ALLOC(ulTtiReqPdu, (ulTtiReq->nPdus *
+ sizeof(fapi_ul_tti_req_pdu_t)));
/* Fill Prach Pdu */
if(ulTtiReq->rachPresent)
{
fillMsgHeader(&ulTtiReq->header, FAPI_UL_TTI_REQUEST, msgLen);
DU_LOG("\nLOWER MAC: Sending UL TTI Request");
LwrMacSendToPhy(ulTtiReq->header.message_type_id, msgLen, (void *)ulTtiReq);
- MAC_FREE(ulTtiReqPdu, (ulTtiReq->nPdus * sizeof(fapi_ul_tti_req_pdu_t)));
}
}
else
DU_LOG("\nLOWER MAC: Sending UL TTI Request");
LwrMacSendToPhy(ulTtiReq->header.message_type_id, msgLen, (void *)ulTtiReq);
}
- MAC_FREE(ulTtiReq, sizeof(fapi_ul_tti_req_t));
return ROK;
}
else
extern void sendToLowerMac(uint16_t msgType, uint32_t msgLen, void *msg);
+/*******************************************************************
+ *
+ * @brief Processes DL data from RLC
+ *
+ * @details
+ *
+ * Function : MacRlcProcDlData
+ *
+ * Functionality:
+ * Processes DL data from RLC
+ *
+ * @params[in] Post structure
+ * DL data
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint16_t MacRlcProcDlData(Pst* pst, SpId spId, RlcMacData *dlData)
+{
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes BO status from RLC
+ *
+ * @details
+ *
+ * Function : MacRlcProcBOStatus
+ *
+ * Functionality:
+ * Processes BO status from RLC
+ *
+ * @params[in] Post structure
+ * BO status
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint16_t MacRlcProcBOStatus(Pst* pst, SpId spId, RlcMacBOStatus* boStatus)
+{
+ return ROK;
+}
+
+
/*******************************************************************
*
* @brief Handles cell start reuqest from DU APP
cmUnpkRguUbndReq(RgUiRguUbndReq, pst, mBuf);
break;
case EVTRLCDLDAT:
- unpackDlData(RgUiRguDDatReq, pst, mBuf);
+ unpackDlData(MacRlcProcDlData, pst, mBuf);
break;
case EVTRLCBOSTA:
- unpackBOStatus(RgUiRguDStaRsp, pst, mBuf);
+ unpackBOStatus(MacRlcProcBOStatus, pst, mBuf);
break;
#ifdef LTE_L2_MEAS
{
if(schCellCfgCfm->rsp == RSP_OK)
{
- sendToLowerMac(PARAM_REQUEST, 0, (void *)NULL);
+ sendToLowerMac(CONFIG_REQUEST, 0, (void *)NULL);
}
else
{
* RFAILED - failure
*
* ****************************************************************/
-PUBLIC S16 RlcMacProcSchedRep(Pst *pst, SuId suId, RlcMacSchedRep *schRep)
+PUBLIC uint16_t RlcMacProcSchedRep(Pst *pst, SuId suId, RlcMacSchedRepInfo *schRep)
{
U8 idx; /* Iterator */
U8 nmbDLch = 0; /* Number of dedicated logical channles */
KwLiRguDStaInd(pst, suId, dLchSchInfo);
}
- KW_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRep));
+ KW_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRepInfo));
RETVALUE(ROK);
}
/* RGU Dedicated Channel Data Request primitive */
-PUBLIC RguDDatReq rlcMacSendDlDataOpts[] =
+PUBLIC RlcMacDlData rlcMacSendDlDataOpts[] =
{
#ifdef EGTP_TEST
macStubSendDlData,
packDlData, /* 0 - loosely coupled */
#endif /* LCRGUIRGU */
#ifdef RG
- RgUiRguDDatReq, /* 1 - tightly coupled, MAC */
+ MacRlcProcDlData, /* 1 - tightly coupled, MAC */
#endif /* RG */
#ifdef LCKWLIRGU
packDlData, /* 0 - loosely coupled */
/* RLC logical Channel Status primitive */
-PUBLIC RguDStaRsp rlcMacSendBOStatusOpts[] =
+PUBLIC RlcMacBoStatus rlcMacSendBOStatusOpts[] =
{
#ifdef EGTP_TEST
macStubBOStatus,
packBOStatus, /* 0 - loosely coupled */
#endif /* LCRGUIRGU */
#ifdef RG
- RgUiRguDStaRsp, /* 1 - tightly coupled, MAC */
+ MacRlcProcBOStatus, /* 1 - tightly coupled, MAC */
#endif /* RG */
#ifdef LCKWLIRGU
packBOStatus, /* 0 - LWLC loosely coupled */
PUBLIC S16 macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta)
{
Pst rspPst;
- RlcMacSchedRep *schRep;
+ RlcMacSchedRepInfo *schRep;
DU_LOG("\nMAC : Received BO status from RLC");
rspPst.pool = pst->pool;
/* Filling Scheduling Report */
- KW_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRep));
+ KW_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRepInfo));
schRep->cellId = boSta->cellId;
schRep->rnti = boSta->rnti;
* @return S16
* -# ROK
**/
-#ifdef ANSI
-PUBLIC S16 packDlData
+PUBLIC uint16_t packDlData
(
Pst* pst,
SpId spId,
RlcMacData *dlData
)
-#else
-PUBLIC S16 packDlData(pst, spId, dlData)
-Pst* pst;
-SpId spId;
-RlcMacData dlData;
-#endif
{
Buffer *mBuf = NULLP;
TRC3(packDlData)
* @return S16
* -# ROK
**/
-#ifdef ANSI
PUBLIC S16 unpackDlData
(
-RguDDatReq func,
+RlcMacDlData func,
Pst *pst,
Buffer *mBuf
)
-#else
-PUBLIC S16 unpackDlData(func, pst, mBuf)
-RguDDatReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
{
SpId spId;
-// RguDDatReqInfo *datReq;
RlcMacData *dlData;
TRC3(unpackDlData)
* @return S16
* -# ROK
**/
-#ifdef ANSI
PUBLIC S16 unpackRcvdUlData
(
-RguDDatInd func,
+RlcMacUlData func,
Pst *pst,
Buffer *mBuf
)
-#else
-PUBLIC S16 unpackRcvdUlData(func, pst, mBuf)
-RguDDatInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
{
SuId suId;
RlcMacData *ulData;
* @return S16
* -# ROK
**/
-#ifdef ANSI
-PUBLIC S16 packBOStatus
+PUBLIC uint16_t packBOStatus
(
Pst* pst,
SpId spId,
RlcMacBOStatus *boStatus
)
-#else
-PUBLIC S16 packBOStatus(pst, spId, staRsp)
-Pst* pst;
-SpId spId;
-RlcMacBOStatus *boStatus;
-#endif
{
RlcMacBOStatus *boStaInfo = NULL;
Buffer *mBuf = NULLP;
* @return S16
* -# ROK
**/
-#ifdef ANSI
-PUBLIC S16 unpackBOStatus
+PUBLIC uint16_t unpackBOStatus
(
-RguDStaRsp func,
+RlcMacBoStatus func,
Pst *pst,
Buffer *mBuf
)
-#else
-PUBLIC S16 unpackBOStatus(func, pst, mBuf)
-RguDStaRsp func;
-Pst *pst;
-Buffer *mBuf;
-#endif
{
SpId spId;
RlcMacBOStatus *boSta;
* @return S16
* -# ROK
**/
-#ifdef ANSI
PUBLIC S16 packSchedRep
(
Pst* pst,
SuId suId,
-RlcMacSchedRep * schRep
+RlcMacSchedRepInfo * schRep
)
-#else
-PUBLIC S16 packSchedRep(pst, suId, staInd)
-Pst* pst;
-SuId suId;
-RlcMacSchedRep * schRep;
-#endif
{
Buffer *mBuf = NULLP;
TRC3(packSchedRep)
__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
(ErrVal)ERGU076, (ErrVal)0, "Packing failed");
#endif
- SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep));
+ SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
RETVALUE(RFAILED);
}
if (pst->selector == RGU_SEL_LWLC)
(ErrVal)ERGU077, (ErrVal)0, "Packing failed");
#endif
SPutSBuf(pst->region, pst->pool, (Data *)schRep,
- sizeof(RlcMacSchedRep));
+ sizeof(RlcMacSchedRepInfo));
SPutMsg(mBuf);
RETVALUE(RFAILED);
}
if (SPutSBuf(pst->region, pst->pool, (Data *)schRep,
- sizeof(RlcMacSchedRep)) != ROK) {
+ sizeof(RlcMacSchedRepInfo)) != ROK) {
#if (ERRCLASS & ERRCLS_ADD_RES)
SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
#endif
if (schRep != NULLP)
{
- SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep));
+ SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
}
SPutMsg(mBuf);
RETVALUE(RFAILED);
* @return S16
* -# ROK
**/
-#ifdef ANSI
PUBLIC S16 unpackSchedRep
(
-RguDStaInd func,
+RlcMacSchedRep func,
Pst *pst,
Buffer *mBuf
)
-#else
-PUBLIC S16 unpackSchedRep(func, pst, mBuf)
-RguDStaInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
{
SuId suId;
-// RguDStaIndInfo *staInd;
- RlcMacSchedRep *schRep;
+ RlcMacSchedRepInfo *schRep;
TRC3(unpackSchedRep)
}
else
{
- if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRep))) != ROK) {
+ if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) {
#if (ERRCLASS & ERRCLS_ADD_RES)
SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
(ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
#endif
SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep));
+ SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
RETVALUE(RFAILED);
}
}
* File :
*
**********************************************************/
-#ifdef ANSI
PUBLIC S16 packSchedRepInfo
(
-RlcMacSchedRep *param,
+RlcMacSchedRepInfo *param,
Buffer *mBuf
)
-#else
-PUBLIC S16 packSchedRepInfo(param, mBuf)
-RlcMacSchedRep *param;
-Buffer *mBuf;
-#endif
{
S32 idx;
* File :
*
**********************************************************/
-#ifdef ANSI
PUBLIC S16 unpackSchedRepInfo
(
-RlcMacSchedRep *param,
+RlcMacSchedRepInfo *param,
Buffer *mBuf
)
-#else
-PUBLIC S16 unpackSchedRepInfo(param, mBuf)
-RlcMacSchedRep *param;
-Buffer *mBuf;
-#endif
{
S32 idx;
CmLteRnti rnti; /*!< Temporary CRNTI */
U8 nmbLch; /*!< Number of logical channels scheduled */
RlcMacLchSta lchSta[RGU_MAX_LC]; /*!< Scheduled info of logical channels */
-}RlcMacSchedRep;
+}RlcMacSchedRepInfo;
/* UL Data i.e. RLC PDU info from RLC to MAC */
typedef struct rlcMacPduInfo
typedef S16 (*RguDDatReq) ARGS((
Pst* pst,
SpId spId,
- RguDDatReqInfo * datReq));
+ RguDDatReqInfo *datReq));
+
+typedef uint16_t (*RlcMacDlData) ARGS((
+ Pst* pst,
+ SpId spId,
+ RlcMacData *dlData));
/** @brief Data Indication from MAC to RLC to
* forward the data received for common channels */
typedef S16 (*RguCDatInd) ARGS((
typedef S16 (*RguDDatInd) ARGS((
Pst* pst,
SuId suId,
- RlcMacData * datInd));
+ RguDDatIndInfo *datInd));
+
+typedef S16 (*RlcMacUlData) ARGS((
+ Pst* pst,
+ SuId suId,
+ RlcMacData *ulData));
/** @brief Status Response from RLC to MAC to
* inform the BO report for common channels */
typedef S16 (*RguCStaRsp) ARGS((
Pst* pst,
SpId spId,
RguDStaRspInfo * staRsp));
+
+typedef uint16_t (*RlcMacBoStatus) ARGS((
+ Pst* pst,
+ SpId spId,
+ RlcMacBOStatus *boStatus));
+
/** @brief Status Indication from MAC to RLC
* as a response to the staRsp primitive from RLC */
typedef S16 (*RguCStaInd) ARGS((
typedef S16 (*RguDStaInd) ARGS((
Pst* pst,
SuId suId,
- RlcMacSchedRep * staInd));
+ RguDStaIndInfo * staInd));
+
+typedef uint16_t (*RlcMacSchedRep) ARGS((
+ Pst* pst,
+ SuId suId,
+ RlcMacSchedRepInfo *schRep));
typedef S16 (*RguFlowCntrlIndInfo) ARGS((
Pst *pst,
* @return ROK/RFAILED
*/
EXTERN S16 RgUiRguDDatReq ARGS((Pst* pst,SpId spId,RguDDatReqInfo *datReq));
+
+EXTERN uint16_t MacRlcProcDlData(Pst* pst, SpId spId, RlcMacData *dlData);
+
/** @brief Data Indication from MAC to RLC to
* forward the data received for common channels
* @param pst Pointer to the post structure.
* @return ROK/RFAILED
*/
EXTERN S16 RgUiRguDStaRsp ARGS((Pst* pst,SpId spId,RguDStaRspInfo *staRsp));
+
+EXTERN uint16_t MacRlcProcBOStatus(Pst* pst, SpId spId, RlcMacBOStatus* boStatus);
+
/** @brief Status Indication from MAC to RLC
* as a response to the staRsp primitive from RLC.
* @param pst Pointer to the post structure.
/**@brief Primitive invoked from MAC to RLC to
* inform scheduling result for logical channels */
-EXTERN S16 RlcMacProcSchedRep ARGS((
+EXTERN uint16_t RlcMacProcSchedRep ARGS((
Pst* pst,
SuId suId,
- RlcMacSchedRep *schRep
+ RlcMacSchedRepInfo *schRep
));
/** @brief Status Indication from MAC to RLC
* as a response to the staRsp primitive from RLC.
));
/** @brief Request from RLC to MAC for forwarding SDUs on
* dedicated channel for transmission */
-EXTERN S16 packDlData ARGS((
+EXTERN uint16_t packDlData ARGS((
Pst* pst,
SpId spId,
RlcMacData * datReq
/** @brief Request from RLC to MAC for forwarding SDUs on
* dedicated channel for transmission */
EXTERN S16 unpackDlData ARGS((
- RguDDatReq func,
+ RlcMacDlData func,
Pst* pst,
Buffer *mBuf
));
/** @brief Data Indication from MAC to RLC to
* forward the data received for dedicated channels*/
EXTERN S16 unpackRcvdUlData ARGS((
- RguDDatInd func,
+ RlcMacUlData func,
Pst* pst,
Buffer *mBuf
));
));
/** @brief Primitive invoked from RLC to MAC to
* inform the BO report for dedicated channels*/
-EXTERN S16 packBOStatus ARGS((
+EXTERN uint16_t packBOStatus ARGS((
Pst* pst,
SpId spId,
RlcMacBOStatus* boStatus
));
/** @brief Primitive invoked from RLC to MAC to
* inform the BO report for dedicated channels*/
-EXTERN S16 unpackBOStatus ARGS((
- RguDStaRsp func,
+EXTERN uint16_t unpackBOStatus ARGS((
+ RlcMacBoStatus func,
Pst* pst,
Buffer *mBuf
));
EXTERN S16 packSchedRep ARGS((
Pst* pst,
SuId suId,
- RlcMacSchedRep * staInd
+ RlcMacSchedRepInfo *staInd
));
EXTERN S16 cmPkRguFlowCntrlInfo ARGS((
RguFlowCntrlInd *param,
* Informs RLC of the totalBufferSize and Timing Info
* for the transmission on dedicated channels. */
EXTERN S16 unpackSchedRep ARGS((
- RguDStaInd func,
+ RlcMacSchedRep func,
Pst* pst,
Buffer *mBuf
));
Buffer *mBuf
));
EXTERN S16 packSchedRepInfo ARGS((
- RlcMacSchedRep *param,
+ RlcMacSchedRepInfo *param,
Buffer *mBuf
));
EXTERN S16 unpackSchedRepInfo ARGS((
- RlcMacSchedRep *param,
+ RlcMacSchedRepInfo *param,
Buffer *mBuf
));
#define DU_APP_MEM_REGION 0
#define RLC_UL_MEM_REGION 1
#define RLC_DL_MEM_REGION 4
-#define RG_MEM_REGION 4
+#define MAC_MEM_REGION 4
#define DU_POOL 1
#define RLC_POOL 1
genCfg = &(rgMngmt.t.cfg.s.genCfg);
/*----------- Fill General Configuration Parameters ---------*/
- genCfg->mem.region = RG_MEM_REGION;
+ genCfg->mem.region = MAC_MEM_REGION;
genCfg->mem.pool = RG_POOL;
genCfg->tmrRes = 10;
genCfg->numRguSaps = 2;
genCfg->lmPst.srcInst = macCfgInst;
genCfg->lmPst.prior = PRIOR0;
genCfg->lmPst.route = RTESPEC;
- genCfg->lmPst.region = RG_MEM_REGION;
+ genCfg->lmPst.region = MAC_MEM_REGION;
genCfg->lmPst.pool = RG_POOL;
genCfg->lmPst.selector = DU_SELECTOR_LC;
rgMngmt.hdr.response.prior = PRIOR0;
rgMngmt.hdr.response.route = RTESPEC;
- rgMngmt.hdr.response.mem.region = RG_MEM_REGION;
+ rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
rgMngmt.hdr.response.mem.pool = RG_POOL;
rgMngmt.hdr.response.selector = DU_SELECTOR_LC;
uSap = &(rgMngmt.t.cfg.s.rguSap);
- uSap->mem.region = RG_MEM_REGION;
+ uSap->mem.region = MAC_MEM_REGION;
uSap->mem.pool = RG_POOL;
uSap->suId = 0;
uSap->spId = sapId;
rgMngmt.hdr.entId.ent = ENTRG;
rgMngmt.hdr.entId.inst = (Inst)0;
rgMngmt.hdr.elmId.elmnt = STRGUSAP;
- rgMngmt.hdr.response.mem.region = RG_MEM_REGION;
+ rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
rgMngmt.hdr.response.mem.pool = RG_POOL;
/* fill pst */
/* Filling of Instance Id */
cfg->instId = DEFAULT_CELLS + 1;
/* Filling of Gen config */
- cfg->genCfg.mem.region = RG_MEM_REGION;
+ cfg->genCfg.mem.region = MAC_MEM_REGION;
cfg->genCfg.mem.pool = RG_POOL;
cfg->genCfg.tmrRes = 10;
cfg->genCfg.lmPst.srcInst = DEFAULT_CELLS + 1;
cfg->genCfg.lmPst.prior = PRIOR0;
cfg->genCfg.lmPst.route = RTESPEC;
- cfg->genCfg.lmPst.region = RG_MEM_REGION;
+ cfg->genCfg.lmPst.region = MAC_MEM_REGION;
cfg->genCfg.lmPst.pool = RG_POOL;
cfg->genCfg.lmPst.selector = DU_SELECTOR_LC;
rgMngmt.hdr.entId.ent = ENTRG;
rgMngmt.hdr.entId.inst = DU_INST;
rgMngmt.hdr.elmId.elmnt = STSCHINST;
- rgMngmt.hdr.response.mem.region = RG_MEM_REGION;
+ rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
rgMngmt.hdr.response.mem.pool = RG_POOL;
/* Fill Pst */
#ifdef EGTP_TEST
duSendEgtpSlotInd();
#endif
- DU_FREE_MEM(pst->region, pst->pool, slotInfo, sizeof(SlotInfo));
+ DU_FREE_MEM(MAC_MEM_REGION, pst->pool, slotInfo, sizeof(SlotInfo));
return ROK;
}
#ifdef FAPI
uint8_t index = 0;
uint32_t msgLen = 0;
- fapi_param_resp_t *fapiParamRsp = (fapi_param_resp_t *)msg;
+ fapi_param_resp_t *fapiParamRsp;
+
+ MAC_ALLOC(fapiParamRsp, sizeof(fapi_param_resp_t));
+ if(!fapiParamRsp)
+ {
+ DU_LOG("PHY STUB: Memory allocation failed");
+ return RFAILED;
+ }
/* Cell Params */
fillTlvs(&fapiParamRsp->tlvs[index++], FAPI_RELEASE_CAPABILITY_TAG, sizeof(uint16_t), 1, &msgLen);
fillTlvs(&fapiParamRsp->tlvs[index++], FAPI_RSSI_MEASUREMENT_SUPPORT_TAG, sizeof(uint8_t), 0, &msgLen);
fapiParamRsp->number_of_tlvs = index;
- msgLen = msgLen + sizeof(fapi_param_resp_t);
-
+ msgLen += sizeof(fapi_param_resp_t) - sizeof(fapi_msg_t);
fillMsgHeader(&fapiParamRsp->header, FAPI_PARAM_RESPONSE, msgLen);
fapiParamRsp->error_code = MSG_OK;
+
DU_LOG("\nPHY_STUB: Sending Param Request to Lower Mac");
handlePhyMessages(fapiParamRsp->header.message_type_id, sizeof(fapi_param_resp_t), (void *)fapiParamRsp);
+ MAC_FREE(fapiParamRsp, sizeof(fapi_param_resp_t));
#endif
return ROK;
}
{
#ifdef FAPI
uint32_t msgLen = 0;
- fapi_config_resp_t *fapiConfigRsp = (fapi_config_resp_t *)msg;
+ fapi_config_resp_t *fapiConfigRsp;
- if(fapiConfigRsp != NULL)
+ MAC_ALLOC(fapiConfigRsp, sizeof(fapi_config_resp_t));
+ if(!fapiConfigRsp)
{
- fapiConfigRsp->number_of_invalid_tlvs = NULLP;
- fapiConfigRsp->number_of_inv_tlvs_idle_only = NULLP;
- fapiConfigRsp->number_of_missing_tlvs = NULLP;
- fapiConfigRsp->error_code = MSG_OK;
- msgLen += sizeof(fapi_config_resp_t);
- fillMsgHeader(&fapiConfigRsp->header, FAPI_CONFIG_RESPONSE, msgLen);
- DU_LOG("\nPHY_STUB: Sending Config Response to Lower Mac");
- handlePhyMessages(fapiConfigRsp->header.message_type_id, sizeof(fapi_config_resp_t), (void *)fapiConfigRsp);
- return ROK;
+ DU_LOG("PHY STUB: Memory allocation failed");
+ return RFAILED;
}
+
+ fapiConfigRsp->number_of_invalid_tlvs = NULLP;
+ fapiConfigRsp->number_of_inv_tlvs_idle_only = NULLP;
+ fapiConfigRsp->number_of_missing_tlvs = NULLP;
+ fapiConfigRsp->error_code = MSG_OK;
+ msgLen += sizeof(fapi_param_resp_t) - sizeof(fapi_msg_t);
+ fillMsgHeader(&fapiConfigRsp->header, FAPI_CONFIG_RESPONSE, msgLen);
+
+ DU_LOG("\nPHY_STUB: Sending Config Response to Lower Mac");
+ handlePhyMessages(fapiConfigRsp->header.message_type_id, \
+ sizeof(fapi_config_resp_t), (void *)fapiConfigRsp);
+ MAC_FREE(fapiConfigRsp, sizeof(fapi_config_resp_t));
#endif
return ROK;
}
PUBLIC void l1HdlParamReq(uint32_t msgLen, void *msg)
{
+#ifdef FAPI
DU_LOG("\nPHY_STUB: Received Param Request in PHY");
- /* Handling PARAM RESPONSE */
+
+ /* Build and send PARAM RESPONSE */
if(l1BldAndSndParamRsp(msg)!= ROK)
{
DU_LOG("\nPHY_STUB: Failed Sending Param Response");
}
+ MAC_FREE(msg, sizeof(fapi_param_req_t));
+#endif
}
/*******************************************************************
PUBLIC void l1HdlConfigReq(uint32_t msgLen, void *msg)
{
+#ifdef FAPI
+ int idx = 0;
+ fapi_config_req_t *configReq = (fapi_config_req_t *)msg;
+
DU_LOG("\nPHY_STUB: Received Config Request in PHY");
/* Handling CONFIG RESPONSE */
{
printf("\nPHY_STUB: Failed Sending config Response");
}
+
+ while(idx < MAX_NUM_TLVS_CONFIG)
+ {
+ if(configReq->tlvs[idx].tl.tag == FAPI_NUM_UNUSED_ROOT_SEQUENCES_TAG)
+ {
+ if(configReq->tlvs[idx].value)
+ {
+ idx++;
+ MAC_FREE(configReq->tlvs[idx].value , \
+ sizeof(uint8_t) * configReq->tlvs[idx-1].value);
+ break;
+ }
+ }
+ idx++;
+ }
+ MAC_FREE(configReq, sizeof(fapi_config_req_t));
+#endif
+
}
fapi_rach_indication_t *rachInd;
/* Building RACH indication */
- if(SGetSBuf(0, 0, (Data **)&rachInd, sizeof(fapi_rach_indication_t)) != ROK)
+ MAC_ALLOC(rachInd, sizeof(fapi_rach_indication_t));
+ if(!rachInd)
{
printf("\nPHY_STUB: Memory allocation failed for Rach Indication Message");
return RFAILED;
/* Sending RACH indication to MAC */
DU_LOG("\nPHY STUB: Sending RACH Indication to MAC");
handlePhyMessages(rachInd->header.message_type_id, sizeof(fapi_rach_indication_t), (void *)rachInd);
- SPutSBuf(0, 0, (Data *)rachInd, sizeof(fapi_rach_indication_t));
+ MAC_FREE(rachInd, sizeof(fapi_rach_indication_t));
#endif
return ROK;
}
{
#ifdef FAPI
fapi_slot_ind_t *slotIndMsg;
- if(SGetSBuf(0, 0, (Data **)&slotIndMsg, sizeof(slotIndMsg)) != ROK)
+
+ MAC_ALLOC(slotIndMsg, sizeof(fapi_slot_ind_t));
+ if(!slotIndMsg)
{
DU_LOG("\nPHY_STUB: Memory allocation failed for slot Indication Message");
return RFAILED;
fillMsgHeader(&slotIndMsg->header, FAPI_SLOT_INDICATION, sizeof(fapi_slot_ind_t));
DU_LOG("\n\nPHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
handlePhyMessages(slotIndMsg->header.message_type_id, sizeof(fapi_slot_ind_t), (void*)slotIndMsg);
- SPutSBuf(0, 0, (Data *)slotIndMsg, sizeof(slotIndMsg));
+ MAC_FREE(slotIndMsg, sizeof(fapi_slot_ind_t));
}
#endif
return ROK;
PUBLIC S16 l1HdlStartReq(uint32_t msgLen, void *msg)
{
+#ifdef FAPI
+ fapi_start_req_t *startReq = (fapi_start_req_t *)msg;
+
if(clGlobalCp.phyState == PHY_STATE_CONFIGURED)
{
duStartSlotIndicaion();
-#ifdef FAPI
- SPutSBuf(0, 0, (Data *)msg, sizeof(fapi_start_req_t));
-#endif
- return ROK;
+ MAC_FREE(startReq, sizeof(fapi_start_req_t));
}
else
{
DU_LOG("\nPHY_STUB: Received Start Req in PHY State %d", clGlobalCp.phyState);
return RFAILED;
}
+#endif
+ return ROK;
}
/*******************************************************************
else if(dlTtiReq->pdus[pduCount].pduType == 1)
DU_LOG("\nPHY_STUB: PDSCH PDU");
}
+
+ /* Free FAPI message */
+ for(pduCount = 0; pduCount < dlTtiReq->nPdus; pduCount++)
+ {
+ if(dlTtiReq->pdus[pduCount].pduType == FAPI_DL_TTI_REQ_PDCCH_PDU_TYPE)
+ {
+ MAC_FREE(dlTtiReq->pdus[pduCount].u.pdcch_pdu.dlDci,\
+ sizeof(fapi_dl_dci_t));
+ }
+ }
+ MAC_FREE(dlTtiReq->pdus, (dlTtiReq->nPdus * sizeof(fapi_dl_tti_req_pdu_t)));
+ MAC_FREE(dlTtiReq, sizeof(fapi_dl_tti_req_t));
+
#endif
return ROK;
}
PUBLIC S16 l1HdlTxDataReq(uint16_t msgLen, void *msg)
{
#ifdef FAPI
+ uint8_t pduCount;
+
DU_LOG("\nPHY STUB: Received TX DATA Request");
fapi_tx_data_req_t *txDataReq;
- txDataReq = (fapi_dl_tti_req_t *)msg;
+ txDataReq = (fapi_tx_data_req_t *)msg;
+
+#if 0
+ for(pduCount = 0; pduCount< txDataReq->numPdus; pduCount++)
+ {
+ if(txDataReq->pduDesc[pduCount].tlvs[0].value)
+ MAC_FREE((uint32_t *)txDataReq->pduDesc[pduCount].tlvs[0].value,\
+ txDataReq->pduDesc[pduCount].tlvs[0].tl.length);
+ }
+#endif
+ MAC_FREE(txDataReq->pduDesc, (txDataReq->numPdus * \
+ sizeof(fapi_tx_pdu_desc_t)));
+ MAC_FREE(txDataReq, sizeof(fapi_tx_data_req_t));
#endif
return ROK;
}
DU_LOG("\nPHY STUB: PRACH PDU");
numPdus--;
}
+
+ MAC_FREE(ulTtiReq->pdus, (ulTtiReq->nPdus * sizeof(fapi_ul_tti_req_pdu_t)));
+ MAC_FREE(ulTtiReq, sizeof(fapi_ul_tti_req_t));
+
if(rachIndSent == false && ulTtiReq->slot == 8)
{
rachIndSent = true;
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
+#include <time.h>
#include "lphy_stub.h"
#include "du_log.h"
void *GenerateTicks(void *arg)
{
- uint8_t counter = 100;
- while(counter)
+ int milisec = 1; /* 1ms */
+ struct timespec req = {0};
+
+ req.tv_sec = 0;
+ req.tv_nsec = milisec * 1000000L;
+
+ while(1)
{
- sleep(1);
+ nanosleep(&req, (struct timespec *)NULL);
+
/* Send Slot indication indication to lower mac */
l1BuildAndSendSlotIndication();
- counter--;
}
return((void *)NULLP);
}