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 Entry point functions
29 **********************************************************************/
31 /** @file rg_pom_scell.c
32 @brief This module does processing related to handling of SCell related function.
35 /* header include files -- defines (.h) */
36 #include "common_def.h"
41 #include "rg_sch_inf.h"
42 #include "rg_prg.h" /* PRG interface includes*/
47 /* header/extern include files (.x) */
52 #include "rg_sch_inf.x"
53 #include "rg_prg.x" /* PRG interface typedefs*/
54 #include "du_app_mac_inf.h"
57 #include "rg_pom_scell.x"
58 static S16 rgPomVldtSCellDedLchCfg ARGS((
60 RgPrgUeSCellLchAddInfo *lcCfg,
64 static S16 rgPomUeSCellDedLcCfg ARGS((RgCellCb *cell,
66 RgPrgUeSCellLchAddInfo *lcCfg
69 * @brief Handler for the Lch reconfiguration request from PMAC to SMAC.
73 * Function : RgPrgPMacSMacUeSCellLchModReq
76 * - calls the function for validating cell, uecb and lch sent by PMAC
77 * - Updates the lch recfg into ueCb.
78 * - If successful, add the control block to hash list of UEs for the cell
79 * else Rollback and FAIL.
82 * @param[in] RgPrgUeSCellLchModInfo *lchCfgCb
87 S16 RgPrgPMacSMacUeSCellLchModReq
90 RgPrgUeSCellLchModInfo *lchCfgCb
93 RgPrgCfgCfmInfo cfgCfm;
94 Inst inst = pst->dstInst;
101 RGDBGPRM(inst,(rgPBuf(inst),
102 "APPLYING CRG UE SCELL CONFIG: cellId %d ueId %d lcId %d lcgId %d\n",
103 lchCfgCb->cellId, lchCfgCb->crnti,lchCfgCb->lcId,lchCfgCb->ulLchRecfg.lcgId));
105 cfgCfm.ueId = lchCfgCb->crnti;
106 cfgCfm.sCellId = lchCfgCb->cellId;
107 cfgCfm.status = PRG_CFG_CFM_OK;
108 cfgCfm.event = EVTPRGUESCELLLCHMODCFM;
109 rgGetPstToInst(&cfmPst, inst, pst->srcInst);
111 ret = rgPomVltdModLch(inst,lchCfgCb, &cell, &ue,&ulLc);
114 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMAC SCell Lc Cfg failed:\
115 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
116 /* Set status as Not OK*/
117 cfgCfm.status = PRG_CFG_CFM_NOK;
121 ret = rgPomUeSCellLcMod(inst, ue, ulLc, lchCfgCb);
124 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMac SCell lc cfg failed:\
125 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
126 /* Set status as Not OK*/
127 cfgCfm.status = PRG_CFG_CFM_NOK;
131 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d] Scell Lch Config done:\
132 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
134 /* Send positive confirmation to primary cell*/
135 RgPrgSMacPMacCfg(&cfmPst, &cfgCfm);
137 } /* RgPrgPMacSMacUeSCellLchModReq */
141 * @brief A wrapper class to send the LCH Del req from PMAC to SMAC
145 * Function : rgPomSndUeSCellLchDelToSmac
148 * - Retrieve the cell control block.
150 * - Validate the range of values received in
152 * - Checks if the Ue has any scell added.
153 * - If validated successfully,
154 * - if SCells have been added ,then
155 * send the lchDel structure to update the same values to SMAC.
157 * - Else return RFAILED.
159 * @param[in] Inst inst
160 * @param[in] CrgDel *lcDel
161 * @param[in] Bool *isCfmRqrd
166 S16 rgPomSndUeSCellLchDelToSmac
176 RgPrgUeSCellLchDelInfo delLcCb;
180 /* Fetch the Active cell */
181 if(((cell = rgCb[inst].cell) == NULLP) ||
182 (cell->cellId != lcDel->u.lchDel.cellId))
184 RGDBGERRNEW(inst,(rgPBuf(inst),
185 "[%d]Active Cell does not exist %d\n",
186 lcDel->u.lchDel.crnti, lcDel->u.lchDel.cellId));
190 RGDBGPRM(inst,(rgPBuf(inst),
191 "Filling SCell LCh Config : cellId %d ueId %d\n",
192 cell->cellId, cell->ueId));
194 if ((ue = rgDBMGetUeCb(cell, lcDel->u.lchDel.crnti)) == NULLP)
196 RGDBGERRNEW(inst,(rgPBuf(inst),
197 "[%d]Ue does not exist\n", lcDel->u.lchDel.crnti));
200 for(idx = 0; idx < RG_MAX_SCELL_PER_UE ; idx++)
202 if(TRUE == ue->sCelInfo[idx].isSCellAdded)
204 dstMacInst = ue->sCelInfo[idx].macInst - RG_INST_START;
205 delLcCb.cellId = ue->sCelInfo[idx].sCellId;
206 delLcCb.crnti = lcDel->u.lchDel.crnti;
207 delLcCb.lcId = lcDel->u.lchDel.lcId;
208 delLcCb.dir = lcDel->u.lchDel.dir;
210 /* Get post structure of the cell to whom delLcCb needs to be sent
211 * And then send the lch recfg based on Mac instances */
212 rgGetPstToInst(&dstInstPst, inst, dstMacInst);
213 RgPrgPMacSMacUeScellLchDel(&dstInstPst, &delLcCb);
222 * @brief A wrapper class to send the LCH reconfig req from PMAC to SMAC
226 * Function : rgPomSndUeSCellLchModToSmac
229 * - Retrieve the cell control block.
231 * - Validate the range of re-configured values recieved in
232 * re-configuration request.
233 * - Checks if the Ue has any scell added.
234 * - If validated successfully,
235 * - if SCells have been added ,then
236 * send the lchRecfg structure to update the same values to SMAC.
238 * - Else return RFAILED.
240 * @param[in] Inst inst
241 * @param[in] RgCellCb *cell
242 @param[in] RgUeCb *ue,
243 @param[in] CrgLchRecfg *lchRecfg,
244 @param[in] Bool *isCfmRqrd
249 S16 rgPomSndUeSCellLchModToSmac
254 CrgLchRecfg *lchRecfg,
260 RgPrgUeSCellLchModInfo lchCfgCb;
263 for(idx = 0; idx < RG_MAX_SCELL_PER_UE ; idx++)
265 if(TRUE == ue->sCelInfo[idx].isSCellAdded)
267 dstMacInst = ue->sCelInfo[idx].macInst - RG_INST_START;
268 lchCfgCb.cellId = ue->sCelInfo[idx].sCellId;
269 lchCfgCb.crnti = lchRecfg->crnti;
270 lchCfgCb.lcId = lchRecfg->lcId;
271 lchCfgCb.ulLchRecfg.lcgId = lchRecfg->ulRecfg.lcgId;
273 /* Get post structure of the cell to whom lchCfgCb needs to be sent
274 * And then send the lch recfg based on Mac instances */
275 rgGetPstToInst(&dstInstPst, inst, dstMacInst);
276 RgPrgPMacSMacUeScellLchMod(&dstInstPst, &lchCfgCb);
284 * @brief A wrapper class to send the LCH config req from PMAC to SMAC
288 * Function : rgPomSndUeSCellLchAddToSmac
291 * - Checks if the Ue has any scell added.
292 * - if SCells have been added ,then
293 * send the lchCfgCb structure to update the same values to SMAC.
295 * - Else return RFAILED.
297 * @param[in] Inst insg
299 * @param[in] RgCellCb *cell
300 * @paran[in] RgUeCb *ue
301 * @paran[in] CrgLchCfg *lchCfg
302 * @paran[in] Bool *isCfmRqrd
307 S16 rgPomSndUeSCellLchAddToSmac
318 RgPrgUeSCellLchAddInfo lchCfgCb;
321 for(idx = 0; idx < RG_MAX_SCELL_PER_UE ; idx++)
323 if(TRUE == ue->sCelInfo[idx].isSCellAdded)
325 dstMacInst = ue->sCelInfo[idx].macInst - RG_INST_START;
326 lchCfgCb.cellId = ue->sCelInfo[idx].sCellId;
327 lchCfgCb.crnti = lchCfg->crnti;
328 lchCfgCb.lcId = lchCfg->lcId;
329 lchCfgCb.lcType = lchCfg->lcType;
330 lchCfgCb.dir = lchCfg->dir;
331 lchCfgCb.dlInfo.dlTrchType = lchCfg->dlInfo.dlTrchType;
332 lchCfgCb.ulInfo.ulTrchType = lchCfg->ulInfo.ulTrchType;
333 lchCfgCb.ulInfo.lcgId = lchCfg->ulInfo.lcgId;
335 lchCfgCb.qci = lchCfg->qci;
336 #endif /* LTE_L2_MEAS */
338 /* Get post structure of the cell to whom lchCfgCb needs to be sent
339 * And then send the lch recfg based on Mac instances */
340 rgGetPstToInst(&dstInstPst, inst, dstMacInst);
341 RgPrgPMacSMacUeScellLchAdd(&dstInstPst, &lchCfgCb);
346 } /* rgPomSndUeSCellLchAddToSmac */
349 * @brief Handler for the Lch delete request from PMAC to SMAC.
353 * Function : RgPrgPMacSMacUeSCellLchDelReq
356 * - calls the function for validating cell, uecb and Lch sent by PMAC
357 * - If successful, delete the logical channel
358 * else Rollback and FAIL.
360 * @param[in] Pst *pst
361 * @param[in] RgPrgUeSCellLchDelInfo *lchCfgCb
366 S16 RgPrgPMacSMacUeSCellLchDelReq
369 RgPrgUeSCellLchDelInfo *delLcCb
372 RgPrgCfgCfmInfo cfgCfm;
373 Inst inst = pst->dstInst;
381 RGDBGPRM(inst,(rgPBuf(inst),
382 "APPLYING CRG UE SCELL CONFIG: cellId %d ueId %d\n",
383 lchCfgCb->cellId, lchCfgCb->crnti));
385 cfgCfm.ueId = delLcCb->crnti;
386 cfgCfm.sCellId = delLcCb->cellId;
387 cfgCfm.status = PRG_CFG_CFM_OK;
388 cfgCfm.event = EVTPRGUESCELLLCHDELCFM;
389 rgGetPstToInst(&cfmPst, inst, pst->srcInst);
391 ret = rgPomVltdDelLch(inst,delLcCb, &cell, &ue,&ulLc,&dlLc);
394 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMAC SCell Lc Cfg failed:\
395 cellId %d\n", delLcCb->crnti, delLcCb->cellId));
396 /* Set status as Not OK*/
397 cfgCfm.status = PRG_CFG_CFM_NOK;
401 ret = rgPomUeSCellLcDel(inst, delLcCb, ue, ulLc,dlLc);
404 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMac SCell lc cfg failed:\
405 cellId %d\n", delLcCb->crnti, delLcCb->cellId));
406 /* Set status as Not OK*/
407 cfgCfm.status = PRG_CFG_CFM_NOK;
411 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d] Scell Lch Config done:\
412 cellId %d\n", delLcCb->crnti, delLcCb->cellId));
414 /* Send positive confirmation to primary cell*/
415 RgPrgSMacPMacCfg(&cfmPst, &cfgCfm);
417 } /* RgPrgPMacSMacUeSCellLchDelReq */
421 * @brief Handler for the Lch configuration request from PMAC to SMAC.
425 * Function : RgPrgPMacSMacUeSCellLchAddReq
428 * - calls the function for validating cell, uecb and Lch sent by PMAC
429 * - Updates the lch recfg into ueCb.
430 * - If successful, add the control block to hash list of UEs for the cell
431 * else Rollback and FAIL.
433 * @param[in] Pst *pst
434 * @param[in] RgPrgLchRecfgInfo *lchCfgCb
439 S16 RgPrgPMacSMacUeSCellLchAddReq
442 RgPrgUeSCellLchAddInfo *lchCfgCb
445 RgPrgCfgCfmInfo cfgCfm;
446 Inst inst = pst->dstInst;
452 RGDBGPRM(inst,(rgPBuf(inst),
453 "APPLYING UE SCELL CONFIG AT SMAC : cellId %d ueId %d\n",
454 lchCfgCb->cellId, lchCfgCb->crnti));
456 cfgCfm.ueId = lchCfgCb->crnti;
457 cfgCfm.sCellId = lchCfgCb->cellId;
458 cfgCfm.status = PRG_CFG_CFM_OK;
459 cfgCfm.event = EVTPRGUESCELLLCHADDCFM;
460 rgGetPstToInst(&cfmPst, inst, pst->srcInst);
462 ret = rgPomVldtAddLch(inst,lchCfgCb, &cell, &ue);
465 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMAC SCell Lc Cfg failed:\
466 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
467 /* Set status as Not OK*/
468 cfgCfm.status = PRG_CFG_CFM_NOK;
472 ret = rgPomUeSCellLcAdd(inst, cell, ue, lchCfgCb);
475 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d] SMac SCell lc cfg failed:\
476 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
477 /* Set status as Not OK*/
478 cfgCfm.status = PRG_CFG_CFM_NOK;
482 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d] Scell Lch Config done:\
483 cellId %d\n", lchCfgCb->crnti, lchCfgCb->cellId));
485 /* Send positive confirmation to primary cell*/
486 RgPrgSMacPMacCfg(&cfmPst, &cfgCfm);
488 } /* RgPrgPMacSMacUeSCellLchAddReq */
490 * @brief Validates the logical channel configuration request from PMAC to SMAC.
494 * Function : rPommVldtAddLch
497 * - Validate the logical channel configuration request from PMAC to
498 * SMAC : validate if configured values are within the range.
499 * - If validated successfully,
500 * - Return ROK and pointer to cell and UE for dedicated logical channels.
504 * @param[in] Inst inst
505 * @param[in] RgPrgUeSCellLchAddInfo *lcCfg
506 * @param[out] RgCellCb **cell
507 * @param[out] RgUeCb **ue
515 RgPrgUeSCellLchAddInfo *lcCfg,
521 RGDBGPRM(inst,(rgPBuf(inst), "VALIDATE SMAC LC CONFIG: cellId %d ueId %d lcId %d\
522 cell %p ue %p\n", lcCfg->cellId, lcCfg->crnti, lcCfg->lcId,
523 (void*)*cell, (void*)*ue));
525 if (lcCfg->lcType == CM_LTE_LCH_DTCH || lcCfg->lcType == CM_LTE_LCH_DCCH)
527 /* Dedicated logical channels */
528 if ((rgPomVldtSCellDedLchCfg(inst,lcCfg, cell, ue)) != ROK)
530 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UEID Validation for dedicated LC failed\n",
537 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UEID Invalid logical channel type %d\n",\
538 lcCfg->crnti, lcCfg->lcType));
542 if ( lcCfg->qci < RG_QCI_MIN ||
543 lcCfg->qci > RG_QCI_MAX
546 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UEID Invalid qci %x\n",
547 lcCfg->crnti, lcCfg->qci));
551 #endif /*LTE_L2_MEAS */
553 RGDBGINFONEW(inst,(rgPBuf(inst),"[%d]UEID CRG LCconfig validation done:cellId:%d lcId:%d\n",
554 lcCfg->crnti, lcCfg->cellId, lcCfg->lcId));
558 * @brief Handler for the logical channel configuration request from
563 * Function : rgPomUeSCellLcAdd
566 * - Update the dedicated logical channel Cb with the configured values.
567 * - If successful, return ROK else RFAILED.
569 * @param[in] Inst inst
570 * @param[in] RgCellCb *cell
571 * @param[in] RgUeCb *ue
572 * @param[in] CrgLchCfg *lcCfg
573 * @param[out] RgErrInfo *errInfo
578 S16 rgPomUeSCellLcAdd
583 RgPrgUeSCellLchAddInfo *lcCfg
587 RGDBGPRM(inst,(rgPBuf(inst), "APPLYING CRG LC CONFIG: cellId %d ueId %d\
588 lcId %d dir %d cell %p ue %p\n", lcCfg->cellId, lcCfg->crnti,
589 lcCfg->lcId, lcCfg->dir, (void*)cell, (void*)ue));
591 if ((rgPomUeSCellDedLcCfg(cell, ue, lcCfg)) != ROK)
593 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Dedicated logical channel configuration"
594 "failed in SCell%d\n", lcCfg->crnti, lcCfg->lcId));
598 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d]SCell LC config done: cellId %d lcId %d\n",
599 lcCfg->crnti, lcCfg->cellId, lcCfg->lcId));
601 } /* rgPomUeSCellLcAdd */
603 /***********************************************************
605 * Func : rgPomVldtSCellDedLchCfg
608 * Desc : Validates dedicated logical channel configuration received from PMAC.
610 * @param[in] Inst inst
611 * @param[in] RgPrgUeScellLchAddInfo *lcCfg
612 * @param[in] RgCellCb **cell
613 * @param[in] RgUeCb **ue
623 **********************************************************/
624 static S16 rgPomVldtSCellDedLchCfg
627 RgPrgUeSCellLchAddInfo *lcCfg,
632 RGDBGPRM(inst,(rgPBuf(inst), "VALIDATING CRG DEDICATED LC CONFIG \n"));
635 /* Fetch the Active cell */
636 if (((*cell = rgCb[inst].cell) == NULLP)
637 || ((*cell)->cellId != lcCfg->cellId))
639 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Active Cell does not exist: Cell %d\n",
640 lcCfg->crnti, lcCfg->cellId));
645 if ((*ue = rgDBMGetUeCb(*cell, lcCfg->crnti)) == NULLP)
647 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UE does not exist for dedicated logical"
648 "channel %d\n", lcCfg->crnti, lcCfg->lcId));
652 /* Validate logical channel Id */
653 /*if ((lcCfg->lcId < RG_DEDLC_MIN_LCID)
654 ||(lcCfg->lcId > RG_DEDLC_MAX_LCID))
656 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Invalid logical channel Id %d\n",
657 lcCfg->crnti, lcCfg->lcId));
660 /* Validate downlink info */
661 if (lcCfg->dir & PRG_DIR_TX)
663 if (rgDBMGetDlDedLcCb((*ue), lcCfg->lcId) != NULLP)
665 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UE: Dedicated DL LC %d already configured\n",
666 lcCfg->crnti, lcCfg->lcId));
672 /* Validate uplink info */
673 if (lcCfg->dir & PRG_DIR_RX)
675 if (lcCfg->ulInfo.lcgId > (RG_MAX_LCG_PER_UE - 1))
677 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UE: Invalid lcgId for uplink logical"
678 "channel %d\n", lcCfg->crnti, lcCfg->ulInfo.lcgId));
681 if (rgDBMGetUlDedLcCb((*ue), lcCfg->lcId) != NULLP)
683 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UE: Dedicated UL LC %d already configured\n",
684 lcCfg->crnti, lcCfg->lcId));
692 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Invalid Direction %d \n",
693 lcCfg->crnti, lcCfg->dir));
697 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d]Dedicated logical channel %d validated"
698 "for cell %d\n", lcCfg->crnti, lcCfg->lcId, lcCfg->cellId));
700 } /* rgPomVldtSCellDedLchCfg */
701 /***********************************************************
703 * Func : rgPomUeSCellDedLcCfg
706 * Desc : Validates dedicated logical channel configuration received from PMAC.
708 * @param[in] RgCellCb *cell
709 * @param[in] RgUeCb *ue
710 * @param[in] RgPrgUeSCellLchAddInfo *lcCfg
720 **********************************************************/
721 static S16 rgPomUeSCellDedLcCfg
725 RgPrgUeSCellLchAddInfo *lcCfg
728 //Inst inst = cell->macInst - RG_INST_START;
729 //RGDBGPRM(inst,(rgPBuf(inst), "APPLYING DEDICATED LC CONFIG\n"));
731 /* Uplink/Bi-directional logical channel */
732 if (lcCfg->dir & PRG_DIR_RX)
735 rgDBMInsUlDedLcCb(ue, lcCfg->lcId, lcCfg->ulInfo.lcgId, lcCfg->qci);
736 cell->qciArray[lcCfg->qci].qci = lcCfg->qci;
737 if(lcCfg->lcType == CM_LTE_LCH_DTCH)
739 rgAddToL2MeasPerQci(cell,lcCfg->qci);/*LTE_L2_MEAS_PHASE2*/
742 rgDBMInsUlDedLcCb(ue, lcCfg->lcId, lcCfg->ulInfo.lcgId);
746 /* Downlink/Bi-directional logical channel */
747 if (lcCfg->dir & PRG_DIR_TX)
749 rgDBMInsDlDedLcCb(ue, lcCfg->lcId);
751 RGDBGINFO(inst,(rgPBuf(inst), "Dedicated LC config done\n"));
754 } /* rgPomUeSCellDedLcCfg */
756 * @brief Function to validate SCellLchReCfg.
760 * Function : rgPomVltdModLch
763 * @param[in] inst instance number to fetch rgCb instance
764 * @param[in] lchCfg Cb lchCfg CB for validation
765 * @param[out] cell cell control block
766 * @param[out] RgCellCb **cell
767 * @param[out] RgUeCb **ue
768 * @param[out] RgUlLcCb **ulLc
775 RgPrgUeSCellLchModInfo *lchCfgCb,
781 RGDBGPRM(inst,(rgPBuf(inst), "VALIDATE SMAC LC RECONFIG: cellId %d ueId %d \
782 lcId %d cell %p ue %p ulLc %p\n",lchCfgCb->cellId,
783 lchCfgCb->crnti,lchCfgCb->lcId, (void*)*cell, (void*)*ue,
786 if ((((*cell = rgCb[inst].cell)) == NULLP)
787 || ((*cell)->cellId != lchCfgCb->cellId))
789 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Active Cell does not exist %d\n",lchCfgCb->crnti, lchCfgCb->cellId));
792 /* Fetch the Ue for dedicated channels */
793 if ((*ue = rgDBMGetUeCb(*cell, lchCfgCb->crnti)) == NULLP)
795 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Ue does not exist for dedicated logical channel\n",
799 if ((*ulLc = rgDBMGetUlDedLcCb((*ue), lchCfgCb->lcId)) == NULLP)
801 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Dedicated UL LC does not exist %d\n",
802 lchCfgCb->crnti, lchCfgCb->lcId));
805 /* if (lchCfgCb->ulLchRecfg.lcgId > (RG_MAX_LCG_PER_UE - 1))
807 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Invalid lcgId for uplink logical channel: lcg %d"
808 "lc %d\n",lchCfgCb->crnti, lchCfgCb->ulLchRecfg.lcgId, lchCfgCb->lcId));
812 } /*rgPomVltdModLch*/
814 * @brief Handler for the logical channel re-configuration request from
819 * Function : rgPomUeSCellLcMod
822 * - Update the dedicated logical channel Cb with the re-configured
824 * - If successful, return ROK else RFAILED.
826 * @param[in] Inst inst
827 * @param[in] RgUlUeCb *ue
828 * @param[in] RgUlLcCb *ulLc
829 * @param[in] RgPrgLchRecfgInfo *lchCfgCb
834 S16 rgPomUeSCellLcMod
839 RgPrgUeSCellLchModInfo *lchCfgCb
842 RGDBGPRM(inst,(rgPBuf(inst), "APPLYING SMAC LC RECONFIG: cellId %d ueId %d\
844 lchCfgCb->cellId, lchCfgCb->crnti, lchCfgCb->lcId));
846 if (ulLc->lcgId != lchCfgCb->ulLchRecfg.lcgId)
848 rgDBMUpdUlDedLcCb(ue, ulLc, lchCfgCb->ulLchRecfg.lcgId);
851 RGDBGINFO(inst,(rgPBuf(inst), "LC %d of Ue %d of cell %d Reconfigured\n",
852 lchCfgCb->lcId, ue->ueId, cell->cellId));
854 } /* rgPomUeSCellLcMod */
856 * @brief Function to validate SCellLchDel.
860 * Function : rgPomVltdDelLch
863 * @param[in] inst instance number to fetch rgCb instance
864 * @param[in] lchCfg Cb lchCfg CB for validation
865 * @param[out] cell cell control block
866 * @param[out] RgCellCb **cell
867 * @param[out] RgUeCb **ue
868 * @param[out] RgUlLcCb **ulLc
875 RgPrgUeSCellLchDelInfo *delLcCb,
882 RGDBGPRM(inst,(rgPBuf(inst), "VALIDATE SMAC LC RECONFIG: cellId %d ueId %d \
883 lcId %d cell %p ue %p ulLc %p\n",delLcCb->cellId,
884 delLcCb->crnti,delLcCb->lcId, (void*)*cell, (void*)*ue,
887 if ((((*cell = rgCb[inst].cell)) == NULLP)
888 || ((*cell)->cellId != delLcCb->cellId))
890 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Active Cell does not exist %d\n",delLcCb->crnti, delLcCb->cellId));
893 /* Fetch the Ue for dedicated channels */
894 if ((*ue = rgDBMGetUeCb(*cell, delLcCb->crnti)) == NULLP)
896 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Ue does not exist for dedicated logical channel\n",
900 if ((*ulLc = rgDBMGetUlDedLcCb((*ue), delLcCb->lcId)) == NULLP)
902 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Dedicated UL LC does not exist %d\n",
903 delLcCb->crnti, delLcCb->lcId));
906 if ((*dlLc = rgDBMGetDlDedLcCb((*ue), delLcCb->lcId)) == NULLP)
908 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]DL LC %d does not exist\n",
909 delLcCb->crnti, delLcCb->lcId));
913 } /*rgPomVltdDelLch*/
915 * @brief Handler for the logical channel delete request from
920 * Function : rgPomUeSCellLcDel
923 * - Fetch the logical channel control block.
924 * - Free the logical channel control block.
925 * - If successful, return ROK else return RFAILED.
927 * @param[in] Inst inst
928 * @param[in] RgPrgUeSCellLchDelInfo *delLcCb
929 * @param[in] RgUeCb *ue
930 * @param[in] RgUlLcCb *ulLc
935 S16 rgPomUeSCellLcDel
938 RgPrgUeSCellLchDelInfo *delLcCb,
945 RGDBGPRM(inst,(rgPBuf(inst), "APPLYING CRG LC DELETE: cellId %d ueId %d\
946 lcId %d dir %d\n", delLcCb->cellId,
947 delLcCb->crnti, delLcCb->lcId,
951 /* Validate downlink info */
952 if (delLcCb->dir & PRG_DIR_TX)
954 rgDBMDelDlDedLcCb(ue, dlLc);
958 /* Validate uplink info */
959 if (delLcCb->dir & PRG_DIR_RX)
961 rgDBMDelUlDedLcCb(ue, ulLc);
967 RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Invalid direction %d for LC Delete\n",
968 delLcCb->crnti, delLcCb->dir));
971 RGDBGINFONEW(inst,(rgPBuf(inst), "[%d]UE's Logical channel %d deleted from cell %d\n",
972 delLcCb->crnti, delLcCb->lcId,
975 } /* rgPomUeSCellLcDel */
977 /**********************************************************************
980 **********************************************************************/