annotate src/g23m-aci/aci/psa_gppps.c @ 702:9394305d4ff5 default tip

etm_audio.c: fix off-by-one error in auw of FIR coefficients This fix was already made in FC Tourmaline a while back, but it is also the kind of bugfix that deserves to be backported to Magnetite and Selenite as well.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 00:14:44 +0000
parents 53929b40109c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project :
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul :
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : This module defines the signalling functions of the
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | protocol stack adapter for GPRS Point-to-Point Protocol ( PPP ).
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #if defined (GPRS) && defined (DTI)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #ifndef PSA_GPPPS_C
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #define PSA_GPPPS_C
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #endif
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "aci_all.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 /*==== INCLUDES ===================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "dti.h" /* functionality of the dti library */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "aci_cmh.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "ati_cmd.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "aci_cmd.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "aci.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "psa.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "dti_conn_mng.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "dti_cntrl_mng.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include "psa_gppp.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 /*==== CONSTANTS ==================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #define TOK_STR " =\t" /* string of token delimiter */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 /*==== TYPES ======================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 /*==== EXPORT =====================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 /*==== VARIABLES ==================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 /*==== FUNCTIONS ==================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 | PROJECT : GPRS (8441) MODULE : PSA_PPPS |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 | STATE : finished ROUTINE : psaGPPP_Establish |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 PURPOSE : request establishment of PPP connection
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 GLOBAL void psaGPPP_Establish ( T_PPP_ESTABLISH_REQ *est_req )
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 TRACE_FUNCTION ("psaGPPP_Establish()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 * create and send primitive for establich PPP
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 PALLOC (ppp_establish_req, PPP_ESTABLISH_REQ);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 *ppp_establish_req = *est_req;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 PSEND (hCommPPP, ppp_establish_req);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 | PROJECT : GPRS (8441) MODULE : PSA_PPPS |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 | STATE : finished ROUTINE : psaGPPP_Terminate |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 PURPOSE : close the PPP connection
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 GLOBAL void psaGPPP_Terminate ( UBYTE lower_layer )
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 TRACE_FUNCTION ("psaGPPP_Terminate()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 * create and send primitive for network attach
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 PALLOC (ppp_terminate_req, PPP_TERMINATE_REQ);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 /* fill in primitive parameter: registration mode */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 ppp_terminate_req -> lower_layer = lower_layer;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 PSEND (hCommPPP, ppp_terminate_req);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 | PROJECT : GPRS (8441) MODULE : PSA_PPPS |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 | STATE : finished ROUTINE : psaGPPP_PDP_Activate |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 PURPOSE : the PDP context is activated (only in server mode)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 GLOBAL void psaGPPP_PDP_Activate ( T_NAS_ip * ip, UBYTE *pco_buf, UBYTE pco_length, U8 nsapi)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 TRACE_FUNCTION ("psaGPPP_PDP_Activate()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 * create and send primitive for network attach
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 PALLOC_SDU (ppp_pdp_activate_res, PPP_PDP_ACTIVATE_RES, (USHORT)(pco_length << 3));
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 /* Issue OMAPS00047332: SM, SNDCP and UPM are not supporting ppp_hc and msid.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 * these two parameter should only be removed after
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 * PPP SAP modification. till then reset it to 0.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 ppp_pdp_activate_res->ppp_hc = 0;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 ppp_pdp_activate_res->msid = 0;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #ifdef _SIMULATION_
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 #pragma message("A check of the IP version is needed before starting a PPP connection.")
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #endif
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 ppp_pdp_activate_res->ip = ip->ip_address.ipv4_addr.a4[0] << 24;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 ppp_pdp_activate_res->ip += ip->ip_address.ipv4_addr.a4[1] << 16;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 ppp_pdp_activate_res->ip += ip->ip_address.ipv4_addr.a4[2] << 8;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 ppp_pdp_activate_res->ip += ip->ip_address.ipv4_addr.a4[3];
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 ppp_pdp_activate_res->sdu.l_buf = pco_length << 3;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 ppp_pdp_activate_res->sdu.o_buf = 0;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 if ( pco_length )
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 memcpy(&ppp_pdp_activate_res->sdu.buf, pco_buf, pco_length);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 PSEND (hCommPPP, ppp_pdp_activate_res);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 | PROJECT : GPRS (8441) MODULE : PSA_PPPS |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 | STATE : finished ROUTINE : psaGPPP_PDP_Reject |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 PURPOSE : the PDP context can't activated (only in server mode)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 GLOBAL SHORT psaGPPP_PDP_Reject ( void )
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 TRACE_FUNCTION ("psaGPPP_PDP_Reject()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 * check owner id
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 if(!psa_IsVldOwnId((T_OWN)gpppShrdPrm.owner))
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 return( -1 );
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 * create and send primitive for network attach
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 PSEND (hCommPPP, gpppShrdPrm.setPrm[gpppShrdPrm.owner].pdp_rej);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 return 0;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 | PROJECT : GPRS (8441) MODULE : PSA_PPPS |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 | STATE : finished ROUTINE : psaGPPP_Modification |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 PURPOSE : negotiate header compression again (only in server mode)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 /* NEEDED ???*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 /* LOCAL SHORT psaGPPP_Modification ( void )*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 /* {*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 /* T_PPP_SET_PRM * pPrmSet; *//* points to used parameter set */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 /* TRACE_FUNCTION ("psaGPPP_Modification()");*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 * check owner id
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 /* if(!psa_IsVldOwnId(gpppShrdPrm.owner))
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 return( -1 );
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 pPrmSet = &gpppShrdPrm.setPrm[gpppShrdPrm.owner]; */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 * create and send primitive for network attach
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 *-------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 /* {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 PALLOC (ppp_modification_req, PPP_MODIFICATION_REQ);*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 /* fill in primitive parameter: registration mode */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 /* ppp_modification_req -> ppp_hc = pPrmSet -> ppp_hc;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 ppp_modification_req -> msid = pPrmSet -> msid;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 PSEND (hCommPPP, ppp_modification_req);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 return 0;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 }*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 #endif /* GPRS */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 /*==== EOF ========================================================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244