FreeCalypso > hg > fc-magnetite
comparison src/aci2/aci/psa_rap.c @ 3:93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2016 00:29:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:c41a534f33c6 | 3:93999a60b835 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_RAP | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This module defines the processing functions for the | |
18 | primitives send to the protocol stack adapter by rate | |
19 | adaptation. | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 #ifdef DTI | |
23 | |
24 #ifndef PSA_RAP_C | |
25 #define PSA_RAP_C | |
26 #endif | |
27 | |
28 #include "aci_all.h" | |
29 | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "aci_cmh.h" | |
32 #include "ati_cmd.h" | |
33 #include "aci_cmd.h" | |
34 | |
35 #ifdef FAX_AND_DATA | |
36 #include "aci_fd.h" | |
37 #endif | |
38 | |
39 #include "aci.h" | |
40 #include "psa.h" | |
41 #include "aci_io.h" | |
42 #include "psa_ra.h" | |
43 #include "psa_mmi.h" | |
44 #include "cmh.h" | |
45 #include "cmh_ra.h" | |
46 | |
47 #if defined (FF_WAP) || defined (FF_SAT_E) | |
48 #include "wap_aci.h" | |
49 #endif | |
50 | |
51 #ifdef FF_TCP_IP | |
52 #include "dti.h" /* functionality of the dti library */ | |
53 #include "dti_conn_mng.h" | |
54 #include "psa_ppp_w.h" | |
55 #endif | |
56 | |
57 #include "psa_cc.h" | |
58 #include "cmh_cc.h" | |
59 | |
60 /*==== CONSTANTS ==================================================*/ | |
61 | |
62 | |
63 /*==== TYPES ======================================================*/ | |
64 | |
65 | |
66 /*==== EXPORT =====================================================*/ | |
67 | |
68 | |
69 /*==== VARIABLES ==================================================*/ | |
70 | |
71 | |
72 /*==== FUNCTIONS ==================================================*/ | |
73 | |
74 /* | |
75 +-------------------------------------------------------------------+ | |
76 | PROJECT : GSM-PS (6147) MODULE : PSA_RA | | |
77 | ROUTINE : psa_ra_activate_cnf | | |
78 +-------------------------------------------------------------------+ | |
79 | |
80 PURPOSE : processes the RA_ACTIVATE_CNF primitive send by RA. | |
81 | |
82 */ | |
83 | |
84 GLOBAL const void psa_ra_activate_cnf | |
85 (T_RA_ACTIVATE_CNF *ra_activate_cnf) | |
86 { | |
87 TRACE_EVENT ("psa_ra_activate_cnf()"); | |
88 | |
89 if ((raShrdPrm.cId EQ NO_ENTRY) OR (ccShrdPrm.ctb[raShrdPrm.cId] EQ NULL)) | |
90 { | |
91 TRACE_ERROR ("raShrdPrm.cId invalid"); | |
92 #ifndef USE_L1FD_FUNC_INTERFACE | |
93 PFREE (ra_activate_cnf); | |
94 #endif | |
95 return; | |
96 } | |
97 | |
98 if (ra_activate_cnf->ack_flg NEQ RA_NAK) | |
99 { | |
100 cmhRA_Activated( raShrdPrm.cId ); | |
101 } | |
102 | |
103 #ifndef USE_L1FD_FUNC_INTERFACE | |
104 PFREE (ra_activate_cnf); | |
105 #endif | |
106 } | |
107 | |
108 #ifdef FF_FAX | |
109 /* | |
110 +-------------------------------------------------------------------+ | |
111 | PROJECT : GSM-PS (6147) MODULE : PSA_RA | | |
112 | ROUTINE : psa_ra_modify_cnf | | |
113 +-------------------------------------------------------------------+ | |
114 | |
115 PURPOSE : processes the RA_MODIFY_CNF primitive send by RA. | |
116 | |
117 */ | |
118 | |
119 GLOBAL const void psa_ra_modify_cnf | |
120 (T_RA_MODIFY_CNF *ra_modify_cnf) | |
121 { | |
122 TRACE_EVENT ("psa_ra_modify_cnf()"); | |
123 | |
124 cmhCC_RA_Modified(raShrdPrm.cId); | |
125 | |
126 #ifndef USE_L1FD_FUNC_INTERFACE | |
127 PFREE (ra_modify_cnf); | |
128 #endif | |
129 } | |
130 #endif /* FF_FAX */ | |
131 | |
132 /* | |
133 +-------------------------------------------------------------------+ | |
134 | PROJECT : GSM-PS (6147) MODULE : PSA_RA | | |
135 | ROUTINE : psa_ra_deactivate_cnf | | |
136 +-------------------------------------------------------------------+ | |
137 | |
138 PURPOSE : processes the RA_DEACTIVATE_CNF primitive send by RA. | |
139 | |
140 */ | |
141 | |
142 GLOBAL const void psa_ra_deactivate_cnf | |
143 (T_RA_DEACTIVATE_CNF *ra_deactivate_cnf) | |
144 { | |
145 TRACE_EVENT ("psa_ra_deactivate_cnf()"); | |
146 | |
147 if ((raShrdPrm.cId EQ NO_ENTRY) OR (ccShrdPrm.ctb[raShrdPrm.cId] EQ NULL)) | |
148 { | |
149 TRACE_ERROR ("raShrdPrm.cId invalid"); | |
150 #ifndef USE_L1FD_FUNC_INTERFACE | |
151 PFREE (ra_deactivate_cnf); | |
152 #endif | |
153 return; | |
154 } | |
155 | |
156 psaCC_ctb(raShrdPrm.cId)->curCs = MNCC_CAUSE_NO_MS_CAUSE; | |
157 | |
158 cmhRA_Deactivated( raShrdPrm.cId ); | |
159 | |
160 #if defined (FF_WAP) || defined (FF_SAT_E) | |
161 if(Wap_Call) | |
162 { | |
163 /* | |
164 * Wap Protocol Stack is down | |
165 */ | |
166 ccShrdPrm.wapStat = CC_WAP_STACK_DOWN; | |
167 | |
168 if(wap_state EQ Wap_Not_Init) | |
169 { | |
170 /* WAP-dedicated variables shall be reinitialized */ | |
171 wapId = NO_ENTRY; | |
172 Wap_Call = FALSE; | |
173 | |
174 TRACE_EVENT ("WAP parameter reseted"); | |
175 } | |
176 } | |
177 #endif | |
178 | |
179 #ifndef USE_L1FD_FUNC_INTERFACE | |
180 PFREE (ra_deactivate_cnf); | |
181 #endif | |
182 } | |
183 #endif /* DTI */ | |
184 /*==== EOF =========================================================*/ | |
185 |