FreeCalypso > hg > fc-magnetite
annotate src/cs/layer1/p_cfile/l1p_afun.c @ 640:16eb1b9640dc
target gtm900 renamed to gtm900mgc2
This change reflects the fact that the build target in question supports
MGC2GSMT hardware only, and will NOT work on other hw that confusing bears
the same end user name of GTM900, neither the LoCosto-based GTM900-C
nor the Calypso-based MG01GSMT that has a different and incompatible RFFE.
If we ever get our hands on a piece of MG01GSMT hw and add support for it,
that other target will be named gtm900mg01.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 31 Jan 2020 00:46:07 +0000 |
parents | 0740b5ff15f6 |
children |
rev | line source |
---|---|
302
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /************* Revision Controle System Header ************* |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * GSM Layer 1 software |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * L1P_AFUN.C |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * Filename l1p_afun.c |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #define L1P_AFUN_C |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include "l1_macro.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include "l1_confg.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #if L1_GPRS |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #if (CODE_VERSION == SIMULATION) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 #include <string.h> |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #include "l1_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #include "sys_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #include "l1_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #if TESTMODE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #include "l1tm_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #if (AUDIO_TASK == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #include "l1audio_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "l1audio_cust.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #include "l1audio_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #if (L1_GTT == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "l1gtt_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "l1gtt_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #if (L1_MP3 == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "l1mp3_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #if (L1_MIDI == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "l1midi_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "l1_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "cust_os.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "l1_varex.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "l1p_cons.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "l1p_msgt.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "l1p_deft.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "l1p_vare.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "l1_msgty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "l1_proto.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #include <string.h> |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #include "l1_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #include "sys_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #include "l1_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #if TESTMODE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #include "l1tm_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #if (AUDIO_TASK == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #include "l1audio_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #include "l1audio_cust.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #include "l1audio_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 #if (L1_GTT == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #include "l1gtt_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #include "l1gtt_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #if (L1_MP3 == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 #include "l1mp3_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 #if (L1_MIDI == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #include "l1midi_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #include "l1_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #include "cust_os.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #include "l1_varex.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #include "l1p_cons.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #include "l1p_msgt.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #include "l1p_deft.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include "l1p_vare.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #include "l1_msgty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #include "l1_proto.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 // Internal prototypes |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 T_TRANSFER_SET *l1pa_get_free_transfer_set (UWORD8 new_tbf); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 int l1pa_sort (const void *a, const void *b); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 void l1pa_reset_cr_freq_list (); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 T_CRES_LIST_PARAM *l1pa_get_free_cres_list_set(); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 void l1pa_send_int_meas_report (UWORD32 SignalCode, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 T_L1P_ITMEAS_IND *last_l1s_msg, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 T_L1A_INT_MEAS_PARAM *first_meas_ptr); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 void l1pa_send_confirmation (UWORD32 SignalCode, UWORD8 id); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 /* l1pa_get_free_transfer_set() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 /* Description: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 /* ------------ */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 /* Modified parameters from globals: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 /* --------------------------------- */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 T_TRANSFER_SET *l1pa_get_free_transfer_set(UWORD8 new_tbf) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 T_TRANSFER_SET *transfer_set; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #define clear_and_new(i, tbf) \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 switch(tbf) \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 { \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 case UL_TBF: \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 l1pa_l1ps_com.transfer.fset[i]->allocated_tbf = DL_TBF; \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 break; \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 case DL_TBF: \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 l1pa_l1ps_com.transfer.fset[i]->allocated_tbf = UL_TBF; \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 break; \ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 // If new_tbf is to replace an existing one, we must return |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 // the considered free set. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 if(new_tbf == BOTH_TBF) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 if(l1pa_l1ps_com.transfer.fset[0]->allocated_tbf == NO_TBF) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 transfer_set = l1pa_l1ps_com.transfer.fset[1]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 transfer_set = l1pa_l1ps_com.transfer.fset[0]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 if(l1pa_l1ps_com.transfer.fset[0]->allocated_tbf == new_tbf) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 transfer_set = l1pa_l1ps_com.transfer.fset[0]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 if(l1pa_l1ps_com.transfer.fset[1]->allocated_tbf == new_tbf) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 transfer_set = l1pa_l1ps_com.transfer.fset[1]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 if(l1pa_l1ps_com.transfer.fset[0]->allocated_tbf == BOTH_TBF) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 clear_and_new(0, new_tbf); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 transfer_set = l1pa_l1ps_com.transfer.fset[1]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 if(l1pa_l1ps_com.transfer.fset[1]->allocated_tbf == BOTH_TBF) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 clear_and_new(1, new_tbf); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 transfer_set = l1pa_l1ps_com.transfer.fset[0]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 if(l1pa_l1ps_com.transfer.fset[0]->allocated_tbf == NO_TBF) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 transfer_set = l1pa_l1ps_com.transfer.fset[0]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 transfer_set = l1pa_l1ps_com.transfer.fset[1]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 transfer_set->SignalCode = NULL; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 transfer_set->dl_tbf_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 transfer_set->ul_tbf_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 transfer_set->transfer_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 // No init of "allocated_tbf" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 transfer_set->assignment_command = NO_TBF; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 transfer_set->multislot_class = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 transfer_set->packet_ta.ta = 255; // Not present |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 transfer_set->packet_ta.ta_index = 255; // Not present |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 transfer_set->packet_ta.ta_tn = 255; // Not present |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 transfer_set->tsc = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 transfer_set->freq_param.chan_sel.h = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 transfer_set->freq_param.chan_sel.rf_channel.single_rf.radio_freq = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 transfer_set->freq_param.chan_sel.rf_channel.hopping_rf.maio = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 transfer_set->freq_param.chan_sel.rf_channel.hopping_rf.hsn = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 transfer_set->freq_param.freq_list.rf_chan_cnt = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 transfer_set->tbf_sti.present = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 transfer_set->dl_pwr_ctl.p0 = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 transfer_set->dl_pwr_ctl.bts_pwr_ctl_mode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 transfer_set->dl_pwr_ctl.pr_mode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 transfer_set->ts_override = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 transfer_set->pc_meas_chan = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 // No init of "ul_tbf_alloc" and "ul_tbf_alloc", mac_mode is enought |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 return(transfer_set); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 /* l1pa_sort() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 /* Description: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 /* ------------ */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 /* Modified parameters from globals: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 /* --------------------------------- */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 int l1pa_sort(const void *a, const void *b) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 UWORD8 entry1, entry2; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 entry1 = *((UWORD8*) a); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 entry2 = *((UWORD8*) b); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 if (entry1 < entry2 ) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 return(-1); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 else if (entry1 == entry2) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 return(0); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 return(1); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 /* l1pa_reset_cr_freq_list() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 /* Description: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 /* ------------ */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 /* This function resets parameters used in Frequency */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 /* list task */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 void l1pa_reset_cr_freq_list() |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 UWORD8 i; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 for(i=0; i<NB_MEAS_MAX_GPRS; i++) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 l1pa_l1ps_com.cr_freq_list.used_il_lna [i].il = l1_config.params.il_min; // IL used in CTRL phase for AGC setting. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 l1pa_l1ps_com.cr_freq_list.used_il_lna_d [i].il = l1_config.params.il_min; // ... 1 frame delay. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 l1pa_l1ps_com.cr_freq_list.used_il_lna_dd[i].il = l1_config.params.il_min; // ... 2 frames delay, used in READ phase. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 l1pa_l1ps_com.cr_freq_list.used_il_lna [i].lna = FALSE; // LNA used in CTRL phase for AGC setting. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 l1pa_l1ps_com.cr_freq_list.used_il_lna_d [i].lna = FALSE; // ... 1 frame delay. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 l1pa_l1ps_com.cr_freq_list.used_il_lna_dd[i].lna = FALSE; // ... 2 frames delay, used in READ phase. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 // Initialize next power measurement control. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 l1pa_l1ps_com.cr_freq_list.next_to_ctrl = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 // Initialize next power measurement result. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 l1pa_l1ps_com.cr_freq_list.next_to_read = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 // Reset PPCH burst ctrl indication |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 l1pa_l1ps_com.cr_freq_list.pnp_ctrl = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 /* l1pa_get_free_cres_list_set() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 T_CRES_LIST_PARAM *l1pa_get_free_cres_list_set() |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 T_CRES_LIST_PARAM *flist; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 // Get free set pointer. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 if(l1pa_l1ps_com.cres_freq_list.alist == &(l1pa_l1ps_com.cres_freq_list.list[0])) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 flist = &(l1pa_l1ps_com.cres_freq_list.list[1]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 flist = &(l1pa_l1ps_com.cres_freq_list.list[0]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 // Clear free set. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 flist->nb_carrier = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 flist->list_id = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 // Reset fifo used in AGC algo => NEED MORE INVESTIGATION. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 return(flist); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 /* l1pa_send_int_meas_report() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 /* Description: */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 /* ------------ */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 /* This function builds and sends the Interf. Meas. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 /* report to L3 */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 /* */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 void l1pa_send_int_meas_report(UWORD32 SignalCode, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 T_L1P_ITMEAS_IND *last_l1s_msg, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 T_L1A_INT_MEAS_PARAM *first_meas_ptr) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 xSignalHeaderRec *msg; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 UWORD8 i,j,k; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 UWORD8 bit_mask = 0x80; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 // Allocate report msg and fill signal code. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 msg = os_alloc_sig(sizeof(T_MPHP_INT_MEAS_IND)); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 DEBUGMSG(status,NU_ALLOC_ERR) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 msg->SignalCode = SignalCode; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 // Save measurement results |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 //------------------------- |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 for(i = 0, j = 0, k = 0; i < 8; i++, bit_mask >>= 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 // Fill 1st measurement report |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 //---------------------------- |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 // If a measurement was done on timeslot i |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 if(first_meas_ptr->meas_bitmap & bit_mask) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 // The result is stored in the msg. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 ((T_MPHP_INT_MEAS_IND *) (msg->SigP))->int_meas[i].rxlev[0] = first_meas_ptr->rxlev[j]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 // Next measurement value |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 j++; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 // No measurement processed on timeslot i (0x80 value) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 ((T_MPHP_INT_MEAS_IND *) (msg->SigP))->int_meas[i].rxlev[0] = (WORD8)NO_MEAS; //omaps00090550 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 // Fill 2nd measurement report |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 //---------------------------- |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 // If a measurement was done on timeslot i |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 if(last_l1s_msg->meas_bitmap & bit_mask) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 // The result is stored in the msg. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 ((T_MPHP_INT_MEAS_IND *) (msg->SigP))->int_meas[i].rxlev[1] = last_l1s_msg->rxlev[k]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 // Next measurement value |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 k++; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 // No measurement processed on timeslot i (0x80 value) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 ((T_MPHP_INT_MEAS_IND *) (msg->SigP))->int_meas[i].rxlev[1] = (WORD8)NO_MEAS; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 // Set ID in the report message |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 ((T_MPHP_INT_MEAS_IND *) (msg->SigP))->id = first_meas_ptr->id; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 #if (TRACE_TYPE==1) || (TRACE_TYPE==4) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 l1_trace_message(msg); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 os_send_sig(msg, GRRM1_QUEUE); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 /* l1pa_send_confirmation() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 void l1pa_send_confirmation(UWORD32 SignalCode, UWORD8 id) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 xSignalHeaderRec *msg_con; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 msg_con = os_alloc_sig(sizeof(T_MPHP_ASSIGNMENT_CON)); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 DEBUGMSG(status,NU_ALLOC_ERR) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 msg_con->SignalCode = SignalCode; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 ((T_MPHP_ASSIGNMENT_CON *) msg_con->SigP)->assignment_id = id; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 #if (TRACE_TYPE==1) || (TRACE_TYPE==4) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 l1_trace_message(msg_con); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 os_send_sig(msg_con, GRRM1_QUEUE); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 /* l1pa_send_tbf_release_con() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 void l1pa_send_tbf_release_con(UWORD32 SignalCode, UWORD8 tbf_type) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 xSignalHeaderRec *conf_msg; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 // Send the confirmation message with the TBF type to L3 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 // Allocate confirmation message... |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 conf_msg = os_alloc_sig( sizeof(T_MPHP_TBF_RELEASE_CON)); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 DEBUGMSG(status,NU_ALLOC_ERR); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 //Fill the message |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 conf_msg->SignalCode = SignalCode; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 ((T_MPHP_TBF_RELEASE_CON *)(conf_msg->SigP))->tbf_type = tbf_type; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 // Send the confirmation message... |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 os_send_sig(conf_msg, GRRM1_QUEUE); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 #endif //L1_GPRS |