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 /********************************************************************20**
21 Name: LTE RLC - Configuration Manager file
25 Desc: It contains the following configuraiton primtives
38 *********************************************************************21*/
39 static const char* RLOG_MODULE_NAME="CFG";
40 static int RLOG_MODULE_ID=2048;
41 static int RLOG_FILE_ID=191;
44 @brief RLC Downlink Configuration Module
48 /* header (.h) include files */
49 #include "common_def.h"
50 #include "lkw.h" /* LKW defines */
51 #include "ckw.h" /* CKW defines */
52 #include "kwu.h" /* KWU defines */
53 #include "rgu.h" /* RGU defines */
54 #include "kw_err.h" /* RLC error options */
55 #include "kw_env.h" /* RLC environment options */
56 #include "kw.h" /* RLC defines */
60 /* extern (.x) include files */
61 #include "lkw.x" /* LKW */
62 #include "ckw.x" /* CKW */
63 #include "kwu.x" /* KWU */
64 #include "rgu.x" /* RGU */
70 #define KW_MODULE KW_DBGMASK_CFG
71 /*Added for adding new Ue in onging L2 Meas*/
75 * @brief Handle modification of UE ID for L2 Meas data structs
78 * @param[in] ueId ue ID
85 PRIVATE S16 kwHdlMeasDlUeIdChg(RlcCb *gCb, U8 cellId,U8 oldUeId, U8 newUeId)
87 KwL2MeasEvtCb *measEvtCb = NULLP;
88 KwL2MeasCb *measCb = NULLP;
92 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
94 measEvtCb = &(gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr]);
95 measCb = &(measEvtCb->measCb);
98 if(measCb->measType & LKW_L2MEAS_DL_IP )
101 for(ueIdx = 0; ueIdx < measCb->val.ipThMeas.numUes; ueIdx++)
103 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == oldUeId)
105 measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId = newUeId;
116 * @brief Handler to delete an UE's L2 Meas ctxt
119 * @param[in] ueId ue ID
126 PRIVATE S16 kwDelFrmDlL2Meas(RlcCb *gCb, U8 cellId,U8 ueId)
128 KwL2MeasEvtCb *measEvtCb = NULLP;
129 KwL2MeasCb *measCb = NULLP;
134 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
136 measEvtCb = &gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr];
137 measCb = &(measEvtCb->measCb);
140 if(measCb->measType & LKW_L2MEAS_DL_IP )
143 for(ueIdx = 0; ((ueIdx < measCb->val.ipThMeas.numUes) &&
144 (ueIdx < gCb->genCfg.maxUe)); ueIdx++)
146 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == ueId)
148 measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid = FALSE;
149 if (measCb->val.ipThMeas.numUes-1 == ueIdx)
151 measCb->val.ipThMeas.numUes--;
163 PRIVATE S16 kwAddToDlL2Meas(RlcCb *gCb, RlcDlRbCb *kwRbCb,U8 cellId,U8 ueId)
165 KwL2MeasEvtCb *measEvtCb = NULLP;
166 KwL2MeasCb *measCb = NULLP;
172 #ifndef XEON_SPECIFIC_CHANGES
173 U8 freeIdx = gCb->genCfg.maxUe;
175 U16 freeIdx = LKW_MAX_UE;
179 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
181 measEvtCb = &gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr];
182 measCb = &(measEvtCb->measCb);
184 freeIdx = gCb->genCfg.maxUe;
186 if(measCb->measType &
187 (LKW_L2MEAS_ACT_UE | LKW_L2MEAS_UU_LOSS | LKW_L2MEAS_DL_DELAY))
189 for(cntr1 =0;((cntr1 < measCb->val.nonIpThMeas.numQci) &&
190 (cntr1 < LKW_MAX_QCI));cntr1++)
192 if(measCb->val.nonIpThMeas.qci[cntr1] != kwRbCb->qci)
194 measCb->val.nonIpThMeas.qci[cntr1] = kwRbCb->qci;
195 gCb->u.dlCb->kwL2Cb.measOn[kwRbCb->qci] |=measCb->measType;
201 if(((kwRbCb->rbL2Cb.measOn & measCb->measType) == LKW_L2MEAS_NONE))
203 if (measCb->measType & LKW_L2MEAS_ACT_UE)
205 if((kwRbCb->mode == CM_LTE_MODE_UM) &&
206 (kwRbCb->dir & KW_DIR_DL ))
208 if (kwRbCb->m.umDl.sduQ.count)
210 if (kwRbCb->ueCb->numActRb[kwRbCb->qci] == 0)
212 kwRbCb->ueCb->numActRb[kwRbCb->qci]++;
213 gCb->u.dlCb->kwL2Cb.numActUe[kwRbCb->qci]++;
217 else if (kwRbCb->mode == CM_LTE_MODE_AM)
219 if ((kwRbCb->m.amDl.cntrlBo) ||
220 (kwRbCb->m.amDl.retxBo) ||
223 if (kwRbCb->ueCb->numActRb[kwRbCb->qci] == 0)
225 kwRbCb->ueCb->numActRb[kwRbCb->qci]++;
226 gCb->u.dlCb->kwL2Cb.numActUe[kwRbCb->qci]++;
232 if((measCb->measType & LKW_L2MEAS_DL_IP))
235 for(ueIdx = 0; ((ueIdx < measCb->val.ipThMeas.numUes) &&
236 (ueIdx < gCb->genCfg.maxUe)); ueIdx++)
238 if ((freeIdx == gCb->genCfg.maxUe) &&
239 (measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid == FALSE))
244 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == ueId)
250 if (ueIdx == measCb->val.ipThMeas.numUes)
252 if (gCb->genCfg.maxUe == measCb->val.ipThMeas.numUes)
256 if (gCb->genCfg.maxUe == freeIdx)
258 measCb->val.ipThMeas.numUes++;
264 measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid = TRUE;
265 cmMemset((U8 *)&measCb->val.ipThMeas.ueInfoLst[ueIdx].measData[0],0x00,(sizeof(KwL2Cntr) *LKW_MAX_QCI));
266 measCb->val.ipThMeas.ueInfoLst[ueIdx].numQci = 0;
268 measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId = ueId;
269 measCb->val.ipThMeas.ueInfoLst[ueIdx].cellId = cellId;
270 numQci = &(measCb->val.ipThMeas.ueInfoLst[ueIdx].numQci);
272 for (qciIdx =0; ((qciIdx < *numQci) &&
273 (qciIdx < LKW_MAX_QCI)) ; qciIdx++)
275 if (measCb->val.ipThMeas.ueInfoLst[ueIdx].qci[qciIdx] == kwRbCb->qci)
281 /* Fix Klock Warning */
282 if ((qciIdx == *numQci) && (qciIdx < LKW_MAX_QCI))
284 measCb->val.ipThMeas.ueInfoLst[ueIdx].qci[qciIdx] = kwRbCb->qci;
288 kwUtlPlcMeasDatInL2Sts(&measCb->val.ipThMeas.ueInfoLst[ueIdx].measData[kwRbCb->qci],
289 &kwRbCb->rbL2Cb, measCb->measType);
291 else if (measCb->measType &
292 (LKW_L2MEAS_DL_DISC | LKW_L2MEAS_DL_DELAY | LKW_L2MEAS_UU_LOSS))
294 kwUtlPlcMeasDatInL2Sts(&measCb->val.nonIpThMeas.measData[kwRbCb->qci],
295 &kwRbCb->rbL2Cb, measCb->measType);
296 measCb->val.nonIpThMeas.qci[kwRbCb->qci] = kwRbCb->qci;
297 measCb->val.nonIpThMeas.measData[kwRbCb->qci].totDrbsPerQci++;
299 kwRbCb->rbL2Cb.measOn |= measCb->measType;
303 #endif /*LTE_L2_MEAS*/
307 * This primitive fills the RbCb
309 * @param [in] gCb - RLC Instance Control Block
310 * @param [out] rbCb - RB Control Block
311 * @param [out] ueCb - UE Control Block
312 * @param [in] entCfg - RLC Entity configuration
319 PRIVATE S16 rlcCfgFillDlRbCb
324 RlcEntCfgInfo *entCfg
327 PRIVATE S16 rlcCfgFillDlRbCb(gCb,rbCb,entCfg)
331 RlcEntCfgInfo *entCfg;
334 TRC3(rlcCfgFillDlRbCb)
336 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
337 "rlcCfgFillRbCb(ueId(%d),cellId(%d) rbType(%d))",
342 /* Initialize according to entMode */
343 switch (entCfg->entMode)
347 rbCb->lch.lChId = entCfg->lCh[0].lChId;
348 rbCb->lch.lChType = entCfg->lCh[0].type;
349 rbCb->dir = entCfg->dir;
355 rbCb->lch.lChId = entCfg->lCh[0].lChId;
356 rbCb->lch.lChType = entCfg->lCh[0].type;
357 rbCb->dir = entCfg->dir;
358 rbCb->m.umDl.snLen = entCfg->m.umInfo.dl.snLen;
359 if (entCfg->m.umInfo.dl.snLen == KW_UM_CFG_5BIT_SN_LEN)
360 rbCb->m.umDl.modBitMask = 0x1f;
362 rbCb->m.umDl.modBitMask = 0x3ff;
364 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
370 /* Down Link Information
371 * indx = 0 as Down Link */
372 rbCb->lch.lChId = entCfg->lCh[0].lChId;
373 rbCb->lch.lChType = entCfg->lCh[0].type;
374 rbCb->dir = KW_DIR_BOTH;
375 rbCb->m.amDl.pollPdu = entCfg->m.amInfo.dl.pollPdu;
376 rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
377 rbCb->m.amDl.maxRetx = entCfg->m.amInfo.dl.maxRetx;
378 rbCb->m.amDl.pollRetxTmrInt = entCfg->m.amInfo.dl.pollRetxTmr;
379 rbCb->m.amDl.snLen = entCfg->m.amInfo.dl.snLen;
381 if(KW_AM_CFG_12BIT_SN_LEN == rbCb->m.amDl.snLen)
383 rbCb->m.amDl.snModMask = (1 << KW_SN_LEN_12BITS) - 1; /* 5GNR */
387 rbCb->m.amDl.snModMask = (1 << KW_SN_LEN_18BITS) - 1; /* 5GNR */
390 cmInitTimers(&(rbCb->m.amDl.pollRetxTmr), 1);
393 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
398 rbCb->m.amDl.txBufLst,
399 (KW_TX_BUF_BIN_SIZE * sizeof(CmLListCp)));
400 for(hashIndex = 0; hashIndex < KW_TX_BUF_BIN_SIZE; hashIndex++)
402 cmLListInit(&(rbCb->m.amDl.txBufLst[hashIndex]));
409 RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId,
410 "Invalid RB Mode ueId(%d),cellId(%d)",
416 rbCb->mode = entCfg->entMode;
417 rbCb->discTmrInt = entCfg->discardTmr;
424 * @brief This primitive Initializes the RB Cb
426 * @param [in] gCb - RLC Instance Control Block
427 * @param [out] rbCb - RB Control Block
428 * @param [in] ptr - Void pointer
429 * @param [in] entCfg - Entity Configuration
436 PRIVATE S16 rlcCfgUpdateDlRb
441 RlcEntCfgInfo *entCfg
444 PRIVATE S16 rlcCfgUpdateDlRb(gCb,rbCb, ptr, entCfg)
448 RlcEntCfgInfo *entCfg;
451 TRC3(rlcCfgUpdateDlRb)
453 if (rbCb->mode != entCfg->entMode)
455 RLOG_ARG4(L_ERROR,DBG_RBID,rbCb->rlcId.rbId,
456 "RB Mode Mismatch : exp [%d] rcv [%d] UEID:%d CELLID:%d",
461 return (CKW_CFG_REAS_RB_MODE_MIS);
468 RlcDlCellCb *cellCb = (RlcDlCellCb *)ptr;
470 rbCb->dir = entCfg->dir;
471 rbCb->lch.lChId = entCfg->lCh[0].lChId;
472 rbCb->lch.lChType = entCfg->lCh[0].type;
474 cellCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
480 RlcDlUeCb *ueCb = (RlcDlUeCb *)ptr;
482 if (entCfg->lCh[0].type == CM_LTE_LCH_DCCH)
484 return (CKW_CFG_REAS_LCHTYPE_MIS);
486 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = NULLP;
487 ueCb->lCh[entCfg->lCh[0].lChId - 1].dlRbCb = rbCb;
489 rbCb->lch.lChId = entCfg->lCh[0].lChId;
490 rbCb->lch.lChType = entCfg->lCh[0].type;
491 rbCb->dir = entCfg->dir;
497 RlcDlUeCb *ueCb = (RlcDlUeCb *)ptr;
499 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = NULLP;
500 ueCb->lCh[entCfg->lCh[1].lChId - 1].dlRbCb = rbCb;
503 rbCb->lch.lChId = entCfg->lCh[1].lChId;
504 rbCb->lch.lChType = entCfg->lCh[1].type;
505 rbCb->m.amDl.pollRetxTmrInt = entCfg->m.amInfo.dl.pollRetxTmr;
506 rbCb->m.amDl.pollPdu = entCfg->m.amInfo.dl.pollPdu;
507 rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
508 rbCb->m.amDl.maxRetx = entCfg->m.amInfo.dl.maxRetx;
515 rbCb->discTmrInt = entCfg->discardTmr;
517 return (CKW_CFG_REAS_NONE);
523 * This primitive adds new RB in Ue/Cell Cb.
526 * This function does following steps -
527 * - If UE ID is 0 then
528 * - Check for CELL CB is present
529 * - If yes, Check for RB ID
530 * - If RB ID is present Status Indication with reason
531 * - Else, Create New RB CB in CELL CB
532 * - If no Create New CELL CB and RB CB
534 * - Check for UE CB is present
535 * - If yes Check for RB ID
536 * - If RB ID is present Status Indication with reason
537 * - Else, Create New RB CB in UE CB
538 * - If no Create New UE CB and RB CB
539 * - Fill entity confirmation
541 * @param [in] gCb - RLC Instance Control Block
542 * @param [in] ueId - UE Identifier
543 * @param [in] cellId - CELL Identifier
544 * @param [in] entCfg - Entity Configuration to be done.
545 * @param [out] entCfm - Entity Confirmation.
552 PUBLIC S16 rlcCfgAddDlRb
557 RlcEntCfgInfo *entCfg,
558 RlcEntCfgCfmInfo *entCfm
561 PUBLIC S16 rlcCfgAddDlRb(gCb,ueId, cellId, entCfg, entCfm)
565 RlcEntCfgInfo *entCfg;
566 RlcEntCfgCfmInfo *entCfm;
569 RlcDlUeCb *ueCb = NULLP; /* UE Control Block */
570 RlcDlCellCb *cellCb; /* Cell Control Block */
571 RlcDlRbCb *kwRbCb; /* KW RB Control Block */
572 U8 reason; /* Rb Identifier */
576 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
577 "rlcCfgAddRb(cellId(%d),UEID:%d cfgType(%d))",
584 /* Fill entCfm structure */
585 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
586 CKW_CFG_REAS_CELL_UNKWN);
587 RLOG_ARG1(L_ERROR,DBG_RBID,entCfg->rbId,
588 "Add DLRb,CellId is 0 for UEID:%d",
592 if ((entCfg->rguSapId >= gCb->genCfg.maxRguSaps) || (entCfg->rguSapId < 0))
594 KWDBGP_ERROR(gCb, "rlcCfgAddDlRb(ueId(%u), cellId(%u), Invalid rguSapId (%d)\n",
595 ueId, cellId, entCfg->rguSapId);
600 /* Process Adding new RB */
603 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
605 /* Fill entCfm structure */
606 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
608 CKW_CFG_REAS_RB_UNKWN);
609 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId,
610 "Invalid RbId ,Max is [%d] CELLID:%d UEID:%d",
617 if (((entCfg->lCh[0].type == CM_LTE_LCH_BCCH) ||
618 (entCfg->lCh[0].type == CM_LTE_LCH_PCCH) ||
619 (entCfg->lCh[0].type == CM_LTE_LCH_CCCH)) &&
620 (entCfg->entMode == CM_LTE_MODE_TM))
622 /* Cell CB present */
623 kwDbmFetchDlCellCb(gCb, cellId, &cellCb);
626 /* Get rbCb from cellCb->rbCb List */
627 if (( cellCb->rbCb[entCfg->rbId] != NULLP))
629 /* Fill entCfm structure */
630 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
632 CKW_CFG_REAS_RB_PRSNT);
633 RLOG_ARG2(L_WARNING, DBG_CELLID,cellId,
634 "RbId [%d] already exists UEID:%d",
640 else /* Cell CB UNKNOWN */
643 if ( ROK != kwDbmCreateDlCellCb(gCb,cellId, &cellCb))
645 /* Fill entCfm structure */
646 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
648 CKW_CFG_REAS_CELL_CREAT_FAIL);
649 RLOG_ARG2(L_ERROR,DBG_CELLID,cellId,
650 "cellCb Creation failed RBID:%d UEID:%d",
658 if(entCfg->lCh[0].lChId <= 0)
660 RLOG_ARG3(L_ERROR,DBG_LCID,entCfg->lCh[0].lChId ,
661 "Invalid LcId CELLID:%d UEID:%d RBID:%d",
665 /* Fill entCfm structure */
666 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
667 CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_LCHID);
672 RLC_ALLOC(gCb,kwRbCb, sizeof (RlcDlRbCb));
675 RLOG_ARG2(L_FATAL,DBG_UEID,ueId,
676 "Memory allocation failed for rbId:%d CELLID:%d",
679 /* Fill entCfm structure */
680 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
681 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_CREAT_FAIL);
684 kwRbCb->rlcId.rbId = entCfg->rbId;
685 cellCb->rbCb[entCfg->rbId] = kwRbCb;
686 KW_LMM_RB_STS_INC(gCb);
687 cellCb->lCh[entCfg->lCh[0].lChId - 1].dlRbCb = kwRbCb;
691 reason= (entCfg->entMode != CM_LTE_MODE_TM)? CKW_CFG_REAS_RB_MODE_MIS:
692 CKW_CFG_REAS_LCHTYPE_MIS;
693 /* Fill entCfm structure */
694 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
695 CKW_CFG_CFM_NOK, reason);
701 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
703 /* Fill entCfm structure */
704 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
705 CKW_CFG_REAS_RB_UNKWN);
706 RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId,
707 "Invalid RbId for RbType[%d] UEID:%d",
712 if ((((entCfg->lCh[0].type == CM_LTE_LCH_DCCH) &&
713 (entCfg->entMode != CM_LTE_MODE_UM) &&
714 (CM_LTE_SRB == entCfg->rbType)) ||
715 ((entCfg->lCh[0].type == CM_LTE_LCH_DTCH) &&
716 (CM_LTE_DRB == entCfg->rbType))) &&
717 (entCfg->entMode != CM_LTE_MODE_TM))
720 if ( kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb) == ROK)
722 /* Get rbCb from ueCb->rbCb list */
723 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, kwRbCb);
725 if(( kwRbCb != NULLP))
727 /* Fill entCfm structure */
728 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
729 CKW_CFG_REAS_RB_PRSNT);
730 RLOG_ARG2(L_WARNING, DBG_UEID, ueId,
731 "CellId[%u]:rbId [%d] already exists",
737 else /* UE CB UNKNOWN */
740 if ( kwDbmCreateDlUeCb(gCb,ueId, cellId, &ueCb) != ROK)
742 /* Fill entCfm structure */
743 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
744 CKW_CFG_REAS_UE_CREAT_FAIL);
745 RLOG_ARG2(L_WARNING, DBG_CELLID,cellId,
746 "UeId [%u]:ueCb Creation Failed RBID:%d",
753 /* Validate LChId for UM and AM modes */
754 if ((entCfg->lCh[0].lChId <= 0) ||
755 ((entCfg->entMode == CM_LTE_MODE_AM)&&
756 (entCfg->lCh[1].lChId <= 0)))
758 /* Fill entCfm structure */
759 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
760 CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_LCHID);
765 RLC_ALLOC(gCb,kwRbCb, sizeof (RlcDlRbCb));
768 /* Fill entCfm structure */
769 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,CKW_CFG_CFM_NOK,
770 CKW_CFG_REAS_RB_CREAT_FAIL);
771 RLOG_ARG2(L_FATAL,DBG_UEID,ueId,
772 "Memory allocation failed RBID:%d CELLID:%d",
778 /* copy the RB Cb into UECb */
779 kwRbCb->rlcId.rbId = entCfg->rbId;
780 if(entCfg->rbType == CM_LTE_SRB)
781 ueCb->srbCb[entCfg->rbId] = kwRbCb;
783 ueCb->drbCb[entCfg->rbId] = kwRbCb;
785 KW_LMM_RB_STS_INC(gCb);
790 if (entCfg->entMode == CM_LTE_MODE_TM)
792 reason = CKW_CFG_REAS_RB_MODE_MIS;
796 reason = CKW_CFG_REAS_LCHTYPE_MIS;
799 /* Fill entCfm structure */
800 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, reason);
806 kwRbCb->rlcId.cellId = cellId;
807 kwRbCb->rlcId.ueId = ueId;
808 kwRbCb->rlcId.rbType = entCfg->rbType;
809 kwRbCb->inst = gCb->init.inst;
810 #ifdef TENB_MULT_CELL_SUPPRT
811 kwRbCb->rguSapId = entCfg->rguSapId;
816 if (rlcCfgFillDlRbCb(gCb,kwRbCb, ueCb, entCfg) != ROK)
818 /* Fill entCfm structure */
819 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
820 CKW_CFG_REAS_RB_CREAT_FAIL);
822 /* Delete RB CB created */
823 RLC_FREE(gCb,kwRbCb, sizeof(RlcDlRbCb));
824 RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId,
825 "Filling of RbCb failed UEID:%d CELLID:%d",
830 kwRbCb->qci = entCfg->qci;
833 if (entCfg->lCh[0].type == CM_LTE_LCH_DTCH)
836 kwAddToDlL2Meas(gCb, kwRbCb,cellId,ueId);
838 #endif /* LTE_L2_MEAS */
840 /* Fill entCfm structure */
841 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
849 * This primitive reconfigures the existing RB in Ue/Cell Cb.
852 * This primitive executes following steps in reconfiguration of existing
854 * - If UE ID is 0 then
855 * - Check for CELL CB is present
856 * - If yes, Check for RB ID
857 * - If RB ID is present Reconfigure the RB CB
858 * - Else, Status Indication with Reason
859 * - Else, Status Indication with Reason
861 * - Check for UE CB is present
862 * - If yes, Check for RB ID
863 * - If RB ID is prenset Reconfigure the CELL CB
864 * - Else, Status Indication with Reason
865 * - Else, Status Indication with Reason
866 * - Fill entity confirmation
868 * @param [in] gCb - RLC Instance Control Block
869 * @param [in] ueId - UE Identifier
870 * @param [in] cellId - CELL Identifier
871 * @param [in] entCfg - Entity Configuration to be done.
872 * @param [out] entCfm - Entity Confirmation
879 PUBLIC S16 rlcCfgReCfgDlRb
884 RlcEntCfgInfo *entCfg,
885 RlcEntCfgCfmInfo *entCfm
888 PUBLIC S16 rlcCfgReCfgDlRb(gCb,ueId, cellId, entCfg, entCfm)
892 RlcEntCfgInfo *entCfg;
893 RlcEntCfgCfmInfo *entCfm;
896 RlcDlRbCb *rbCb; /* RB Control Block */
897 RlcDlRbCb tRbCb; /* KW RB Control Block */
898 RlcDlCellCb *cellCb; /* Cell Control Block */
899 RlcDlUeCb *ueCb; /* Ue Control Block */
902 TRC3(rlcCfgReCfgDlRb)
904 RLOG_ARG3(L_DEBUG,DBG_UEID,ueId,
905 "rlcCfgReCfgRb(cellId(%d), cfgType(%d)) RBID:%d",
906 cellId, entCfg->cfgType,entCfg->rbId);
909 /* Check for UeCb or CellCb */
912 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
914 /* Fill entCfm structure */
915 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
916 CKW_CFG_REAS_RB_UNKWN);
917 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId,
918 "Invalid RbId , Max is [%d] UEID:%d CELLID:%d",
925 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
928 /* Fill entCfm structure */
929 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
930 CKW_CFG_REAS_CELL_UNKWN);
931 RLOG_ARG3(L_ERROR,DBG_CELLID,cellId,
932 "CellCb not found ueId:%d RBID:%d CELLID:%d",
940 KW_DBM_GET_CELL_RBCB(entCfg->rbId, cellCb->rbCb, rbCb);
944 /* Fill entCfm structure */
945 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
946 CKW_CFG_REAS_RB_UNKWN);
947 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
948 "CELLID:%d RBID:%d not found",
954 /* Take backup of rbCb before updating.
955 * Because in failure case restore original rbCb
957 cmMemcpy((U8 *)&tRbCb, (U8 *)rbCb, sizeof(RlcDlRbCb));
960 ret = rlcCfgUpdateDlRb(gCb,rbCb, cellCb,entCfg);
963 /* Fill entCfm structure */
964 KW_CFG_FILL_CFG_CFM(entCfm,
970 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
971 "CELLID:%u RBID:%d updation failed",
974 cmMemcpy((U8*)rbCb, (U8 *)&tRbCb, sizeof(RlcDlRbCb));
981 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
983 /* Fill entCfm structure */
984 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
985 CKW_CFG_REAS_RB_UNKWN);
986 RLOG_ARG3(L_ERROR,DBG_UEID,ueId,
987 "CELLID:%d Invalid RBID:%d for RbType[%d]",
994 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
997 /* Fill entCfm structure */
998 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
999 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1000 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1001 "UEID:%d UeCb not found RBID:%d",
1008 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, rbCb);
1012 /* Fill entCfm structure */
1013 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1014 CKW_CFG_REAS_RB_UNKWN);
1015 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1016 "CELLID:%d RBID:%d not found",
1022 /* Take backup of rbCb before updating.
1023 * Because in failure case restore original rbCb
1025 cmMemcpy((U8 *)&tRbCb, (U8 *)rbCb, sizeof(RlcDlRbCb));
1028 ret = rlcCfgUpdateDlRb(gCb,rbCb,ueCb, entCfg);
1029 if (ret != CKW_CFG_REAS_NONE)
1031 /* Fill entCfm structure */
1032 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1034 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
1035 "CELLID:%d RBID:%d updation failed",
1038 cmMemcpy((U8*)rbCb, (U8 *)&tRbCb, sizeof(RlcDlRbCb));
1044 /* Fill entCfm structure */
1045 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1052 * @brief This primitive deletes the existing RB in Ue/Cell Cb.
1055 * - If UE ID is 0 then
1056 * - Check for CELL CB is present
1057 * - If yes, Check for RB ID
1058 * - If RB ID is prenset Delete the RB CB
1059 * - If there is no RB CB exist in CELL CB then Delete CELL CB.
1060 * - Else, Status Indication with Reason
1061 * - Else, Status Indication with Reason
1063 * - Check for UE CB is present
1064 * - If yes, Check for RB ID
1065 * - If RB ID is prenset Delete the RB CB
1066 * - If there is no RB CB exist in UE CB then Delete UE CB.
1067 * - Else, Status Indication with Reason
1068 * - Else, Status Indication with Reason
1069 * - Fill entity confirmation
1071 * @param [in] gCb - RLC Instance Control Block
1072 * @param [in] ueId - UE Identifier
1073 * @param [in] cellId - CELL Identifier
1074 * @param [in] entCfg - Entity Configuration to be done.
1075 * @param [out] entCfm - Entity Confirmation
1082 PUBLIC S16 rlcCfgDelDlRb
1087 RlcEntCfgInfo *entCfg,
1088 RlcEntCfgCfmInfo *entCfm
1091 PUBLIC S16 rlcCfgDelRb(gCb,ueId, cellId, entCfg, entCfm)
1095 RlcEntCfgInfo *entCfg;
1096 RlcEntCfgCfmInfo *entCfm;
1099 S16 ret; /* Return Value */
1100 RlcDlUeCb *ueCb; /* UE Control Block */
1101 RlcDlCellCb *cellCb; /* UE Control Block */
1102 RlcDlRbCb *kwRbCb; /* KW RB Control Block */
1106 RLOG_ARG3(L_DEBUG,DBG_UEID,ueId,
1107 "rlcCfgDelRb(RBID(%d), cellId(%d), cfgType(%d))",
1114 /* Get cellCb and delete rbCb from it */
1117 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
1119 /* Fill entCfm structure */
1120 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1121 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1122 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId ,
1123 "Invalid RbId, Max is [%d] UEID:%d CELLID:%d",
1130 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
1133 /* Fill entCfm structure */
1134 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1135 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1136 RLOG_ARG2(L_ERROR,DBG_CELLID,cellId,
1137 "CellCb not found UEID:%d RBID:%d",
1144 KW_DBM_GET_CELL_RBCB(entCfg->rbId, cellCb->rbCb, kwRbCb);
1146 if ( kwRbCb == NULLP)
1148 /* Fill entCfm structure */
1149 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1150 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1151 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1152 "CellId[%u]:RbId[%d] not found",
1158 /* Assign NULLP to rbCb in rbCbLst */
1159 cellCb->rbCb[entCfg->rbId] = NULLP;
1161 /* Assign NULLP to dlRbCb/ulRbCb.
1162 * Delete Hashlist allocated for it if any */
1163 cellCb->lCh[kwRbCb->lch.lChId - 1].dlRbCb = NULLP;
1164 RLC_FREE(gCb,kwRbCb, sizeof(RlcDlRbCb)); /*Vartika: Mem leak fix */
1166 /* Get ueCb and delete rbCb from it */
1169 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
1171 /* Fill entCfm structure */
1172 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1173 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1174 RLOG_ARG3(L_ERROR,DBG_RBID, entCfg->rbId,
1175 "Invalid RbId for RbType[%d] UEID:%d CELLID:%d",
1183 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
1186 /* Fill entCfm structure */
1187 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1188 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1189 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1190 "UeId [%d]: UeCb not found RBID:%d",
1197 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, kwRbCb);
1199 if ( kwRbCb == NULLP)
1201 /* Fill entCfm structure */
1202 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1203 CKW_CFG_REAS_RB_UNKWN);
1204 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1205 "CellId[%u]:RbId[%d] not found",
1211 ueCb->lCh[kwRbCb->lch.lChId - 1].dlRbCb = NULLP;
1214 KW_UPD_L2_DECR_NONIP_PER_QCI_RB_COUNT(gCb, kwRbCb);
1216 /* Free the Buffers of RbCb */
1217 if( CM_LTE_MODE_UM == kwRbCb->mode)
1219 kwUmmFreeDlRbCb(gCb,kwRbCb);
1221 RLC_FREE(gCb,kwRbCb, sizeof(RlcDlRbCb));
1223 else if( CM_LTE_MODE_AM == kwRbCb->mode)
1225 kwAmmFreeDlRbCb(gCb,kwRbCb);
1228 /* Assign NULLP to rbCb in rbCbLst */
1229 if ( entCfg->rbType == CM_LTE_SRB )
1231 ueCb->srbCb[entCfg->rbId] = NULLP;
1235 ueCb->drbCb[entCfg->rbId] = NULLP;
1239 KW_LMM_RB_STS_DEC(gCb);
1241 /* Fill entCfm structure */
1242 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK,
1250 * @brief This primitive re-establish the existing RB in Ue/Cell Cb.
1253 * - If UE ID is 0 then
1254 * - Check for CELL CB is present
1255 * - If yes, Check for RB ID
1256 * - If RB ID is prenset initialize the parameters of the RB CB
1257 * - Else, Status Indication with Reason
1258 * - Else, Status Indication with Reason
1260 * - Check for UE CB is present
1261 * - If yes, Check for RB ID
1262 * - If RB ID is prenset initialize the parameters of the RB CB
1263 * - Else, Status Indication with Reason
1264 * - Else, Status Indication with Reason
1265 * - Fill entity confirmation
1267 * @param [in] gCb - RLC Instance Control Block
1268 * @param [in] ueId - UE Identifier
1269 * @param [in] cellId - CELL Identifier
1270 * @param [in] entCfg - Entity Configuration to be done.
1271 * @param [out] entCfm - Entity Confirmation
1278 PUBLIC S16 rlcCfgReEstDlRb
1284 RlcEntCfgInfo *entCfg,
1285 RlcEntCfgCfmInfo *entCfm
1288 PUBLIC S16 rlcCfgReEstDlRb(gCb,ueId, cellId,sndReEstInd,entCfg, entCfm)
1293 RlcEntCfgInfo *entCfg;
1294 RlcEntCfgCfmInfo *entCfm;
1297 RlcDlRbCb *rbCb; /* RB Control Block */
1298 CmLteRlcId rlcId; /* RLC Identifier */
1300 TRC3(rlcCfgReEstDlRb)
1302 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
1303 "rlcCfgReEstDlRb(ueId(%d), cellId(%d), cfgType(%d))",
1310 rlcId.cellId = cellId;
1311 rlcId.rbId = entCfg->rbId;
1312 rlcId.rbType = entCfg->rbType;
1314 kwDbmFetchDlRbCbByRbId(gCb,&rlcId, &rbCb);
1317 /* Fill entCfm structure */
1318 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, rlcId.rbType, CKW_CFG_CFM_NOK,
1319 CKW_CFG_REAS_RB_UNKWN);
1320 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1321 "CellId[%u]:RbId[%d] not found",
1327 rbCb->rlcId.ueId = ueId;
1331 case CM_LTE_MODE_TM:
1333 rlcDlTmmReEstablish(gCb,rbCb);
1337 case CM_LTE_MODE_UM:
1339 rlcDlUmmReEstablish(gCb,rlcId,sndReEstInd,rbCb);
1343 case CM_LTE_MODE_AM:
1345 kwAmmDlReEstablish(gCb, rlcId, rbCb);
1350 /* Fill entCfm structure */
1351 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1352 CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1359 * @brief This primitive deletes the RBs in Ue Cb.
1362 * - If UE ID is 0 then
1363 * - Status Indication with Reason
1365 * - Check for UE CB is present
1366 * - If yes, Delete all RB CB in UE CB and Delete UE CB also.
1367 * - Else, Status Indication with Reason
1368 * - Fill entity confirmation
1370 * @param [in] gCb - RLC Instance Control Block
1371 * @param [in] ueId - UE Identifier
1372 * @param [in] cellId - CELL Identifier
1373 * @param [in] entCfg - Entity Configuration to be done.
1374 * @param [out] entCfm - Entity Confirmation
1381 PUBLIC S16 rlcCfgDelDlUe
1386 RlcEntCfgInfo *entCfg,
1387 RlcEntCfgCfmInfo *entCfm
1390 PUBLIC S16 rlcCfgDelDlUe(ueId, cellId, entCfg, entCfm)
1394 RlcEntCfgInfo *entCfg;
1395 RlcEntCfgCfmInfo *entCfm;
1398 S16 ret; /* Return Value */
1399 RlcDlUeCb *ueCb; /* UE Control Block */
1403 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
1404 "rlcCfgDelUe(ueId(%d), cellId(%d), cfgType(%d))",
1411 /* Check for ueId is present or not */
1414 /* Fill entCfm structure */
1415 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1416 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1417 RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId,
1418 "ueId(%d), cellId(%d)",
1425 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
1428 /* Fill entCfm structure */
1429 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1430 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1431 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1432 "UEID:%d UeCb not found RBID:%d",
1439 kwDelFrmDlL2Meas(gCb,cellId,ueId);
1440 kwDbmDelAllDlL2MeasTbFrmUe(gCb,ueCb);
1443 kwDbmDelDlUeCb(gCb,ueCb, FALSE);
1445 /* Fill entCfm structure */
1446 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1447 CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1454 * @brief This primitive deletes the RBs in Ue Cb.
1457 * - If CELL ID is 0 then
1458 * - Status Indication with Reason
1460 * - Check for CELL CB is present
1461 * - If yes, Delete all RB CB in CELL CB and Delete CELL CB also.
1462 * - Else, Status Indication with Reason
1463 * - Fill entity confirmation
1465 * @param [in] cellId - CELL Identifier
1466 * @param [in] entCfg - Entity Configuration to be done.
1467 * @param [out] entCfm - Entity Confirmation
1474 PUBLIC S16 rlcCfgDelDlCell
1478 RlcEntCfgInfo *entCfg,
1479 RlcEntCfgCfmInfo *entCfm
1482 PUBLIC S16 rlcCfgDelCell(gCb,cellId, entCfg, entCfm)
1485 RlcEntCfgInfo *entCfg;
1486 RlcEntCfgCfmInfo *entCfm;
1489 RlcDlCellCb *cellCb; /* UE Control Block */
1490 U8 rbId; /* RB Identifier */
1494 RLOG_ARG2(L_DEBUG,DBG_RBID,entCfg->rbId,
1495 "rlcCfgDelCell( cellId(%d), cfgType(%d)",
1500 rbId = entCfg->rbId;
1502 /* Check for ueId is present or not */
1505 /* Fill entCfm structure */
1506 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1507 CKW_CFG_REAS_CELL_UNKWN);
1508 RLOG_ARG1(L_DEBUG,DBG_RBID,entCfg->rbId,
1509 "cellId is 0 (%d) ",
1515 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
1518 /* Fill entCfm structure */
1519 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1520 CKW_CFG_REAS_CELL_UNKWN);
1521 RLOG_ARG1(L_ERROR, DBG_CELLID,cellId,
1522 "CellCb not found for RBID:%d",
1528 kwDbmDelDlCellCb(gCb,cellCb);
1530 /* Fill entCfm structure */
1531 /* kw005.201 added support for L2 Measurement */
1532 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_OK,
1539 * @brief This primitive changes the ueId of Ue Cb.
1542 * - If oldUeId and newUeId are
1543 * - Confirm the Status with Reason
1544 * - If UeId not present
1545 * - Confirm the Status with Reason
1547 * - Copy rbCbs from old UeCb to new UeCb
1549 * - Fill entity confirmation
1551 * @param [in] ueInfo - Old UE Information
1552 * @param [in] newUeInfo - New UE Information
1553 * @param [out] status - Status
1560 PUBLIC S16 rlcCfgDlUeIdChng
1564 CkwUeInfo *newUeInfo,
1568 PUBLIC S16 rlcCfgDlUeIdChng(gCb,ueInfo,newUeInfo,status)
1571 CkwUeInfo *newUeInfo;
1576 /*kw004.201 Adding of Missing Trace in LTE RLC PDCP*/
1577 TRC3(rlcCfgUeIdChng)
1579 if ( (ueInfo->ueId == newUeInfo->ueId) &&
1580 (ueInfo->cellId == newUeInfo->cellId))
1582 status->reason = CKW_CFG_REAS_SAME_UEID;
1583 status->status = CKW_CFG_CFM_NOK;
1584 RLOG_ARG2(L_ERROR,DBG_CELLID,ueInfo->cellId,
1585 "Old UeId[%d] same as new UeId[%d]",
1591 if(ROK == kwDbmFetchDlUeCb(gCb,newUeInfo->ueId, newUeInfo->cellId, &ueCb))
1593 RLOG_ARG1(L_ERROR, DBG_CELLID, newUeInfo->cellId,
1594 "NewUeId[%d]:ueCb already exists",
1596 status->reason = CKW_CFG_REAS_UE_EXISTS;
1597 status->status = CKW_CFG_CFM_NOK;
1601 if(ROK != kwDbmFetchDlUeCb(gCb,ueInfo->ueId, ueInfo->cellId, &ueCb))
1604 RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId,
1605 "UeId [%d]: UeCb not found",
1607 status->reason = CKW_CFG_REAS_UE_UNKWN;
1608 status->status = CKW_CFG_CFM_NOK;
1613 kwHdlMeasDlUeIdChg(gCb, ueInfo->cellId, ueInfo->ueId, newUeInfo->ueId);
1615 if(ROK != cmHashListDelete(&(gCb->u.dlCb->ueLstCp), (PTR) ueCb))
1617 RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId,
1618 "UeId[%u] HashList Deletion Failed",
1620 status->reason = CKW_CFG_REAS_UE_CREAT_FAIL;
1621 status->status = CKW_CFG_CFM_NOK;
1625 /* update the hash key with new values */
1626 ueCb->ueId = newUeInfo->ueId;
1627 ueCb->cellId = newUeInfo->cellId;
1629 if(ROK != cmHashListInsert(&(gCb->u.dlCb->ueLstCp),
1630 (PTR)ueCb, (U8 *)&(ueCb->ueId),
1631 (U16) sizeof(CmLteRnti)))
1634 RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId,
1635 "UeId[%u] HashList Insertion Failed",
1637 status->reason = CKW_CFG_REAS_UE_CREAT_FAIL;
1638 status->status = CKW_CFG_CFM_NOK;
1645 /********************************************************************30**
1648 **********************************************************************/