FreeCalypso > hg > fc-magnetite
annotate src/g23m-gprs/upm/upm_link_control.c @ 624:012028896cfb
FFS dev.c, Leonardo target: Fujitsu MB84VF5F5F4J2 #if 0'ed out
The FFS code we got from TI/Openmoko had a stanza for "Fujitsu MB84VF5F5F4J2
stacked device", using a fake device ID code that would need to be patched
manually into cfgffs.c (suppressing and overriding autodetection) and using
an FFS base address in the nCS2 bank, indicating that this FFS config was
probably meant for the MCP version of Leonardo which allows for 16 MiB flash
with a second bank on nCS2.
We previously had this FFS config stanza conditionalized under
CONFIG_TARGET_LEONARDO because the base address contained therein is invalid
for other targets, but now that we actually have a Leonardo build target in
FC Magnetite, I realize that the better approach is to #if 0 out this stanza
altogether: it is already non-functional because it uses a fake device ID
code, thus it is does not add support for more Leonardo board variants,
instead it is just noise.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 22 Dec 2019 21:24:29 +0000 |
parents | 2cf312e56ee7 |
children |
rev | line source |
---|---|
197
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /*---------------------------------------------------------------------------- |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 | Project : 3G PS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Module : UPM |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 +----------------------------------------------------------------------------- |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 | Copyright 2003 Texas Instruments. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | All rights reserved. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | This file is confidential and a trade secret of Texas |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | Instruments . |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | The receipt of or possession of this file does not convey |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | any rights to reproduce or disclose its contents or to |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | manufacture, use, or sell anything it may describe, in |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | whole, or in part, without the specific written consent of |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | Texas Instruments. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 +----------------------------------------------------------------------------- |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 | Purpose: Link Control state machine implementation in the UPM entity. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | For design details, see: |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | 8010.939 UPM Detailed Specification |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 +---------------------------------------------------------------------------*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /*==== DECLARATION CONTROL =================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 /*==== INCLUDES =============================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #include "upm.h" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #include "upm_rab_control.h" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "upm_sndcp_control.h" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "upm_sm_output_handler.h" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 /*==== CONSTS ===============================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 /*==== TYPES ================================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 typedef void (*T_UPM_LINK_CONTROL_TRANSITION_FUNC)(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 typedef struct { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #ifdef DEBUG |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 T_UPM_LINK_CONTROL_EVENT event; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #endif /* DEBUG */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 T_UPM_LINK_CONTROL_TRANSITION_FUNC func; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 } T_UPM_LINK_CONTROL_TRANSITION; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 /*==== LOCALS ===============================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 static void state_event_error (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 static void ignored (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 static void handle_sm_activate_started_ind (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 static void handle_dti_closed (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 static void go_to_S2 (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 static void handle_sm_activate_ind_in_umts (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 static void handle_sm_modify_ind_in_umts (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 static void handle_deactivate_in_umts (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 static void handle_rab_released_abnormal (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 static void handle_rab_released_normal (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 static void handle_sm_activate_ind_in_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 static void handle_llc_link_established (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 static void handle_sm_modify_ind_in_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 static void handle_modify_response_in_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 static void handle_deactivate_in_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 static void handle_deactivate_without_link_in_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 static void handle_llc_release_normal (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 static void handle_llc_release_abnormal (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 static void handle_gsm_qos_store(struct T_CONTEXT_DATA *ptr_context_data, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 U8 sapi, U8 radio_prio, U8 pkt_flow_id, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 T_PS_ctrl_qos ctrl_qos, T_PS_qos *qos); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 static void go_to_S8 (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 static void handle_rat_change_to_gsm_without_context (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 static void handle_rat_change_to_gsm (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 static void handle_rab_established_in_S6 (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 static void handle_rat_change_to_umts_without_context (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 static void handle_rat_change_to_umts_while_establishing(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 static void handle_rat_change_to_umts (struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #else |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #define handle_rat_change_to_gsm_without_context state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #define handle_rat_change_to_gsm state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #define handle_rat_change_to_umts_without_context state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #define handle_rat_change_to_umts_while_establishing state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #define handle_rat_change_to_umts state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 static void upm_link_mark_nsapi_deactivated(U8 nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 /*********************************************************************** |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 * State/Transition Table |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 static const T_UPM_LINK_CONTROL_TRANSITION |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 transition[UPM_LINK_CONTROL_NUMBER_OF_STATES] |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 [UPM_LINK_CONTROL_NUMBER_OF_EVENTS] = |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 { /* S0: UPM_LINK_RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, handle_sm_activate_started_ind), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, state_event_error) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 { /* S1: UPM_LINK_ESTABLISHING_RAB */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 M_TRANSITION(UPM_I_RAB_ESTABLISHED, go_to_S2), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_gsm_without_context) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 { /* S2: UPM_LINK_AWAITING_ACTIVATE_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, handle_sm_activate_ind_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 M_TRANSITION(UPM_I_RAB_RELEASED, handle_rab_released_abnormal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, state_event_error) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 { /* S3: UPM_LINK_RAB_ESTABLISHED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 M_TRANSITION(UPM_P_SM_MODIFY_IND, handle_sm_modify_ind_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 M_TRANSITION(UPM_I_RAB_ESTABLISHED, ignored), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 M_TRANSITION(UPM_I_RAB_RELEASED, handle_rab_released_abnormal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, ignored), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_gsm) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 { /* S4: UPM_LINK_RELEASING_RAB */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 M_TRANSITION(UPM_I_RAB_RELEASED, handle_rab_released_normal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, ignored) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 { /* S5: UPM_LINK_COMPLETING_RAT_CHANGE_TO_GSM */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 M_TRANSITION(UPM_I_RAB_RELEASED, ignored), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, go_to_S8), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, handle_llc_release_abnormal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, state_event_error) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 { /* S6: UPM_LINK_COMPLETING_RAT_CHANGE_TO_UMTS_INITIAL */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_umts), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 M_TRANSITION(UPM_I_RAB_ESTABLISHED, handle_rab_established_in_S6), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, ignored), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_gsm) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 { /* S7: UPM_LINK_AWAITING_ACTIVATE_GSM */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, handle_sm_activate_ind_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_without_link_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_umts_without_context) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 { /* S8: UPM_LINK_ESTABLISHING_LLC_LINK */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 M_TRANSITION(UPM_I_RAB_ESTABLISHED, ignored), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, handle_llc_link_established), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, handle_llc_release_abnormal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_umts_while_establishing) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 { /* S9: UPM_LINK_LLC_LINK_ESTABLISHED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, handle_deactivate_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 M_TRANSITION(UPM_P_SM_MODIFY_IND, handle_sm_modify_ind_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, handle_dti_closed), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, handle_modify_response_in_gsm), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, handle_llc_release_abnormal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, handle_rat_change_to_umts) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 }, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 { /* S10: UPM_LINK_RELEASING_LLC_LINK */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 M_TRANSITION(UPM_P_SM_ACTIVATE_STARTED_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 M_TRANSITION(UPM_P_SM_ACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 M_TRANSITION(UPM_P_SM_DEACTIVATE_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 M_TRANSITION(UPM_P_SM_MODIFY_IND, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 M_TRANSITION(UPM_I_LINK_DTI_CLOSED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 M_TRANSITION(UPM_I_RAB_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 M_TRANSITION(UPM_I_RAB_RELEASED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_ESTABLISHED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_MODIFIED, state_event_error), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 M_TRANSITION(UPM_I_SNDCP_LLC_LINK_RELEASED, handle_llc_release_normal), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 M_TRANSITION(UPM_I_LINK_RAT_CHANGED, ignored) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 }; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 /*==== PRIVATE FUNCTIONS ====================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 | Function : link_control_goto_state |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 | Description : Move to the state specified in the new_state parameter |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 | new_state - New state |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 static void link_control_goto_state(struct T_CONTEXT_DATA *ptr_context_data, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 T_UPM_LINK_CONTROL_STATE new_state) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 ptr_context_data->link_control_state = new_state; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 | Function : link_control_state |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 | Description : Return the state in which Link Control is in for this |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 | context instanse. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 static T_UPM_LINK_CONTROL_STATE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 link_control_state(struct T_CONTEXT_DATA *ptr_context_data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 return ptr_context_data->link_control_state; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 | Function : state_event_error |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 | Description : General function used to report state event errors. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 | Parameters : ptr_context_data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 static void state_event_error(/*@unused@*/ struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 (void)TRACE_ERROR("UPM Link Control: STATE EVENT ERROR!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 | Function : ignored |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 | Description : General function used for transitions that shall be ignored |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 | Parameters : ptr_context_data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 static void ignored(/*@unused@*/ struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 (void)TRACE_FUNCTION("UPM Link Control: Event ignored."); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 | Function : go_to_S* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 | Description : General functions for simple state transitions |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 | Parameters : ptr_context_data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 static void go_to_S2(/*@unused@*/ struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 /* (void)TRACE_FUNCTION("UPM Link Control: Transition to UPM LINK AWAITING ACTIVATE UMTS state"); */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 link_control_goto_state(ptr_context_data, UPM_LINK_AWAITING_ACTIVATE_UMTS); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 static void go_to_S8(/*@unused@*/ struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 /* (void)TRACE_FUNCTION("UPM Link Control: Transition to UPM LINK LLC LINK ESTABLISHED state"); */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 link_control_goto_state(ptr_context_data, UPM_LINK_LLC_LINK_ESTABLISHED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 | Function : handle_sm_activate_started_ind |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 | Description : Handle SM_ACTIVATE_STARTED_IND primitive. Examines RAT, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 | and moves to GSM or UTMS state. Starts RAB in UMTS. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 | data - SM_ACTIVATE_STARTED_IND primitive (unused) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 static void handle_sm_activate_started_ind(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ /*@unused@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 (void)TRACE_FUNCTION("UPM Link Control: handle_sm_activate_started_ind"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 /* Examine RAT: */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 if (upm_get_current_rat() == PS_RAT_GSM) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 /* GSM: Do nothing until SM_ACTIVATE_IND arrives. Just change state. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 link_control_goto_state(ptr_context_data, UPM_LINK_AWAITING_ACTIVATE_GSM); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 else if (upm_get_current_rat() == PS_RAT_UMTS_FDD) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 /* UMTS: Order RAB Control to await RAB establishment, and change state. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 link_control_goto_state(ptr_context_data, UPM_LINK_ESTABLISHING_RAB); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_INITIAL_ESTABLISH, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 | Function : handle_dti_closed |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 | Description : Handle UPM_I_LINK_DTI_CLOSED |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 static void handle_dti_closed(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 T_PS_sapi llc_sapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 (void)TRACE_FUNCTION("UPM Link Control: handle_dti_closed"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 llc_sapi = (T_PS_sapi)ptr_context_data->gprs_data.sndcp_llc_sapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 #else |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 llc_sapi = PS_SAPI_0; /* SAPI not assigned [3G 24.008, 6.1.3.1.1] */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 /* Send SM_STATUS_REQ, and expect control plane to take action. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 send_sm_status_req(upm_nsapi2nsapi_set(ptr_context_data->nsapi), |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 llc_sapi, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 CAUSE_is_from_upm, (U16)CAUSE_UPM_DTI_DISCONNECT); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 | Function : handle_sm_activate_ind_in_utms |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 | Description : Handle SM_ACTIVATE_IND primitive while in UMTS RAT. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 | data - SM_ACTIVATE_IND primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 static void handle_sm_activate_ind_in_umts(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 T_SM_ACTIVATE_IND *prim = (T_SM_ACTIVATE_IND *)data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 (void)TRACE_FUNCTION("UPM Link Control: handle_sm_activate_ind_in_umts"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 TRACE_ASSERT( data != NULL ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 /* Store GSM-RAT relevant QoS parameters in ptr_context_data fields. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 handle_gsm_qos_store(ptr_context_data, prim->sapi, prim->radio_prio, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 (U8)prim->pkt_flow_id, prim->ctrl_qos, &prim->qos); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 /* Send SM_ACTIVATE_RES */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 send_sm_activate_res(ptr_context_data, ((T_SN_ACTIVATE_CNF*)data)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 /* Go to state UPM LINK RAB ESTABLISHED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 link_control_goto_state(ptr_context_data, UPM_LINK_RAB_ESTABLISHED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 /* Store QoS parameter as needed in RAB Control */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 upm_rab_control(ptr_context_data, UPM_I_RAB_MODIFY, &(prim->qos.qos_r99)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 /* Inform Uplink and Downlink state machines of link up. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 | Function : handle_sm_modify_ind_in_utms |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 | Description : Handle SM_MODIFY_IND primitive while in UMTS RAT. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 | data - SM_MODIFY_IND primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 static void handle_sm_modify_ind_in_umts(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 T_SM_MODIFY_IND *prim = (T_SM_MODIFY_IND *)data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 (void)TRACE_FUNCTION("UPM Link Control: handle_sm_modify_ind_in_umts"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 TRACE_ASSERT( data != NULL ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 /* Store GSM-RAT relevant QoS parameters in ptr_context_data fields. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 handle_gsm_qos_store(ptr_context_data, prim->sapi, prim->radio_prio, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 (U8)prim->pkt_flow_id, prim->ctrl_qos, &prim->qos); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 #endif |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 /* Store QoS parameter as needed in RAB Control */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 upm_rab_control(ptr_context_data, UPM_I_RAB_MODIFY, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 &(prim->qos.qos_r99)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 /* Send SM_MODIFY_RES */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 send_sm_modify_res(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 | Function : handle_deactivate_in_umts |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 | Description : Handle SM_DEACTIVATE_IND primitive while in UMTS RAT. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 | data - Local release flag (Not used in UMTS) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 static void handle_deactivate_in_umts(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 (void)TRACE_FUNCTION("UPM Link Control: handle_deactivate_in_umts"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 /* Go to state UPM LINK RELEASING RAB */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASING_RAB); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 /* Terminate Uplink and Downlink state machines. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 /* Order RAB Control to await RAB release. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_RAB_RELEASE, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 | Function : handle_rab_released_abnormal |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 | Description : Handle UPM_I_RAB_RELEASED when not expected |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 static void handle_rab_released_abnormal(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 (void)TRACE_FUNCTION("UPM Link Control: handle_rab_released_abnormal"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 /* Go to state UPM LINK RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 /* Terminate Uplink and Downlink state machines. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 | Function : handle_rab_released_normal |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 | Description : Handle UPM_I_RAB_RELEASED during normal deactivation |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 static void handle_rab_released_normal(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 (void)TRACE_FUNCTION("UPM Link Control: handle_rab_released_normal"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 /* SM_DEACTIVATE_RES sent from dispatcher; groups responses for all NSAPIs */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 /* send_sm_deactivate_res( ... ); */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 upm_link_mark_nsapi_deactivated(ptr_context_data->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 /* Go to state UPM LINK RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 | Function : handle_sm_activate_ind_in_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 | Description : Handle SM_ACTIVATE_IND in S7 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 static void handle_sm_activate_ind_in_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 T_SM_ACTIVATE_IND *prim = (T_SM_ACTIVATE_IND *)data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 (void)TRACE_FUNCTION("UPM Link Control: handle_sm_activate_ind_in_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 TRACE_ASSERT(prim != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 /* Store GSM-RAT relevant QoS parameters in ptr_context_data fields. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 handle_gsm_qos_store(ptr_context_data, prim->sapi, prim->radio_prio, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 (U8)prim->pkt_flow_id, prim->ctrl_qos, &prim->qos); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 /* Go to state UPM LINK ESTABLISHING LLC LINK */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 link_control_goto_state(ptr_context_data, UPM_LINK_ESTABLISHING_LLC_LINK); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 /* Order SNDCP Control to establish LLC link */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 /* Pass compression parameter fields only if they are present */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 if( (((T_SM_ACTIVATE_IND *)data)->v_comp_params == TRUE) ) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 upm_sndcp_control(ptr_context_data, UPM_I_SNDCP_ESTABLISH_LLC_LINK, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 &((T_SM_ACTIVATE_IND *)data)->comp_params); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 upm_sndcp_control(ptr_context_data, UPM_I_SNDCP_ESTABLISH_LLC_LINK, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 | Function : handle_llc_link_established |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 | Description : Handle UPM_I_LLC_LINK_ESTABLISHED in S8 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 static void handle_llc_link_established(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 (void)TRACE_FUNCTION("UPM Link Control: handle_llc_link_established"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 send_sm_activate_res(ptr_context_data, ((T_SN_ACTIVATE_CNF*)data)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 /* Go to state UPM LINK LLC LINK ESTABLISHED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 link_control_goto_state(ptr_context_data, UPM_LINK_LLC_LINK_ESTABLISHED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 #ifndef UPM_WITHOUT_USER_PLANE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 /* Report initial LINK UP to Uplink Data */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 /* Report link up to Downlink Data Control. This triggers flow control |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 * initialization towards SNDCP. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 #endif /* UPM_WITHOUT_USER_PLANE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 | Function : handle_sm_modify_ind_in_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 | Description : Handle SM_MODIFY_IND primitive while in GSM RAT. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 | data - SM_MODIFY_IND primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 static void handle_sm_modify_ind_in_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 T_SM_MODIFY_IND *prim = (T_SM_MODIFY_IND *)data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 (void)TRACE_FUNCTION("UPM Link Control: handle_sm_modify_ind_in_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 TRACE_ASSERT( data != NULL ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 /*lint -e613 (Possible use of null pointer 'unknown-name' in left argument to operator '->') */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 /* Store GSM-RAT relevant QoS parameters in ptr_context_data fields. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 handle_gsm_qos_store(ptr_context_data, prim->sapi, prim->radio_prio, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 (U8)prim->pkt_flow_id, prim->ctrl_qos, &prim->qos); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 /* SNDCP Control constructs a modify primitive to SNDCP */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 upm_sndcp_control(ptr_context_data, UPM_I_SNDCP_MODIFY_LLC_LINK, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 &((T_SM_MODIFY_IND *)data)->qos.qos_r99); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 /*lint +e613 (Possible use of null pointer 'unknown-name' in left argument to operator '->') */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 | Function : handle_modify_response_in_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 | Description : Handle UPM_I_SNDCP_LLC_LINK_MODIFIED |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 static void handle_modify_response_in_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 (void)TRACE_FUNCTION("UPM Link Control: handle_modify_response_in_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 /* Send SM_MODIFY_RES */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 send_sm_modify_res(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 | Function : handle_deactivate_in_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 | Description : Handle SM_DEACTIVATE_IND while active in GSM RAT |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 | data - Local flag (rel_ind) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 static void handle_deactivate_in_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 (void)TRACE_FUNCTION("UPM Link Control: handle_deactivate_in_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 /* Go to state UPM LINK RELEASING LLC LINK */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASING_LLC_LINK); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 #ifndef UPM_WITHOUT_USER_PLANE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 /* Terminate Uplink and Downlink state machines. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 #endif /* UPM_WITHOUT_USER_PLANE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 /* SNDCP Control constructs a deactivate primitive for SNDCP */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 upm_sndcp_control(ptr_context_data, UPM_I_SNDCP_RELEASE_LLC_LINK, data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 | Function : handle_deactivate_without_link_in_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 | Description : Handle SM_DEACTIVATE_IND in GSM, when no link exists (S5) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 static void handle_deactivate_without_link_in_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 (void)TRACE_FUNCTION("UPM Link Control: handle_deactivate_without_link_in_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 /* SM_DEACTIVATE_RES sent in dispatcher. One primitive for all NSAPIs. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 /* send_sm_deactivate_res( ... ); */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 upm_link_mark_nsapi_deactivated(ptr_context_data->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 /* Go to state UPM LINK RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 | Function : handle_llc_release_normal |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 | Description : Handle UPM_I_SNDCP_LLC_LINK_RELEASED in S10 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 static void handle_llc_release_normal(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 (void)TRACE_FUNCTION("UPM Link Control: handle_llc_release_normal"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 /* SM_DEACTIVATE_RES sent in dispatcher. One primitive for all NSAPIs. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 /* send_sm_deactivate_res( ... ); */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 upm_link_mark_nsapi_deactivated(ptr_context_data->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 /* Go to state UPM LINK RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 | Function : handle_llc_release_abnormal |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 | Description : Handle UPM_I_SNDCP_LLC_LINK_RELEASED in state other than S10 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 | data - SN_STATUS_IND primitive (unused) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 static void handle_llc_release_abnormal(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ /*@unused@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 (void)TRACE_FUNCTION("UPM Link Control: handle_llc_release_abnormal"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 /* SM_STATUS_REQ sent once for all affected NSAPIs in sndcp_control. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 /* send_sm_status_req(...) */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 /* Go to state UPM LINK RELEASED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 #ifndef UPM_WITHOUT_USER_PLANE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 /* Terminate Uplink and Downlink state machines. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_DOWN, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 #endif /* UPM_WITHOUT_USER_PLANE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 | Function : handle_rat_change_to_gsm_without_context |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 | Description : Handle UPM_I_LINK_RAT_CHANGED(GSM) in S1 or S2 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 | Parameters : ptr_context_data - Context Data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 | data - GSM/UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 static void handle_rat_change_to_gsm_without_context(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 (void)TRACE_FUNCTION("UPM Link Control: handle_rat_change_to_gsm_without_context"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 TRACE_ASSERT( (T_PS_rat)data == PS_RAT_GSM ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 /* Go to state UPM LINK AWAITING ACTIVATE GSM */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 link_control_goto_state(ptr_context_data, UPM_LINK_AWAITING_ACTIVATE_GSM); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 /* Order RAB Control to await RAB release, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 * or to stop awaiting RAB establish */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_RAB_RELEASE, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 | Function : handle_rat_change_to_gsm |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 | Description : Handle UPM_I_LINK_RAT_CHANGED(GSM) in S3 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 | data - GSM/UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 static void handle_rat_change_to_gsm(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 (void)TRACE_FUNCTION("UPM Link Control: handle_rat_change_to_gsm"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 TRACE_ASSERT( (T_PS_rat)data == PS_RAT_GSM ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 /* Go to state UPM LINK COMPLETING RAT CHANGE TO GSM */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 link_control_goto_state(ptr_context_data, UPM_LINK_COMPLETING_RAT_CHANGE_TO_GSM); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 /* Order RAB Control to await RAB release */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_RAB_RELEASE, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 /* Order SNDCP Control to await LLC link establishment */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 upm_sndcp_control(ptr_context_data, UPM_I_SNDCP_AWAIT_ESTABLISH, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 | Function : handle_rab_established_in_S6 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 | Description : Handle UPM_I_RAB_ESTABLISHED in S7 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 | data - Not used |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 static void handle_rab_established_in_S6(struct T_CONTEXT_DATA *ptr_context_data, /*@unused@*/ /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 (void)TRACE_FUNCTION("UPM Link Control: handle_rab_established_in_S6"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 /* Go to state UPM LINK RAB ESTABLISHED */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 link_control_goto_state(ptr_context_data, UPM_LINK_RAB_ESTABLISHED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 /* Send SM_ACTIVATE_RES */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 send_sm_activate_res(ptr_context_data, ((T_SN_ACTIVATE_CNF*)data)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 /* Inform Uplink and Downlink state machines. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 upm_uplink_data_control(ptr_context_data, UPM_I_UPLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 upm_downlink_data_control(ptr_context_data, UPM_I_DOWNLINK_DATA_LINK_UP, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 | Function : handle_rat_change_to_umts_without_context |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 | Description : Handle UPM_I_LINK_RAT_CHANGED(UMTS) in S7 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 | data - GSM/UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 static void handle_rat_change_to_umts_without_context(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 (void)TRACE_FUNCTION("UPM Link Control: handle_rat_change_to_umts_without_context"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 TRACE_ASSERT( (T_PS_rat)data == PS_RAT_UMTS_FDD ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 /* Go to state UPM LINK ESTABLISHING RAB */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 link_control_goto_state(ptr_context_data, UPM_LINK_ESTABLISHING_RAB); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 /* Order RAB Control to await RAB establishment */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_INITIAL_ESTABLISH, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 | Function : handle_rat_change_to_umts_without_context |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 | Description : Handle UPM_I_LINK_RAT_CHANGED(UMTS) in S8 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 | data - GSM/UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 static void handle_rat_change_to_umts_while_establishing(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 (void)TRACE_FUNCTION("UPM Link Control: handle_rat_change_to_umts_while_establishing"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 TRACE_ASSERT( (T_PS_rat)data == PS_RAT_UMTS_FDD ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 /* Go to state UPM LINK COMPLETING RAT CHANGE TO UMTS INITIAL */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 link_control_goto_state(ptr_context_data, UPM_LINK_COMPLETING_RAT_CHANGE_TO_UMTS_INITIAL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 /* Order RAB Control to await RAB establishment */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_INITIAL_ESTABLISH, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 | Function : handle_rat_change_to_umts |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 | Description : Handle UPM_I_LINK_RAT_CHANGED(UMTS) in S9 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 | data - GSM/UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 static void handle_rat_change_to_umts(struct T_CONTEXT_DATA *ptr_context_data, /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 (void)TRACE_FUNCTION("UPM Link Control: handle_rat_change_to_umts"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 TRACE_ASSERT( (T_PS_rat)data == PS_RAT_UMTS_FDD ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 /* Go to state UPM LINK RAB ESTABLISHED*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 link_control_goto_state(ptr_context_data, UPM_LINK_RAB_ESTABLISHED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 /* Order RAB Control to await RAB establishment */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 upm_rab_control(ptr_context_data, UPM_I_RAB_AWAIT_RAB_ESTABLISH, NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 | Function : handle_gsm_qos_store |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 | Description : Store GSM-RAT relevant QoS parameters for the NSAPI |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 | Parameters : ptr_context_data - Context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 | qos - R99 format QoS data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 static void handle_gsm_qos_store(struct T_CONTEXT_DATA *ptr_context_data, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 U8 sapi, U8 radio_prio, U8 pkt_flow_id, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 T_PS_ctrl_qos ctrl_qos, T_PS_qos *qos) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 struct T_UPM_CONTEXT_DATA_GPRS *gprs_data = &ptr_context_data->gprs_data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 (void)TRACE_FUNCTION("UPM Link Control: handle_gsm_qos_store"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 gprs_data->sndcp_llc_sapi = sapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 gprs_data->sndcp_radio_prio = radio_prio; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 /* [3G 24.008] version 6 says to keep PFI if omitted. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 if (pkt_flow_id != (U8)PS_PKT_FLOW_ID_NOT_PRES) { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 gprs_data->pkt_flow_id = pkt_flow_id; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 if (ctrl_qos == PS_is_R97) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 gprs_data->sndcp_delay = qos->qos_r97.delay; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 gprs_data->sndcp_relclass = qos->qos_r97.relclass; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 gprs_data->sndcp_peak_bitrate = qos->qos_r97.peak; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 gprs_data->sndcp_preced = qos->qos_r97.preced; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 gprs_data->sndcp_mean = qos->qos_r97.mean; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 } else if (ctrl_qos == PS_is_R99) { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 T_PS_qos_r97 temp_qos_r97; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 cl_qos_convert_r99_to_r97(&qos->qos_r99, &temp_qos_r97); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 gprs_data->sndcp_delay = temp_qos_r97.delay; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 gprs_data->sndcp_relclass = temp_qos_r97.relclass; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 gprs_data->sndcp_peak_bitrate = temp_qos_r97.peak; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 gprs_data->sndcp_preced = temp_qos_r97.preced; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 gprs_data->sndcp_mean = temp_qos_r97.mean; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 (void)TRACE_ERROR("Link Control (handle_gsm_qos_store): Invalid QoS union controller!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 | Function : upm_link_mark_nsapi_deactivated |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 | Description : Helper function to group nsapis in SM_DEACTIVATE_RES |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 | Parameters : nsapi - NSAPI |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 static U16 nsapis_to_deactivate = 0, nsapis_currently_deactivated = 0; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 static void upm_link_mark_nsapi_deactivated(U8 nsapi) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 (void)TRACE_FUNCTION("UPM Link Control: upm_link_mark_nsapi_deactivated"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 nsapis_currently_deactivated |= upm_nsapi2nsapi_set(nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 if (nsapis_currently_deactivated == nsapis_to_deactivate) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 send_sm_deactivate_res(nsapis_to_deactivate); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 /* All context requested deactivated have been deactivated */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 /* Zero out store */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 nsapis_to_deactivate = 0; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 nsapis_currently_deactivated = 0; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 /*==== PUBLIC FUNCTIONS =====================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 | Function : upm_is_link_released |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 | Description : Link Control state query function. Return TRUE if Link Control |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 | is in state UPM LINK RELEASED; returns FALSE otherwise. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 | Parameters : ptr_context_data - Pointer to context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 BOOL upm_is_link_released(struct T_CONTEXT_DATA *ptr_context_data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 TRACE_ASSERT(ptr_context_data != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 if (link_control_state(ptr_context_data) == UPM_LINK_RELEASED) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 (void)TRACE_FUNCTION("UPM Link Control: upm_is_link_released (TRUE)"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 return TRUE; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 (void)TRACE_FUNCTION("UPM Link Control: upm_is_link_released (FALSE)"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 return FALSE; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 | Function : upm_link_dispatch_sm_deactivate_ind |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 | Description : Dispatch SM_DEACTIVATE_IND |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 | Parameters : sm_deactivate_ind - received primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 void upm_link_dispatch_sm_deactivate_ind(T_SM_DEACTIVATE_IND *sm_deactivate_ind) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 int nsapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 struct T_CONTEXT_DATA *ptr_context_data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 (void)TRACE_FUNCTION("UPM Link Control: upm_link_dispatch_sm_deactivate_ind"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 /* Add NSAPI to nsapi_set to deactivate */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 nsapis_to_deactivate |= sm_deactivate_ind->nsapi_set; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 for (nsapi = (int)NAS_NSAPI_5; nsapi < NAS_SIZE_NSAPI; nsapi++) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 if ( (sm_deactivate_ind->nsapi_set & upm_nsapi2nsapi_set(nsapi)) != 0) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 ptr_context_data = upm_get_context_data_from_nsapi(nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 if (ptr_context_data != NULL) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 if (upm_is_link_released(ptr_context_data)) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 nsapis_currently_deactivated |= upm_nsapi2nsapi_set(nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 upm_link_control(ptr_context_data, UPM_P_SM_DEACTIVATE_IND, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 (void *)sm_deactivate_ind->rel_ind); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 upm_check_for_released_context_and_release(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 (void)TRACE_ERROR("Tried to deactivate non-existent context!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 } /* for */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 | Function : upm_link_control_init |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 | Description : Link Control state machine initialization function |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 | Parameters : ptr_context_data - Pointer to context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 void upm_link_control_init(struct T_CONTEXT_DATA *ptr_context_data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 (void)TRACE_FUNCTION("UPM Link Control: upm_link_control_init"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 TRACE_ASSERT(ptr_context_data != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 /* Zero out store for deactivation synchronization */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 nsapis_to_deactivate = 0; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 nsapis_currently_deactivated = 0; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 | Function : upm_link_control_exit |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 | Description : Link Control state machine exit function |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 | Parameters : ptr_context_data - Pointer to context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 void upm_link_control_exit(struct T_CONTEXT_DATA *ptr_context_data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 (void)TRACE_FUNCTION("UPM Link Control: upm_link_control_exit"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 TRACE_ASSERT(ptr_context_data != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 link_control_goto_state(ptr_context_data, UPM_LINK_RELEASED); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 | Function : upm_link_control |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 | Description : Link Control state machine |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 | Parameters : ptr_context_data - Pointer to context data |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 | event - Internal event (see upm_link_control.h) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 | data - Event dependent parameter |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 void upm_link_control (struct T_CONTEXT_DATA *ptr_context_data, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 T_UPM_LINK_CONTROL_EVENT event, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 /*@null@*/ void *data) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 #ifdef DEBUG |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 T_UPM_LINK_CONTROL_STATE old_state; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 /*@observer@*/ /*@notnull@*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 static const char *state_name[UPM_LINK_CONTROL_NUMBER_OF_STATES] = { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 "S0_UPM_LINK_RELEASED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 "S1_UPM_LINK_ESTABLISHING_RAB", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 "S2_UPM_LINK_AWAITING_ACTIVATE_UMTS", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 "S3_UPM_LINK_RAB_ESTABLISHED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 "S4_UPM_LINK_RELEASING_RAB", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 "S5_UPM_LINK_COMPLETING_RAT_CHANGE_TO_GSM", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 "S6_UPM_LINK_COMPLETING_RAT_CHANGE_TO_UMTS_INITIAL", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 "S7_UPM_LINK_AWAITING_ACTIVATE_GSM", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 "S8_UPM_LINK_ESTABLISHING_LLC_LINK", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 "S9_UPM_LINK_LLC_LINK_ESTABLISHED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 "S10_UPM_LINK_RELEASING_LLC_LINK" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 }; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 /*@observer@*/ /*@notnull@*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 static const char *event_name[UPM_LINK_CONTROL_NUMBER_OF_EVENTS] = { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 "UPM_P_SM_ACTIVATE_STARTED_IND", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 "UPM_P_SM_ACTIVATE_IND", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 "UPM_P_SM_DEACTIVATE_IND", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 "UPM_P_SM_MODIFY_IND", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 "UPM_I_LINK_DTI_CLOSED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 "UPM_I_RAB_ESTABLISHED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 "UPM_I_RAB_RELEASED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 "UPM_I_SNDCP_LLC_LINK_ESTABLISHED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 "UPM_I_SNDCP_LLC_LINK_MODIFIED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 "UPM_I_SNDCP_LLC_LINK_RELEASED", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 "UPM_I_LINK_RAT_CHANGED" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 }; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 TRACE_ASSERT(ptr_context_data != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 TRACE_ASSERT(event < UPM_LINK_CONTROL_NUMBER_OF_EVENTS); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 old_state = link_control_state(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 TRACE_ASSERT(old_state < UPM_LINK_CONTROL_NUMBER_OF_STATES); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 if (transition[(U16)old_state][(U16)event].event != event) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 (void)TRACE_ERROR("Event table error in upm_link_control!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 #endif /* DEBUG */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 transition[(U16)link_control_state(ptr_context_data)][(U16)event].func(ptr_context_data, data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 #ifdef DEBUG |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 (void)TRACE_EVENT_P4("LINK #%d: %s => %s to %s", |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 ptr_context_data->nsapi, |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 event_name[(U16)event], |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 state_name[(U16)old_state], |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 state_name[(U16)link_control_state(ptr_context_data)]); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 #endif /* DEBUG */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 /*==== END OF FILE ==========================================================*/ |