comparison src/g23m-fad/ip/ip_csf.c @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-FaD (8411)
4 | Modul : IP_CSF
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This Modul defines the custom specific functions
18 | for the component Radio Link Protocol
19 | of the mobile station
20 +-----------------------------------------------------------------------------
21 */
22
23 #define ENTITY_IP
24
25 /*==== INCLUDES ===================================================*/
26
27 #include <string.h>
28 #include "typedefs.h"
29 #include "pconst.cdg"
30 #include "vsi.h"
31 #include "pconst.cdg"
32 #include "custom.h"
33 #include "gsm.h"
34 #include "cnf_ip.h"
35 #include "mon_ip.h"
36 #include "prim.h"
37 #include "pei.h"
38 #include "tok.h"
39 #include "ccdapi.h"
40
41 #include "dti.h"
42 #include "ip.h"
43
44 /*==== EXPORT =====================================================*/
45
46 /*==== PRIVAT =====================================================*/
47
48 /*==== VARIABLES ==================================================*/
49
50 /*==== FUNCTIONS ==================================================*/
51 /*
52 +--------------------------------------------------------------------+
53 | PROJECT : GSM-FaD (8411) MODULE : IP_CSF |
54 | STATE : code ROUTINE : csf_init_timer |
55 +--------------------------------------------------------------------+
56
57 PURPOSE : Initialize the timer.
58
59 */
60
61 GLOBAL BOOL csf_init_timer (void)
62 {
63 USHORT i;
64
65 TRACE_FUNCTION ("csf_init_timer()");
66
67 for (i=0; i < MAX_IP_TIMER; i++)
68 {
69 ip_data->lola.timer_reass_running[i % MAX_SEGM_SERVER] = FALSE;
70 }
71
72 TRACE_FUNCTION ("csf_init_timer() RETURN TRUE");
73
74 return TRUE;
75 }
76
77 /*
78 +--------------------------------------------------------------------+
79 | PROJECT : GSM-FaD (8411) MODULE : IP_CSF |
80 | STATE : code ROUTINE : csf_close_timer |
81 +--------------------------------------------------------------------+
82
83 PURPOSE : Closes all timer of the timer pool.
84
85 */
86
87 GLOBAL void csf_close_timer (void)
88 {
89 }
90
91 /*
92 +--------------------------------------------------------------------+
93 | PROJECT : GSM-FaD (8411) MODULE : IP_CSF |
94 | STATE : code ROUTINE : csf_stop_timer |
95 +--------------------------------------------------------------------+
96
97 PURPOSE : The function stops one timer.
98
99 */
100
101
102 GLOBAL void csf_stop_timer (USHORT index)
103 {
104 vsi_t_stop (VSI_CALLER index);
105 }
106
107
108 /*
109 +--------------------------------------------------------------------+
110 | PROJECT : GSM-FaD (8411) MODULE : IP_CSF |
111 | STATE : code ROUTINE : csf_timer_expired |
112 +--------------------------------------------------------------------+
113
114 PURPOSE : After timeout the according instance is searched.
115
116 */
117
118
119 GLOBAL BOOL csf_timer_expired (USHORT index,
120 USHORT * layer,
121 USHORT * segm_server,
122 USHORT * timer)
123 {
124 if (index < MAX_IP_TIMER)
125 {
126 * layer = (USHORT) (index / MAX_SEGM_SERVER);
127 * segm_server = (USHORT) (index % MAX_SEGM_SERVER);
128 ip_data->lola.timer_reass_running[*segm_server] = FALSE;
129 * timer = TREASSEMBLY;
130
131 return TRUE;
132 }
133
134 *timer = NOT_PRESENT_16BIT;
135
136 return FALSE;
137 }
138