FreeCalypso > hg > fc-magnetite
annotate src/g23m-gprs/llc/llc_us.c @ 361:9e0608dc9170
l1_cust.c: madc_vbat_inverse() function added for the new FCHG
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 29 Dec 2017 05:51:08 +0000 |
parents | 219afcfc6250 |
children |
rev | line source |
---|---|
183
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
219afcfc6250
src/g23m-gprs: 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 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
219afcfc6250
src/g23m-gprs: 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 |
219afcfc6250
src/g23m-gprs: 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 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
219afcfc6250
src/g23m-gprs: 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 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : This modul is part of the entity LLC and implements all |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | functions to handles the incoming process internal signals as |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 | described in the SDL-documentation (U-statemachine) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 +----------------------------------------------------------------------------- |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #ifndef LLC_US_C |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #define LLC_US_C |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #endif |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #define ENTITY_LLC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /*==== INCLUDES =============================================================*/ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "typedefs.h" /* to get Condat data types */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "vsi.h" /* to get a lot of macros */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "macdef.h" |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "gprs.h" |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "gsm.h" /* to get a lot of macros */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "cnf_llc.h" /* to get cnf-definitions */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "mon_llc.h" /* to get mon-definitions */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "prim.h" /* to get the definitions of used SAP and directions */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "llc.h" /* to get the global entity definitions */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "llc_f.h" |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "llc_uf.h" /* to get local U functions */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "llc_ul.h" /* to get local U labels */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "llc_t200s.h" /* to get signal interface to T200 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "llc_txs.h" /* to get signal interface to TX */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "llc_llmes.h" /* to get signal interface to LLME */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 /*==== CONST ================================================================*/ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 /*==== LOCAL VARS ===========================================================*/ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 /*==== PRIVATE FUNCTIONS ====================================================*/ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /*==== PUBLIC FUNCTIONS =====================================================*/ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 | Function : sig_llme_u_assign_req |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 | Description : Handles the internal signal SIG_LLME_U_ASSIGN_REQ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 | Parameters : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 GLOBAL void sig_llme_u_assign_req (void) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 TRACE_ISIG( "sig_llme_u_assign_req" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 switch (GET_STATE(U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 case U_TLLI_UNASSIGNED: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 u_init_sapi(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 TRACE_ERROR( "SIG_LLME_U_ASSIGN_REQ unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 } /* sig_llme_u_assign_req() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 | Function : sig_llme_u_unassign_req |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 | Description : Handles the internal signal SIG_LLME_U_UNASSIGN_REQ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 | Parameters : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 GLOBAL void sig_llme_u_unassign_req (void) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 TRACE_ISIG( "sig_llme_u_unassign_req" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 switch (GET_STATE(U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 case U_TLLI_UNASSIGNED: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 TRACE_ERROR( "SIG_LLME_U_UNASSIGN_REQ unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 sig_u_t200_stop_req(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 SET_STATE (U, U_TLLI_UNASSIGNED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 } /* sig_llme_u_unassign_req() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 | Function : sig_rx_u_data_ind |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 | Description : Handles the internal signal SIG_RX_U_DATA_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 | Parameters : ll_unitdata_ind - a valid pointer to an LL-UNITDATA-IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 | primitive |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 | command - contains the command within the primitive |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 | cr_bit - setting of the C/R bit |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 | pf_bit - setting of the P/F bit |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 GLOBAL void sig_rx_u_data_ind (T_LL_UNITDATA_IND *ll_unitdata_ind, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 T_COMMAND command, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 T_BIT cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 T_BIT pf_bit) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 BOOL reset_received; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 BOOL xid_ind; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 BOOL rc_xid_valid; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 BOOL l3p_outstanding; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 TRACE_ISIG( "sig_rx_u_data_ind" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 * Set TLLI for current transaction. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 llc_data->u->current_tlli = ll_unitdata_ind->tlli; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 switch (GET_STATE(U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 case U_ADM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 if (cr_bit EQ SGSN_COMMAND) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 * Label ADM_COMMAND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 case U_SABM: /* COMMAND ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 * Label ADM_SABM |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 if ( (llc_data->current_sapi EQ LL_SAPI_1) || |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 (llc_data->current_sapi EQ LL_SAPI_7) ) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 * ABM not possible on SAPI 1 and 7 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 u_send_dm (pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 else /* current_sapi is one of 3, 5, 9, or 11 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 rc_xid_valid = u_check_xid (&(ll_unitdata_ind->sdu), |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 cr_bit, command); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 if (rc_xid_valid) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 * No check needed, reset_received cannot be TRUE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 * (<R.LLC.XID_INVA.A.003>) and xid_ind is meaningless |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 * (LL_ESTABLISH_IND contains N201-U/I). |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 u_eval_xid (cr_bit, &reset_received, &xid_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 * Check XID/SABM collision issue - XID command shall |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 * be treated as not transmitted. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 if (llc_data->u->xid_pending) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 llc_data->u->xid_pending = FALSE; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 sig_u_t200_stop_req(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 * Label S_EST_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 u_label_s_est_ind (pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 else /* pf_bit is not set */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 case U_XID: /* COMMAND ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 * Label XID |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 u_label_xid (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 case U_DISC: /* COMMAND ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 u_send_dm (pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 else /* SGSN_RESPONSE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 * Label ADM_RESPONSE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 case U_UA: /* RESPONSE ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 u_send_llgmm_status_ind (LLGMM_ERRCS_MULT_ASS_TLLI); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 case U_DM: /* RESPONSE ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 case U_XID: /* RESPONSE ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 * Label XIDRES |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 u_label_xidres (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 case U_FRMR: /* RESPONSE ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 break; /* U_ADM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 case U_LOCAL_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 if (cr_bit EQ SGSN_COMMAND) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 * Label LEST_COMMAND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 case U_SABM: /* COMMAND LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 * Label LEST_SABM |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 rc_xid_valid = u_check_xid (&ll_unitdata_ind->sdu, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 command); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 if (rc_xid_valid) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 if ((llc_data->decoded_l3_xid.valid EQ TRUE) AND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 !(llc_data->u->xid_tag_sent & (0x00000001L << XID_LAYER_3))) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 * No check needed, reset_received cannot be TRUE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 * (<R.LLC.XID_INVA.A.003>) and xid_ind is meaningless |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 * (LL_ESTABLISH_IND contains N201-U/I). |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 u_eval_xid (cr_bit, &reset_received, &xid_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 * Label S_EST_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 u_label_s_est_ind (pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 else /* pf_bit is not set */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 case U_DISC: /* COMMAND LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 PALLOC (ll_release_ind, LL_RELEASE_IND); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 ll_release_ind->sapi = llc_data->current_sapi; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 #ifdef LL_2to1 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 ll_release_ind->ps_cause.ctrl_value = CAUSE_is_from_llc; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 ll_release_ind->ps_cause.value.llc_cause = LL_RELCS_NORMAL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 #else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 ll_release_ind->cause = LL_RELCS_NORMAL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 #endif |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 TRACE_1_OUT_PARA("s:%d", ll_release_ind->sapi); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 PSEND (hCommSNDCP, ll_release_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 u_send_dm (1); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 case U_XID: /* COMMAND LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 * Label XID_SABM_SEND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 u_label_xid_sabm_send (ll_unitdata_ind, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 else /* SGSN_RESPONSE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 * Label LEST_RESPONSE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 case U_UA: /* RESPONSE LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 * Label LEST_UA |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 rc_xid_valid = u_check_xid (&ll_unitdata_ind->sdu, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 cr_bit, command); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 if (rc_xid_valid) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 l3p_outstanding = (llc_data->u->xid_tag_sent & (0x1L << XID_LAYER_3)) ? TRUE : FALSE; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 * An UA response frame should only be handled if the XID L3 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 * para are included or not same as requested. Else ignore it! |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 if (llc_data->decoded_l3_xid.valid == l3p_outstanding) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 * <R.LLC.ABMEST_R.A.018> |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 sig_u_t200_stop_req(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 * If an XID parameter is not included in the response and |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 * if it was included in the request, the requested value is |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 * implicit accepted. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 u_handle_optimization (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 * Reset_received cannot be TRUE, otherwise |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 * frame would not be valid |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 u_eval_xid (cr_bit, &reset_received, &xid_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 if (llc_data->u->release_requested == TRUE) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 * Do not send any establish confirmation to L3 and start |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 * release procedure |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 llc_data->u->retransmission_counter = 0; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 SET_STATE (U, U_LOCAL_RELEASE); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 * Send GRLC_DATA_REQ (DISC), start T200. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 u_send_disc(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 if (llc_data->u->ind_cnf_establishment EQ IND_ESTABLISHMENT) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 u_send_ll_establish_ind (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 SET_STATE (U, U_ESTABLISH_RES_PENDING); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 * start ABM (re-)establish when establish response is received |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 else /* CNF_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 u_send_ll_establish_cnf (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 SET_STATE (U, U_ABM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 * inform LLME about (re-)establischment |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 sig_u_llme_abmest_ind(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 * request T200 to let the timer manually expire, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 * thus retransmitting the frame immediately |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 sig_u_t200_expire_req (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 /* SET_STATE (U, SAME_STATE); */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 else /* pf_bit == 0 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 u_send_llgmm_status_ind (LLGMM_ERRCS_MULT_ASS_TLLI); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 /* SET_STATE (U, SAME_STATE); */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 case U_DM: /* RESPONSE LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 * Label LEST_DM |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 sig_u_t200_stop_req(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 if (llc_data->u->release_requested == TRUE) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 u_send_ll_release_cnf (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 u_send_ll_release_ind (LL_RELCS_DM_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 case U_XID: /* RESPONSE LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 * Label XIDRES |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 u_label_xidres (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 case U_FRMR: /* RESPONSE LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 break; /* U_LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 case U_ABM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 if (cr_bit EQ SGSN_COMMAND) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 * Label ABM_COMMAND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 case U_SABM: /* COMMAND ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 * Label ABM_REEST_PEER |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 u_send_llgmm_status_ind (LLGMM_ERRCS_PEER_REEST); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 rc_xid_valid = u_check_xid (&ll_unitdata_ind->sdu, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 cr_bit, command); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 if (rc_xid_valid) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 * No check needed, reset_received cannot be TRUE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 * (<R.LLC.XID_INVA.A.003>) and xid_ind is meaningless |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 * (LL_ESTABLISH_IND contains N201-U/I). |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 u_eval_xid (cr_bit, &reset_received, &xid_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 * Label S_EST_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 u_label_s_est_ind (pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 else /* pf_bit == 0 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 case U_DISC: /* COMMAND ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 * Label ABM_DISC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 PALLOC (ll_release_ind, LL_RELEASE_IND); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 ll_release_ind->sapi = llc_data->current_sapi; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 #ifdef LL_2to1 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 ll_release_ind->ps_cause.ctrl_value = CAUSE_is_from_llc; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 ll_release_ind->ps_cause.value.llc_cause = LL_RELCS_NORMAL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 #else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 ll_release_ind->cause = LL_RELCS_NORMAL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 #endif |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 TRACE_1_OUT_PARA("s:%d", ll_release_ind->sapi); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 PSEND (hCommSNDCP, ll_release_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 sig_u_llme_abmrel_ind(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 * Send UA response without XID information field (= FALSE). |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 u_send_ua (pf_bit, FALSE); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 case U_XID: /* COMMAND ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 * Label XID |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 u_label_xid (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL_ABM; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 * Label FRMR_COND_REEST |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 u_label_frmr_cond_reest (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 else /* SGSN_RESPONSE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 * Label ABM_RESPONSE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 case U_UA: /* RESPONSE ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 * Label ABM_UA |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 u_send_llgmm_status_ind (LLGMM_ERRCS_MULT_ASS_TLLI); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 case U_DM: /* RESPONSE ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 * Label ABM_DM |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 u_send_llgmm_status_ind (LLGMM_ERRCS_DM1_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 else /* pf_bit == 0 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 u_send_llgmm_status_ind (LLGMM_ERRCS_DM0_RECEIVED_REEST); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 llc_data->u->retransmission_counter = 0; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 * Send LL_ESTABLISH_IND after successful establishment. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 llc_data->u->ind_cnf_establishment = IND_ESTABLISHMENT; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 SET_STATE (U, U_LOCAL_ESTABLISHMENT); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 sig_u_llme_abmrel_ind(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 * Re-establishment procedure: send GRLC_DATA_REQ (SABM), |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 * start T200. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 u_send_sabm(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 case U_XID: /* RESPONSE ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 * Label XIDRES |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 u_label_xidres (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 case U_FRMR: /* RESPONSE ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL_ABM; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 * Label FRMR_COND_REEST |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 u_label_frmr_cond_reest (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 break; /* U_ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 case U_LOCAL_RELEASE: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 if (cr_bit EQ SGSN_COMMAND) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 * Label LREL_COMMAND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 case U_SABM: /* COMMAND LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 * Send DM response with F bit set to 1. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 u_send_dm (1); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 case U_DISC: /* COMMAND LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 * Send UA response with F bit set to 1, but without information |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 * field (= FALSE). |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 u_send_ua (1, FALSE); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 case U_XID: /* COMMAND LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 * Label XID |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 u_label_xid (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 else /* SGSN_RESPONSE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 * Label LREL_RESPONSE |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 switch (command) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 case U_UA: /* RESPONSE LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 * no break! |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 case U_DM: /* RESPONSE LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 * Label LREL_UA_DM |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 if (pf_bit EQ 1) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 sig_u_t200_stop_req(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 u_send_ll_release_cnf(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 else /* pf_bit == 0 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 if (command EQ U_UA) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 u_send_llgmm_status_ind (LLGMM_ERRCS_MULT_ASS_TLLI); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 case U_XID: /* RESPONSE LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 * Label XIDRES |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 u_label_xidres (ll_unitdata_ind, command, cr_bit, pf_bit); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 case U_FRMR: /* RESPONSE LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_RECEIVED); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 llc_data->u->frmr_reason = FRMR_UNDEFINED_CTRL; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 * Label FRMR_COND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 u_label_frmr_cond (ll_unitdata_ind, cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 llc_data->u->frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 break; /* U_LOCAL_RELEASE */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 TRACE_ERROR( "SIG_RX_U_DATA_IND unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 } /* sig_rx_u_data_ind() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 | Function : sig_rx_u_frmr_ind |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 | Description : Handles the internal signal SIG_RX_U_FRMR_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 | Parameters : ll_unitdata_ind - valid pointer to the frame that caused the |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 | frame rejection condition |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 | pdu_type - type of frame |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 | frmr_ctrl_length - length of frame control field, if known |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 | cr_bit - C/R bit setting of frame |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 | frmr_reason - reason of frame rejection condition |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 GLOBAL void sig_rx_u_frmr_ind (T_LL_UNITDATA_IND *ll_unitdata_ind, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 T_PDU_TYPE pdu_type, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 USHORT frmr_ctrl_length, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 T_BIT cr_bit, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 UBYTE frmr_reason) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 TRACE_ISIG( "sig_rx_u_frmr_ind" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 * Set TLLI for current transaction. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 llc_data->u->current_tlli = ll_unitdata_ind->tlli; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 switch (GET_STATE (U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 case U_ADM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 case U_LOCAL_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 case U_ESTABLISH_RES_PENDING: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 case U_REMOTE_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 * No break! |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 case U_LOCAL_RELEASE: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_COND); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 u_send_frmr (ll_unitdata_ind, pdu_type, frmr_ctrl_length, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 llc_data->sapi->vs, llc_data->sapi->vr, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 cr_bit, frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 case U_ABM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 u_send_llgmm_status_ind (LLGMM_ERRCS_FRMR_COND_REEST); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 SET_STATE (U, U_LOCAL_ESTABLISHMENT); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 * Set bit W4 in frmr_reason to indicate ABM mode. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 frmr_reason |= FRMR_W4; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 u_send_frmr (ll_unitdata_ind, pdu_type, frmr_ctrl_length, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 llc_data->sapi->vs, llc_data->sapi->vr, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 cr_bit, frmr_reason); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 sig_u_llme_abmrel_ind(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 llc_data->u->retransmission_counter = 0; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 * Send LL_ESTABLISH_IND after successful establishment. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 llc_data->u->ind_cnf_establishment = IND_ESTABLISHMENT; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 * Re-establishment procedure: send GRLC_DATA_REQ (SABM), start T200. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 u_send_sabm(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 PFREE (ll_unitdata_ind); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 TRACE_ERROR( "SIG_RX_U_FRMR_IND unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 } /* sig_rx_u_frmr_ind() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 | Function : sig_t200_u_expired_ind |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 | Description : Handles the internal signal SIG_T200_U_EXPIRED_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 | Parameters : grlc_data_req - a valid pointer to the frame (primitive) that |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 | is associated with the timer |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 GLOBAL void sig_t200_u_expired_ind |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 ( |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 #ifndef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 T_LL_UNITDATA_REQ *ll_unitdesc_req, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 #else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 T_LL_UNITDESC_REQ *ll_unitdesc_req, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 #endif |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 UBYTE cause, |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 T_EXPIRY_MODE_TYPE mode |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 ) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 UBYTE u_state; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 TRACE_ISIG( "sig_t200_u_expired_ind" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 * Set TLLI for current transaction. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 llc_data->u->current_tlli = llc_data->tlli_new; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 u_state = GET_STATE(U); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 switch (u_state) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 case U_LOCAL_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 * First check if an L3 release requested is pendling |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 if (llc_data->u->release_requested == TRUE) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 * Do not restart timer. Send the release confirm. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 u_send_ll_release_cnf(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 * Increment retransmission_counter. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 llc_data->u->retransmission_counter++; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 if (llc_data->u->retransmission_counter <= *(llc_data->n200)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 * T200 has to be started before the primitive is sent to TX, because |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 * the primitive is copied by t200_start() and it may not be valid |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 * anymore after sending to TX. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 sig_u_t200_start_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 sig_u_tx_data_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 else /* retransmission_counter exceeds N200 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 * Label LEST_N200 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 u_send_llgmm_status_ind (LLGMM_ERRCS_SABM_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 if (mode == EXPIRY_TIMED) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 u_send_ll_release_ind (LL_RELCS_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 else /* EXPIRY_REQUESTED */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 * <R.LLC.ABMEST_R.A.015> |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 * vs. <R.LLC.ABMEST_R.A.030> |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 u_send_ll_release_ind (LL_RELCS_INVALID_XID); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 break; /* U_LOCAL_ESTABLISHMENT */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 case U_LOCAL_RELEASE: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 * First check if an L3 release requested is pendling |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 if (llc_data->u->release_requested == TRUE) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 * Do not restart timer. Send the release confirm. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 u_send_ll_release_cnf(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 * Increment retransmission_counter. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 llc_data->u->retransmission_counter++; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 if (llc_data->u->retransmission_counter <= *(llc_data->n200)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 * T200 has to be started before the primitive is sent to TX, because |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 * the primitive is copied by t200_start() and it may not be valid |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 * anymore after sending to TX. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 sig_u_t200_start_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 sig_u_tx_data_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 else /* retransmission_counter exceeds N200 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 u_send_llgmm_status_ind (LLGMM_ERRCS_DISC_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 u_send_ll_release_cnf (); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 case U_ADM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 case U_ABM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 llc_data->u->retransmission_counter++; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 if (llc_data->u->retransmission_counter <= *(llc_data->n200)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 /* If T200 expires and needs to send SABM the state should |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 * be set properly |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 if (u_state == U_ADM AND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 llc_data->u->xid_pending NEQ TRUE ) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 SET_STATE (U,U_LOCAL_ESTABLISHMENT); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 * T200 has to be started before the primitive is sent to TX, because |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 * the primitive is copied by t200_start() and it may not be valid |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 * anymore after sending to TX. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 sig_u_t200_start_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 sig_u_tx_data_req (ll_unitdesc_req, cause); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 /* SET_STATE (U, SAME_STATE); */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 else |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 * Label XIDSENT_N200 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 u_send_llgmm_status_ind (LLGMM_ERRCS_XID_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 if (llc_data->u->xid_pending) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 llc_data->u->xid_pending = FALSE; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 if (u_state == U_ADM) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 if (llc_data->u->xid_tag_sent & (0x00000001L << XID_LAYER_3)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 if (mode == EXPIRY_TIMED) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 u_send_ll_status_ind (LL_ERRCS_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 else /* EXPIRY_REQUESTED */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 u_send_ll_status_ind (LL_ERRCS_INVALID_XID); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 /* SET_STATE (U, SAME_STATE); */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 else /* U_ABM */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 if (mode == EXPIRY_TIMED) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 u_send_ll_release_ind (LL_RELCS_NO_PEER_RES); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 else /* EXPIRY_REQUESTED */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 * <R.LLC.XIDNEG_O.A.016> |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 * vs. <R.LLC.XIDNEG_O.A.022> |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 u_send_ll_release_ind (LL_RELCS_INVALID_XID); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 SET_STATE (U, U_ADM); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 sig_u_llme_abmrel_ind(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 #ifdef LL_DESC |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 llc_cl_desc3_free((T_desc3*)ll_unitdesc_req->desc_list3.first); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 #endif /* LL_DESC */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 PFREE (ll_unitdesc_req); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 TRACE_ERROR( "SIG_T200_U_EXPIRED_IND unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 } /* sig_t200_u_expired_ind() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 | Function : sig_llme_u_reest_req |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 | Description : Handles the internal signal SIG_LLME_U_REEST_REQ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 | Parameters : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 GLOBAL void sig_llme_u_reest_req ( void ) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 TRACE_FUNCTION( "sig_llme_u_reest_req" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 switch (GET_STATE(U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 case U_ABM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 llc_data->u->retransmission_counter = 0; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 * Send LL_ESTABLISH_IND after successful re-establishment. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 llc_data->u->ind_cnf_establishment = IND_ESTABLISHMENT; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 SET_STATE (U, U_LOCAL_ESTABLISHMENT); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 * Send GRLC_DATA_REQ (SABM), start T200. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 u_send_sabm(); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 TRACE_ERROR( "SIG_LLME_U_REEST_REQ unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 } /* sig_llme_u_reest_req() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 | Function : sig_irx_u_no_frame_expected_ind |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 | Description : Handles the internal signal SIG_IRX_U_NO_FRAME_EXPECTED_IND |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 | Parameters : |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1210 | |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 +------------------------------------------------------------------------------ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 GLOBAL void sig_irx_u_no_frame_expected_ind ( void ) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1214 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 TRACE_FUNCTION( "sig_irx_u_no_frame_expected_ind" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1217 switch (GET_STATE(U)) |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1218 { |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1219 case U_ADM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1220 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1221 * An LLE shall transmit a DM resonse to any valid command received |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1222 * that it cannot action: GSM 04.64 Ver 6.7.0 Chapter 6.4.1.4 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1223 * Upon receiption of an I+S frame in ADM state, the MS shall send |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1224 * a DM response with F bit set 0. |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1225 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1226 u_send_dm (0); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1227 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1228 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1229 case U_LOCAL_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1230 case U_ESTABLISH_RES_PENDING: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1231 case U_REMOTE_ESTABLISHMENT: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1232 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1233 * Ignore S- and I/S-frames received while ABM establishment. Do |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1234 * not send any response: GSM 04.64 Ver 6.7.0 Chapter 8.5.1.1 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1235 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1236 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1237 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1238 case U_LOCAL_RELEASE: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1239 /* |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1240 * Ignore S- and I/S-frames received while ABM termination. Do |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1241 * not send any response: GSM 04.64 Ver 6.7.0 Chapter 8.5.2.1 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1242 */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1243 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1244 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1245 case U_ABM: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1246 default: |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1247 TRACE_ERROR( "SIG_IRX_U_NO_FRAME_EXPECTED_IND unexpected" ); |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1248 break; |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1249 } |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1250 |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1251 } /* sig_irx_u_no_frame_expected_ind() */ |
219afcfc6250
src/g23m-gprs: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1252 |