FreeCalypso > hg > fc-tourmaline
comparison src/g23m-aci/aci/psa_gmms.c @ 1:fa8dc04885d8
src/g23m-*: import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:25:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:4e78acac3d88 | 1:fa8dc04885d8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
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 signalling functions of the | |
18 | protocol stack adapter for the registration part of | |
19 | GPRS mobility management ( GMM ). | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #ifdef GPRS | |
24 | |
25 #ifndef PSA_GMMS_C | |
26 #define PSA_GMMS_C | |
27 #endif | |
28 | |
29 #include "aci_all.h" | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "aci_cmh.h" | |
32 #include "ati_cmd.h" | |
33 #include "aci_cmd.h" | |
34 #include "gaci_cmh.h" | |
35 #include "aci.h" | |
36 #include "psa.h" | |
37 #include "psa_gmm.h" | |
38 | |
39 #include "psa_sim.h" | |
40 #include "cmh.h" | |
41 #include "dti_conn_mng.h" | |
42 #include "cmh_sim.h" | |
43 | |
44 | |
45 /*==== CONSTANTS ==================================================*/ | |
46 | |
47 | |
48 /*==== TYPES ======================================================*/ | |
49 | |
50 | |
51 /*==== EXPORT =====================================================*/ | |
52 | |
53 | |
54 /*==== VARIABLES ==================================================*/ | |
55 /*==== FUNCTIONS ==================================================*/ | |
56 /* | |
57 +-------------------------------------------------------------------+ | |
58 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
59 | ROUTINE : psaGMM_Attach | | |
60 +-------------------------------------------------------------------+ | |
61 | |
62 PURPOSE : start an attach | |
63 | |
64 */ | |
65 GLOBAL void psaGMM_Attach ( UBYTE mobile_class, UBYTE attach_type, UBYTE service_mode ) | |
66 { | |
67 | |
68 TRACE_FUNCTION ("psaGMM_Attach()"); | |
69 | |
70 GMM_PRIM_TRACE_2("ATT_REQ", | |
71 dbg_mobileClass(mobile_class), | |
72 dbg_attachType(attach_type)); | |
73 /* | |
74 *------------------------------------------------------------------- | |
75 * create and send primitive for network attach | |
76 *------------------------------------------------------------------- | |
77 */ | |
78 { | |
79 PALLOC (gmmreg_attach_req, GMMREG_ATTACH_REQ); | |
80 | |
81 /* fill in primitive parameter: registration mode */ | |
82 gmmreg_attach_req -> mobile_class = mobile_class; | |
83 gmmreg_attach_req -> attach_type = attach_type; | |
84 gmmreg_attach_req -> service_mode = service_mode; | |
85 | |
86 /* Fill the bootup action to NORMAL_REG to take | |
87 appropriate actions by the lower layers */ | |
88 gmmreg_attach_req->bootup_act = NORMAL_REG; | |
89 psaGMM_NetworkRegistrationStatus(GMMREG_ATTACH_REQ, gmmreg_attach_req); | |
90 | |
91 PSEND (hCommGMM, gmmreg_attach_req); | |
92 } | |
93 | |
94 } | |
95 | |
96 /* | |
97 +-------------------------------------------------------------------+ | |
98 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
99 | ROUTINE : psaGMM_Detach | | |
100 +-------------------------------------------------------------------+ | |
101 | |
102 PURPOSE : start an detach | |
103 | |
104 */ | |
105 GLOBAL void psaGMM_Detach ( UBYTE detach_type ) | |
106 { | |
107 | |
108 TRACE_FUNCTION ("psaGMM_Detach()"); | |
109 | |
110 GMM_PRIM_TRACE_1("DET_REQ", | |
111 dbg_detachType(detach_type)); | |
112 /* | |
113 *------------------------------------------------------------------- | |
114 * create and send primitive for network attach | |
115 *------------------------------------------------------------------- | |
116 */ | |
117 { | |
118 PALLOC (gmmreg_detach_req, GMMREG_DETACH_REQ); | |
119 | |
120 /* fill in primitive parameter: registration mode */ | |
121 gmmreg_detach_req -> detach_type = detach_type; | |
122 | |
123 PSEND (hCommGMM, gmmreg_detach_req); | |
124 } | |
125 } | |
126 | |
127 /* | |
128 +-------------------------------------------------------------------+ | |
129 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
130 | ROUTINE : psaGMM_Net_Req | | |
131 +-------------------------------------------------------------------+ | |
132 | |
133 PURPOSE : start a network search | |
134 | |
135 */ | |
136 GLOBAL void psaGMM_Net_Req ( void ) | |
137 { | |
138 | |
139 TRACE_FUNCTION ("psaGMM_Net_Req()"); | |
140 | |
141 /* | |
142 *------------------------------------------------------------------- | |
143 * create and send primitive for network attach | |
144 *------------------------------------------------------------------- | |
145 */ | |
146 { | |
147 PALLOC (gmmreg_net_req, GMMREG_NET_REQ); | |
148 PSEND (hCommGMM, gmmreg_net_req); | |
149 } | |
150 } | |
151 | |
152 /* | |
153 +-------------------------------------------------------------------+ | |
154 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
155 | ROUTINE : psaGMM_Plmn_res | | |
156 +-------------------------------------------------------------------+ | |
157 | |
158 PURPOSE : select a PLMN after network search | |
159 | |
160 */ | |
161 GLOBAL void psaGMM_Plmn_res ( UBYTE mobile_class, UBYTE attach_type, T_plmn *plmn ) | |
162 { | |
163 | |
164 TRACE_FUNCTION ("psaGMM_Plmn_res()"); | |
165 | |
166 GMM_PRIM_TRACE_2("PLMN_RES", | |
167 dbg_mobileClass(mobile_class), | |
168 dbg_attachType(attach_type)); | |
169 /* | |
170 *------------------------------------------------------------------- | |
171 * create and send primitive for network attach | |
172 *------------------------------------------------------------------- | |
173 */ | |
174 { | |
175 PALLOC (gmmreg_plmn_res, GMMREG_PLMN_RES); | |
176 | |
177 /* fill in primitive parameter: registration mode */ | |
178 gmmreg_plmn_res -> plmn = *plmn; | |
179 gmmreg_plmn_res -> attach_type = attach_type; | |
180 gmmreg_plmn_res -> mobile_class = mobile_class; | |
181 | |
182 PSEND (hCommGMM, gmmreg_plmn_res); | |
183 } | |
184 | |
185 } | |
186 | |
187 /* | |
188 +-------------------------------------------------------------------+ | |
189 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
190 | ROUTINE : psaGMM_Plmn_mode_req | | |
191 +-------------------------------------------------------------------+ | |
192 | |
193 PURPOSE : switch between automatic and manual mode of registration | |
194 | |
195 */ | |
196 GLOBAL void psaGMM_Plmn_mode_req ( UBYTE net_selection_mode ) | |
197 { | |
198 | |
199 TRACE_FUNCTION ("psaGMM_Plmn_mode_req()"); | |
200 | |
201 /* | |
202 *------------------------------------------------------------------- | |
203 * create and send primitive for network attach | |
204 *------------------------------------------------------------------- | |
205 */ | |
206 { | |
207 PALLOC (gmmreg_plmn_mode_req, GMMREG_PLMN_MODE_REQ); | |
208 | |
209 /* fill in primitive parameter: registration mode */ | |
210 gmmreg_plmn_mode_req -> net_selection_mode = net_selection_mode; | |
211 | |
212 PSEND (hCommGMM, gmmreg_plmn_mode_req); | |
213 } | |
214 | |
215 } | |
216 | |
217 /* | |
218 +-------------------------------------------------------------------+ | |
219 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
220 | ROUTINE : psaGMM_Config_req | | |
221 +-------------------------------------------------------------------+ | |
222 | |
223 PURPOSE : send a config request to GMM. | |
224 | |
225 */ | |
226 GLOBAL void psaGMM_Config_req( UBYTE cipher_on, UBYTE tlli_handling ) | |
227 { | |
228 TRACE_FUNCTION ("psaGMM_Config_req()"); | |
229 | |
230 { | |
231 PALLOC (gmmreg_config_req, GMMREG_CONFIG_REQ); | |
232 | |
233 gmmreg_config_req -> cipher_on = cipher_on; | |
234 gmmreg_config_req -> tlli_handling = tlli_handling; | |
235 | |
236 PSEND (hCommGMM, gmmreg_config_req); | |
237 } | |
238 | |
239 } | |
240 | |
241 #endif /* GPRS */ | |
242 /*==== EOF ========================================================*/ | |
243 |