annotate src/g23m-gprs/upm/upm_pei.c @ 495:9e55fe3a5ee4

OSL: os_mis_fl.c compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 24 Jun 2018 20:47:42 +0000
parents 2cf312e56ee7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
197
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 | Project : 3G PS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Module : UPM
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 +-----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | Copyright 2003 Texas Instruments.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | All rights reserved.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 | This file is confidential and a trade secret of Texas
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | Instruments .
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | The receipt of or possession of this file does not convey
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | any rights to reproduce or disclose its contents or to
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | manufacture, use, or sell anything it may describe, in
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | whole, or in part, without the specific written consent of
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | Texas Instruments.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 +-----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 | Purpose: This module implements the process body interface
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | for the User Plane Manager (UPM) entity.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | For design details, see:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 | 8010.939 UPM Detailed Specification
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 +---------------------------------------------------------------------------*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 /*==== DECLARATION CONTROL =================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #ifndef UPM_PEI_C
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #define UPM_PEI_C
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 /*==== INCLUDES =============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "upm.h"
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include <pei.h>
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include <custom.h>
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "upm_dispatcher.h"
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "mon_upm.h"
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 /*==== CONSTS ===============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 /*==== TYPES ================================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 /*==== LOCALS ===============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 static T_MONITOR upm_mon;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 static BOOL first_access = TRUE;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /*==== PRIVATE FUNCTIONS ====================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 | Function : pei_primitive
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 | Description : This function is called by the frame when a primitive is
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 | received and needs to be processed.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 | |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 | | UPPER LAYER
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 | v
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 | +---------------------------(DTI SAP)--------------------------+
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 | | |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 | | UPM |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 | | |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 | +-^---------^---------^---------^--------^---------^---------^-+
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 | | | | | | | |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 | | | | | | | | LOWER LAYER
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 | (SM SAP) (MMPM SAP) (RR SAP) (RRC SAP) (SN SAP) (PDCP SAP) (MEM SAP)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 | Parameters : prim - Pointer to the received primitive
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 | Return : PEI_OK - function succeeded
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 | PEI_ERROR - function failed
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 static short pei_primitive (void *primitive)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 /*@globals upm_data@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 (void)TRACE_FUNCTION("UPM pei_primitive");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 if (primitive != NULL)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 T_PRIM_HEADER *prim;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 U32 opc;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 opc = P_OPC(primitive);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 /*@i1@*/(void)PTRACE_IN (opc);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 prim = (T_PRIM_HEADER *)&((T_PRIM *)primitive)->data;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 /* Memory supervision ? */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 VSI_PPM_RCV (primitive);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 switch (opc)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 /* DTI SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #ifdef DTI2
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 case DTI2_CONNECT_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 upm_disp_dti_connect_req((T_DTI2_CONNECT_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 case DTI2_CONNECT_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 upm_disp_dti_connect_cnf ((T_DTI2_CONNECT_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 case DTI2_CONNECT_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 upm_disp_dti_connect_ind ((T_DTI2_CONNECT_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 case DTI2_CONNECT_RES:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 upm_disp_dti_connect_res((T_DTI2_CONNECT_RES *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 case DTI2_DISCONNECT_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 upm_disp_dti_disconnect_ind((T_DTI2_DISCONNECT_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 case DTI2_DISCONNECT_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 upm_disp_dti_disconnect_req((T_DTI2_DISCONNECT_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 #endif /* DTI2 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 case DTI2_GETDATA_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 upm_disp_dti_getdata_req((T_DTI2_GETDATA_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 case DTI2_READY_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 upm_disp_dti_ready_ind ((T_DTI2_READY_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 case DTI2_DATA_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 upm_disp_dti_data_req((T_DTI2_DATA_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 /* PFREE is called in the upm_sig_callback function in upm_dti_handler.c */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 case DTI2_DATA_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 upm_disp_dti_data_ind ((T_DTI2_DATA_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 /* PFREE is called in the upm_sig_callback function in upm_dti_handler.c */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 case DTI2_DATA_TEST_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 upm_disp_dti_data_test_req((T_DTI2_DATA_TEST_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 case DTI2_DATA_TEST_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 upm_disp_dti_data_test_ind((T_DTI2_DATA_TEST_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 /* PFREE is called in the DTILIB */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #endif /* DEBUG */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 /* SM SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 case SM_ACTIVATE_STARTED_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 upm_disp_sm_activate_started_ind((T_SM_ACTIVATE_STARTED_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 case SM_ACTIVATE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 upm_disp_sm_activate_ind((T_SM_ACTIVATE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 case SM_DEACTIVATE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 upm_link_dispatch_sm_deactivate_ind((T_SM_DEACTIVATE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 case SM_MODIFY_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 upm_disp_sm_modify_ind((T_SM_MODIFY_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 /* MMPM SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 case MMPM_SUSPEND_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 upm_disp_mmpm_suspend_ind((T_MMPM_SUSPEND_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 case MMPM_RESUME_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 upm_disp_mmpm_resume_ind((T_MMPM_RESUME_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 case MMPM_REESTABLISH_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 upm_disp_mmpm_reestablish_cnf((T_MMPM_REESTABLISH_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 case MMPM_REESTABLISH_REJ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 upm_disp_mmpm_reestablish_rej((T_MMPM_REESTABLISH_REJ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 case MMPM_SEQUENCE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 upm_disp_mmpm_sequence_ind((T_MMPM_SEQUENCE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 #ifdef TI_DUAL_MODE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 case MMPM_RAT_CHANGE_COMPLETED_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 upm_disp_mmpm_rat_change_completed_ind((T_MMPM_RAT_CHANGE_COMPLETED_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 case MMPM_RAT_CHANGE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 upm_disp_mmpm_rat_change_ind((T_MMPM_RAT_CHANGE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 #endif /* TI_DUAL_MODE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 /* PDCP SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 case PDCP_DATA_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 upm_disp_pdcp_data_ind((T_PDCP_DATA_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 case PDCP_TEST_DATA_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 upm_disp_pdcp_test_data_ind((T_PDCP_TEST_DATA_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 #endif /* DEBUG */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #ifdef TI_DUAL_MODE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 case PDCP_AM_GET_PENDING_PDU_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 upm_disp_pdcp_get_pending_pdu_cnf((T_PDCP_AM_GET_PENDING_PDU_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 case PDCP_TEST_AM_GET_PENDING_PDU_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 upm_disp_pdcp_test_am_get_pending_pdu_cnf((T_PDCP_TEST_AM_GET_PENDING_PDU_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 /* RRC SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 case RRC_MOVE_USER_DATA_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 upm_disp_rrc_move_user_data_ind((T_RRC_MOVE_USER_DATA_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 #endif /* TI_DUAL_MODE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 case RRC_RAB_ESTABLISH_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 upm_disp_rrc_rab_establish_ind((T_RRC_RAB_ESTABLISH_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 case RRC_RAB_ESTABLISH_COMPLETE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 upm_disp_rrc_rab_establish_complete_ind((T_RRC_RAB_ESTABLISH_COMPLETE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 case RRC_RAB_RELEASE_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 upm_disp_rrc_rab_release_ind((T_RRC_RAB_RELEASE_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 /* MEM SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 case MEM_READY_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 upm_disp_mem_ready_ind((T_MEM_READY_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 /* SN SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 case SN_ACTIVATE_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 upm_disp_sn_activate_cnf((T_SN_ACTIVATE_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 case SN_COUNT_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 upm_disp_sn_count_cnf((T_SN_COUNT_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 case SN_MODIFY_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 upm_disp_sn_modify_cnf((T_SN_MODIFY_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 case SN_DEACTIVATE_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 upm_disp_sn_deactivate_cnf((T_SN_DEACTIVATE_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 case SN_STATUS_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 /* May affect multiple contexts. Special dispatch handling. */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 upm_sndcp_dispatch_sn_status_ind((T_SN_STATUS_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 case SN_SEQUENCE_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 /* May affect multiple contexts. Special dispatch handling. */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 upm_sndcp_dispatch_sn_sequence_cnf((T_SN_SEQUENCE_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 #ifdef TI_DUAL_MODE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 case SN_GET_PENDING_PDU_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 upm_disp_sn_get_pending_pdu_cnf((T_SN_GET_PENDING_PDU_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 case SN_TEST_GET_PENDING_PDU_CNF:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 upm_disp_sn_test_get_pending_pdu_cnf((T_SN_TEST_GET_PENDING_PDU_CNF *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 #endif /* DEBUG */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 /* RR SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 case RR_MOVE_USER_DATA_IND:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 upm_disp_rr_move_user_data_ind((T_RR_MOVE_USER_DATA_IND *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 #endif /* TI_DUAL_MODE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 /* UPM SAP */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 case UPM_COUNT_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 upm_disp_upm_count_req((T_UPM_COUNT_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 case UPM_DTI_REQ:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 upm_disp_upm_dti_req((T_UPM_DTI_REQ *)(prim));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 break;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 default:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 /* forward sys primitives to the environment */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 if ( (opc & SYS_MASK) != 0) {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 (void)vsi_c_primitive(VSI_CALLER primitive);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 return (short)PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 } else {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 PFREE(prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 } /* switch */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 } /* if (prim != NULL) */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 return PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 | Function : pei_init
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 | Description : This function is called by the frame. It is used
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 | to initialise the entity.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 | Parameters : handle - task handle
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 | Return : PEI_OK - entity initialised
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 | PEI_ERROR - entity not (yet) initialised
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 static short pei_init (T_HANDLE handle)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 /*@globals undef upm_data@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 /*@modifies upm_data@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 (void)TRACE_FUNCTION ("UPM pei_init");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 /* Clear static entity data store */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 memset(&upm_data, 0, sizeof(upm_data));
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 * Initialize task handles
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 upm_data.upm_handle = handle;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 hCommACI = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 hCommSM = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 hCommMM = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 hCommPDCP = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 hCommRRC = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 hCommSNDCP = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 hCommRR = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 * Open communication channels
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 if (hCommACI < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 if ((hCommACI = vsi_c_open(VSI_CALLER ACI_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 if (hCommSM < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 if ((hCommSM = vsi_c_open(VSI_CALLER SM_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 if (hCommMM < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 /*#ifdef UPM_EDGE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 if ((hCommMM = vsi_c_open(VSI_CALLER GMM_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 /*#else */ /*#ifdef UPM_EDGE*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 /* if ((hCommMM = vsi_c_open(VSI_CALLER MM_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 #endif */ /*#ifdef UPM_EDGE*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 if (hCommPDCP < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 if ((hCommPDCP = vsi_c_open(VSI_CALLER PDCP_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 if (hCommRRC < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 if ((hCommRRC = vsi_c_open(VSI_CALLER RRC_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 if (hCommSNDCP < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 if ((hCommSNDCP = vsi_c_open (VSI_CALLER SNDCP_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 if (hCommRR < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 if ((hCommRR = vsi_c_open (VSI_CALLER RR_NAME)) < VSI_OK)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 return (short)PEI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 * Initialize entity data (call init functions)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 mem_init();
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 * Initialize DTI
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 assert (upm_hDTI == NULL);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 upm_hDTI = dti_init((U8)NAS_SIZE_NSAPI, upm_data.upm_handle,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 DTI_DEFAULT_OPTIONS, upm_sig_callback);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 return (short)PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 | Function : pei_exit
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 | Description : This function is called by the frame when the entity
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 | is terminated. All open resources are freed.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 | Parameters : -
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 | Return : PEI_OK - exit sucessful
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 | PEI_ERROR - exit not successful
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 static short pei_exit (void)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503 int nsapi;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 (void)TRACE_FUNCTION ("UPM pei_exit");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 * Clean up entity data
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510 for (nsapi = (int)NAS_NSAPI_5; nsapi < NAS_SIZE_NSAPI; nsapi++) {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511 struct T_CONTEXT_DATA *ptr_context_data;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 ptr_context_data = upm_get_context_data_from_nsapi(nsapi);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 if (ptr_context_data != NULL) {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 upm_sndcp_control_exit (ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 upm_rab_control_exit (ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 upm_link_control_exit (ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 upm_downlink_data_control_exit(ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 upm_uplink_data_control_exit (ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 upm_dti_control_exit (ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 upm_free_mem_buffer(ptr_context_data);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 upm_free_context_data(nsapi);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 #ifdef TI_DUAL_MODE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 upm_rat_control_exit();
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 #ifndef UPM_WITHOUT_USER_PLANE
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 * Clean-up DTILIB
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 dti_deinit(upm_hDTI);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 /* Disable forced DTI neighbor routing */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 upm_disp_force_neighbor(NULL);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550 #endif /* UPM_WITHOUT_USER_PLANE */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 * Close communication channels
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 (void)vsi_c_close(VSI_CALLER hCommACI);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 hCommACI = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 (void)vsi_c_close(VSI_CALLER hCommSM);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 hCommSM = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 (void)vsi_c_close(VSI_CALLER hCommMM);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 hCommMM = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 (void)vsi_c_close(VSI_CALLER hCommPDCP);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 hCommPDCP = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 (void)vsi_c_close(VSI_CALLER hCommRRC);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569 hCommRRC = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572 #ifdef TI_GPRS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 (void)vsi_c_close(VSI_CALLER hCommSNDCP);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 hCommSNDCP = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 (void)vsi_c_close(VSI_CALLER hCommRR);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 hCommRR = VSI_ERROR;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 #endif /* TI_GPRS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 return PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 | Function : pei_config
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 | Description : This function is called by the frame when a primitive is
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 | received indicating dynamic configuration.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 | This function is not used in this entity.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 | Parameters : handle - Communication handle
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 | Return : PEI_OK - sucessful
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 | PEI_ERROR - not successful
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 static short pei_config (char *inString)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 const size_t neighbor_strlen = strlen("NEIGHBOR_ENTITY");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 #endif
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 (void)TRACE_FUNCTION ("UPM pei_config");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 (void)TRACE_FUNCTION (inString);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 #ifdef DEBUG
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 #ifdef TI_UMTS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 if ( strcmp(inString, "MEM_FLOW_CONTROL ON") == 0)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 upm_disp_adjust_mem_flow_control(TRUE);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 else if ( strcmp(inString, "MEM_FLOW_CONTROL OFF") == 0)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 upm_disp_adjust_mem_flow_control(FALSE);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 else if ( strncmp(inString, "NEIGHBOR_ENTITY", neighbor_strlen) == 0)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 if (strncmp(&inString[neighbor_strlen + 1], "CLEAR", sizeof("CLEAR")) != 0)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 upm_disp_force_neighbor(&inString[neighbor_strlen + 1]);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 } else {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 upm_disp_force_neighbor(NULL);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 } else
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 #endif /* TI_UMTS */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 if ( strcmp(inString, "LL_ENTITY_TEST") == 0)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 upm_activate_ll_entity_test();
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 #endif /* DEBUG */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 return PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638 | Function : pei_monitor
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 | Description : This function is called by the frame in case sudden entity
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 | specific data is requested (e.g. entity Version).
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 | Parameters : out_monitor - return the address of the data to be
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 | monitoredCommunication handle
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 | Return : PEI_OK - sucessful (address in out_monitor is valid)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 | PEI_ERROR - not successful
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 /*@-compdef@*/ /*@-mods@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 static short pei_monitor (void **out_monitor) /*@globals undef upm_mon@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 (void)TRACE_FUNCTION ("UPM pei_monitor");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 * Version = "0.S" (S = Step).
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 upm_mon.version = "UPM 0.1";
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 *out_monitor = &upm_mon;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 return PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 /*@=compdef@*/ /*@=mods@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665 /*==== PUBLIC FUNCTIONS =====================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 | Function : pei_create
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 | Description : This function is called by the frame when the process is
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 | created.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 | Parameters : out_name - Pointer to the buffer in which to locate
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 | the name of this entity
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 | Return : PEI_OK - entity created successfuly
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 | PEI_ERROR - entity could not be created
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 short pei_create (T_PEI_INFO **info)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683 /*@globals first_access@*/ /*@modifies first_access@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 /*@-nullassign@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 static T_PEI_INFO pei_info =
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 /*@i1@*/ UPM_NAME, /* name */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689 { /* pei-table */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 pei_init,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 pei_exit,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 pei_primitive,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 NULL, /* no pei_timeout function */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 NULL, /* no pei_signal function */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 NULL, /* no pei_run function */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 pei_config,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 pei_monitor
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 },
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 (U32)1024, /* stack size */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 (U16)20, /* queue entries */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 (U16)216, /* priority (1->low, 255->high) */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 (U16)0, /* number of timers */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 (U8)0x03 /* flags: bit 0 active(0) body/passive(1) */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 }; /* bit 1 com by copy(0)/reference(1) */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 /*@+nullassign@*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 (void)TRACE_FUNCTION ("UPM pei_create");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710 * Close Resources if open
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712 if (first_access)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 first_access = FALSE;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 } else {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 (void)pei_exit();
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 * Export startup configuration data
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 *info = &pei_info;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 return PEI_OK;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 /*==== END OF FILE ==========================================================*/