1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for Layer Manager Interface Module
29 **********************************************************************/
32 @brief This file contains the Layer Management interface module implementation.
33 The functions for the configuration, control, status and statistics
34 request primitives are defined here.
36 static const char* RLOG_MODULE_NAME="MAC";
37 static int RLOG_FILE_ID=220;
38 static int RLOG_MODULE_ID=4096;
40 /* header include files (.h) */
41 #include "envopt.h" /* environment options */
42 #include "envdep.h" /* environment dependent */
43 #include "envind.h" /* environment independent */
44 #include "gen.h" /* general */
45 #include "ssi.h" /* system services */
46 #include "cm_tkns.h" /* Common Token Defines */
47 #include "cm_llist.h" /* Common Link List Defines */
48 #include "cm_hash.h" /* Common Hash List Defines */
49 #include "cm_mblk.h" /* common memory link list library */
50 #include "cm_lte.h" /* Common LTE Defines */
51 #include "rg_env.h" /* MAC Environment Defines */
52 #include "crg.h" /* CRG Interface defines */
53 #include "rgu.h" /* RGU Interface defines */
54 #include "tfu.h" /* RGU Interface defines */
55 #include "rg_sch_inf.h" /* RGR Interface defines */
56 #include "lrg.h" /* LRG Interface defines */
57 #include "rgr.h" /* LRG Interface defines */
58 #include "rg.h" /* MAC defines */
59 #include "rg_err.h" /* MAC error defines */
62 /* header/extern include files (.x) */
63 #include "gen.x" /* general */
64 #include "ssi.x" /* system services */
65 #include "cm5.x" /* system services */
66 #include "cm_tkns.x" /* Common Token Definitions */
67 #include "cm_llist.x" /* Common Link List Definitions */
68 #include "cm_lib.x" /* Common Library Definitions */
69 #include "cm_hash.x" /* Common Hash List Definitions */
70 #include "cm_mblk.x" /* common memory link list library */
71 #include "cm_lte.x" /* Common LTE Defines */
72 #include "crg.x" /* CRG Interface includes */
73 #include "rgu.x" /* RGU Interface includes */
74 #include "tfu.x" /* RGU Interface includes */
75 #include "rg_sch_inf.x" /* SCH Interface includes */
76 #include "rg_prg.x" /* PRG Interface includes */
77 #include "lrg.x" /* LRG Interface includes */
78 #include "rgr.x" /* LRG Interface includes */
79 #include "du_app_mac_inf.h"
80 #include "rg.x" /* MAC includes */
82 #include "ss_diag.h" /* Common log file */
87 #include "lwr_mac.h" /* MAC CL defines */
91 #endif /* __cplusplus */
92 EXTERN Void rgGetSId ARGS((SystemId *s));
95 #endif /* __cplusplus */
97 /* Public variable declaration */
101 /* forward references */
102 PRIVATE U16 rgLMMGenCfg ARGS((
107 PRIVATE U16 rgLMMSapCfg ARGS((
113 PRIVATE Void rgLMMShutdown ARGS((
117 PRIVATE Void rgLMMFillCfmPst ARGS((
123 PRIVATE Void rgLMMGenCntrl ARGS((
129 PRIVATE Void rgLMMSapCntrl ARGS((
135 extern U16 packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
137 packMacCellCfgConfirm packMacCellCfmOpts[] =
139 packMacCellCfgCfm, /* packing for loosely coupled */
140 duHandleMacCellCfgCfm, /* packing for tightly coupled */
141 packMacCellCfgCfm, /* packing for light weight loosly coupled */
144 SchCellCfgFunc SchCellCfgOpts[] =
146 packSchCellCfg, /* packing for loosely coupled */
147 SchHdlCellCfgReq, /* packing for tightly coupled */
148 packSchCellCfg /* packing for light weight loosly coupled */
153 * @brief Task Initiation callback function.
157 * Function : rgActvInit
159 * This function is supplied as one of parameters during MAC's
160 * task registration. SSI will invoke this function once, after
161 * it creates and attaches this TAPA Task to a system task.
163 * @param[in] Ent entity, the entity ID of this task.
164 * @param[in] Inst inst, the instance ID of this task.
165 * @param[in] Region region, the region ID registered for memory
166 * usage of this task.
167 * @param[in] Reason reason.
172 PUBLIC S16 rgActvInit
174 Ent entity, /* entity */
175 Inst inst, /* instance */
176 Region region, /* region */
177 Reason reason /* reason */
180 PUBLIC S16 rgActvInit(entity, inst, region, reason)
181 Ent entity; /* entity */
182 Inst inst; /* instance */
183 Region region; /* region */
184 Reason reason; /* reason */
190 RG_IS_INST_VALID(inst);
192 macInst = inst - RG_INST_START;
193 /* Initialize the MAC TskInit structure to zero */
194 cmMemset ((U8 *)&rgCb[macInst], 0, sizeof(RgCb));
196 /* Initialize the MAC TskInit with received values */
197 rgCb[macInst].rgInit.ent = entity;
198 rgCb[macInst].rgInit.inst = inst;
199 rgCb[macInst].rgInit.region = region;
200 rgCb[macInst].rgInit.pool = 0;
201 rgCb[macInst].rgInit.reason = reason;
202 rgCb[macInst].rgInit.cfgDone = FALSE;
203 rgCb[macInst].rgInit.acnt = FALSE;
204 rgCb[macInst].rgInit.usta = FALSE;
205 rgCb[macInst].rgInit.trc = FALSE;
206 rgCb[macInst].trcLen = 0;
209 /* disabling debugs by default */
210 rgCb[macInst].rgInit.dbgMask = 0xffffffff;
214 rgCb[macInst].rgInit.logMask = 0x0;
216 rgCb[macInst].rgInit.procId = SFndProcId();
217 rgCb[macInst].tfuSap.numBndRetries = 0;
219 /* Initialize Sap state */
220 rgCb[macInst].tfuSap.sapSta.sapState = LRG_NOT_CFG;
221 rgCb[macInst].crgSap.sapSta.sapState = LRG_NOT_CFG;
222 rgCb[macInst].rguSap = NULLP;
223 rgCb[macInst].crgSap.sapSta.sapState = LRG_NOT_CFG;
225 rgCb[macInst].inactiveCell = NULLP;
226 rgCb[macInst].cell = NULLP;
228 SAttachSRngBuf(SS_RNG_BUF_ULMAC_TO_ULRLC, SS_RBUF_ENT_ULMAC,SS_RNG_TX);
229 SAttachSRngBuf(SS_RNG_BUF_ULMAC_TO_ULRLC, SS_RBUF_ENT_ULRLC,SS_RNG_RX);
232 /* Initializing CL control block */
233 clGlobalCp.region = region;
235 clGlobalCp.clCfgDone = FALSE;
236 clGlobalCp.numOfCells = 0;
237 clGlobalCp.phyState = PHY_STATE_IDLE;
239 if( cmHashListInit(&clGlobalCp.cellCbLst, MAX_NUM_CELL_SUPP, 0x0, FALSE,
240 CM_HASH_KEYTYPE_DEF, clGlobalCp.region, clGlobalCp.pool ) != ROK )
242 printf("\n Cellcb hash list initialization failed for MAC CL");
246 /* Initialize Scheduler as well */
247 schActvInit(ENTRG, (DEFAULT_CELLS + SCH_INST_START), DFLT_REGION, PWR_UP);
254 * @brief Layer Manager Configuration request handler.
258 * Function : RgMiLrgCfgReq
260 * This function handles the configuration
261 * request received from the Layer Manager.
262 * -# Based on the cfg->hdr.elmId.elmnt value it invokes one of the
263 * functions rgHdlGenCfg() or rgHdlSapCfg().
264 * -# Invokes RgMiLrgCfgCfm() to send back the confirmation to the LM.
266 * @param[in] Pst *pst, the post structure
267 * @param[in] RgMngmt *cfg, the configuration parameter's structure
272 PUBLIC S16 RgMiLrgCfgReq
274 Pst *pst, /* post structure */
275 RgMngmt *cfg /* config structure */
278 PUBLIC S16 RgMiLrgCfgReq(pst, cfg)
279 Pst *pst; /* post structure */
280 RgMngmt *cfg; /* config structure */
283 U16 ret = LCM_PRIM_OK;
284 U16 reason = LCM_REASON_NOT_APPL;
292 RG_DIAG_LVL0(inst,0x0a0b0001, RG_DIAG_NA, SS_DIAG_INV_ARG,
293 "Received CfgReq for MAC layer, Entity = %d, Instance = %d\n",
294 pst->srcEnt, pst->srcInst,0,0);
296 RG_IS_INST_VALID(pst->dstInst);
297 inst = pst->dstInst - RG_INST_START;
299 /* Fill the post structure for sending the confirmation */
300 rgLMMFillCfmPst(pst, &cfmPst, cfg);
302 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
305 cfm.hdr.transId = cfg->hdr.transId;
309 cfm.hdr.elmId.elmnt = cfg->hdr.elmId.elmnt;
310 switch(cfg->hdr.elmId.elmnt)
313 reason = rgLMMGenCfg(inst,&cfg->t.cfg);
318 reason = rgLMMSapCfg(inst,&cfg->t.cfg, cfg->hdr.elmId.elmnt);
322 reason = LCM_REASON_INVALID_ELMNT;
323 RLOG1(L_ERROR, "Invalid Elmnt=%d",
324 cfg->hdr.elmId.elmnt);
328 if (reason != LCM_REASON_NOT_APPL)
333 cfm.cfm.status = ret;
334 cfm.cfm.reason = reason;
336 RgMiLrgCfgCfm(&cfmPst, &cfm);
339 }/*-- RgMiLrgCfgReq --*/
343 * @brief Layer Manager Statistics request handler.
347 * Function : RgMiLrgStsReq
349 * This function handles the statistics
350 * request received from the Layer Manager.
351 * -# Based on sts->hdr.elmId.elmnt, it retrieves either general or SAP
352 * statistics from the rgCb global control block.
353 * -# If action=ARST, it will reset the statistics parameters in rgCb to 0.
354 * -# Invokes the RgMiLrgStsCfm to send back the confirmation to LM.
356 * @param[in] Pst *pst, the post structure
357 * @param[in] RgMngmt *sts, the statistics parameter's structure
362 PUBLIC S16 RgMiLrgStsReq
364 Pst *pst, /* post structure */
365 RgMngmt *sts /* statistics structure */
368 PUBLIC S16 RgMiLrgStsReq(pst, sts)
369 Pst *pst; /* post structure */
370 RgMngmt *sts; /* statistics structure */
380 RG_IS_INST_VALID(pst->dstInst);
381 inst = pst->dstInst - RG_INST_START;
382 /* Fill the post structure for sending the confirmation */
383 rgLMMFillCfmPst(pst, &cfmPst, sts);
385 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
388 cfm.hdr.transId = sts->hdr.transId;
390 SGetDateTime(&cfm.t.sts.dt);
391 cfm.cfm.status = LCM_PRIM_OK;
392 cfm.cfm.reason = LCM_REASON_NOT_APPL;
393 cfm.hdr.elmId.elmnt = sts->hdr.elmId.elmnt;
394 cfm.t.sts.action = sts->t.sts.action;
396 /* Check if General Config Done */
397 if(rgCb[inst].rgInit.cfgDone != TRUE)
399 cfm.cfm.status = LCM_PRIM_NOK;
400 cfm.cfm.reason = LCM_REASON_GENCFG_NOT_DONE;
401 RgMiLrgStsCfm(&cfmPst,&cfm);
402 RLOG0(L_ERROR, "Gen Cfg not done");
406 switch(sts->hdr.elmId.elmnt)
410 cmMemcpy((U8 *)&(cfm.t.sts.s.genSts), (U8 *)&rgCb[inst].genSts,
412 /* check if action is read and reset */
413 if(sts->t.sts.action == ARST)
415 rgCb[inst].genSts.numHarqFail = 0;
420 RgGenSts *genSts = &(cfm.t.sts.s.genSts);
422 for(cqi=0; cqi <= 14; cqi++)
424 /* Filling DL ACK/NACK stats */
425 genSts->nackAckStats.dlCqiStat[cqi].mcs = \
426 hqFailStats.dlCqiStat[cqi].mcs;
427 genSts->nackAckStats.dlCqiStat[cqi].numOfNacks = \
428 hqFailStats.dlCqiStat[cqi].numOfNacks;
429 genSts->nackAckStats.dlCqiStat[cqi].numOfAcks =
430 hqFailStats.dlCqiStat[cqi].numOfAcks;
432 /* Filling UL ACK/NACK stats */
433 genSts->nackAckStats.ulCqiStat[cqi].mcs = \
434 hqFailStats.ulCqiStat[cqi].mcs;
435 genSts->nackAckStats.ulCqiStat[cqi].numOfNacks = \
436 hqFailStats.ulCqiStat[cqi].numOfNacks;
437 genSts->nackAckStats.ulCqiStat[cqi].numOfAcks = \
438 hqFailStats.ulCqiStat[cqi].numOfAcks;
440 /* Filling DL HQ Retx stats */
441 genSts->hqRetxStats.dlCqiStat[cqi].mcs = \
442 hqRetxStats.dlCqiStat[cqi].mcs;
443 genSts->hqRetxStats.dlCqiStat[cqi].numOfHQ_1 = \
444 hqRetxStats.dlCqiStat[cqi].numOfHQ_1;
445 genSts->hqRetxStats.dlCqiStat[cqi].numOfHQ_2 = \
446 hqRetxStats.dlCqiStat[cqi].numOfHQ_2;
447 genSts->hqRetxStats.dlCqiStat[cqi].numOfHQ_3 = \
448 hqRetxStats.dlCqiStat[cqi].numOfHQ_3;
449 genSts->hqRetxStats.dlCqiStat[cqi].numOfHQ_4 = \
450 hqRetxStats.dlCqiStat[cqi].numOfHQ_4;
451 genSts->hqRetxStats.dlCqiStat[cqi].totalTx = \
452 hqRetxStats.dlCqiStat[cqi].totalTx;
454 /* Filling UL HQ Retx stats */
455 genSts->hqRetxStats.ulCqiStat[cqi].mcs = \
456 hqRetxStats.ulCqiStat[cqi].mcs;
457 genSts->hqRetxStats.ulCqiStat[cqi].numOfHQ_1 = \
458 hqRetxStats.ulCqiStat[cqi].numOfHQ_1;
459 genSts->hqRetxStats.ulCqiStat[cqi].numOfHQ_2 = \
460 hqRetxStats.ulCqiStat[cqi].numOfHQ_2;
461 genSts->hqRetxStats.ulCqiStat[cqi].numOfHQ_3 = \
462 hqRetxStats.ulCqiStat[cqi].numOfHQ_3;
463 genSts->hqRetxStats.ulCqiStat[cqi].numOfHQ_4 = \
464 hqRetxStats.ulCqiStat[cqi].numOfHQ_4;
465 genSts->hqRetxStats.ulCqiStat[cqi].totalTx = \
466 hqRetxStats.ulCqiStat[cqi].totalTx;
468 /* Reset statistics */
469 if(sts->t.sts.action == ZEROSTS)
471 cmMemset((U8 *)&hqRetxStats, 0, \
472 sizeof(RgSchHqRetxStats));
473 cmMemset((U8 *)&hqFailStats, 0, \
474 sizeof(RgSchNackAckStats));
477 #endif /* MAC_SCH_STATS*/
481 cmMemcpy((U8 *)&(cfm.t.sts.s.rguSts), (U8 *)&rgCb[inst].rguSap[sts->t.sts.sapInst].sapSts,
484 /* check if action is read and reset */
485 if(sts->t.sts.action == ARST)
486 cmMemset((U8 *)&rgCb[inst].rguSap[sts->t.sts.sapInst].sapSts, 0, sizeof(RgSapSts));
490 cmMemcpy((U8 *)&(cfm.t.sts.s.crgSts), (U8 *)&rgCb[inst].crgSap.sapSts,
493 /* check if action is read and reset */
494 if(sts->t.sts.action == ARST)
495 cmMemset((U8 *)&rgCb[inst].crgSap.sapSts, 0, sizeof(RgSapSts));
499 cmMemcpy((U8 *)&(cfm.t.sts.s.tfuSts), (U8 *)&rgCb[inst].tfuSap.sapSts,
502 /* check if action is read and reset */
503 if(sts->t.sts.action == ARST)
504 cmMemset((U8 *)&rgCb[inst].tfuSap.sapSts, 0, sizeof(RgSapSts));
508 cfm.cfm.status = LCM_PRIM_NOK;
509 cfm.cfm.reason = LCM_REASON_INVALID_ELMNT;
510 RLOG1(L_ERROR, "Invalid Elmnt = %d",sts->hdr.elmId.elmnt);
513 RgMiLrgStsCfm(&cfmPst,&cfm);
515 }/*-- RgMiLrgStsReq --*/
519 * @brief Layer Manager Status request handler.
523 * Function : RgMiLrgStaReq
525 * This function handles the solicited status
526 * request received from the Layer Manager.
527 * -# Based on sta->hdr.elmId.elmnt, it retrieves the status of a
528 * particular SAP from the rgCb global control block.
529 * -# Invokes the RgMiLrgStaCfm to send back the confirmation to LM.
531 * @param[in] Pst *pst, the post structure
532 * @param[in] RgMngmt *sta, the status parameter's structure
537 PUBLIC S16 RgMiLrgStaReq
539 Pst *pst, /* post structure */
540 RgMngmt *sta /* status structure */
543 PUBLIC S16 RgMiLrgStaReq(pst, sta)
544 Pst *pst; /* post structure */
545 RgMngmt *sta; /* status structure */
555 RG_IS_INST_VALID(pst->dstInst);
556 inst = pst->dstInst - RG_INST_START;
559 /* Fill the post structure for sending the confirmation */
560 rgLMMFillCfmPst(pst, &cfmPst, sta);
562 if (sta->t.ssta.s.sysId.ptNmb != NULLP)
564 SPutSBuf(pst->region, pst->pool, (Data *)sta->t.ssta.s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
567 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
568 cfm.hdr.elmId.elmnt = sta->hdr.elmId.elmnt;
571 cfm.hdr.transId = sta->hdr.transId;
573 /* Check if General Config Done */
574 if(rgCb[inst].rgInit.cfgDone != TRUE)
576 SGetDateTime(&cfm.t.ssta.dt);
577 if (SGetSBuf(cfmPst.region, cfmPst.pool,
578 (Data **)&(cfm.t.ssta.s.sysId.ptNmb), LRG_MAX_PT_NUM_SIZE)
581 RLOG0(L_ERROR, "Memory Unavailable for Confirmation");
584 cmMemset((U8 *)(cfm.t.ssta.s.sysId.ptNmb), 0, LRG_MAX_PT_NUM_SIZE);
585 rgGetSId(&cfm.t.ssta.s.sysId);
586 cfm.cfm.status = LCM_PRIM_NOK;
587 cfm.cfm.reason = LCM_REASON_GENCFG_NOT_DONE;
588 cfm.hdr.elmId.elmnt = sta->hdr.elmId.elmnt;
589 RgMiLrgStaCfm(&cfmPst, &cfm);
590 RLOG0(L_ERROR, "Gen Cfg not done");
594 switch(sta->hdr.elmId.elmnt)
597 SGetDateTime(&cfm.t.ssta.dt);
598 if (SGetSBuf(cfmPst.region, cfmPst.pool,
599 (Data **)&(cfm.t.ssta.s.sysId.ptNmb), LRG_MAX_PT_NUM_SIZE)
602 RLOG0(L_ERROR, "Memory Unavailable for Confirmation");
605 cmMemset((U8 *)(cfm.t.ssta.s.sysId.ptNmb), 0, LRG_MAX_PT_NUM_SIZE);
606 rgGetSId(&cfm.t.ssta.s.sysId);
607 cfm.cfm.status = LCM_PRIM_OK;
608 cfm.cfm.reason = LCM_REASON_NOT_APPL;
609 RgMiLrgStaCfm(&cfmPst, &cfm);
612 cfm.cfm.status = LCM_PRIM_OK;
613 cfm.cfm.reason = LCM_REASON_NOT_APPL;
614 SGetDateTime(&cfm.t.ssta.dt);
615 cmMemcpy((U8 *)&(cfm.t.ssta.s.rguSapSta),
616 (U8 *)&rgCb[inst].rguSap[sta->t.ssta.sapInst].sapSta,
618 RgMiLrgStaCfm(&cfmPst, &cfm);
621 cfm.cfm.status = LCM_PRIM_OK;
622 cfm.cfm.reason = LCM_REASON_NOT_APPL;
623 SGetDateTime(&cfm.t.ssta.dt);
624 cmMemcpy((U8 *)&(cfm.t.ssta.s.crgSapSta), (U8 *)&rgCb[inst].crgSap.sapSta,
626 RgMiLrgStaCfm(&cfmPst, &cfm);
629 cfm.cfm.status = LCM_PRIM_OK;
630 cfm.cfm.reason = LCM_REASON_NOT_APPL;
631 SGetDateTime(&cfm.t.ssta.dt);
632 cmMemcpy((U8 *)&(cfm.t.ssta.s.tfuSapSta), (U8 *)&rgCb[inst].tfuSap.sapSta,
634 RgMiLrgStaCfm(&cfmPst, &cfm);
637 cfm.cfm.status = LCM_PRIM_NOK;
638 cfm.cfm.reason = LCM_REASON_INVALID_ELMNT;
639 RgMiLrgStaCfm(&cfmPst, &cfm);
640 RLOG1(L_ERROR, "Invalid elmnt=%d",sta->hdr.elmId.elmnt);
644 }/*-- RgMiLrgStaReq --*/
648 * @brief Layer Manager Control request handler.
652 * Function : RgMiLrgCntrlReq
654 * This function handles the control
655 * request received from the Layer Manager.
656 * -# Based on cntrl->hdr.elmId.elmnt, cntrl->t.cntrl.action
657 * and cntrl->t.cntrl.subAction, it performs the appropriate control action
658 * of SAP (enable/disable), Debug (enable/disable), Trace (enable/disable)
659 * and layer shutdown.
660 * -# Invokes the RgMiLrgCntrlCfm to send back the confirmation to LM.
662 * @param[in] Pst *pst, the post structure
663 * @param[in] RgMngmt *cntrl, the control parameter's structure
668 PUBLIC S16 RgMiLrgCntrlReq
670 Pst *pst, /* post structure */
671 RgMngmt *cntrl /* control structure */
674 PUBLIC S16 RgMiLrgCntrlReq(pst, cntrl)
675 Pst *pst; /* post structure */
676 RgMngmt *cntrl; /* control structure */
679 S16 ret = ROK; /* return value */
684 TRC2(RgMiLrgCntrlReq)
686 /* Fill the post structure for sending the confirmation */
688 RG_IS_INST_VALID(pst->dstInst);
689 inst = pst->dstInst - RG_INST_START;
691 rgLMMFillCfmPst(pst, &cfmPst, cntrl);
693 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
695 cfm.hdr.transId = cntrl->hdr.transId;
697 cfm.hdr.elmId.elmnt = cntrl->hdr.elmId.elmnt;
698 cfm.t.cntrl.action = cntrl->t.cntrl.action;
699 cfm.t.cntrl.subAction = cntrl->t.cntrl.subAction;
701 /* Check if General Config Done*/
702 if(rgCb[inst].rgInit.cfgDone != TRUE)
704 cfm.cfm.status = LCM_PRIM_NOK;
705 cfm.cfm.reason = LCM_REASON_GENCFG_NOT_DONE;
706 cfm.hdr.elmId.elmnt = cntrl->hdr.elmId.elmnt;
707 RgMiLrgCntrlCfm(&cfmPst, &cfm);
708 RLOG0(L_ERROR, "Gen Cfg not done");
712 /* General Config done, process the Control request */
713 switch(cntrl->hdr.elmId.elmnt)
716 rgLMMGenCntrl(cntrl, &cfm, &cfmPst);
721 rgLMMSapCntrl(cntrl, &cfm, &cfmPst);
724 cfm.cfm.status = LCM_PRIM_NOK;
725 cfm.cfm.reason = LCM_REASON_INVALID_PAR_VAL;
726 RgMiLrgCntrlCfm(&cfmPst, &cfm);
727 RLOG1(L_ERROR, "invalid elmnt=%d",cntrl->hdr.elmId.elmnt);
731 }/*-- RgMiLrgCntrlReq --*/
735 * @brief SAP Configuration Handler.
739 * Function : rgLMMSapCfg
741 * This function in called by RgMiLrgCfgReq(). It handles the
742 * interface SAP configuration of the LTE MAC layer. It
743 * initializes the sapState to LRG_UNBND. Returns
744 * reason for success/failure of this function.
746 * @param[in] Inst inst
747 * @param[in] RgCfg *cfg, the Configuaration information
749 * -# LCM_REASON_GENCFG_NOT_DONE
750 * -# LCM_REASON_INVALID_SAP
751 * -# LCM_REASON_NOT_APPL
754 PRIVATE U16 rgLMMSapCfg
757 RgCfg *cfg, /* Configuaration information */
758 Elmnt sapType /* Sap Type */
761 PRIVATE U16 rgLMMSapCfg(inst,cfg,sapType)
763 RgCfg *cfg; /* Configuaration information */
764 Elmnt sapType; /* Sap Type */
767 U16 ret = LCM_REASON_NOT_APPL;
768 RgLowSapCfgInfo *lowSapCfg = NULLP;
769 RgUpSapCfgInfo *upSapCfg = NULLP;
770 RgUpSapCb *upSapCb = NULLP;
774 /* Check if Gen Config has been done */
775 if(rgCb[inst].rgInit.cfgDone != TRUE)
776 RETVALUE(LCM_REASON_GENCFG_NOT_DONE);
781 if ((cfg->s.rguSap.spId > LRG_MAX_RGU_SAPS) &&
782 (cfg->s.rguSap.selector != RGU_SEL_TC) &&
783 (cfg->s.rguSap.selector != RGU_SEL_LC))
785 ret = LCM_REASON_INVALID_PAR_VAL;
786 RLOG0(L_ERROR, "unsupported Selector value for RGU");
789 upSapCb = &(rgCb[inst].rguSap[cfg->s.rguSap.spId]);
790 if(upSapCb->sapSta.sapState == LRG_NOT_CFG)
792 upSapCb->sapSta.sapState = LRG_UNBND;
794 upSapCfg = &(upSapCb->sapCfg);
795 upSapCfg->sapPst.dstEnt = cfg->s.rguSap.ent;
796 upSapCfg->sapPst.dstInst = cfg->s.rguSap.inst;
797 upSapCfg->sapPst.dstProcId = cfg->s.rguSap.procId;
798 upSapCfg->sapPst.srcEnt = rgCb[inst].rgInit.ent;
799 upSapCfg->sapPst.srcInst = rgCb[inst].rgInit.inst;
800 upSapCfg->sapPst.srcProcId = rgCb[inst].rgInit.procId;
801 upSapCfg->sapPst.region = cfg->s.rguSap.mem.region;
802 upSapCfg->sapPst.pool = cfg->s.rguSap.mem.pool;
803 upSapCfg->sapPst.selector = cfg->s.rguSap.selector;
804 upSapCfg->sapPst.route = cfg->s.rguSap.route;
805 upSapCfg->sapPst.intfVer = 0;
806 upSapCfg->sapPst.prior = cfg->s.rguSap.prior;
807 upSapCfg->suId = cfg->s.rguSap.suId;
808 upSapCfg->spId = cfg->s.rguSap.spId;
809 /*T2K uses 2 saps, T3K uses 1 sap. change the rgRguDlSap to 1 only if
810 * there is cfg request with sap is 1*/
813 if ((cfg->s.crgSap.selector != CRG_SEL_TC) &&
814 (cfg->s.crgSap.selector != CRG_SEL_LC))
816 ret = LCM_REASON_INVALID_PAR_VAL;
817 RLOG0(L_ERROR, "unsupported Selector value for CRG");
820 if(rgCb[inst].crgSap.sapSta.sapState == LRG_NOT_CFG)
822 rgCb[inst].crgSap.sapSta.sapState = LRG_UNBND;
824 upSapCfg = &rgCb[inst].crgSap.sapCfg;
826 upSapCfg->sapPst.dstEnt = cfg->s.crgSap.ent;
827 upSapCfg->sapPst.dstInst = cfg->s.crgSap.inst;
828 upSapCfg->sapPst.dstProcId = cfg->s.crgSap.procId;
829 upSapCfg->sapPst.srcEnt = rgCb[inst].rgInit.ent;
830 upSapCfg->sapPst.srcInst = rgCb[inst].rgInit.inst;
831 upSapCfg->sapPst.srcProcId = rgCb[inst].rgInit.procId;
832 upSapCfg->sapPst.region = cfg->s.crgSap.mem.region;
833 upSapCfg->sapPst.pool = cfg->s.crgSap.mem.pool;
834 upSapCfg->sapPst.selector = cfg->s.crgSap.selector;
835 upSapCfg->sapPst.route = cfg->s.crgSap.route;
836 upSapCfg->sapPst.intfVer = 0;
837 upSapCfg->sapPst.prior = cfg->s.crgSap.prior;
838 upSapCfg->suId = cfg->s.crgSap.suId;
839 upSapCfg->spId = cfg->s.crgSap.spId;
843 if ((cfg->s.tfuSap.selector != TFU_SEL_TC) &&
844 (cfg->s.tfuSap.selector != TFU_SEL_LC))
846 ret = LCM_REASON_INVALID_PAR_VAL;
847 RLOG0(L_ERROR, "unsupported Selector value for TFU");
851 if (rgCb[inst].tfuSap.sapSta.sapState == LRG_NOT_CFG)
853 rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND;
855 lowSapCfg = &rgCb[inst].tfuSap.sapCfg;
857 lowSapCfg->sapPst.dstEnt = cfg->s.tfuSap.ent;
858 lowSapCfg->sapPst.dstInst = cfg->s.tfuSap.inst;
859 lowSapCfg->sapPst.dstProcId = rgCb[inst].rgInit.procId;
860 lowSapCfg->sapPst.srcEnt = rgCb[inst].rgInit.ent;
861 lowSapCfg->sapPst.srcInst = rgCb[inst].rgInit.inst;
862 lowSapCfg->sapPst.srcProcId = rgCb[inst].rgInit.procId;
863 lowSapCfg->sapPst.region = cfg->s.tfuSap.mem.region;
864 lowSapCfg->sapPst.pool = cfg->s.tfuSap.mem.pool;
865 lowSapCfg->sapPst.selector = cfg->s.tfuSap.selector;
866 lowSapCfg->sapPst.route = cfg->s.tfuSap.route;
867 lowSapCfg->sapPst.intfVer = 0;
868 lowSapCfg->sapPst.prior = cfg->s.tfuSap.prior;
869 lowSapCfg->suId = cfg->s.tfuSap.suId;
870 lowSapCfg->spId = cfg->s.tfuSap.spId;
871 cmMemcpy((U8 *)&lowSapCfg->bndTmr, (U8 *)&cfg->s.tfuSap.bndTmr,
875 /* would never reach here */
883 * @brief General Configuration Handler.
887 * Function : rgLMMGenCfg
889 * This function in called by RgMiLrgCfgReq(). It handles the
890 * general configuration of the LTE MAC layer. It initializes
891 * the hash lists of RgCb. Returns
892 * reason for success/failure of this function.
894 * @param[in] Inst inst
895 * @param[in] RgCfg *cfg, the Configuaration information
897 * -# LCM_REASON_NOT_APPL
898 * -# LCM_REASON_INVALID_MSGTYPE
899 * -# LCM_REASON_MEM_NOAVAIL
902 PRIVATE U16 rgLMMGenCfg
905 RgCfg *cfg /* Configuaration information */
908 PRIVATE U16 rgLMMGenCfg(inst,cfg)
910 RgCfg *cfg; /* Configuaration information */
913 U16 ret = LCM_REASON_NOT_APPL;
917 /* Check if General Configuration is done already */
918 if (rgCb[inst].rgInit.cfgDone == TRUE)
920 RETVALUE(LCM_REASON_INVALID_MSGTYPE);
922 if ((cfg->s.genCfg.lmPst.selector != LRG_SEL_TC) &&
923 (cfg->s.genCfg.lmPst.selector != LRG_SEL_LC))
925 RLOG0(L_ERROR, "unsupported Selector value for RGU");
926 RETVALUE(LCM_REASON_INVALID_PAR_VAL);
928 /* Update the Pst structure for LM interface */
929 cmMemcpy((U8 *)&rgCb[inst].rgInit.lmPst, (U8 *)&cfg->s.genCfg.lmPst,
932 rgCb[inst].rgInit.lmPst.srcProcId = rgCb[inst].rgInit.procId;
933 rgCb[inst].rgInit.lmPst.srcEnt = rgCb[inst].rgInit.ent;
934 rgCb[inst].rgInit.lmPst.srcInst = rgCb[inst].rgInit.inst;
935 rgCb[inst].rgInit.lmPst.event = EVTNONE;
937 rgCb[inst].rgInit.region = cfg->s.genCfg.mem.region;
938 rgCb[inst].rgInit.pool = cfg->s.genCfg.mem.pool;
939 rgCb[inst].genCfg.tmrRes = cfg->s.genCfg.tmrRes;
941 macCb.macInst = rgCb[inst].rgInit.inst;
943 /* Initialize SAP States */
944 rgCb[inst].crgSap.sapSta.sapState = LRG_NOT_CFG;
946 if(cfg->s.genCfg.numRguSaps == 0)
948 RGDBGERRNEW(inst,(rgPBuf(inst), "\nrgGenCfg(): Invalid numRguSap.\n"));
952 /* allocate RGR saps */
953 if (SGetSBuf(rgCb[inst].rgInit.region,
954 rgCb[inst].rgInit.pool,
955 (Data **)&rgCb[inst].rguSap,
956 (sizeof(RgUpSapCb) * cfg->s.genCfg.numRguSaps)) != ROK)
958 RGDBGERRNEW(inst,(rgPBuf(inst), "\nrgGenCfg(): Failed to allocate mem for RGU SAP's.\n"));
961 rgCb[inst].numRguSaps = cfg->s.genCfg.numRguSaps;
963 for (int idx = 0; idx < rgCb[inst].numRguSaps; idx++)
965 rgCb[inst].rguSap[idx].sapSta.sapState = LRG_NOT_CFG;
966 cmMemset((U8 *)&rgCb[inst].rguSap[idx], 0, sizeof(RgUpSapCb));
968 rgCb[inst].tfuSap.sapSta.sapState = LRG_NOT_CFG;
969 /* Initialize the timer blocks */
970 cmInitTimers(rgCb[inst].tmrBlk, RG_MAX_TIMER);
971 /* Initialzie the timer queue */
972 cmMemset((U8 *)&rgCb[inst].tmrTq, 0, sizeof(CmTqType)*RG_TQ_SIZE);
973 /* Initialize the timer control point */
974 cmMemset((U8 *)&rgCb[inst].tmrTqCp, 0, sizeof(CmTqCp));
975 rgCb[inst].tmrTqCp.tmrLen = RG_TQ_SIZE;
977 /* Timer Registration request to SSI */
978 if (SRegTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst,
979 (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr) != ROK)
982 RLOG0(L_ERROR, "Failed to register timer");
984 SPutSBuf(rgCb[inst].rgInit.region,
985 rgCb[inst].rgInit.pool,
986 (Data *)rgCb[inst].rguSap,
987 (sizeof(RgUpSapCb) * cfg->s.genCfg.numRguSaps));
989 RETVALUE(LCM_REASON_MEM_NOAVAIL);
992 /* Set Config done in TskInit */
993 rgCb[inst].rgInit.cfgDone = TRUE;
999 /***********************************************************
1001 * Func : rgLMMShutdown
1004 * Desc : Handles the MAC layer shutdown request. Calls
1005 * rgCFGFreeCellCb(RgCellCb*) to handle each cellCb deallocation.
1014 **********************************************************/
1016 PRIVATE Void rgLMMShutdown
1021 PRIVATE Void rgLMMShutdown(inst)
1025 RgCellCb *cell = rgCb[inst].cell;
1030 /* Unbind the TFU Sap */
1031 if(rgCb[inst].tfuSap.sapSta.sapState == LRG_WAIT_BNDCFM)
1033 rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND);
1034 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1036 rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap);
1038 rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND;
1040 if(rgCb[inst].tfuSap.sapSta.sapState == LRG_BND)
1042 rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, LRG_UNBND);
1043 rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND;
1049 for(idx=0;idx < RG_NUM_SUB_FRAMES; idx++)
1051 rgTOMRlsSf(inst,&cell->subFrms[idx]);
1054 rgCFGFreeCellCb(cell);
1057 /* Deleting the RGU SAPs */
1058 SPutSBuf(rgCb[inst].rgInit.region,
1059 rgCb[inst].rgInit.pool,
1060 (Data *)rgCb[inst].rguSap,
1061 (sizeof(RgUpSapCb) * rgCb[inst].numRguSaps));
1062 rgCb[inst].rguSap = NULLP;
1064 rgCb[inst].inactiveCell = NULLP;
1065 rgCb[inst].cell = NULLP;
1067 /* De-register the Timer Service */
1068 (Void) SDeregTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst,
1069 (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr);
1071 /* call back the task initialization function to intialize
1072 * the global RgCb Struct */
1073 rgActvInit(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst, rgCb[inst].rgInit.region,
1074 rgCb[inst].rgInit.reason);
1080 /***********************************************************
1082 * Func : rgLMMGenCntrl
1085 * Desc : Processes the LM control request for STGEN elmnt.
1094 **********************************************************/
1096 PRIVATE Void rgLMMGenCntrl
1103 PRIVATE Void rgLMMGenCntrl(cntrl, cfm, cfmPst)
1109 Inst inst = (cfmPst->srcInst - RG_INST_START);
1112 cfm->cfm.status = LCM_PRIM_OK;
1113 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1116 switch(cntrl->t.cntrl.action)
1119 /* Action is Enable */
1120 switch(cntrl->t.cntrl.subAction)
1124 rgCb[inst].rgInit.trc = TRUE;
1125 rgCb[inst].trcLen = cntrl->t.cntrl.s.trcLen;
1126 /*Store the response and TransId for sending the Traces */
1127 cmMemcpy((U8 *)&rgCb[inst].genCfg.trcResp.response,
1128 (U8 *)&cntrl->hdr.response, sizeof(Resp));
1129 rgCb[inst].genCfg.trcResp.transId = cntrl->hdr.transId;
1133 /* Enable Unsolicited Status (alarms) */
1134 rgCb[inst].rgInit.usta = TRUE;
1135 /*Store the response and TransId for sending the Alarms */
1136 cmMemcpy((U8 *)&rgCb[inst].genCfg.ustaResp.response,
1137 (U8 *)&cntrl->hdr.response, sizeof(Resp));
1138 rgCb[inst].genCfg.ustaResp.transId = cntrl->hdr.transId;
1141 /* Enable Debug Printing */
1143 rgCb[inst].rgInit.dbgMask |= cntrl->t.cntrl.s.rgDbgCntrl.dbgMask;
1148 rgCb[inst].rgInit.logMask = cntrl->t.cntrl.s.logMask;
1153 cfm->cfm.status = LCM_PRIM_NOK;
1154 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1155 RLOG1(L_ERROR, "invalid subaction=%d",cntrl->t.cntrl.subAction);
1160 /* Action is Diable immidiately */
1161 switch(cntrl->t.cntrl.subAction)
1164 /* Disable Traces */
1165 rgCb[inst].rgInit.trc = FALSE;
1168 /* Disable Unsolicited Status (alarms) */
1169 rgCb[inst].rgInit.usta = FALSE;
1172 /* Disable Debug Printing */
1174 rgCb[inst].rgInit.dbgMask &=~cntrl->t.cntrl.s.rgDbgCntrl.dbgMask;
1179 rgCb[inst].rgInit.logMask = cntrl->t.cntrl.s.logMask;
1184 cfm->cfm.status = LCM_PRIM_NOK;
1185 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1186 RLOG1(L_ERROR, "invalid subaction=%d",cntrl->t.cntrl.subAction);
1191 /* Free all the memory dynamically allocated by MAC */
1192 rgLMMShutdown(inst);
1195 cfm->cfm.status = LCM_PRIM_NOK;
1196 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1197 RLOG1(L_ERROR, "invalid action=%d",cntrl->t.cntrl.action);
1200 RgMiLrgCntrlCfm(cfmPst, cfm);
1205 /***********************************************************
1207 * Func : rgLMMSapCntrl
1210 * Desc : Processes the LM control request for STxxxSAP elmnt.
1219 **********************************************************/
1221 PRIVATE Void rgLMMSapCntrl
1228 PRIVATE Void rgLMMSapCntrl(cntrl, cfm, cfmPst)
1234 Inst inst = cfmPst->srcInst - RG_INST_START;
1237 /* Only TFU Sap can be controlled by LM */
1238 switch(cntrl->hdr.elmId.elmnt)
1241 switch(cntrl->t.cntrl.action)
1244 /* Bind Enable Request */
1245 if ((rgCb[inst].tfuSap.sapSta.sapState == LRG_NOT_CFG) ||
1246 (rgCb[inst].tfuSap.sapSta.sapState == LRG_BND))
1248 cfm->cfm.status = LCM_PRIM_NOK;
1249 cfm->cfm.reason = LCM_REASON_INVALID_SAP;
1253 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1255 rgLMMStartTmr(inst,RG_BNDREQ_TMR, rgCb[inst].tfuSap.sapCfg.bndTmr.val,
1256 (PTR)&rgCb[inst].tfuSap);
1258 /* Change SAP state */
1259 rgCb[inst].tfuSap.sapSta.sapState = LRG_WAIT_BNDCFM;
1260 rgCb[inst].tfuSap.numBndRetries++;
1261 /* Store the response and TransId for sending
1262 * the Control confirm */
1263 cmMemcpy((U8 *)&rgCb[inst].genCfg.bndCfmResp.response,
1264 (U8 *)&cntrl->hdr.response, sizeof(Resp));
1265 rgCb[inst].genCfg.bndCfmResp.transId = cntrl->hdr.transId;
1267 /* Sending Status Indication to Layer Manager */
1268 cfm->cfm.status = LCM_PRIM_OK_NDONE;
1269 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1270 RgMiLrgCntrlCfm(cfmPst, cfm);
1272 rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId,
1273 rgCb[inst].tfuSap.sapCfg.spId);
1278 /* Unbind request */
1280 /* Check if the SAP is configured */
1281 if( (rgCb[inst].tfuSap.sapSta.sapState == LRG_NOT_CFG) ||
1282 (rgCb[inst].tfuSap.sapSta.sapState == LRG_UNBND))
1284 cfm->cfm.status = LCM_PRIM_NOK;
1285 cfm->cfm.reason = LCM_REASON_INVALID_MSGTYPE;
1289 rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT);
1290 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1292 rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap);
1294 /* Change SAP state */
1295 rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND;
1296 cfm->cfm.status = LCM_PRIM_OK;
1297 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1301 /* Delete SAP, does initialization of SAP */
1302 if ((rgCb[inst].tfuSap.sapSta.sapState == LRG_WAIT_BNDCFM) ||
1303 (rgCb[inst].tfuSap.sapSta.sapState == LRG_BND))
1305 rgLIMTfuUbndReq(inst,rgCb[inst].tfuSap.sapCfg.spId, TFU_UBNDREQ_MNGMT);
1306 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1308 rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap);
1311 cmMemset((U8 *)&rgCb[inst].tfuSap, 0, sizeof(RgLowSapCb));
1312 rgCb[inst].tfuSap.sapSta.sapState = LRG_NOT_CFG;
1313 cfm->cfm.status = LCM_PRIM_OK;
1314 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1317 cfm->cfm.status = LCM_PRIM_NOK;
1318 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1319 RGDBGERRNEW(inst,(rgPBuf(inst), "\nrgLMMSapCntrl(): invalid action=%d",
1320 cntrl->t.cntrl.action));
1325 switch(cntrl->t.cntrl.action)
1328 cmMemset((U8 *)&rgCb[inst].rguSap[cntrl->t.cntrl.instId], 0, sizeof(RgUpSapCb));
1329 rgCb[inst].rguSap[cntrl->t.cntrl.instId].sapSta.sapState = LRG_NOT_CFG;
1330 cfm->cfm.status = LCM_PRIM_OK;
1331 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1334 cfm->cfm.status = LCM_PRIM_NOK;
1335 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1336 RGDBGERRNEW(inst,(rgPBuf(inst), "\nrgLMMSapCntrl(): invalid action=%d",
1337 cntrl->t.cntrl.action));
1342 switch(cntrl->t.cntrl.action)
1345 cmMemset((U8 *)&rgCb[inst].crgSap, 0, sizeof(RgUpSapCb));
1346 rgCb[inst].crgSap.sapSta.sapState = LRG_NOT_CFG;
1347 cfm->cfm.status = LCM_PRIM_OK;
1348 cfm->cfm.reason = LCM_REASON_NOT_APPL;
1351 cfm->cfm.status = LCM_PRIM_NOK;
1352 cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
1353 RLOG1(L_ERROR, "invalid action=%d",cntrl->t.cntrl.action);
1359 /* Would never here. */
1362 RgMiLrgCntrlCfm(cfmPst, cfm);
1367 /***********************************************************
1369 * Func : rgLMMFillCfmPst
1372 * Desc : Fills the Confirmation Post Structure cfmPst using the reqPst
1373 * and the cfm->hdr.response.
1382 **********************************************************/
1384 PRIVATE Void rgLMMFillCfmPst
1391 PRIVATE Void rgLMMFillCfmPst(reqPst, cfmPst, cfm)
1398 TRC2(rgLMMFillCfmPst)
1399 inst = (reqPst->dstInst - RG_INST_START);
1401 cfmPst->srcEnt = rgCb[inst].rgInit.ent;
1402 cfmPst->srcInst = rgCb[inst].rgInit.inst;
1403 cfmPst->srcProcId = rgCb[inst].rgInit.procId;
1404 cfmPst->dstEnt = reqPst->srcEnt;
1405 cfmPst->dstInst = reqPst->srcInst;
1406 cfmPst->dstProcId = reqPst->srcProcId;
1408 cfmPst->selector = cfm->hdr.response.selector;
1409 cfmPst->prior = cfm->hdr.response.prior;
1410 cfmPst->route = cfm->hdr.response.route;
1411 cfmPst->region = cfm->hdr.response.mem.region;
1412 cfmPst->pool = cfm->hdr.response.mem.pool;
1419 * @brief Timer start handler.
1423 * Function : rgLMMStartTmr
1425 * This function based on the input parameters starts the timer for
1426 * "tmrVal" duration. As of now MAC uses the timer functionality for
1427 * BndReq only. Hence there is no conditional code based on "tmrEvnt".
1429 * @param[in] Inst inst
1430 * @param[in] S16 tmrEvnt, the Timer Event
1431 * @param[in] U32 tmrVal, the Wait Time
1432 * @param[in] PTR cb, Entry for which Timer expired
1437 PUBLIC S16 rgLMMStartTmr
1440 S16 tmrEvnt, /* Timer Event */
1441 U32 tmrVal, /* Wait Time */
1442 PTR cb /* Entry for which Timer Expired */
1445 PUBLIC S16 rgLMMStartTmr(tmrEvnt, tmrVal, cb)
1447 S16 tmrEvnt; /* Timer Event */
1448 U32 tmrVal; /* Wait Time */
1449 PTR cb; /* Entry for which Timer Expired */
1458 /* Initialize the arg structure */
1459 cmMemset((U8 *)&arg, 0, sizeof(CmTmrArg));
1461 arg.tqCp = &rgCb[inst].tmrTqCp;
1462 arg.tq = rgCb[inst].tmrTq;
1463 arg.timers = rgCb[inst].tmrBlk;
1466 arg.max = RG_MAX_TIMER;
1467 arg.evnt = RG_BNDREQ_TMR;
1476 * @brief Timer stop handler.
1480 * Function : rgLMMStopTmr
1482 * This function based on the input parameters stops the timer for
1483 * "tmrEvnt". As of now MAC uses the timer functionality for
1484 * BndReq only. Hence there is no conditional code based on "tmrEvnt".
1485 * Once the bind happens and this timer is stopped, the timer functionality
1486 * is deregistered with SSI. As there is no further use of timer processing.
1488 * @param[in] Inst inst
1489 * @param[in] S16 tmrEvnt, the Timer Event
1490 * @param[in] PTR cb, Entry for which Timer expired
1496 PUBLIC S16 rgLMMStopTmr
1498 Inst inst, /* Scheduler instance */
1499 S16 tmrEvnt, /* Timer Event */
1500 PTR cb /* Entry for which Timer Expired */
1503 PUBLIC S16 rgLMMStopTmr(inst,tmrEvnt, cb)
1504 Inst inst; /* Scheduler instance */
1505 S16 tmrEvnt; /* Timer Event */
1506 PTR cb; /* Entry for which Timer Expired */
1517 for(i=0;i<RG_MAX_TIMER;i++)
1519 /* Search for the Timer Blocks */
1520 if(rgCb[inst].tmrBlk[i].tmrEvnt == tmrEvnt)
1522 /* Initialize the arg structure */
1523 cmMemset((U8 *)&arg, 0, sizeof(CmTmrArg));
1525 arg.tqCp = &rgCb[inst].tmrTqCp;
1526 arg.tq = rgCb[inst].tmrTq;
1527 arg.timers = rgCb[inst].tmrBlk;
1529 arg.max = RG_MAX_TIMER;
1547 * @brief Timer Expiry handler.
1551 * Function : rgLMMTmrExpiry
1553 * This is a callback function used as an input parameter to cmPrcTmr()
1554 * to check expiry of any timer. In this function, the only concern is
1555 * about tmrEvnt=Bind timer.
1557 * @param[in] PTR cb, Entry for which Timer expired
1558 * @param[in] S16 tmrEvnt, the Timer Event
1563 PUBLIC S16 rgLMMTmrExpiry
1565 PTR cb, /* Pointer to timer control block */
1566 S16 tmrEvnt /* Timer Event */
1569 PUBLIC S16 rgLMMTmrExpiry(cb,tmrEvnt)
1570 PTR cb; /* Pointer to timer control block */
1571 S16 tmrEvnt; /* Timer Event */
1575 RgLowSapCb *tfuSap = (RgLowSapCb *)cb;
1576 Inst inst = tfuSap->sapCfg.sapPst.srcInst - RG_INST_START;
1578 TRC2(rgLMMTmrExpiry)
1584 tfuSap->numBndRetries++;
1585 if(tfuSap->numBndRetries > RG_MAX_BNDRETRY)
1587 rgLMMStaInd(inst,LCM_CATEGORY_INTERFACE, LCM_EVENT_BND_FAIL,
1588 LCM_CAUSE_TMR_EXPIRED, NULLP);
1592 /* Restart the bind timer */
1593 if (tfuSap->sapCfg.bndTmr.enb == TRUE)
1595 ret = rgLMMStartTmr(inst,RG_BNDREQ_TMR, tfuSap->sapCfg.bndTmr.val,
1599 /* Send bind request */
1600 rgLIMTfuBndReq(inst,rgCb[inst].tfuSap.sapCfg.suId,
1601 rgCb[inst].tfuSap.sapCfg.spId);
1605 RLOG1(L_ERROR, "Invalid tmrEvnt=%d",tmrEvnt);
1615 * @brief Layer Manager Unsolicited Status Indication generation.
1619 * Function : rgLMMStaInd
1621 * This API is used by the other modules of MAC to send a unsolicited
1622 * status indication to the Layer Manager.
1624 * @param[in] Inst inst
1625 * @param[in] U16 category, the Alarm category
1626 * @param[in] U16 event, the Alarm event
1627 * @param[in] U16 cause, the cause of the Alarm
1628 * @param[in] RgUstaDgn *dgn, Alarm Diagonostics
1633 PUBLIC S16 rgLMMStaInd
1642 PUBLIC S16 rgLMMStaInd(inst,category, event, cause, dgn)
1654 if(rgCb[inst].rgInit.usta == FALSE)
1659 cmMemset((U8 *)&usta, 0, sizeof(RgMngmt));
1661 SGetDateTime(&usta.t.usta.cmAlarm.dt);
1662 usta.t.usta.cmAlarm.category = category;
1663 usta.t.usta.cmAlarm.event = event;
1664 usta.t.usta.cmAlarm.cause = cause;
1667 cmMemcpy((U8 *)&usta.t.usta.dgn, (U8 *)dgn, sizeof(RgUstaDgn));
1670 rgCb[inst].rgInit.lmPst.selector = rgCb[inst].genCfg.ustaResp.response.selector;
1671 rgCb[inst].rgInit.lmPst.prior = rgCb[inst].genCfg.ustaResp.response.prior;
1672 rgCb[inst].rgInit.lmPst.route = rgCb[inst].genCfg.ustaResp.response.route;
1673 rgCb[inst].rgInit.lmPst.region = rgCb[inst].genCfg.ustaResp.response.mem.region;
1674 rgCb[inst].rgInit.lmPst.pool = rgCb[inst].genCfg.ustaResp.response.mem.pool;
1675 usta.hdr.transId = rgCb[inst].genCfg.ustaResp.transId;
1677 RETVALUE(RgMiLrgStaInd(&rgCb[inst].rgInit.lmPst, &usta));
1682 * @brief Layer Manager Trace Indication generation.
1686 * Function : rgLMMTrcInd
1688 * This API is used by the other modules of MAC to send a
1689 * Trace indication to the Layer Manager.
1691 * @param[in] Inst inst
1692 * @param[in] Buffer *srcMbuf, the Message Buffer .
1693 * @param[in] U8 event, the trace event.
1697 PUBLIC Void rgLMMTrcInd
1700 Buffer *srcMbuf, /* Message Buffer */
1701 U8 event /* event */
1704 PUBLIC Void rgLMMTrcInd(inst,srcMbuf,event)
1706 Buffer *srcMbuf; /* Message Buffer */
1707 U8 event; /* event */
1710 Buffer *dstMbuf = NULLP;
1720 if ((rgCb[inst].trcLen == LRG_NO_TRACE) || (srcMbuf == NULLP))
1722 RLOG0(L_ERROR, "Trace Disabled.");
1726 cmMemset((U8 *)&trc, 0, sizeof(RgMngmt));
1728 pst = rgCb[inst].rgInit.lmPst;
1729 pst.selector = rgCb[inst].genCfg.trcResp.response.selector;
1730 pst.prior = rgCb[inst].genCfg.trcResp.response.prior;
1731 pst.route = rgCb[inst].genCfg.trcResp.response.route;
1732 pst.region = rgCb[inst].genCfg.trcResp.response.mem.region;
1733 pst.pool = rgCb[inst].genCfg.trcResp.response.mem.pool;
1735 trc.hdr.transId = rgCb[inst].genCfg.trcResp.transId;
1737 SGetDateTime(&trc.t.trc.dt);
1739 /* Check if the whole buffer is to be sent in Trace indication */
1740 if(rgCb[inst].trcLen == LRG_FULL_TRACE)
1742 if (SCpyMsgMsg(srcMbuf, pst.region, pst.pool, &dstMbuf)
1745 RLOG0(L_ERROR, "SCpyMsgMsg Failed.");
1748 trc.cfm.status = LCM_PRIM_OK;
1749 trc.cfm.reason = LCM_REASON_NOT_APPL;
1750 trc.t.trc.evnt = event;
1752 /* Send Trace Indication to Layer manager */
1753 RgMiLrgTrcInd(&pst, &trc, dstMbuf);
1755 /* check if only a specified number of bytes are to be sent */
1756 else if(rgCb[inst].trcLen > 0)
1758 /* Get the length of the recvd message buffer */
1759 if (SFndLenMsg(srcMbuf, &bufLen) != ROK)
1761 RLOG0(L_ERROR, "SFndLenMsg Failed.");
1764 /* Check if the recvd buffer size is less than request trace len */
1765 if(bufLen < rgCb[inst].trcLen)
1767 /* Copy the whole of the recvd buffer in trace indication */
1769 if (SCpyMsgMsg(srcMbuf, pst.region, pst.pool, &dstMbuf)
1772 RLOG0(L_ERROR, "SCpyMsgMsg Failed.");
1776 trc.cfm.status = LCM_PRIM_OK;
1777 trc.cfm.reason = LCM_REASON_NOT_APPL;
1778 trc.t.trc.evnt = event;
1780 /* Send Trace Indication to Layer manager */
1781 RgMiLrgTrcInd(&pst, &trc, dstMbuf);
1783 /* if the recvd buffer size is greater than request trace len */
1784 if(bufLen >= rgCb[inst].trcLen)
1786 /* Get a temporary buffer to store the msg */
1787 if (rgAllocSBuf(inst,&tempBuf, rgCb[inst].trcLen) != ROK)
1789 RLOG0(L_ERROR, "rgAllocSBuf Failed.");
1793 /* Copy trcLen nos of bytes from the recvd message */
1794 if (SCpyMsgFix(srcMbuf,0,rgCb[inst].trcLen,tempBuf,&tempCnt) != ROK)
1796 RLOG0(L_ERROR, "SCpyMsgFix Failed.");
1800 if (SGetMsg(pst.region, pst.pool, &dstMbuf) != ROK)
1802 RLOG0(L_ERROR, "dstMbuf Allocation Failed");
1805 /* Copy the tempBuf data to dst mBuf */
1806 if (SCpyFixMsg(tempBuf,dstMbuf,0,rgCb[inst].trcLen,&tempCnt) != ROK)
1808 RLOG0(L_ERROR, "SCpyFixMsg Failed.");
1812 /*ccpu00117052 - MOD - Passing double pointer for proper NULLP
1814 /* Free the memory allocated for tempBuf */
1815 rgFreeSBuf(inst,&tempBuf, rgCb[inst].trcLen);
1817 trc.cfm.status = LCM_PRIM_OK;
1818 trc.cfm.reason = LCM_REASON_NOT_APPL;
1819 trc.t.trc.evnt = event;
1821 /* Send Trace Indication to Layer manager */
1822 RgMiLrgTrcInd(&pst, &trc, dstMbuf);
1830 * @brief Layer Manager Control Confirm generation handler
1831 * for Bind Confirm reception at TFU interface.
1832 * RgLiTfuBndCfm() forwards the confirmation to this
1833 * function. All SAP state related handling is restricted
1834 * to LMM modules, hence the cfm forwarding.
1838 * Function : rgLMMBndCfm
1840 * This API is used by the LIM module of MAC to forward
1841 * the Bind Confirm it receives over the TFU interface.
1843 * @param[in] Pst *pst, Post Structure
1844 * @param[in] SuId suId, Service user ID
1845 * @param[in] U8 status, Status
1850 PUBLIC S16 rgLMMBndCfm
1852 Pst *pst, /* Post Structure */
1853 SuId suId, /* Service user ID */
1854 U8 status /* Status */
1857 PUBLIC S16 rgLMMBndCfm(pst,suId,status)
1858 Pst *pst; /* Post Structure */
1859 SuId suId; /* Service user ID */
1860 U8 status; /* Status */
1863 Inst inst = pst->dstInst - RG_INST_START;
1872 /* Check if the suId is valid */
1873 if(rgCb[inst].tfuSap.sapCfg.suId != suId)
1875 RLOG0(L_ERROR, "Invalid SuId");
1879 /* check the Sap State */
1880 switch(rgCb[inst].tfuSap.sapSta.sapState)
1882 case LRG_WAIT_BNDCFM:
1885 /* SAP is already bound */
1891 cfmPst = rgCb[inst].rgInit.lmPst;
1892 cfmPst.selector = rgCb[inst].genCfg.bndCfmResp.response.selector;
1893 cfmPst.prior = rgCb[inst].genCfg.bndCfmResp.response.prior;
1894 cfmPst.route = rgCb[inst].genCfg.bndCfmResp.response.route;
1895 cfmPst.region = rgCb[inst].genCfg.bndCfmResp.response.mem.region;
1896 cfmPst.pool = rgCb[inst].genCfg.bndCfmResp.response.mem.pool;
1898 cmMemset((U8 *)&cntrlCfm, 0, sizeof(RgMngmt));
1902 case CM_BND_OK: /* status is OK */
1903 /* Change SAP state to Bound */
1904 rgCb[inst].tfuSap.sapSta.sapState = LRG_BND;
1905 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1907 ret = rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap);
1909 /* Send Control Confirm with status as OK to Layer Manager */
1910 cntrlCfm.cfm.status = LCM_PRIM_OK;
1911 cntrlCfm.cfm.reason = LCM_REASON_NOT_APPL;
1915 /* Change SAP state to UnBound */
1916 rgCb[inst].tfuSap.sapSta.sapState = LRG_UNBND;
1917 if (rgCb[inst].tfuSap.sapCfg.bndTmr.enb == TRUE)
1919 ret = rgLMMStopTmr(inst,RG_BNDREQ_TMR, (PTR)&rgCb[inst].tfuSap);
1921 /* Send Control Confirm with status as NOK to Layer Manager */
1922 cntrlCfm.cfm.status = LCM_PRIM_NOK;
1923 cntrlCfm.cfm.reason = LCM_REASON_NEG_CFM;
1926 rgCb[inst].tfuSap.numBndRetries = 0;
1927 cntrlCfm.hdr.elmId.elmnt = STTFUSAP;
1928 cntrlCfm.hdr.transId = rgCb[inst].genCfg.bndCfmResp.transId;
1930 ret = RgMiLrgCntrlCfm(&cfmPst, &cntrlCfm);
1937 * @brief LTE MAC timer call back function registered with SSI.
1941 * Function : rgActvTmr
1943 * This function is invoked by SSI for every timer activation
1950 PUBLIC S16 rgActvTmr
1956 PUBLIC S16 rgActvTmr(ent, inst)
1961 Inst macInst = (inst - RG_INST_START);
1964 /* Check if any MAC timer has expired */
1965 cmPrcTmr(&rgCb[macInst].tmrTqCp, rgCb[macInst].tmrTq, (PFV) rgLMMTmrExpiry);
1969 } /* end of rgActvTmr */
1972 * @brief Layer Manager Configuration request handler for Scheduler
1976 * Function : MacSchGenCfgReq
1978 * This function receives general configurations for Scheduler
1979 * from DU APP and forwards to Scheduler.
1981 * @param[in] Pst *pst, the post structure
1982 * @param[in] RgMngmt *cfg, the configuration parameter's structure
1987 PUBLIC S16 MacSchGenCfgReq
1989 Pst *pst, /* post structure */
1990 RgMngmt *cfg /* config structure */
1993 PUBLIC S16 MacSchGenCfgReq(pst, cfg)
1994 Pst *pst; /* post structure */
1995 RgMngmt *cfg; /* config structure */
1998 printf("\nReceived Scheduler gen config at MAC");
1999 pst->dstInst = DEFAULT_CELLS + 1;
2000 HandleSchGenCfgReq(pst, cfg);
2006 * @brief Layer Manager Configuration response from Scheduler
2010 * Function : SchSendCfgCfm
2012 * This function sends general configurations response from
2013 * Scheduler to DU APP.
2015 * @param[in] Pst *pst, the post structure
2016 * @param[in] RgMngmt *cfm, the configuration confirm structure
2021 PUBLIC S16 SchSendCfgCfm
2023 Pst *pst, /* post structure */
2024 RgMngmt *cfm /* config confirm structure */
2027 PUBLIC S16 SchSendCfgCfm(pst, cfm)
2028 Pst *pst; /* post structure */
2029 RgMngmt *cfm; /* config confirm structure */
2032 printf("\nSending Scheduler config confirm to DU APP");
2033 pst->dstEnt = ENTDUAPP;
2036 pst->selector = MAC_SCH_LC_SELECTOR;
2037 RgMiLrgSchCfgCfm(pst, cfm);
2043 /***********************************************************
2045 * Func : macCellCfgFillCfmPst
2048 * Desc : Fills the Confirmation Post Structure cfmPst
2056 **********************************************************/
2057 Void macCellCfgFillCfmPst
2064 inst = reqPst->dstInst;
2066 cfmPst->srcEnt = rgCb[inst].rgInit.ent;
2067 cfmPst->srcInst = rgCb[inst].rgInit.inst;
2068 cfmPst->srcProcId = rgCb[inst].rgInit.procId;
2070 cfmPst->dstEnt = ENTDUAPP;
2071 cfmPst->dstInst = 0;
2072 cfmPst->dstProcId = cfmPst->srcProcId;
2074 cfmPst->selector = LRG_SEL_LC;
2075 cfmPst->prior = reqPst->prior;
2076 cfmPst->route = reqPst->route;
2077 cfmPst->region = reqPst->region;
2078 cfmPst->pool = reqPst->pool;
2079 cfmPst->event = EVENT_MAC_CELL_CONFIG_CFM;
2085 * @brief Layer Manager Configuration request handler.
2089 * Function : MacHdlCellCfgReq
2091 * This function handles the gNB and cell configuration
2092 * request received from DU APP.
2093 * This API unapcks and forwards the config towards SCH
2095 * @param[in] Pst *pst
2096 * @param[in] MacCellCfg *macCellCfg
2100 int MacHdlCellCfgReq
2103 MacCellCfg *macCellCfg
2109 MacCellCb *macCellCb;
2110 Inst inst = pst->dstInst;
2112 cmMemset((U8 *)&cfmPst, 0, sizeof(Pst));
2113 MAC_ALLOC(cellCb,sizeof(RgCellCb));
2117 DU_LOG("\nMAC : cellCb is NULL at handling of macCellCfg\n");
2121 memcpy(&cellCb->macCellCfg,macCellCfg,sizeof(MacCellCfg));
2122 rgCb[inst].cell = cellCb;
2124 MAC_ALLOC(macCellCb,sizeof(MacCellCb));
2125 if(macCellCb == NULLP)
2127 DU_LOG("\nMAC : macCellCb is NULL at handling of macCellCfg\n");
2130 macCb.macCell = macCellCb;
2131 macCb.macCell->cellId = macCellCfg->cellId;
2132 /* Send cell cfg to scheduler */
2133 ret = MacSchCellCfgReq(pst, macCellCfg);
2136 MacCellCfgCfm macCellCfgCfm;
2137 macCellCfgCfm.rsp = RSP_NOK;
2138 macCellCfgCfm.transId = macCellCfg->transId;
2139 macCellCfgFillCfmPst(pst,&cfmPst);
2140 ret = (*packMacCellCfmOpts[cfmPst.selector])(&cfmPst,&macCellCfgCfm);
2143 } /* end of MacHdlCellCfgReq */
2146 * @brief Layer Manager Configuration request handler.
2150 * Function : MacSchCellCfgReq
2152 * This function sends cell configuration to SCH
2154 * @param[in] Pst *pst
2155 * @param[in] MacCellCfg *macCellCfg
2159 int MacSchCellCfgReq
2162 MacCellCfg *macCellCfg
2165 SchCellCfg schCellCfg;
2169 cmMemset((U8 *)&cfgPst, 0, sizeof(Pst));
2170 schCellCfg.cellId = macCellCfg->cellId;
2171 schCellCfg.phyCellId = macCellCfg->phyCellId;
2172 schCellCfg.bandwidth = macCellCfg->dlCarrCfg.bw;
2173 schCellCfg.dupMode = macCellCfg->dupType;
2175 /* fill ssb scheduler parameters */
2176 schCellCfg.ssbSchCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr;
2177 schCellCfg.ssbSchCfg.scsCommon = macCellCfg->ssbCfg.scsCmn;
2178 schCellCfg.ssbSchCfg.ssbOffsetPointA = macCellCfg->ssbCfg.ssbOffsetPointA;
2179 schCellCfg.ssbSchCfg.ssbPeriod = macCellCfg->ssbCfg.ssbPeriod;
2180 schCellCfg.ssbSchCfg.ssbSubcOffset = macCellCfg->ssbCfg.ssbScOffset;
2181 for(uint8_t idx=0; idx<SSB_MASK_SIZE; idx++)
2183 schCellCfg.ssbSchCfg.nSSBMask[idx] = macCellCfg->ssbCfg.ssbMask[idx];
2186 /* fill SIB1 scheduler parameters */
2187 schCellCfg.sib1SchCfg.sib1PduLen = macCellCfg->sib1Cfg.sib1PduLen;
2188 schCellCfg.sib1SchCfg.sib1NewTxPeriod = macCellCfg->sib1Cfg.sib1NewTxPeriod;
2189 schCellCfg.sib1SchCfg.sib1RepetitionPeriod = macCellCfg->sib1Cfg.sib1RepetitionPeriod;
2190 schCellCfg.sib1SchCfg.coresetZeroIndex = macCellCfg->sib1Cfg.coresetZeroIndex;
2191 schCellCfg.sib1SchCfg.searchSpaceZeroIndex = macCellCfg->sib1Cfg.searchSpaceZeroIndex;
2192 schCellCfg.sib1SchCfg.sib1Mcs = macCellCfg->sib1Cfg.sib1Mcs;
2194 cfgPst.srcProcId = pst->dstProcId;
2195 cfgPst.dstProcId = pst->srcProcId;
2196 cfgPst.srcEnt = ENTRG;
2198 cfgPst.dstEnt = ENTRG;
2200 cfgPst.selector = MAC_SCH_TC_SELECTOR;
2201 cfgPst.event = EVENT_SCH_CELL_CFG;
2203 ret = (*SchCellCfgOpts[cfgPst.selector])(&cfgPst, &schCellCfg);
2205 } /* end of MacSchCellCfgReq */
2208 /*******************************************************************
2210 * @brief Sends Cell config confirm to DU APP
2214 * Function : MacSendCellCfgCfm
2217 * Sends Cell config confirm to DU APP
2219 * @params[in] Response status
2222 * ****************************************************************/
2223 void MacSendCellCfgCfm(uint8_t response)
2227 MacCellCfgCfm macCellCfgCfm;
2229 cmMemset((U8 *)&pst, 0, sizeof(Pst));
2230 cellCb = rgCb[macCb.macInst].cell;
2232 macCellCfgCfm.transId = cellCb->macCellCfg.transId;
2233 macCellCfgCfm.rsp = response;
2235 memcpy((void *)&pst, (void *)&rgCb[macCb.macInst].rgInit.lmPst, sizeof(Pst));
2236 pst.event = EVENT_MAC_CELL_CONFIG_CFM;
2237 (*packMacCellCfmOpts[pst.selector])(&pst,&macCellCfgCfm);
2242 * @brief Layer Manager Configuration response handler.
2246 * Function : MacProcSchCellCfgCfm
2248 * This function processes cell configuration to SCH
2250 * @param[in] Pst *pst
2251 * @param[in] SchCellCfgCfm *schCellCfgCfm
2255 int MacProcSchCellCfgCfm
2258 SchCellCfgCfm *schCellCfgCfm
2261 if(schCellCfgCfm->rsp == RSP_OK)
2263 sendToLowerMac(PARAM_REQUEST, 0, (void *)NULL);
2267 MacSendCellCfgCfm(RSP_NOK);
2272 /**********************************************************************
2275 **********************************************************************/