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 "envopt.h" /* environment options */
50 #include "envdep.h" /* environment dependent */
51 #include "envind.h" /* environment independent */
53 #include "gen.h" /* general */
54 #include "ssi.h" /* system services */
55 #include "cm5.h" /* common timer defines */
56 #include "cm_tkns.h" /* common tokens defines */
57 #include "cm_mblk.h" /* common memory allocation library defines */
58 #include "cm_llist.h" /* common link list defines */
59 #include "cm_hash.h" /* common hash list defines */
60 #include "cm_lte.h" /* common LTE defines */
61 #include "lkw.h" /* LKW defines */
62 #include "ckw.h" /* CKW defines */
63 #include "kwu.h" /* KWU defines */
64 #include "rgu.h" /* RGU defines */
65 #include "kw_err.h" /* RLC error options */
66 #include "kw_env.h" /* RLC environment options */
67 #include "kw.h" /* RLC defines */
71 /* extern (.x) include files */
72 #include "gen.x" /* general */
73 #include "ssi.x" /* system services */
75 #include "cm5.x" /* common timer library */
76 #include "cm_tkns.x" /* common tokens */
77 #include "cm_mblk.x" /* common memory allocation */
78 #include "cm_llist.x" /* common link list */
79 #include "cm_hash.x" /* common hash list */
80 #include "cm_lte.x" /* common LTE includes */
81 #include "cm_lib.x" /* common memory allocation library */
82 #include "lkw.x" /* LKW */
83 #include "ckw.x" /* CKW */
84 #include "kwu.x" /* KWU */
85 #include "rgu.x" /* RGU */
91 #define KW_MODULE KW_DBGMASK_CFG
92 /*Added for adding new Ue in onging L2 Meas*/
96 * @brief Handle modification of UE ID for L2 Meas data structs
99 * @param[in] ueId ue ID
106 PRIVATE S16 kwHdlMeasDlUeIdChg(KwCb *gCb, U8 cellId,U8 oldUeId, U8 newUeId)
108 KwL2MeasEvtCb *measEvtCb = NULLP;
109 KwL2MeasCb *measCb = NULLP;
113 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
115 measEvtCb = &(gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr]);
116 measCb = &(measEvtCb->measCb);
119 if(measCb->measType & LKW_L2MEAS_DL_IP )
122 for(ueIdx = 0; ueIdx < measCb->val.ipThMeas.numUes; ueIdx++)
124 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == oldUeId)
126 measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId = newUeId;
137 * @brief Handler to delete an UE's L2 Meas ctxt
140 * @param[in] ueId ue ID
147 PRIVATE S16 kwDelFrmDlL2Meas(KwCb *gCb, U8 cellId,U8 ueId)
149 KwL2MeasEvtCb *measEvtCb = NULLP;
150 KwL2MeasCb *measCb = NULLP;
155 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
157 measEvtCb = &gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr];
158 measCb = &(measEvtCb->measCb);
161 if(measCb->measType & LKW_L2MEAS_DL_IP )
164 for(ueIdx = 0; ((ueIdx < measCb->val.ipThMeas.numUes) &&
165 (ueIdx < gCb->genCfg.maxUe)); ueIdx++)
167 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == ueId)
169 measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid = FALSE;
170 if (measCb->val.ipThMeas.numUes-1 == ueIdx)
172 measCb->val.ipThMeas.numUes--;
184 PRIVATE S16 kwAddToDlL2Meas(KwCb *gCb, KwDlRbCb *kwRbCb,U8 cellId,U8 ueId)
186 KwL2MeasEvtCb *measEvtCb = NULLP;
187 KwL2MeasCb *measCb = NULLP;
193 #ifndef XEON_SPECIFIC_CHANGES
194 U8 freeIdx = gCb->genCfg.maxUe;
196 U16 freeIdx = LKW_MAX_UE;
200 for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
202 measEvtCb = &gCb->u.dlCb->kwL2Cb.kwL2EvtCb[cntr];
203 measCb = &(measEvtCb->measCb);
205 freeIdx = gCb->genCfg.maxUe;
207 if(measCb->measType &
208 (LKW_L2MEAS_ACT_UE | LKW_L2MEAS_UU_LOSS | LKW_L2MEAS_DL_DELAY))
210 for(cntr1 =0;((cntr1 < measCb->val.nonIpThMeas.numQci) &&
211 (cntr1 < LKW_MAX_QCI));cntr1++)
213 if(measCb->val.nonIpThMeas.qci[cntr1] != kwRbCb->qci)
215 measCb->val.nonIpThMeas.qci[cntr1] = kwRbCb->qci;
216 gCb->u.dlCb->kwL2Cb.measOn[kwRbCb->qci] |=measCb->measType;
222 if(((kwRbCb->rbL2Cb.measOn & measCb->measType) == LKW_L2MEAS_NONE))
224 if (measCb->measType & LKW_L2MEAS_ACT_UE)
226 if((kwRbCb->mode == CM_LTE_MODE_UM) &&
227 (kwRbCb->dir & KW_DIR_DL ))
229 if (kwRbCb->m.umDl.sduQ.count)
231 if (kwRbCb->ueCb->numActRb[kwRbCb->qci] == 0)
233 kwRbCb->ueCb->numActRb[kwRbCb->qci]++;
234 gCb->u.dlCb->kwL2Cb.numActUe[kwRbCb->qci]++;
238 else if (kwRbCb->mode == CM_LTE_MODE_AM)
240 if ((kwRbCb->m.amDl.cntrlBo) ||
241 (kwRbCb->m.amDl.retxBo) ||
244 if (kwRbCb->ueCb->numActRb[kwRbCb->qci] == 0)
246 kwRbCb->ueCb->numActRb[kwRbCb->qci]++;
247 gCb->u.dlCb->kwL2Cb.numActUe[kwRbCb->qci]++;
253 if((measCb->measType & LKW_L2MEAS_DL_IP))
256 for(ueIdx = 0; ((ueIdx < measCb->val.ipThMeas.numUes) &&
257 (ueIdx < gCb->genCfg.maxUe)); ueIdx++)
259 if ((freeIdx == gCb->genCfg.maxUe) &&
260 (measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid == FALSE))
265 if((measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId) == ueId)
271 if (ueIdx == measCb->val.ipThMeas.numUes)
273 if (gCb->genCfg.maxUe == measCb->val.ipThMeas.numUes)
277 if (gCb->genCfg.maxUe == freeIdx)
279 measCb->val.ipThMeas.numUes++;
285 measCb->val.ipThMeas.ueInfoLst[ueIdx].isValid = TRUE;
286 cmMemset((U8 *)&measCb->val.ipThMeas.ueInfoLst[ueIdx].measData[0],0x00,(sizeof(KwL2Cntr) *LKW_MAX_QCI));
287 measCb->val.ipThMeas.ueInfoLst[ueIdx].numQci = 0;
289 measCb->val.ipThMeas.ueInfoLst[ueIdx].ueId = ueId;
290 measCb->val.ipThMeas.ueInfoLst[ueIdx].cellId = cellId;
291 numQci = &(measCb->val.ipThMeas.ueInfoLst[ueIdx].numQci);
293 for (qciIdx =0; ((qciIdx < *numQci) &&
294 (qciIdx < LKW_MAX_QCI)) ; qciIdx++)
296 if (measCb->val.ipThMeas.ueInfoLst[ueIdx].qci[qciIdx] == kwRbCb->qci)
302 /* Fix Klock Warning */
303 if ((qciIdx == *numQci) && (qciIdx < LKW_MAX_QCI))
305 measCb->val.ipThMeas.ueInfoLst[ueIdx].qci[qciIdx] = kwRbCb->qci;
309 kwUtlPlcMeasDatInL2Sts(&measCb->val.ipThMeas.ueInfoLst[ueIdx].measData[kwRbCb->qci],
310 &kwRbCb->rbL2Cb, measCb->measType);
312 else if (measCb->measType &
313 (LKW_L2MEAS_DL_DISC | LKW_L2MEAS_DL_DELAY | LKW_L2MEAS_UU_LOSS))
315 kwUtlPlcMeasDatInL2Sts(&measCb->val.nonIpThMeas.measData[kwRbCb->qci],
316 &kwRbCb->rbL2Cb, measCb->measType);
317 measCb->val.nonIpThMeas.qci[kwRbCb->qci] = kwRbCb->qci;
318 measCb->val.nonIpThMeas.measData[kwRbCb->qci].totDrbsPerQci++;
320 kwRbCb->rbL2Cb.measOn |= measCb->measType;
324 #endif /*LTE_L2_MEAS*/
328 * This primitive fills the RbCb
330 * @param [in] gCb - RLC Instance Control Block
331 * @param [out] rbCb - RB Control Block
332 * @param [out] ueCb - UE Control Block
333 * @param [in] entCfg - RLC Entity configuration
340 PRIVATE S16 kwCfgFillDlRbCb
345 CkwEntCfgInfo *entCfg
348 PRIVATE S16 kwCfgFillDlRbCb(gCb,rbCb,entCfg)
352 CkwEntCfgInfo *entCfg;
355 TRC3(kwCfgFillDlRbCb)
357 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
358 "kwCfgFillRbCb(ueId(%d),cellId(%d) rbType(%d))",
363 /* Initialize according to entMode */
364 switch (entCfg->entMode)
368 rbCb->lch.lChId = entCfg->lCh[0].lChId;
369 rbCb->lch.lChType = entCfg->lCh[0].type;
370 rbCb->dir = entCfg->dir;
376 rbCb->lch.lChId = entCfg->lCh[0].lChId;
377 rbCb->lch.lChType = entCfg->lCh[0].type;
378 rbCb->dir = entCfg->dir;
379 rbCb->m.umDl.snLen = entCfg->m.umInfo.dl.snLen;
380 if (entCfg->m.umInfo.dl.snLen == KW_UM_CFG_5BIT_SN_LEN)
381 rbCb->m.umDl.modBitMask = 0x1f;
383 rbCb->m.umDl.modBitMask = 0x3ff;
385 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
391 /* Down Link Information
392 * indx = 0 as Down Link */
393 rbCb->lch.lChId = entCfg->lCh[0].lChId;
394 rbCb->lch.lChType = entCfg->lCh[0].type;
395 rbCb->dir = KW_DIR_BOTH;
396 rbCb->m.amDl.pollPdu = entCfg->m.amInfo.dl.pollPdu;
397 rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
398 rbCb->m.amDl.maxRetx = entCfg->m.amInfo.dl.maxRetx;
399 rbCb->m.amDl.pollRetxTmrInt = entCfg->m.amInfo.dl.pollRetxTmr;
400 rbCb->m.amDl.snLen = entCfg->m.amInfo.dl.snLen;
402 if(KW_AM_CFG_12BIT_SN_LEN == rbCb->m.amDl.snLen)
404 rbCb->m.amDl.snModMask = (1 << KW_SN_LEN_12BITS) - 1; /* 5GNR */
408 rbCb->m.amDl.snModMask = (1 << KW_SN_LEN_18BITS) - 1; /* 5GNR */
411 cmInitTimers(&(rbCb->m.amDl.pollRetxTmr), 1);
414 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
419 rbCb->m.amDl.txBufLst,
420 (KW_TX_BUF_BIN_SIZE * sizeof(CmLListCp)));
421 for(hashIndex = 0; hashIndex < KW_TX_BUF_BIN_SIZE; hashIndex++)
423 cmLListInit(&(rbCb->m.amDl.txBufLst[hashIndex]));
430 RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId,
431 "Invalid RB Mode ueId(%d),cellId(%d)",
437 rbCb->mode = entCfg->entMode;
438 rbCb->discTmrInt = entCfg->discardTmr;
445 * @brief This primitive Initializes the RB Cb
447 * @param [in] gCb - RLC Instance Control Block
448 * @param [out] rbCb - RB Control Block
449 * @param [in] ptr - Void pointer
450 * @param [in] entCfg - Entity Configuration
457 PRIVATE S16 kwCfgUpdateDlRb
462 CkwEntCfgInfo *entCfg
465 PRIVATE S16 kwCfgUpdateDlRb(gCb,rbCb, ptr, entCfg)
469 CkwEntCfgInfo *entCfg;
472 TRC3(kwCfgUpdateDlRb)
474 if (rbCb->mode != entCfg->entMode)
476 RLOG_ARG4(L_ERROR,DBG_RBID,rbCb->rlcId.rbId,
477 "RB Mode Mismatch : exp [%d] rcv [%d] UEID:%d CELLID:%d",
482 RETVALUE(CKW_CFG_REAS_RB_MODE_MIS);
489 KwDlCellCb *cellCb = (KwDlCellCb *)ptr;
491 rbCb->dir = entCfg->dir;
492 rbCb->lch.lChId = entCfg->lCh[0].lChId;
493 rbCb->lch.lChType = entCfg->lCh[0].type;
495 cellCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
501 KwDlUeCb *ueCb = (KwDlUeCb *)ptr;
503 if (entCfg->lCh[0].type == CM_LTE_LCH_DCCH)
505 RETVALUE(CKW_CFG_REAS_LCHTYPE_MIS);
507 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = NULLP;
508 ueCb->lCh[entCfg->lCh[0].lChId - 1].dlRbCb = rbCb;
510 rbCb->lch.lChId = entCfg->lCh[0].lChId;
511 rbCb->lch.lChType = entCfg->lCh[0].type;
512 rbCb->dir = entCfg->dir;
518 KwDlUeCb *ueCb = (KwDlUeCb *)ptr;
520 ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = NULLP;
521 ueCb->lCh[entCfg->lCh[1].lChId - 1].dlRbCb = rbCb;
524 rbCb->lch.lChId = entCfg->lCh[1].lChId;
525 rbCb->lch.lChType = entCfg->lCh[1].type;
526 rbCb->m.amDl.pollRetxTmrInt = entCfg->m.amInfo.dl.pollRetxTmr;
527 rbCb->m.amDl.pollPdu = entCfg->m.amInfo.dl.pollPdu;
528 rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
529 rbCb->m.amDl.maxRetx = entCfg->m.amInfo.dl.maxRetx;
536 rbCb->discTmrInt = entCfg->discardTmr;
538 RETVALUE(CKW_CFG_REAS_NONE);
544 * This primitive adds new RB in Ue/Cell Cb.
547 * This function does following steps -
548 * - If UE ID is 0 then
549 * - Check for CELL CB is present
550 * - If yes, Check for RB ID
551 * - If RB ID is present Status Indication with reason
552 * - Else, Create New RB CB in CELL CB
553 * - If no Create New CELL CB and RB CB
555 * - Check for UE CB is present
556 * - If yes Check for RB ID
557 * - If RB ID is present Status Indication with reason
558 * - Else, Create New RB CB in UE CB
559 * - If no Create New UE CB and RB CB
560 * - Fill entity confirmation
562 * @param [in] gCb - RLC Instance Control Block
563 * @param [in] ueId - UE Identifier
564 * @param [in] cellId - CELL Identifier
565 * @param [in] entCfg - Entity Configuration to be done.
566 * @param [out] entCfm - Entity Confirmation.
573 PUBLIC S16 kwCfgAddDlRb
578 CkwEntCfgInfo *entCfg,
579 CkwEntCfgCfmInfo *entCfm
582 PUBLIC S16 kwCfgAddDlRb(gCb,ueId, cellId, entCfg, entCfm)
586 CkwEntCfgInfo *entCfg;
587 CkwEntCfgCfmInfo *entCfm;
590 KwDlUeCb *ueCb = NULLP; /* UE Control Block */
591 KwDlCellCb *cellCb; /* Cell Control Block */
592 KwDlRbCb *kwRbCb; /* KW RB Control Block */
593 U8 reason; /* Rb Identifier */
597 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
598 "kwCfgAddRb(cellId(%d),UEID:%d cfgType(%d))",
605 /* Fill entCfm structure */
606 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
607 CKW_CFG_REAS_CELL_UNKWN);
608 RLOG_ARG1(L_ERROR,DBG_RBID,entCfg->rbId,
609 "Add DLRb,CellId is 0 for UEID:%d",
613 if ((entCfg->rguSapId >= gCb->genCfg.maxRguSaps) || (entCfg->rguSapId < 0))
615 KWDBGP_ERROR(gCb, "kwCfgAddDlRb(ueId(%u), cellId(%u), Invalid rguSapId (%d)\n",
616 ueId, cellId, entCfg->rguSapId);
621 /* Process Adding new RB */
624 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
626 /* Fill entCfm structure */
627 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
629 CKW_CFG_REAS_RB_UNKWN);
630 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId,
631 "Invalid RbId ,Max is [%d] CELLID:%d UEID:%d",
638 if (((entCfg->lCh[0].type == CM_LTE_LCH_BCCH) ||
639 (entCfg->lCh[0].type == CM_LTE_LCH_PCCH) ||
640 (entCfg->lCh[0].type == CM_LTE_LCH_CCCH)) &&
641 (entCfg->entMode == CM_LTE_MODE_TM))
643 /* Cell CB present */
644 kwDbmFetchDlCellCb(gCb, cellId, &cellCb);
647 /* Get rbCb from cellCb->rbCb List */
648 if (( cellCb->rbCb[entCfg->rbId] != NULLP))
650 /* Fill entCfm structure */
651 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
653 CKW_CFG_REAS_RB_PRSNT);
654 RLOG_ARG2(L_WARNING, DBG_CELLID,cellId,
655 "RbId [%d] already exists UEID:%d",
661 else /* Cell CB UNKNOWN */
664 if ( ROK != kwDbmCreateDlCellCb(gCb,cellId, &cellCb))
666 /* Fill entCfm structure */
667 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
669 CKW_CFG_REAS_CELL_CREAT_FAIL);
670 RLOG_ARG2(L_ERROR,DBG_CELLID,cellId,
671 "cellCb Creation failed RBID:%d UEID:%d",
679 if(entCfg->lCh[0].lChId <= 0)
681 RLOG_ARG3(L_ERROR,DBG_LCID,entCfg->lCh[0].lChId ,
682 "Invalid LcId CELLID:%d UEID:%d RBID:%d",
686 /* Fill entCfm structure */
687 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
688 CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_LCHID);
693 KW_ALLOC(gCb,kwRbCb, sizeof (KwDlRbCb));
696 RLOG_ARG2(L_FATAL,DBG_UEID,ueId,
697 "Memory allocation failed for rbId:%d CELLID:%d",
700 /* Fill entCfm structure */
701 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
702 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_CREAT_FAIL);
705 kwRbCb->rlcId.rbId = entCfg->rbId;
706 cellCb->rbCb[entCfg->rbId] = kwRbCb;
707 KW_LMM_RB_STS_INC(gCb);
708 cellCb->lCh[entCfg->lCh[0].lChId - 1].dlRbCb = kwRbCb;
712 reason= (entCfg->entMode != CM_LTE_MODE_TM)? CKW_CFG_REAS_RB_MODE_MIS:
713 CKW_CFG_REAS_LCHTYPE_MIS;
714 /* Fill entCfm structure */
715 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
716 CKW_CFG_CFM_NOK, reason);
722 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
724 /* Fill entCfm structure */
725 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
726 CKW_CFG_REAS_RB_UNKWN);
727 RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId,
728 "Invalid RbId for RbType[%d] UEID:%d",
733 if ((((entCfg->lCh[0].type == CM_LTE_LCH_DCCH) &&
734 (entCfg->entMode != CM_LTE_MODE_UM) &&
735 (CM_LTE_SRB == entCfg->rbType)) ||
736 ((entCfg->lCh[0].type == CM_LTE_LCH_DTCH) &&
737 (CM_LTE_DRB == entCfg->rbType))) &&
738 (entCfg->entMode != CM_LTE_MODE_TM))
741 if ( kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb) == ROK)
743 /* Get rbCb from ueCb->rbCb list */
744 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, kwRbCb);
746 if(( kwRbCb != NULLP))
748 /* Fill entCfm structure */
749 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
750 CKW_CFG_REAS_RB_PRSNT);
751 RLOG_ARG2(L_WARNING, DBG_UEID, ueId,
752 "CellId[%u]:rbId [%d] already exists",
758 else /* UE CB UNKNOWN */
761 if ( kwDbmCreateDlUeCb(gCb,ueId, cellId, &ueCb) != ROK)
763 /* Fill entCfm structure */
764 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
765 CKW_CFG_REAS_UE_CREAT_FAIL);
766 RLOG_ARG2(L_WARNING, DBG_CELLID,cellId,
767 "UeId [%u]:ueCb Creation Failed RBID:%d",
774 /* Validate LChId for UM and AM modes */
775 if ((entCfg->lCh[0].lChId <= 0) ||
776 ((entCfg->entMode == CM_LTE_MODE_AM)&&
777 (entCfg->lCh[1].lChId <= 0)))
779 /* Fill entCfm structure */
780 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
781 CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_LCHID);
786 KW_ALLOC(gCb,kwRbCb, sizeof (KwDlRbCb));
789 /* Fill entCfm structure */
790 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,CKW_CFG_CFM_NOK,
791 CKW_CFG_REAS_RB_CREAT_FAIL);
792 RLOG_ARG2(L_FATAL,DBG_UEID,ueId,
793 "Memory allocation failed RBID:%d CELLID:%d",
799 /* copy the RB Cb into UECb */
800 kwRbCb->rlcId.rbId = entCfg->rbId;
801 if(entCfg->rbType == CM_LTE_SRB)
802 ueCb->srbCb[entCfg->rbId] = kwRbCb;
804 ueCb->drbCb[entCfg->rbId] = kwRbCb;
806 KW_LMM_RB_STS_INC(gCb);
811 if (entCfg->entMode == CM_LTE_MODE_TM)
813 reason = CKW_CFG_REAS_RB_MODE_MIS;
817 reason = CKW_CFG_REAS_LCHTYPE_MIS;
820 /* Fill entCfm structure */
821 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, reason);
827 kwRbCb->rlcId.cellId = cellId;
828 kwRbCb->rlcId.ueId = ueId;
829 kwRbCb->rlcId.rbType = entCfg->rbType;
830 kwRbCb->inst = gCb->init.inst;
831 #ifdef TENB_MULT_CELL_SUPPRT
832 kwRbCb->rguSapId = entCfg->rguSapId;
837 if (kwCfgFillDlRbCb(gCb,kwRbCb, ueCb, entCfg) != ROK)
839 /* Fill entCfm structure */
840 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
841 CKW_CFG_REAS_RB_CREAT_FAIL);
843 /* Delete RB CB created */
844 KW_FREE(gCb,kwRbCb, sizeof(KwDlRbCb));
845 RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId,
846 "Filling of RbCb failed UEID:%d CELLID:%d",
851 kwRbCb->qci = entCfg->qci;
854 if (entCfg->lCh[0].type == CM_LTE_LCH_DTCH)
857 kwAddToDlL2Meas(gCb, kwRbCb,cellId,ueId);
859 #endif /* LTE_L2_MEAS */
861 /* Fill entCfm structure */
862 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
870 * This primitive reconfigures the existing RB in Ue/Cell Cb.
873 * This primitive executes following steps in reconfiguration of existing
875 * - If UE ID is 0 then
876 * - Check for CELL CB is present
877 * - If yes, Check for RB ID
878 * - If RB ID is present Reconfigure the RB CB
879 * - Else, Status Indication with Reason
880 * - Else, Status Indication with Reason
882 * - Check for UE CB is present
883 * - If yes, Check for RB ID
884 * - If RB ID is prenset Reconfigure the CELL CB
885 * - Else, Status Indication with Reason
886 * - Else, Status Indication with Reason
887 * - Fill entity confirmation
889 * @param [in] gCb - RLC Instance Control Block
890 * @param [in] ueId - UE Identifier
891 * @param [in] cellId - CELL Identifier
892 * @param [in] entCfg - Entity Configuration to be done.
893 * @param [out] entCfm - Entity Confirmation
900 PUBLIC S16 kwCfgReCfgDlRb
905 CkwEntCfgInfo *entCfg,
906 CkwEntCfgCfmInfo *entCfm
909 PUBLIC S16 kwCfgReCfgDlRb(gCb,ueId, cellId, entCfg, entCfm)
913 CkwEntCfgInfo *entCfg;
914 CkwEntCfgCfmInfo *entCfm;
917 KwDlRbCb *rbCb; /* RB Control Block */
918 KwDlRbCb tRbCb; /* KW RB Control Block */
919 KwDlCellCb *cellCb; /* Cell Control Block */
920 KwDlUeCb *ueCb; /* Ue Control Block */
925 RLOG_ARG3(L_DEBUG,DBG_UEID,ueId,
926 "kwCfgReCfgRb(cellId(%d), cfgType(%d)) RBID:%d",
927 cellId, entCfg->cfgType,entCfg->rbId);
930 /* Check for UeCb or CellCb */
933 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
935 /* Fill entCfm structure */
936 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
937 CKW_CFG_REAS_RB_UNKWN);
938 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId,
939 "Invalid RbId , Max is [%d] UEID:%d CELLID:%d",
946 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
949 /* Fill entCfm structure */
950 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
951 CKW_CFG_REAS_CELL_UNKWN);
952 RLOG_ARG3(L_ERROR,DBG_CELLID,cellId,
953 "CellCb not found ueId:%d RBID:%d CELLID:%d",
961 KW_DBM_GET_CELL_RBCB(entCfg->rbId, cellCb->rbCb, rbCb);
965 /* Fill entCfm structure */
966 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
967 CKW_CFG_REAS_RB_UNKWN);
968 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
969 "CELLID:%d RBID:%d not found",
975 /* Take backup of rbCb before updating.
976 * Because in failure case restore original rbCb
978 cmMemcpy((U8 *)&tRbCb, (U8 *)rbCb, sizeof(KwDlRbCb));
981 ret = kwCfgUpdateDlRb(gCb,rbCb, cellCb,entCfg);
984 /* Fill entCfm structure */
985 KW_CFG_FILL_CFG_CFM(entCfm,
991 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
992 "CELLID:%u RBID:%d updation failed",
995 cmMemcpy((U8*)rbCb, (U8 *)&tRbCb, sizeof(KwDlRbCb));
1002 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
1004 /* Fill entCfm structure */
1005 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1006 CKW_CFG_REAS_RB_UNKWN);
1007 RLOG_ARG3(L_ERROR,DBG_UEID,ueId,
1008 "CELLID:%d Invalid RBID:%d for RbType[%d]",
1015 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
1018 /* Fill entCfm structure */
1019 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1020 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1021 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1022 "UEID:%d UeCb not found RBID:%d",
1029 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, rbCb);
1033 /* Fill entCfm structure */
1034 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1035 CKW_CFG_REAS_RB_UNKWN);
1036 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1037 "CELLID:%d RBID:%d not found",
1043 /* Take backup of rbCb before updating.
1044 * Because in failure case restore original rbCb
1046 cmMemcpy((U8 *)&tRbCb, (U8 *)rbCb, sizeof(KwDlRbCb));
1049 ret = kwCfgUpdateDlRb(gCb,rbCb,ueCb, entCfg);
1050 if (ret != CKW_CFG_REAS_NONE)
1052 /* Fill entCfm structure */
1053 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1055 RLOG_ARG2(L_ERROR,DBG_UEID,ueId,
1056 "CELLID:%d RBID:%d updation failed",
1059 cmMemcpy((U8*)rbCb, (U8 *)&tRbCb, sizeof(KwDlRbCb));
1065 /* Fill entCfm structure */
1066 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1073 * @brief This primitive deletes the existing RB in Ue/Cell Cb.
1076 * - If UE ID is 0 then
1077 * - Check for CELL CB is present
1078 * - If yes, Check for RB ID
1079 * - If RB ID is prenset Delete the RB CB
1080 * - If there is no RB CB exist in CELL CB then Delete CELL CB.
1081 * - Else, Status Indication with Reason
1082 * - Else, Status Indication with Reason
1084 * - Check for UE CB is present
1085 * - If yes, Check for RB ID
1086 * - If RB ID is prenset Delete the RB CB
1087 * - If there is no RB CB exist in UE CB then Delete UE CB.
1088 * - Else, Status Indication with Reason
1089 * - Else, Status Indication with Reason
1090 * - Fill entity confirmation
1092 * @param [in] gCb - RLC Instance Control Block
1093 * @param [in] ueId - UE Identifier
1094 * @param [in] cellId - CELL Identifier
1095 * @param [in] entCfg - Entity Configuration to be done.
1096 * @param [out] entCfm - Entity Confirmation
1103 PUBLIC S16 kwCfgDelDlRb
1108 CkwEntCfgInfo *entCfg,
1109 CkwEntCfgCfmInfo *entCfm
1112 PUBLIC S16 kwCfgDelRb(gCb,ueId, cellId, entCfg, entCfm)
1116 CkwEntCfgInfo *entCfg;
1117 CkwEntCfgCfmInfo *entCfm;
1120 S16 ret; /* Return Value */
1121 KwDlUeCb *ueCb; /* UE Control Block */
1122 KwDlCellCb *cellCb; /* UE Control Block */
1123 KwDlRbCb *kwRbCb; /* KW RB Control Block */
1127 RLOG_ARG3(L_DEBUG,DBG_UEID,ueId,
1128 "kwCfgDelRb(RBID(%d), cellId(%d), cfgType(%d))",
1135 /* Get cellCb and delete rbCb from it */
1138 if(entCfg->rbId >= KW_MAX_RB_PER_CELL)
1140 /* Fill entCfm structure */
1141 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1142 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1143 RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId ,
1144 "Invalid RbId, Max is [%d] UEID:%d CELLID:%d",
1151 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
1154 /* Fill entCfm structure */
1155 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1156 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1157 RLOG_ARG2(L_ERROR,DBG_CELLID,cellId,
1158 "CellCb not found UEID:%d RBID:%d",
1165 KW_DBM_GET_CELL_RBCB(entCfg->rbId, cellCb->rbCb, kwRbCb);
1167 if ( kwRbCb == NULLP)
1169 /* Fill entCfm structure */
1170 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1171 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1172 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1173 "CellId[%u]:RbId[%d] not found",
1179 /* Assign NULLP to rbCb in rbCbLst */
1180 cellCb->rbCb[entCfg->rbId] = NULLP;
1182 /* Assign NULLP to dlRbCb/ulRbCb.
1183 * Delete Hashlist allocated for it if any */
1184 cellCb->lCh[kwRbCb->lch.lChId - 1].dlRbCb = NULLP;
1185 KW_FREE(gCb,kwRbCb, sizeof(KwDlRbCb)); /*Vartika: Mem leak fix */
1187 /* Get ueCb and delete rbCb from it */
1190 if (!(KW_VALIDATE_UE_RBID(entCfg->rbType, entCfg->rbId)))
1192 /* Fill entCfm structure */
1193 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1194 CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN);
1195 RLOG_ARG3(L_ERROR,DBG_RBID, entCfg->rbId,
1196 "Invalid RbId for RbType[%d] UEID:%d CELLID:%d",
1204 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
1207 /* Fill entCfm structure */
1208 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1209 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1210 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1211 "UeId [%d]: UeCb not found RBID:%d",
1218 KW_DBM_GET_RBCB_FROM_UECB(entCfg->rbId, entCfg->rbType, ueCb, kwRbCb);
1220 if ( kwRbCb == NULLP)
1222 /* Fill entCfm structure */
1223 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1224 CKW_CFG_REAS_RB_UNKWN);
1225 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1226 "CellId[%u]:RbId[%d] not found",
1232 ueCb->lCh[kwRbCb->lch.lChId - 1].dlRbCb = NULLP;
1235 KW_UPD_L2_DECR_NONIP_PER_QCI_RB_COUNT(gCb, kwRbCb);
1237 /* Free the Buffers of RbCb */
1238 if( CM_LTE_MODE_UM == kwRbCb->mode)
1240 kwUmmFreeDlRbCb(gCb,kwRbCb);
1242 KW_FREE(gCb,kwRbCb, sizeof(KwDlRbCb));
1244 else if( CM_LTE_MODE_AM == kwRbCb->mode)
1246 kwAmmFreeDlRbCb(gCb,kwRbCb);
1249 /* Assign NULLP to rbCb in rbCbLst */
1250 if ( entCfg->rbType == CM_LTE_SRB )
1252 ueCb->srbCb[entCfg->rbId] = NULLP;
1256 ueCb->drbCb[entCfg->rbId] = NULLP;
1260 KW_LMM_RB_STS_DEC(gCb);
1262 /* Fill entCfm structure */
1263 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_OK,
1271 * @brief This primitive re-establish the existing RB in Ue/Cell Cb.
1274 * - If UE ID is 0 then
1275 * - Check for CELL CB is present
1276 * - If yes, Check for RB ID
1277 * - If RB ID is prenset initialize the parameters of the RB CB
1278 * - Else, Status Indication with Reason
1279 * - Else, Status Indication with Reason
1281 * - Check for UE CB is present
1282 * - If yes, Check for RB ID
1283 * - If RB ID is prenset initialize the parameters of the RB CB
1284 * - Else, Status Indication with Reason
1285 * - Else, Status Indication with Reason
1286 * - Fill entity confirmation
1288 * @param [in] gCb - RLC Instance Control Block
1289 * @param [in] ueId - UE Identifier
1290 * @param [in] cellId - CELL Identifier
1291 * @param [in] entCfg - Entity Configuration to be done.
1292 * @param [out] entCfm - Entity Confirmation
1299 PUBLIC S16 kwCfgReEstDlRb
1305 CkwEntCfgInfo *entCfg,
1306 CkwEntCfgCfmInfo *entCfm
1309 PUBLIC S16 kwCfgReEstDlRb(gCb,ueId, cellId,sndReEstInd,entCfg, entCfm)
1314 CkwEntCfgInfo *entCfg;
1315 CkwEntCfgCfmInfo *entCfm;
1318 KwDlRbCb *rbCb; /* RB Control Block */
1319 CmLteRlcId rlcId; /* RLC Identifier */
1321 TRC3(kwCfgReEstDlRb)
1323 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
1324 "kwCfgReEstDlRb(ueId(%d), cellId(%d), cfgType(%d))",
1331 rlcId.cellId = cellId;
1332 rlcId.rbId = entCfg->rbId;
1333 rlcId.rbType = entCfg->rbType;
1335 kwDbmFetchDlRbCbByRbId(gCb,&rlcId, &rbCb);
1338 /* Fill entCfm structure */
1339 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, rlcId.rbType, CKW_CFG_CFM_NOK,
1340 CKW_CFG_REAS_RB_UNKWN);
1341 RLOG_ARG2(L_ERROR, DBG_UEID,ueId,
1342 "CellId[%u]:RbId[%d] not found",
1348 rbCb->rlcId.ueId = ueId;
1352 case CM_LTE_MODE_TM:
1354 kwDlTmmReEstablish(gCb,rbCb);
1358 case CM_LTE_MODE_UM:
1360 kwDlUmmReEstablish(gCb,rlcId,sndReEstInd,rbCb);
1364 case CM_LTE_MODE_AM:
1366 kwAmmDlReEstablish(gCb, rlcId, rbCb);
1371 /* Fill entCfm structure */
1372 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1373 CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1380 * @brief This primitive deletes the RBs in Ue Cb.
1383 * - If UE ID is 0 then
1384 * - Status Indication with Reason
1386 * - Check for UE CB is present
1387 * - If yes, Delete all RB CB in UE CB and Delete UE CB also.
1388 * - Else, Status Indication with Reason
1389 * - Fill entity confirmation
1391 * @param [in] gCb - RLC Instance Control Block
1392 * @param [in] ueId - UE Identifier
1393 * @param [in] cellId - CELL Identifier
1394 * @param [in] entCfg - Entity Configuration to be done.
1395 * @param [out] entCfm - Entity Confirmation
1402 PUBLIC S16 kwCfgDelDlUe
1407 CkwEntCfgInfo *entCfg,
1408 CkwEntCfgCfmInfo *entCfm
1411 PUBLIC S16 kwCfgDelDlUe(ueId, cellId, entCfg, entCfm)
1415 CkwEntCfgInfo *entCfg;
1416 CkwEntCfgCfmInfo *entCfm;
1419 S16 ret; /* Return Value */
1420 KwDlUeCb *ueCb; /* UE Control Block */
1424 RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId,
1425 "kwCfgDelUe(ueId(%d), cellId(%d), cfgType(%d))",
1432 /* Check for ueId is present or not */
1435 /* Fill entCfm structure */
1436 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1437 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1438 RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId,
1439 "ueId(%d), cellId(%d)",
1446 ret = kwDbmFetchDlUeCb(gCb,ueId, cellId, &ueCb);
1449 /* Fill entCfm structure */
1450 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1451 CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN);
1452 RLOG_ARG2(L_ERROR,DBG_CELLID, cellId,
1453 "UEID:%d UeCb not found RBID:%d",
1460 kwDelFrmDlL2Meas(gCb,cellId,ueId);
1461 kwDbmDelAllDlL2MeasTbFrmUe(gCb,ueCb);
1464 kwDbmDelDlUeCb(gCb,ueCb, FALSE);
1466 /* Fill entCfm structure */
1467 KW_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,
1468 CKW_CFG_CFM_OK, CKW_CFG_REAS_NONE);
1475 * @brief This primitive deletes the RBs in Ue Cb.
1478 * - If CELL ID is 0 then
1479 * - Status Indication with Reason
1481 * - Check for CELL CB is present
1482 * - If yes, Delete all RB CB in CELL CB and Delete CELL CB also.
1483 * - Else, Status Indication with Reason
1484 * - Fill entity confirmation
1486 * @param [in] cellId - CELL Identifier
1487 * @param [in] entCfg - Entity Configuration to be done.
1488 * @param [out] entCfm - Entity Confirmation
1495 PUBLIC S16 kwCfgDelDlCell
1499 CkwEntCfgInfo *entCfg,
1500 CkwEntCfgCfmInfo *entCfm
1503 PUBLIC S16 kwCfgDelCell(gCb,cellId, entCfg, entCfm)
1506 CkwEntCfgInfo *entCfg;
1507 CkwEntCfgCfmInfo *entCfm;
1510 KwDlCellCb *cellCb; /* UE Control Block */
1511 U8 rbId; /* RB Identifier */
1515 RLOG_ARG2(L_DEBUG,DBG_RBID,entCfg->rbId,
1516 "kwCfgDelCell( cellId(%d), cfgType(%d)",
1521 rbId = entCfg->rbId;
1523 /* Check for ueId is present or not */
1526 /* Fill entCfm structure */
1527 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1528 CKW_CFG_REAS_CELL_UNKWN);
1529 RLOG_ARG1(L_DEBUG,DBG_RBID,entCfg->rbId,
1530 "cellId is 0 (%d) ",
1536 kwDbmFetchDlCellCb(gCb,cellId, &cellCb);
1539 /* Fill entCfm structure */
1540 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK,
1541 CKW_CFG_REAS_CELL_UNKWN);
1542 RLOG_ARG1(L_ERROR, DBG_CELLID,cellId,
1543 "CellCb not found for RBID:%d",
1549 kwDbmDelDlCellCb(gCb,cellCb);
1551 /* Fill entCfm structure */
1552 /* kw005.201 added support for L2 Measurement */
1553 KW_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_OK,
1560 * @brief This primitive changes the ueId of Ue Cb.
1563 * - If oldUeId and newUeId are
1564 * - Confirm the Status with Reason
1565 * - If UeId not present
1566 * - Confirm the Status with Reason
1568 * - Copy rbCbs from old UeCb to new UeCb
1570 * - Fill entity confirmation
1572 * @param [in] ueInfo - Old UE Information
1573 * @param [in] newUeInfo - New UE Information
1574 * @param [out] status - Status
1581 PUBLIC S16 kwCfgDlUeIdChng
1585 CkwUeInfo *newUeInfo,
1589 PUBLIC S16 kwCfgDlUeIdChng(gCb,ueInfo,newUeInfo,status)
1592 CkwUeInfo *newUeInfo;
1597 /*kw004.201 Adding of Missing Trace in LTE RLC PDCP*/
1600 if ( (ueInfo->ueId == newUeInfo->ueId) &&
1601 (ueInfo->cellId == newUeInfo->cellId))
1603 status->reason = CKW_CFG_REAS_SAME_UEID;
1604 status->status = CKW_CFG_CFM_NOK;
1605 RLOG_ARG2(L_ERROR,DBG_CELLID,ueInfo->cellId,
1606 "Old UeId[%d] same as new UeId[%d]",
1612 if(ROK == kwDbmFetchDlUeCb(gCb,newUeInfo->ueId, newUeInfo->cellId, &ueCb))
1614 RLOG_ARG1(L_ERROR, DBG_CELLID, newUeInfo->cellId,
1615 "NewUeId[%d]:ueCb already exists",
1617 status->reason = CKW_CFG_REAS_UE_EXISTS;
1618 status->status = CKW_CFG_CFM_NOK;
1622 if(ROK != kwDbmFetchDlUeCb(gCb,ueInfo->ueId, ueInfo->cellId, &ueCb))
1625 RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId,
1626 "UeId [%d]: UeCb not found",
1628 status->reason = CKW_CFG_REAS_UE_UNKWN;
1629 status->status = CKW_CFG_CFM_NOK;
1634 kwHdlMeasDlUeIdChg(gCb, ueInfo->cellId, ueInfo->ueId, newUeInfo->ueId);
1636 if(ROK != cmHashListDelete(&(gCb->u.dlCb->ueLstCp), (PTR) ueCb))
1638 RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId,
1639 "UeId[%u] HashList Deletion Failed",
1641 status->reason = CKW_CFG_REAS_UE_CREAT_FAIL;
1642 status->status = CKW_CFG_CFM_NOK;
1646 /* update the hash key with new values */
1647 ueCb->ueId = newUeInfo->ueId;
1648 ueCb->cellId = newUeInfo->cellId;
1650 if(ROK != cmHashListInsert(&(gCb->u.dlCb->ueLstCp),
1651 (PTR)ueCb, (U8 *)&(ueCb->ueId),
1652 (U16) sizeof(CmLteRnti)))
1655 RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId,
1656 "UeId[%u] HashList Insertion Failed",
1658 status->reason = CKW_CFG_REAS_UE_CREAT_FAIL;
1659 status->status = CKW_CFG_CFM_NOK;
1666 /********************************************************************30**
1669 **********************************************************************/