/* Public variable declaration */
ClCb clGlobalCp;
+MacCb macCb;
/* forward references */
PRIVATE U16 rgLMMGenCfg ARGS((
rgCb[inst].rgInit.region = cfg->s.genCfg.mem.region;
rgCb[inst].rgInit.pool = cfg->s.genCfg.mem.pool;
rgCb[inst].genCfg.tmrRes = cfg->s.genCfg.tmrRes;
+
+ macCb.macInst = rgCb[inst].rgInit.inst;
+
/* Initialize SAP States */
rgCb[inst].crgSap.sapSta.sapState = LRG_NOT_CFG;
return RFAILED;
}
macCb.macCell = macCellCb;
+ macCb.macCell->cellId = macCellCfg->cellId;
/* Send cell cfg to scheduler */
ret = MacSchCellCfgReq(pst, macCellCfg);
if(ret != ROK)
schCellCfg.phyCellId = macCellCfg->phyCellId;
schCellCfg.bandwidth = macCellCfg->dlCarrCfg.bw;
schCellCfg.dupMode = macCellCfg->dupType;
- schCellCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr;
- schCellCfg.scsCommon = macCellCfg->ssbCfg.scsCmn;
- schCellCfg.ssbOffsetPointA = macCellCfg->ssbCfg.ssbOffsetPointA;
- schCellCfg.ssbPeriod = macCellCfg->ssbCfg.ssbPeriod;
- schCellCfg.ssbSubcOffset = macCellCfg->ssbCfg.ssbScOffset;
+
+ /* fill ssb scheduler parameters */
+ schCellCfg.ssbSchCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr;
+ schCellCfg.ssbSchCfg.scsCommon = macCellCfg->ssbCfg.scsCmn;
+ schCellCfg.ssbSchCfg.ssbOffsetPointA = macCellCfg->ssbCfg.ssbOffsetPointA;
+ schCellCfg.ssbSchCfg.ssbPeriod = macCellCfg->ssbCfg.ssbPeriod;
+ schCellCfg.ssbSchCfg.ssbSubcOffset = macCellCfg->ssbCfg.ssbScOffset;
for(uint8_t idx=0; idx<SSB_MASK_SIZE; idx++)
{
- schCellCfg.nSSBMask[idx] = macCellCfg->ssbCfg.ssbMask[idx];
+ schCellCfg.ssbSchCfg.nSSBMask[idx] = macCellCfg->ssbCfg.ssbMask[idx];
}
+
+ /* fill SIB1 scheduler parameters */
+ schCellCfg.sib1SchCfg.sib1PduLen = macCellCfg->sib1Cfg.sib1PduLen;
+ schCellCfg.sib1SchCfg.sib1NewTxPeriod = macCellCfg->sib1Cfg.sib1NewTxPeriod;
+ schCellCfg.sib1SchCfg.sib1RepetitionPeriod = macCellCfg->sib1Cfg.sib1RepetitionPeriod;
+ schCellCfg.sib1SchCfg.coresetZeroIndex = macCellCfg->sib1Cfg.coresetZeroIndex;
+ schCellCfg.sib1SchCfg.searchSpaceZeroIndex = macCellCfg->sib1Cfg.searchSpaceZeroIndex;
+ schCellCfg.sib1SchCfg.sib1Mcs = macCellCfg->sib1Cfg.sib1Mcs;
+
cfgPst.srcProcId = pst->dstProcId;
cfgPst.dstProcId = pst->srcProcId;
cfgPst.srcEnt = ENTRG;
return ret;
} /* end of MacSchCellCfgReq */
+
+/*******************************************************************
+ *
+ * @brief Sends Cell config confirm to DU APP
+ *
+ * @details
+ *
+ * Function : MacSendCellCfgCfm
+ *
+ * Functionality:
+ * Sends Cell config confirm to DU APP
+ *
+ * @params[in] Response status
+ * @return void
+ *
+ * ****************************************************************/
+void MacSendCellCfgCfm(uint8_t response)
+{
+ Pst pst;
+ RgCellCb *cellCb;
+ MacCellCfgCfm macCellCfgCfm;
+
+ cmMemset((U8 *)&pst, 0, sizeof(Pst));
+ cellCb = rgCb[macCb.macInst].cell;
+
+ macCellCfgCfm.transId = cellCb->macCellCfg.transId;
+ macCellCfgCfm.rsp = response;
+
+ memcpy((void *)&pst, (void *)&rgCb[macCb.macInst].rgInit.lmPst, sizeof(Pst));
+ pst.event = EVENT_MAC_CELL_CONFIG_CFM;
+ (*packMacCellCfmOpts[pst.selector])(&pst,&macCellCfgCfm);
+}
+
+
/**
* @brief Layer Manager Configuration response handler.
*
SchCellCfgCfm *schCellCfgCfm
)
{
- Pst cfmPst;
- int ret;
- RgCellCb *cellCb;
- MacCellCfgCfm macCellCfgCfm;
-
- cmMemset((U8 *)&cfmPst, 0, sizeof(Pst));
- cellCb = rgCb[pst->dstInst].cell;
- macCellCfgCfm.transId = cellCb->macCellCfg.transId;
if(schCellCfgCfm->rsp == RSP_OK)
{
- macCellCfgCfm.rsp = RSP_OK;
+ sendToLowerMac(PARAM_REQUEST, 0, (void *)NULL);
}
else
{
- macCellCfgCfm.rsp = RSP_NOK;
+ MacSendCellCfgCfm(RSP_NOK);
}
- macCellCfgFillCfmPst(pst,&cfmPst);
- ret = (*packMacCellCfmOpts[cfmPst.selector])(&cfmPst,&macCellCfgCfm);
-
+ return ROK;
}
+
/**********************************************************************
End of file