FreeCalypso > hg > fc-magnetite
annotate src/g23m-gprs/upm/upm_dispatcher.c @ 366:042be096c669
configs/2092: FCHG enabled
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 31 Dec 2017 23:57:20 +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: This module implements the process dispatcher |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | for the User Plane Manager (UPM) entity. |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | For design details, see: |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 | 8010.939 UPM Detailed Specification |
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 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 /*==== DECLARATION CONTROL =================================================*/ |
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 #include "upm_dispatcher.h" |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /*==== CONSTS ===============================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 /*==== TYPES ================================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 /*==== LOCALS ===============================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 /*==== PRIVATE FUNCTIONS ====================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 /*==== PUBLIC FUNCTIONS =====================================================*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
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 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 | Function : upm_disp_sm_activate_started_ind |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 | Description : Dispatch SM_ACTIVATE_STARTED_IND |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 | Parameters : sm_activate_started_ind - received primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 void upm_disp_sm_activate_started_ind(T_SM_ACTIVATE_STARTED_IND *prim) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 int nsapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 struct T_CONTEXT_DATA *ptr_context_data; |
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 (void)TRACE_FUNCTION("upm_disp_sm_activate_started_ind"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 nsapi = (int)prim->nsapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 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
|
57 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 /* UPM_DTI_REQ arrived first (or activation override). Use present data structures. */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 if (ptr_context_data != NULL) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #ifdef UPM_WITHOUT_USER_PLANE /*T_UPM_USER_PLANE_DATA is not visible for GPRS world*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 memset(ptr_context_data, 0, sizeof(struct T_CONTEXT_DATA) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /* - sizeof(struct T_UPM_USER_PLANE_DATA)*/); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #else /*#ifndef UPM_WITHOUT_USER_PLANE*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 memset(ptr_context_data, 0, sizeof(struct T_CONTEXT_DATA) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 - sizeof(struct T_UPM_USER_PLANE_DATA)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #endif /*#ifndef UPM_WITHOUT_USER_PLANE*/ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 ptr_context_data->nsapi = (U8)nsapi; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 MALLOC(ptr_context_data, (U32)sizeof(struct T_CONTEXT_DATA)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 if (ptr_context_data == NULL) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 (void)TRACE_ERROR("Unable to allocate data structure for new context!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 return; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 memset(ptr_context_data, 0, sizeof(struct T_CONTEXT_DATA)); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 upm_assign_context_data_to_nsapi(ptr_context_data, nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 TRACE_ASSERT(ptr_context_data != NULL); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 upm_link_control_init(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 upm_rab_control_init(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #endif /* TI_UMTS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 upm_sndcp_control_init(ptr_context_data); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 upm_rat_control_init( (T_PS_rat)prim->rat ); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 upm_link_control(ptr_context_data, UPM_P_SM_ACTIVATE_STARTED_IND, prim); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 } |
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 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 | Function : upm_disp_sm_activate_ind |
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 | Description : Dispatch SM_ACTIVATE_IND |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 | Parameters : sm_activate_ind - received primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 void upm_disp_sm_activate_ind(T_SM_ACTIVATE_IND *sm_activate_ind) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 struct T_CONTEXT_DATA *ptr_context_data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 (void)TRACE_FUNCTION("upm_disp_sm_activate_ind"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 ptr_context_data = upm_get_context_data_from_nsapi(sm_activate_ind->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 if (ptr_context_data != NULL) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 upm_link_control(ptr_context_data, UPM_P_SM_ACTIVATE_IND, sm_activate_ind); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 (void)TRACE_ERROR("Tried to complete activation of non-existent context!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 | Function : upm_disp_sm_modify_ind |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 | Description : Dispatch SM_MODIFY_IND |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 | Parameters : sm_modify_ind - received primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 void upm_disp_sm_modify_ind (T_SM_MODIFY_IND *sm_modify_ind) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 struct T_CONTEXT_DATA *ptr_context_data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 (void)TRACE_FUNCTION("upm_disp_sm_modify_ind"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 ptr_context_data = upm_get_context_data_from_nsapi(sm_modify_ind->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 if (ptr_context_data != NULL) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 upm_link_control(ptr_context_data, UPM_P_SM_MODIFY_IND, sm_modify_ind); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 (void)TRACE_ERROR("Tried to modify non-existent context!"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 /* |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 | Function : upm_disp_upm_count_req |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 +------------------------------------------------------------------------------ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 | Description : Dispatch UPM_COUNT_REQ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 | |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 | Parameters : prim - received primitive |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 +------------------------------------------------------------------------------ |
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 void upm_disp_upm_count_req (T_UPM_COUNT_REQ *prim) |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 struct T_CONTEXT_DATA *ptr_context_data; |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 (void)TRACE_FUNCTION("upm_disp_upm_count_req"); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 ptr_context_data = upm_get_context_data_from_nsapi(prim->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 if (ptr_context_data != NULL) { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 #ifdef TI_GPRS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 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
|
167 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 upm_sndcp_dispatch_upm_count_req(prim); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 #endif /* TI_GPRS */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 #ifdef TI_DUAL_MODE |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 else |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 #endif /* TI_DUAL_MODE */ |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 #ifdef TI_UMTS |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 upm_dti_dispatch_upm_count_req(ptr_context_data, prim->reset); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 #endif |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 } else { |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 (void)TRACE_EVENT_P1("Warning: Received COUNT_REQ for undefined " |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 "NSAPI/context; ignored...", prim->nsapi); |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 } |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 /*==== END OF FILE ==========================================================*/ |