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 packing/unpacking of INF interface
30 **********************************************************************/
32 /* header include files (.h) */
33 #include "common_def.h"
34 #include "tfu.h" /* RGU defines */
38 #include "rg_sch_inf.h" /* RGU Interface defines */
40 /* header/extern include files (.x) */
41 #include "tfu.x" /* RGU defines */
45 #include "rg_sch_inf.x" /* RGU Interface includes */
48 /*Fix: start: Inform UE delete to scheduler*/
50 * @brief This primitive is used to indicate to scheduler
51 * that UE has been deleted at MAC.
55 * Function : cmPkMacSchUeDelInd
58 * @param[in] RgInfUeDelInd* ueDelInd
63 PUBLIC S16 cmPkMacSchUeDelInd
66 RgInfUeDelInd* ueDelInd
69 PUBLIC S16 cmPkMacSchUeDelInd(pst, ueDelInd)
71 RgInfUeDelInd* ueDelInd;
75 TRC2(cmPkMacSchUeDelInd)
77 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
82 #ifdef MS_MBUF_CORRUPTION
83 MS_BUF_ADD_ALLOC_CALLER();
85 if(SAddPstMsgMult((Data *)ueDelInd, sizeof(RgInfUeDelInd), mBuf) != ROK)
87 RGSCHINF_FREE_MSG(mBuf);
91 pst->event = (Event) EVTINFUEDELIND;
92 return (SPstTsk(pst,mBuf));
96 * @brief This primitive is used to indicate to scheduler
97 * that UE has been deleted at MAC.
102 * Function : cmUnpkMacSchUeDelInd
104 * @param[in] Pst* pst
105 * @param[in] SpId spId
106 * @param[in] RguDDatReqInfo * datReq
111 PUBLIC S16 cmUnpkMacSchUeDelInd
118 PUBLIC S16 cmUnpkMacSchUeDelInd(func, pst, mBuf)
124 RgInfUeDelInd ueDelInd;
126 TRC2(cmUnpkMacSchUeDelInd)
128 if(SRemPreMsgMult((Data *)&ueDelInd, sizeof(RgInfUeDelInd), mBuf) != ROK)
130 RGSCHINF_FREE_MSG(mBuf);
134 RGSCHINF_FREE_MSG(mBuf);
136 return ((*func)(pst, &ueDelInd));
138 /*Fix: end: Inform UE delete to scheduler*/
141 * @brief Request from RLC to MAC for forwarding SDUs on
142 * dedicated channel for transmission.
146 * Function : cmPkMacSchDedBoUpdtReq
148 * @param[in] Pst* pst
149 * @param[in] SpId spId
150 * @param[in] RguDDatReqInfo * datReq
155 PUBLIC S16 cmPkMacSchDedBoUpdtReq
161 PUBLIC S16 cmPkMacSchDedBoUpdtReq(pst, boRpt)
163 RgInfDedBoRpt* boRpt;
166 Buffer *mBuf = NULLP;
167 TRC2(cmPkMacSchDedBoUpdtReq)
169 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
173 #ifdef MS_MBUF_CORRUPTION
174 MS_BUF_ADD_ALLOC_CALLER();
176 if(SAddPstMsgMult((Data *)boRpt, sizeof(RgInfDedBoRpt), mBuf) != ROK)
178 RGSCHINF_FREE_MSG(mBuf);
182 pst->event = (Event) EVTINFDEDBOUPDTREQ;
183 return (SPstTsk(pst,mBuf));
188 * @brief Request from RLC to MAC for forwarding SDUs on
189 * dedicated channel for transmission.
193 * Function : cmUnpkMacSchDedBoUpdtReq
195 * @param[in] Pst* pst
196 * @param[in] SpId spId
197 * @param[in] RguDDatReqInfo * datReq
202 PUBLIC S16 cmUnpkMacSchDedBoUpdtReq
209 PUBLIC S16 cmUnpkMacSchDedBoUpdtReq(func, pst, mBuf)
217 TRC2(cmUnpkMacSchDedBoUpdtReq)
219 if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfDedBoRpt), mBuf) != ROK)
221 RGSCHINF_FREE_MSG(mBuf);
225 RGSCHINF_FREE_MSG(mBuf);
226 return ((*func)(pst, &boRpt));
229 * @brief Request from RLC to MAC for forwarding SDUs on
230 * dedicated channel for transmission.
234 * Function : cmPkMacSchCmnBoUpdtReq
236 * @param[in] Pst* pst
237 * @param[in] SpId spId
238 * @param[in] RguDDatReqInfo * datReq
243 PUBLIC S16 cmPkMacSchCmnBoUpdtReq
249 PUBLIC S16 cmPkMacSchCmnBoUpdtReq(pst, boRpt)
251 RgInfCmnBoRpt* boRpt;
254 Buffer *mBuf = NULLP;
255 TRC2(cmPkMacSchCmnBoUpdtReq)
257 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
261 #ifdef MS_MBUF_CORRUPTION
262 MS_BUF_ADD_ALLOC_CALLER();
264 if(SAddPstMsgMult((Data *)boRpt, sizeof(RgInfCmnBoRpt), mBuf) != ROK)
266 RGSCHINF_FREE_MSG(mBuf);
270 pst->event = (Event) EVTINFCMNBOUPDTREQ;
271 return (SPstTsk(pst,mBuf));
276 * @brief Request from RLC to MAC for forwarding SDUs on
277 * dedicated channel for transmission.
281 * Function : cmUnpkMacSchCmnBoUpdtReq
283 * @param[in] Pst* pst
284 * @param[in] SpId spId
285 * @param[in] RguDDatReqInfo * datReq
290 PUBLIC S16 cmUnpkMacSchCmnBoUpdtReq
297 PUBLIC S16 cmUnpkMacSchCmnBoUpdtReq(func, pst, mBuf)
305 TRC2(cmUnpkMacSchCmnBoUpdtReq)
307 if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfCmnBoRpt), mBuf) != ROK)
309 RGSCHINF_FREE_MSG(mBuf);
313 RGSCHINF_FREE_MSG(mBuf);
314 return ((*func)(pst, &boRpt));
317 * @brief Request from RLC to MAC for forwarding SDUs on
318 * dedicated channel for transmission.
322 * Function : cmPkMacSchSfRecpInd
324 * @param[in] Pst* pst
325 * @param[in] SpId spId
326 * @param[in] RguDDatReqInfo * datReq
331 PUBLIC S16 cmPkMacSchSfRecpInd
334 RgInfSfDatInd* datInd
337 PUBLIC S16 cmPkMacSchSfRecpInd(pst, datInd)
339 RgInfSfDatInd* datInd;
342 Buffer *mBuf = NULLP;
343 TRC2(cmPkMacSchSfRecpInd)
345 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
349 if(oduPackPointer((PTR)datInd, mBuf) != ROK)
351 RGSCHINF_FREE_MSG(mBuf);
355 pst->event = (Event) EVTINFSFRECPIND;
356 return (SPstTsk(pst,mBuf));
361 * @brief Request from RLC to MAC for forwarding SDUs on
362 * dedicated channel for transmission.
366 * Function : cmUnpkMacSchSfRecpInd
368 * @param[in] Pst* pst
369 * @param[in] SpId spId
370 * @param[in] RguDDatReqInfo * datReq
375 PUBLIC S16 cmUnpkMacSchSfRecpInd
382 PUBLIC S16 cmUnpkMacSchSfRecpInd(func, pst, mBuf)
388 RgInfSfDatInd* datInd;
390 TRC2(cmUnpkMacSchCmnBoUpdtReq)
392 if(oduUnpackPointer((PTR *)&datInd, mBuf) != ROK)
394 RGSCHINF_FREE_MSG(mBuf);
398 RGSCHINF_FREE_MSG(mBuf);
399 /* Call cmFreeMem(datInd) in scheduler */
400 return ((*func)(pst, datInd));
405 * @brief Primitive from MAC to SCH to indicate release of UL SPS for a UE
409 * Function : cmPkMacSchSpsRelInd
411 * @param[in] Pst* pst
412 * @param[in] RgInfSpsRelInfo* relInfo
417 PUBLIC S16 cmPkMacSchSpsRelInd
420 RgInfSpsRelInfo* relInfo
423 PUBLIC S16 cmPkMacSchSpsRelInd(pst, relInfo)
425 RgInfSpsRelInfo* relInfo;
428 Buffer *mBuf = NULLP;
430 TRC2(cmPkMacSchSpsRelInd)
432 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
436 if(oduPackPointer((PTR)relInfo, mBuf) != ROK)
438 RGSCHINF_FREE_MSG(mBuf);
442 pst->event = (Event) EVTINFSPSRELIND;
443 return (SPstTsk(pst,mBuf));
444 } /* end of cmPkMacSchSpsRelInd */
447 * @brief Primitive from MAC to SCH to indicate release of UL SPS for a UE
451 * Function : cmUnpkMacSchSpsRelInd
453 * @param[in] SpsRelInd func
454 * @param[in] Pst* pst
455 * @param[in] Buffer *mBuf
460 PUBLIC S16 cmUnpkMacSchSpsRelInd
467 PUBLIC S16 cmUnpkMacSchSpsRelInd(func, pst, mBuf)
473 RgInfSpsRelInfo *relInfo;
475 TRC2(cmUnpkMacSchSpsRelInd)
477 if(oduUnpackPointer((PTR *)&relInfo, mBuf) != ROK)
479 RGSCHINF_FREE_MSG(mBuf);
483 RGSCHINF_FREE_MSG(mBuf);
484 return ((*func)(pst, relInfo));
485 } /* end of cmUnpkMacSchSpsRelInd */
486 #endif /* LTEMAC_SPS */
491 * @brief Request from RLC to MAC for forwarding SDUs on
492 * dedicated channel for transmission.
496 * Function : cmPkSchMacSfAllocReq
498 * @param[in] Pst* pst
499 * @param[in] SpId spId
500 * @param[in] RguDDatReqInfo * datReq
505 PUBLIC S16 cmPkSchMacSfAllocReq
508 RgInfSfAlloc* resAllocReq
511 PUBLIC S16 cmPkSchMacSfAllocReq(pst, resAllocReq)
513 RgInfSfAlloc* resAllocReq;
516 Buffer *mBuf = NULLP;
517 TRC2(cmPkSchMacSfAllocReq)
519 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
523 if(oduPackPointer((PTR)resAllocReq, mBuf) != ROK)
525 RGSCHINF_FREE_MSG(mBuf);
529 pst->event = (Event) EVTINFSFALLOCREQ;
530 return (SPstTsk(pst,mBuf));
535 * @brief Request from RLC to MAC for forwarding SDUs on
536 * dedicated channel for transmission.
540 * Function : cmUnpkSchMacSfAllocReq
542 * @param[in] Pst* pst
543 * @param[in] SpId spId
544 * @param[in] RguDDatReqInfo * datReq
549 PUBLIC S16 cmUnpkSchMacSfAllocReq
556 PUBLIC S16 cmUnpkSchMacSfAllocReq(func, pst, mBuf)
562 RgInfSfAlloc* resAllocReq;
564 TRC2(cmUnpkSchMacSfAllocReq)
566 if(oduUnpackPointer((PTR *)&resAllocReq, mBuf) != ROK)
568 RGSCHINF_FREE_MSG(mBuf);
572 RGSCHINF_FREE_MSG(mBuf);
573 return ((*func)(pst, resAllocReq));
576 * @brief Request from SCH To MAC for harq entity reset
580 * Function : cmPkSchMacRstHqEntReq
582 * @param[in] Pst* pst
583 * @param[in] RgInfResetHqEnt *hqEntInfo
588 PUBLIC S16 cmPkSchMacRstHqEntReq
591 RgInfResetHqEnt* hqEntInfo
594 PUBLIC S16 cmPkSchMacRstHqEntReq(pst, sfHqInfo)
596 RgInfResetHqEnt* hqEntInfo
599 Buffer *mBuf = NULLP;
600 TRC2(cmPkSchMacRstHqEntReq)
602 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
606 if(oduPackPointer((PTR)hqEntInfo, mBuf) != ROK)
608 RGSCHINF_FREE_MSG(mBuf);
612 pst->event = (Event) EVTINFHQENTRESET;
613 return (SPstTsk(pst,mBuf));
617 * @brief Request from SCH to MAC for resetting the harqentity
621 * Function : cmUnpkSchMacRstHqEntReq
623 * @param[in] Pst* pst
624 * @param[in] RgInfResetHqEnt *hqEntInfo
629 PUBLIC S16 cmUnpkSchMacRstHqEntReq
636 PUBLIC S16 cmUnpkSchMacRstHqEntReq(func, pst, mBuf)
642 RgInfResetHqEnt* hqEntRstInfo;
644 TRC2(cmUnpkSchMacRstHqEntReq)
646 if(oduUnpackPointer((PTR *)&hqEntRstInfo, mBuf) != ROK)
648 RGSCHINF_FREE_MSG(mBuf);
652 RGSCHINF_FREE_MSG(mBuf);
653 return ((*func)(pst, hqEntRstInfo));
657 * @brief Request from RLC to MAC for forwarding SDUs on
658 * dedicated channel for transmission.
662 * Function : cmPkSchMacRlsHqReq
664 * @param[in] Pst* pst
665 * @param[in] SpId spId
666 * @param[in] RguDDatReqInfo * datReq
671 PUBLIC S16 cmPkSchMacRlsHqReq
674 RgInfRlsHqInfo* sfHqInfo
677 PUBLIC S16 cmPkSchMacRlsHqReq(pst, sfHqInfo)
679 RgInfRlsHqInfo* sfHqInfo;
682 Buffer *mBuf = NULLP;
683 TRC2(cmPkSchMacRlsHqReq)
685 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
689 if(oduPackPointer((PTR)sfHqInfo, mBuf) != ROK)
691 RGSCHINF_FREE_MSG(mBuf);
695 pst->event = (Event) EVTINFRLSHQREQ;
696 return (SPstTsk(pst,mBuf));
700 * @brief Request from RLC to MAC for forwarding SDUs on
701 * dedicated channel for transmission.
705 * Function : cmUnpkSchMacRlsHqReq
707 * @param[in] Pst* pst
708 * @param[in] SpId spId
709 * @param[in] RguDDatReqInfo * datReq
714 PUBLIC S16 cmUnpkSchMacRlsHqReq
721 PUBLIC S16 cmUnpkSchMacRlsHqReq(func, pst, mBuf)
727 RgInfRlsHqInfo* sfHqInfo;
729 TRC2(cmUnpkSchMacRlsHqReq)
731 if(oduUnpackPointer((PTR *)&sfHqInfo, mBuf) != ROK)
733 RGSCHINF_FREE_MSG(mBuf);
737 RGSCHINF_FREE_MSG(mBuf);
738 return ((*func)(pst, sfHqInfo));
741 * @brief Request from RLC to MAC for forwarding SDUs on
742 * dedicated channel for transmission.
746 * Function : cmPkSchMacRlsRntiReq
748 * @param[in] Pst* pst
749 * @param[in] SpId spId
750 * @param[in] RguDDatReqInfo * datReq
755 PUBLIC S16 cmPkSchMacRlsRntiReq
758 RgInfRlsRnti* rlsRnti
761 PUBLIC S16 cmPkSchMacRlsRntiReq(pst, rlsRnti)
763 RgInfRlsRnti* rlsRnti;
766 Buffer *mBuf = NULLP;
767 TRC2(cmPkSchMacRlsRntiReq)
769 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
773 #ifdef MS_MBUF_CORRUPTION
774 MS_BUF_ADD_ALLOC_CALLER();
776 if(SAddPstMsgMult((Data *)rlsRnti, sizeof(RgInfRlsRnti), mBuf) != ROK)
778 RGSCHINF_FREE_MSG(mBuf);
782 pst->event = (Event) EVTINFRLSRNTIREQ;
783 return (SPstTsk(pst,mBuf));
787 * @brief Request from RLC to MAC for forwarding SDUs on
788 * dedicated channel for transmission.
792 * Function : cmUnpkSchMacRlsRntiReq
794 * @param[in] Pst* pst
795 * @param[in] SpId spId
796 * @param[in] RguDDatReqInfo * datReq
801 PUBLIC S16 cmUnpkSchMacRlsRntiReq
808 PUBLIC S16 cmUnpkSchMacRlsRntiReq(func, pst, mBuf)
814 RgInfRlsRnti rlsRnti;
816 TRC2(cmUnpkSchMacRlsRntiReq)
818 if(SRemPreMsgMult((Data *)&rlsRnti, sizeof(RgInfRlsRnti), mBuf) != ROK)
820 RGSCHINF_FREE_MSG(mBuf);
824 RGSCHINF_FREE_MSG(mBuf);
825 return ((*func)(pst, &rlsRnti));
829 * @brief Request from RLC to MAC for forwarding SDUs on
830 * dedicated channel for transmission.
834 * Function : cmPkSchMacCellRegReq
836 * @param[in] Pst* pst
837 * @param[in] SpId spId
838 * @param[in] RguDDatReqInfo * datReq
843 PUBLIC S16 cmPkSchMacCellRegReq
849 PUBLIC S16 cmPkSchMacCellRegReq(pst, regReq)
851 RgInfCellReg* regReq;
854 Buffer *mBuf = NULLP;
855 TRC2(cmPkSchMacCellRegReq)
857 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
861 #ifdef MS_MBUF_CORRUPTION
862 MS_BUF_ADD_ALLOC_CALLER();
864 if(SAddPstMsgMult((Data *)regReq, sizeof(RgInfCellReg), mBuf) != ROK)
866 RGSCHINF_FREE_MSG(mBuf);
870 pst->event = (Event) EVTINFCELLREGREQ;
871 return (SPstTsk(pst,mBuf));
875 * @brief Request from RLC to MAC for forwarding SDUs on
876 * dedicated channel for transmission.
880 * Function : cmUnpkSchMacCellRegReq
882 * @param[in] Pst* pst
883 * @param[in] SpId spId
884 * @param[in] RguDDatReqInfo * datReq
889 PUBLIC S16 cmUnpkSchMacCellRegReq
896 PUBLIC S16 cmUnpkSchMacCellRegReq(func, pst, mBuf)
904 TRC2(cmUnpkSchMacCellRegReq)
906 if(SRemPreMsgMult((Data *)®Req, sizeof(RgInfCellReg), mBuf) != ROK)
908 RGSCHINF_FREE_MSG(mBuf);
912 RGSCHINF_FREE_MSG(mBuf);
913 return ((*func)(pst, ®Req));
917 * @brief Primitive from SCH to MAC to register GBR LCG per UE
921 * Function : cmPkSchMacLcgRegReq
923 * @param[in] Pst* pst
924 * @param[in] RgInfLcgRegReq *lcgRegReq
929 PUBLIC S16 cmPkSchMacLcgRegReq
932 RgInfLcgRegReq *lcgRegReq
935 PUBLIC S16 cmPkSchMacLcgRegReq(pst, lcgRegReq)
937 RgInfLcgRegReq *lcgRegReq;
940 Buffer *mBuf = NULLP;
942 TRC2(cmPkSchMacLcgRegReq)
944 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
948 if(SAddPstMsgMult((Data *)lcgRegReq, sizeof(RgInfLcgRegReq), mBuf) != ROK)
950 RGSCHINF_FREE_MSG(mBuf);
954 pst->event = (Event) EVTINFLCGREG;
955 return (SPstTsk(pst,mBuf));
956 } /* end of cmPkSchMacLcgRegReq */
959 * @brief Primitive from SCH to MAC to register GBR LCG
963 * Function : cmUnpkSchMacLcgRegReq
965 * @param[in] LcgReg func
966 * @param[in] Pst* pst
967 * @param[in] Buffer *mBuf
972 PUBLIC S16 cmUnpkSchMacLcgRegReq
979 PUBLIC S16 cmUnpkSchMacLcgRegReq(func, pst, mBuf)
985 RgInfLcgRegReq *lcgRegReq;
987 TRC2(cmUnpkSchMacLcgRegReq)
989 if(oduUnpackPointer((PTR *)&lcgRegReq, mBuf) != ROK)
991 RGSCHINF_FREE_MSG(mBuf);
995 RGSCHINF_FREE_MSG(mBuf);
996 return ((*func)(pst, lcgRegReq));
997 } /* end of cmUnpkSchMacLcgRegReq */
1002 * @brief Primitive from SCH to MAC to register the set of SPS LCs per UE
1006 * Function : cmPkSchMacSpsLcRegReq
1008 * @param[in] Pst* pst
1009 * @param[in] RgInfSpsLcInfo *lcInfo
1014 PUBLIC S16 cmPkSchMacSpsLcRegReq
1017 RgInfSpsLcInfo *lcInfo
1020 PUBLIC S16 cmPkSchMacSpsLcRegReq(pst, lcInfo)
1022 RgInfSpsLcInfo *lcInfo;
1025 Buffer *mBuf = NULLP;
1027 TRC2(cmPkSchMacSpsLcRegReq)
1029 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1033 if(oduPackPointer((PTR)lcInfo, mBuf) != ROK)
1035 RGSCHINF_FREE_MSG(mBuf);
1039 pst->event = (Event) EVTINFSPSLCREG;
1040 return (SPstTsk(pst,mBuf));
1041 } /* end of cmPkSchMacSpsLcRegReq */
1044 * @brief Primitive from SCH to MAC to reset SPS Params for the UE
1048 * Function : cmPkSchMacUlSpsResetReq
1050 * @param[in] Pst* pst
1051 * @param[in] RgInfUlSpsReset *ulSpsResetInfo
1056 PUBLIC S16 cmPkSchMacUlSpsResetReq
1059 RgInfUlSpsReset *ulSpsResetInfo
1062 PUBLIC S16 cmPkSchMacUlSpsResetReq(pst, ulSpsResetInfo)
1064 RgInfUlSpsReset *ulSpsResetInfo;
1067 Buffer *mBuf = NULLP;
1069 TRC2(cmPkSchMacUlSpsResetReq)
1071 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1075 if(oduPackPointer((PTR)ulSpsResetInfo, mBuf) != ROK)
1077 RGSCHINF_FREE_MSG(mBuf);
1081 pst->event = (Event) EVTINFSPSRESET;
1082 return (SPstTsk(pst,mBuf));
1083 } /* end of cmPkSchMacUlSpsResetReq */
1086 * @brief Primitive from SCH to MAC to register the set of SPS LCs per UE
1090 * Function : cmUnpkSchMacSpsLcRegReq
1092 * @param[in] SpsLcReg func
1093 * @param[in] Pst* pst
1094 * @param[in] Buffer *mBuf
1099 PUBLIC S16 cmUnpkSchMacSpsLcRegReq
1106 PUBLIC S16 cmUnpkSchMacSpsLcRegReq(func, pst, mBuf)
1112 RgInfSpsLcInfo *lcInfo;
1114 TRC2(cmUnpkSchMacSpsLcRegReq)
1116 if(oduUnpackPointer((PTR *)&lcInfo, mBuf) != ROK)
1118 RGSCHINF_FREE_MSG(mBuf);
1122 RGSCHINF_FREE_MSG(mBuf);
1123 return ((*func)(pst, lcInfo));
1124 } /* end of cmUnpkSchMacSpsLcRegReq */
1129 * @brief Primitive from SCH to MAC to reset UL SPS params
1133 * Function : cmUnpkSchMacUlSpsResetReq
1135 * @param[in] UlSpsReset func
1136 * @param[in] Pst* pst
1137 * @param[in] Buffer *mBuf
1142 PUBLIC S16 cmUnpkSchMacUlSpsResetReq
1149 PUBLIC S16 cmUnpkSchMacUlSpsResetReq(func, pst, mBuf)
1155 RgInfUlSpsReset *ulSpsResetInfo;
1157 TRC2(cmUnpkSchMacUlSpsResetReq)
1159 if(oduUnpackPointer((PTR *)&ulSpsResetInfo, mBuf) != ROK)
1161 RGSCHINF_FREE_MSG(mBuf);
1165 RGSCHINF_FREE_MSG(mBuf);
1166 return ((*func)(pst, ulSpsResetInfo));
1167 } /* end of cmUnpkSchMacUlSpsResetReq */
1172 * @brief Primitive from SCH to MAC to deregister the set of SPS LCs per UE
1176 * Function : cmPkSchMacSpsLcDeregReq
1178 * @param[in] Pst* pst
1179 * @param[in] CmLteCellId cellId,
1180 * @param[in] CmLteRnti crnti
1185 PUBLIC S16 cmPkSchMacSpsLcDeregReq
1192 PUBLIC S16 cmPkSchMacSpsLcDeregReq(pst, cellId, crnti)
1198 Buffer *mBuf = NULLP;
1200 TRC2(cmPkSchMacSpsLcDeregReq)
1202 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1206 CMCHKPK(cmPkLteCellId, cellId, mBuf);
1207 CMCHKPK(cmPkLteRnti, crnti, mBuf);
1209 pst->event = (Event) EVTINFSPSLCDEREG;
1210 return (SPstTsk(pst,mBuf));
1211 } /* end of cmPkSchMacSpsLcDeregReq */
1214 * @brief Primitive from SCH to MAC to deregister the set of SPS LCs per UE
1218 * Function : cmUnpkSchMacSpsLcDeregReq
1220 * @param[in] SpsLcDereg func
1221 * @param[in] Pst* pst
1222 * @param[in] Buffer *mBuf
1227 PUBLIC S16 cmUnpkSchMacSpsLcDeregReq
1234 PUBLIC S16 cmUnpkSchMacSpsLcDeregReq(func, pst, mBuf)
1243 TRC2(cmUnpkSchMacSpsLcDeregReq)
1245 CMCHKUNPK(cmUnpkLteRnti, &crnti, mBuf);
1246 CMCHKUNPK(cmUnpkLteCellId, &cellId, mBuf);
1248 RGSCHINF_FREE_MSG(mBuf);
1249 return ((*func)(pst, cellId, crnti));
1250 } /* end of cmUnpkSchMacSpsLcDeregReq */
1252 #endif /* LTEMAC_SPS */
1256 * @brief Primitive from SCH to MAC for L2 Measurement
1260 * Function : cmPkSchMacL2MeasReq
1262 * @param[in] Pst* pst
1263 * @param[in] RgInfSpsLcInfo *lcInfo
1268 PUBLIC S16 cmPkSchMacL2MeasReq
1271 RgInfL2MeasReq *measInfo
1274 PUBLIC S16 cmPkSchMacL2MeasReq(pst, measInfo)
1276 RgInfL2MeasReq *measInfo;
1279 Buffer *mBuf = NULLP;
1281 TRC2(cmPkSchMacL2MeasReq)
1283 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1286 if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
1288 RGSCHINF_FREE_MSG(mBuf);
1292 pst->event = (Event) EVTINFL2MEASREQ;
1293 return (SPstTsk(pst,mBuf));
1294 } /* end of cmPkSchMacL2MeasReq */
1297 * @brief Primitive from SCH to MAC for L2 Stop Measurement
1301 * Function : cmPkSchMacL2MeasStopReq
1303 * @param[in] Pst* pst
1304 * @param[in] RgInfSpsLcInfo *lcInfo
1309 PUBLIC S16 cmPkSchMacL2MeasStopReq
1312 RgInfL2MeasStopReq *measInfo
1315 PUBLIC S16 cmPkSchMacL2MeasStopReq(pst, measInfo)
1317 RgInfL2MeasStopReq *measInfo;
1320 Buffer *mBuf = NULLP;
1322 TRC2(cmPkSchMacL2MeasStopReq)
1324 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1327 if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
1333 pst->event = (Event) EVTINFL2MEASSTOPREQ;
1334 return (SPstTsk(pst,mBuf));
1335 } /* end of cmPkSchMacL2MeasStopReq */
1337 * @brief Primitive from SCH to MAC for L2 Measurement
1341 * Function : cmPkSchMacL2MeasSendReq
1343 * @param[in] Pst* pst
1344 * @param[in] RgInfSpsLcInfo *lcInfo
1349 PUBLIC S16 cmPkSchMacL2MeasSendReq
1352 RgInfL2MeasSndReq *measInfo
1355 PUBLIC S16 cmPkSchMacL2MeasSendReq(pst, measInfo)
1357 RgInfL2MeasSndReq *measInfo;
1360 Buffer *mBuf = NULLP;
1362 TRC2(cmPkSchMacL2MeasSendReq)
1363 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1367 if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)
1373 pst->event = (Event) EVTINFL2MEASSENDREQ;
1374 return (SPstTsk(pst,mBuf));
1375 } /* end of cmPkSchMacL2MeasSendReq */
1378 * @brief Primitive from SCH to MAC for L2 Measurement request
1382 * Function : cmUnpkSchMacL2MeasReq
1384 * @param[in] L2MeasReg func
1385 * @param[in] Pst* pst
1386 * @param[in] Buffer *mBuf
1391 PUBLIC S16 cmUnpkSchMacL2MeasReq
1398 PUBLIC S16 cmUnpkSchMacL2MeasReq(func, pst, mBuf)
1404 RgInfL2MeasReq measInfo;
1406 TRC2(cmUnpkSchMacL2MeasReq)
1408 if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
1410 RGSCHINF_FREE_MSG(mBuf);
1414 RGSCHINF_FREE_MSG(mBuf);
1415 return ((*func)(pst, &measInfo));
1416 } /* end of cmUnpkSchMacL2MeasReq */
1419 * @brief Primitive from SCH to MAC for L2 Measurement Stop request
1423 * Function : cmUnpkSchMacL2MeasStopReq
1425 * @param[in] L2MeasReg func
1426 * @param[in] Pst* pst
1427 * @param[in] Buffer *mBuf
1432 PUBLIC S16 cmUnpkSchMacL2MeasStopReq
1439 PUBLIC S16 cmUnpkSchMacL2MeasStopReq(func, pst, mBuf)
1445 RgInfL2MeasStopReq measInfo;
1447 TRC2(cmUnpkSchMacL2MeasStopReq)
1448 if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
1455 return ((*func)(pst, &measInfo));
1456 } /* end of cmUnpkSchMacL2MeasReq */
1458 * @brief Primitive from SCH to MAC for L2 Measurement request
1462 * Function : cmUnpkSchMacL2MeasReq
1464 * @param[in] L2MeasReg func
1465 * @param[in] Pst* pst
1466 * @param[in] Buffer *mBuf
1471 PUBLIC S16 cmUnpkSchMacL2MeasSendReq
1478 PUBLIC S16 cmUnpkSchMacL2MeasSendReq(func, pst, mBuf)
1484 RgInfL2MeasSndReq measInfo;
1486 TRC2(cmUnpkSchMacL2MeasSendReq)
1487 if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)
1494 return ((*func)(pst, &measInfo));
1495 } /* end of cmUnpkSchMacL2MeasSendReq*/
1498 * @brief Primitive from MAC to SCH for L2 Measurement
1502 * Function : cmPkMacSchL2MeasCfm
1504 * @param[in] Pst* pst
1505 * @param[in] RgInfL2MeasCfm *measInfo
1510 PUBLIC S16 cmPkMacSchL2MeasCfm
1513 RgInfL2MeasCfm *measCfm
1516 PUBLIC S16 cmPkMacSchL2MeasCfm(pst, measCfm)
1518 RgInfL2MeasCfm *measCfm;
1521 Buffer *mBuf = NULLP;
1523 TRC2(cmPkMacSchL2MeasCfm)
1525 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1529 if(SAddPstMsgMult((Data *)measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
1531 RGSCHINF_FREE_MSG(mBuf);
1535 pst->event = (Event) EVTINFL2MEASCFM;
1536 return (SPstTsk(pst,mBuf));
1537 } /* end of cmPkMacSchL2MeasCfm */
1541 * @brief Primitive from MAC to SCH for L2 Measurement
1545 * Function : cmPkMacSchL2MeasStopCfm
1547 * @param[in] Pst* pst
1548 * @param[in] RgInfL2MeasCfm *measInfo
1553 PUBLIC S16 cmPkMacSchL2MeasStopCfm
1556 RgInfL2MeasCfm *measCfm
1559 PUBLIC S16 cmPkMacSchL2MeasStopCfm(pst, measCfm)
1561 RgInfL2MeasCfm *measCfm;
1564 Buffer *mBuf = NULLP;
1566 TRC2(cmPkMacSchL2MeasStopCfm)
1567 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1571 if(SAddPstMsgMult((Data *)measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
1577 pst->event = (Event) EVTINFL2MEASSTOPCFM;
1578 return (SPstTsk(pst,mBuf));
1579 }/*cmPkMacSchL2MeasStopCfm*/
1581 * @brief Primitive from MAC to SCH for L2 Measurement Cfm
1585 * Function : cmUnpkSchMacL2MeasReq
1587 * @param[in] L2MeasCfm func
1588 * @param[in] Pst* pst
1589 * @param[in] Buffer *mBuf
1594 PUBLIC S16 cmUnpkMacSchL2MeasCfm
1601 PUBLIC S16 cmUnpkMacSchL2MeasCfm(func, pst, mBuf)
1607 RgInfL2MeasCfm measCfm;
1609 TRC2(cmUnpkMacSchL2MeasCfm)
1611 if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
1613 RGSCHINF_FREE_MSG(mBuf);
1617 RGSCHINF_FREE_MSG(mBuf);
1618 return ((*func)(pst, &measCfm));
1619 } /* end of cmUnpkMacSchL2MeasCfm */
1622 * @brief Primitive from MAC to SCH for L2 Measurement Stop Cfm
1626 * Function : cmUnpkMacSchL2MeasStopCfm
1628 * @param[in] L2MeasCfm func
1629 * @param[in] Pst* pst
1630 * @param[in] Buffer *mBuf
1635 PUBLIC S16 cmUnpkMacSchL2MeasStopCfm
1642 PUBLIC S16 cmUnpkMacSchL2MeasStopCfm(func, pst, mBuf)
1648 RgInfL2MeasCfm measCfm;
1650 TRC2(cmUnpkMacSchL2MeasStopCfm)
1652 if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
1659 return ((*func)(pst, &measCfm));
1660 } /* end of cmUnpkMacSchL2MeasStopCfm */
1662 #endif/* LTE_L2_MEAS */
1667 /**********************************************************************
1670 **********************************************************************/