FreeCalypso > hg > fc-selenite
annotate src/g23m-gprs/grr/grr_pgf.c @ 158:8fe0cde2fd79
doc/Compiling: update for SE J100 target and fc-host-tools-r10
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 17 Mar 2019 07:20:28 +0000 |
parents | d393cd9bb723 |
children |
rev | line source |
---|---|
1
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : GPRS (8441) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : GRR |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : This module implements local functions for service PG of |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | entity GRR. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #ifndef GRR_PGF_C |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #define GRR_PGF_C |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #endif |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #define ENTITY_GRR |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 /*==== INCLUDES =============================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #include "typedefs.h" /* to get Condat data types */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "vsi.h" /* to get a lot of macros */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "macdef.h" |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "gprs.h" |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "gsm.h" /* to get a lot of macros */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "ccdapi.h" /* to get CCD API */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "cnf_grr.h" /* to get cnf-definitions */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "mon_grr.h" /* to get mon-definitions */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "prim.h" /* to get the definitions of used SAP and directions */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "message.h" |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "grr.h" /* to get the global entity definitions */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "grr_f.h" /* */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "grr_pgf.h" /* */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "grr_ctrls.h" /* */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "grr_meass.h" |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "grr_css.h" |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "grr_em.h" /*for Engineering mode*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #include <string.h> /* for memcpy*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #include <stdio.h> /* for memcpy*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /*==== CONST ================================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 const USHORT NC2_NON_DRX_TABLE[8] = {0, 240, 480, 720, 960, 1200, 1440, 1920}; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 /*==== LOCAL VARS ===========================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 static UBYTE NON_DRX_TABLE[] = {0, 1, 2, 4, 8, 16, 32, 64}; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 /*==== GLOBAL VARS ===========================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 /*==== PRIVATE FUNCTIONS ====================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 LOCAL void pg_stop_t_nc2_ndrx( void ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 LOCAL void pg_stop_non_drx_timer( void ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 LOCAL void pg_start_non_drx_timer(USHORT milliseconds); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 LOCAL BOOL pg_decode_imsi(T_ms_id ms_id, UBYTE *digits, UBYTE *nr_digits); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 /*==== PUBLIC FUNCTIONS =====================================================*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 | Function : pg_init |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 | Description : The function pg_init() .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 GLOBAL void pg_init ( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 TRACE_FUNCTION( "pg_init" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 pg_init_params(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 grr_data->pg.v_emlpp_prio = FALSE; /* valid flag for emlpp_priority*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 grr_data->pg.packet_mode = PACKET_MODE_NULL; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 INIT_STATE(PG,PG_NULL); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 } /* pg_init() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 | Function : pg_init_params |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 | Description : The function pg_init_params() .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 GLOBAL void pg_init_params ( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 TRACE_FUNCTION( "pg_init_params" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 psc_db->last_pg_mode = psc_db->network_pg_mode = REORG_PAGING; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 } /* pg_init_params() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 | Function : pg_process_pp_req |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 | Description : The function pg_process_pp_req() .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 | Parameters : T_D_PAGING_REQ *paging_req: pointer to the decoded message, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 UBYTE state: state of pg state machine: IDLE, TRANSFER, TIMER_3172 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 GLOBAL void pg_process_pp_req ( T_D_PAGING_REQ *paging_req, UBYTE state ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 char i; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 ULONG ul; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 TRACE_FUNCTION( "pg_process_pp_req" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 if(paging_req->v_pers_lev) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 { /*copy persistence level parameters into database*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 grr_save_persistence_level (&(paging_req->pers_lev)); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 /*if(paging_req->v_nln) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 { message contains at least one page request for RR connection establishment |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 04.08: NLN(PCH) Notification List Number |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 "The presence of the NLN(PCH) field indicates that if an NCH is present, reduced NCH monitoring can be used, and |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 gives the NLN(PCH) value, to be used as specified in 3.3.3." |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 This is used by VGCS MSs... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 }*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 if(paging_req->rep_page_info_trnc_grp.v_rep_page_info) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 for (i=0; i < paging_req->rep_page_info_trnc_grp.c_rep_page_info; i++) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 if(paging_req->rep_page_info_trnc_grp.rep_page_info[i].v_rep_page_s1 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 AND |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 grr_t_status( T3172_1 ) EQ 0 /* T3172 is not running*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 * page request for TBF establishment |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 switch(state) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 case PG_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 if(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s1.v_ptmsi) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 *Paging with PTMSI |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 if(grr_data->db.ms_id.new_ptmsi NEQ GMMRR_TMSI_INVALID) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 if(grr_check_ptmsi(&(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s1.ptmsi))) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 TRACE_EVENT("Paging with PTIMSI for TBF"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 sig_pg_ctrl_downlink_transfer ( GMMRR_PTMSI ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 i = paging_req->rep_page_info_trnc_grp.c_rep_page_info; /* break condition for for loop*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 TRACE_EVENT("Paging with wrong PTIMSI for TBF: IGNORE"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 TRACE_EVENT("Paging with PTMSI, but no valid PTMSI in MS"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 *Paging with Mobile Identity (IMSI) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 UBYTE dummy_digits[MAX_IMSI_DIGITS]; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 UBYTE dummy_nr_digits = 0; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 if(pg_decode_imsi(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s1.ms_id, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 dummy_digits, &dummy_nr_digits)) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 if( dummy_nr_digits |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 EQ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 grr_data->db.ms_id.imsi.number_of_digits)/* check the number of digits*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 if( !memcmp |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 ( grr_data->db.ms_id.imsi.digit, /* IMSI stored in the data_base*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 dummy_digits, /* received IMSI*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 grr_data->db.ms_id.imsi.number_of_digits |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 /* The MS was paged with the IMSI*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 TRACE_EVENT("Paging with Mobile Identity (IMSI) for TBF"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 sig_pg_ctrl_downlink_transfer ( GMMRR_IMSI ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 i = paging_req->rep_page_info_trnc_grp.c_rep_page_info; /* break condition for for loop*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 TRACE_EVENT("Paging with wrong IMSI for TBF: IGNORE"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 default: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 * ignore paging request for TBF establishment, do |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 * not check the content |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 if(paging_req->rep_page_info_trnc_grp.rep_page_info[i].v_rep_page_s2) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 * page request for RR connection establishment |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 * In packet access mode, class A or B shall respond to a pp_req for |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 * RR connection est. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 * During the time T3172 is running, the mobile station shall ignore all |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 * received PACKET PAGING REQUEST messages except paging request to trigger |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 * RR connection establishment. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 switch(state) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 case PG_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 case PG_TRANSFER: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 case PG_ACCESS: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 if(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.v_tmsi_field) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 *Paging with TMSI |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 if(grr_data->db.ms_id.tmsi NEQ GMMRR_TMSI_INVALID) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 ul = grr_buffer2ulong((BUF_ptmsi *)&(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.tmsi_field)); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 if(ul EQ grr_data->db.ms_id.tmsi) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 TRACE_EVENT("Paging with Mobile Identity (TMSI) for RR est"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 /* Set some parameters needed RR connection establishment*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 grr_data->pg.ch_needed = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.chan_need; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 grr_data->pg.v_emlpp_prio = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.v_emlpp_prio; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 grr_data->pg.emlpp_prio = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.emlpp_prio; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 /* MS was paged with TMSI for RR connection establishment*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 grr_data->pg.type = ID_TMSI; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 sig_pg_ctrl_rr_est_req ( PG_ON_PCCCH); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 i = paging_req->rep_page_info_trnc_grp.c_rep_page_info; /* break condition for for loop*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 TRACE_EVENT("Paging with wrong TMSI for RR: IGNORE"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 TRACE_EVENT("Paging with TMSI, but no valid TMSI in MS"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 *Paging with Mobile Identity (IMSI) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 UBYTE dummy_digits[MAX_IMSI_DIGITS]; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 UBYTE dummy_nr_digits = 0; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 if(pg_decode_imsi(paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.ms_id, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 dummy_digits, &dummy_nr_digits)) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 if( dummy_nr_digits |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 EQ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 grr_data->db.ms_id.imsi.number_of_digits)/* check the number of digits*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 if( !memcmp |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 ( grr_data->db.ms_id.imsi.digit, /* IMSI stored in the data_base*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 dummy_digits, /* received IMSI*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 grr_data->db.ms_id.imsi.number_of_digits |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 /* The MS was paged with the IMSI*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 TRACE_EVENT("Paging with Mobile Identity (IMSI) for RR est"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 /* Set some parameters needed RR connection establishment*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 grr_data->pg.ch_needed = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.chan_need; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 grr_data->pg.v_emlpp_prio = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.v_emlpp_prio; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 grr_data->pg.emlpp_prio = paging_req->rep_page_info_trnc_grp.rep_page_info[i].rep_page_s2.emlpp_prio; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 /* MS was paged with IMSI for RR connection establishment*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 grr_data->pg.type = ID_IMSI; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 sig_pg_ctrl_rr_est_req ( PG_ON_PCCCH ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 i = paging_req->rep_page_info_trnc_grp.c_rep_page_info; /* break condition for for loop*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 TRACE_EVENT("Paging with wrong IMSI for RR: IGNORE"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 default: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 * ignore paging request for RR connection establishment, do |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 * not check the content |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 } /* pg_process_pp_req() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 | Function : pg_send_stop |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 | Description : The function pg_send_stop() .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 GLOBAL void pg_send_stop ( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 TRACE_FUNCTION( "pg_send_stop" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 if (grr_data->is_pg_started EQ TRUE) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 PALLOC (mphp_stop_pccch_req, MPHP_STOP_PCCCH_REQ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 PSEND (hCommL1, mphp_stop_pccch_req); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 grr_data->is_pg_started = FALSE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 pg_stop_non_drx_timer(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 pg_stop_t_nc2_ndrx(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 } /* pg_send_stop() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 | Function : pg_send_start |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 | Description : The function pg_send_start() .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 | Parameters : UBYTE page_mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 GLOBAL void pg_send_start ( UBYTE page_mode ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 UBYTE pccch_group; /* 0 .. KC-1*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 USHORT dummy; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 TRACE_FUNCTION( "pg_send_start" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 if(grr_is_non_drx_period()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 page_mode = REORG_PAGING; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 switch(page_mode) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 case NORMAL_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 case EXT_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 case REORG_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 case SAME_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 break;/*O.K.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 default: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 /* same as before: nothing to do return*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 TRACE_EVENT("page_mode is corrupt: assume same as before: return"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 return; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 if(psc_db->paging_group.kc EQ 0) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 * No PCCCH description: return |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 TRACE_ERROR("psc_db->paging_group.kc EQ 0"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 return; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 PALLOC( start_pccch, MPHP_START_PCCCH_REQ ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 start_pccch->imsi_mod = grr_imsi_mod( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 pccch_group = ( UBYTE )( start_pccch->imsi_mod % psc_db->paging_group.kc ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 if( !grr_get_pccch_freq_par( pccch_group, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 &start_pccch->p_ch_des.p_chan_sel, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 &start_pccch->p_freq_list ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 PFREE( start_pccch ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 return; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 start_pccch->kcn = psc_db->paging_group.kc; /*< KC multiplied by N */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 start_pccch->split_pg_cycle = grr_data->ms.split_pg_cycle; /*< Split paging cycle */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 start_pccch->bs_pag_blks_res = psc_db->pccch.bs_pag_blks; /*< No paging no PBCCH */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 start_pccch->bs_pbcch_blks = psc_db->pccch.bs_pbcch_blks; /*< Number of PBCCH per multiframe */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 start_pccch->pb = psc_db->g_pwr_par.pb; /*< Power reduction value */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 start_pccch->p_ch_des.tsc = psc_db->paging_group.pccch[pccch_group].tsc; /*< Training sequence code */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 start_pccch->p_ch_des.tn = psc_db->paging_group.pccch[pccch_group].tn; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 if( start_pccch->p_ch_des.p_chan_sel.hopping ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 TRACE_EVENT_P8( "Hopping PCCCH - ma_num:%d hsn/maio:%ld tsc:%d tn:%d f1:%d f2:%d f3:%d f4:%d", |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 psc_db->paging_group.pccch[pccch_group].ma_num, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 start_pccch->p_ch_des.p_chan_sel.p_rf_ch.arfcn, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 start_pccch->p_ch_des.tsc, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 start_pccch->p_ch_des.tn, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 start_pccch->p_freq_list.p_rf_chan_no.p_radio_freq[0], |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 start_pccch->p_freq_list.p_rf_chan_no.p_radio_freq[1], |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 start_pccch->p_freq_list.p_rf_chan_no.p_radio_freq[2], |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 start_pccch->p_freq_list.p_rf_chan_no.p_radio_freq[3] ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 TRACE_EVENT_P3( "Static PCCCH - arfcn:%ld tsc:%d tn:%d", |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 start_pccch->p_ch_des.p_chan_sel.p_rf_ch.arfcn, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 start_pccch->p_ch_des.tsc, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 start_pccch->p_ch_des.tn ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 start_pccch->p_ch_des.p_chan_sel.p_rf_ch.arfcn = |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 grr_g23_arfcn_to_l1( start_pccch->p_ch_des.p_chan_sel.p_rf_ch.arfcn ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 * Calculate downlink signalling counter |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 /* DRX period is used, there is a valid SPILT_PG_CYCLE value */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 dummy = grr_data->ms.split_pg_cycle; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 /* Downlink signalling counter*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 dummy = ( ( 90 * dummy ) / 64 < 10 ) ? 10 : ( 90 * dummy ) / 64; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 if(!grr_data->is_pg_started) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 grr_data->pg.initial_dsc = dummy; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 grr_data->pg.dsc = dummy; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 GRR_EM_SET_DSC_VAL(dummy); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 if( grr_data->pg.is_l1_ref_tn_changed NEQ psc_db->paging_group.pccch[pccch_group].tn ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 sig_pg_cs_pause( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 /*Read PCCCH */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 start_pccch->page_mode = page_mode; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 PSEND(hCommL1, start_pccch); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 if( grr_data->pg.is_l1_ref_tn_changed NEQ psc_db->paging_group.pccch[pccch_group].tn ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 sig_pg_cs_resume( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 grr_data->pg.is_l1_ref_tn_changed = psc_db->paging_group.pccch[pccch_group].tn; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 psc_db->last_pg_mode = page_mode; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 switch(page_mode) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 case NORMAL_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 TRACE_EVENT("page mode NORMAL"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 break;/*O.K.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 case EXT_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 TRACE_EVENT("page mode EXT"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 break;/*O.K.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 case REORG_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 TRACE_EVENT("page mode REORG"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 break;/*O.K.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 case SAME_PAGING: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 TRACE_EVENT("page mode SAME"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 break;/*O.K.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 grr_data->is_pg_started = TRUE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 } /* pg_send_start() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 | Function : pg_start_non_drx_timer |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 | Description : The function pg_start_non_drx_timer() starts the timer for |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 | non DRX period |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 | Parameters : USHORT milliseconds |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 LOCAL void pg_start_non_drx_timer(USHORT milliseconds) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 TRACE_FUNCTION( "pg_start_non_drx_timer"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 psc_db->non_drx_timer_running = TRUE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 vsi_t_start(GRR_handle,T_TRANS_NON_DRX, milliseconds); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 }/* pg_start_non_drx_timer*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 | Function : pg_stop_non_drx_timer |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 | Description : The function pg_stop_non_drx_timer() stops the timer for |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 | non DRX period |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 GLOBAL void pg_stop_non_drx_timer(void) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 TRACE_FUNCTION( "pg_stop_non_drx_timer"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 if(psc_db->non_drx_timer_running) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 psc_db->non_drx_timer_running = FALSE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 vsi_t_stop(GRR_handle,T_TRANS_NON_DRX); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 }/* pg_stop_non_drx_timer*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 | Function : pg_start_t_nc2_ndrx |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 | Description : ... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 GLOBAL void pg_start_t_nc2_ndrx( UBYTE nc_non_drx_period ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 TRACE_FUNCTION( "pg_start_t_nc2_ndrx"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 if( nc_non_drx_period NEQ 0 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 USHORT nc2_drx_period = NC2_NON_DRX_TABLE[nc_non_drx_period]; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 psc_db->nc2_non_drx_period_running = TRUE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 vsi_t_start( GRR_handle, T_NC2_NON_DRX, nc2_drx_period ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 TRACE_EVENT_P1( "Timer T_NC2_NON_DRX started: %d", nc2_drx_period ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 }/* pg_start_t_nc2_ndrx */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 | Function : pg_stop_t_nc2_ndrx |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 | Description : ... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 GLOBAL void pg_stop_t_nc2_ndrx( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 TRACE_FUNCTION( "pg_stop_t_nc2_ndrx" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 if( psc_db->nc2_non_drx_period_running EQ TRUE ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 psc_db->nc2_non_drx_period_running = FALSE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 vsi_t_stop( GRR_handle, T_NC2_NON_DRX ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 TRACE_EVENT( "Timer T_NC2_NON_DRX stopped" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 } /* pg_stop_t_nc2_ndrx */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 | Function : pg_handle_non_drx_timers |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 | Description : ... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 GLOBAL void pg_handle_non_drx_timers(void) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 USHORT non_drx_timer = 0; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 TRACE_FUNCTION("pg_handle_non_drx_timers"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 non_drx_timer = ( psc_db->non_drx_timer < psc_db->gprs_cell_opt.drx_t_max ) ? |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 psc_db->non_drx_timer : psc_db->gprs_cell_opt.drx_t_max; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 non_drx_timer = (USHORT)(NON_DRX_TABLE[non_drx_timer]*1000);/* in milliseconds*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 pg_start_non_drx_timer(non_drx_timer); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 }/* pg_handle_non_drx_timers */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 | Function : pg_non_drx |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 | Description : Handles the timer of non DRX mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 GLOBAL void pg_non_drx ( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 TRACE_FUNCTION( "pg_non_drx" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 switch( GET_STATE( PG ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 case PG_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 * To ensure that the paging mode is not set to page normal in other states |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 * than packet idle mode, the function grr_is_packet_idle_mode is called in |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 * advance. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 * |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 * State PG_IDLE not necessarily means that GRR is in packet idle mode. In |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 * case GRR is currently executing the RRGRR_STOP_TASK_REQ/CNF procedure, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 * just the services CPAP and TC changes their states. All other services |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 * remain in state IDLE, which is not quite correct. A similar scenario |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 * occurs during execution of the MPHP_ASSIGNMENT_REQ/CON procedure. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 if( grr_is_packet_idle_mode( ) EQ TRUE ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 pg_handle_idle_mode( PTM_IDLE ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 TRACE_EVENT( "pg_non_drx: Timeout T_TRANS_NON_DRX handled by next packet idle mode" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 default: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 TRACE_EVENT( "pg_non_drx: Timeout T_TRANS_NON_DRX handled by next PG_IDLE" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 }/* pg_non_drx*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 | Function : pg_decode_imsi |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 | Description : Handles the timer of non DRX mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 LOCAL BOOL pg_decode_imsi(T_ms_id ms_id, UBYTE *digits, UBYTE *nr_digits) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 UBYTE odd_even_type, i; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 BOOL is_odd; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 TRACE_FUNCTION("pg_decode_imsi"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 *nr_digits = 0; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 if(ms_id.ms_id_len > 0) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 odd_even_type = (ms_id.ident_digit[0] & 0x0f); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 if(odd_even_type & 1) /* Check IMSI or not*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 is_odd = odd_even_type & 0x08; /* odd: ung.*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 digits[0] = (ms_id.ident_digit[0] >> 4); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 *nr_digits = 1; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 for(i=1; i< ms_id.ms_id_len; i++) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 if(!is_odd AND (i EQ (ms_id.ms_id_len-1))) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 digits[*nr_digits] = (ms_id.ident_digit[i] & 0x0f); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 *nr_digits = (*nr_digits) + 1; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 digits[*nr_digits] = (ms_id.ident_digit[i] & 0x0f); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 *nr_digits = (*nr_digits) + 1; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 digits[*nr_digits] = (ms_id.ident_digit[i] >> 4); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 *nr_digits = (*nr_digits) + 1; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 /*No IMSI, ignore*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 return FALSE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 /* No mobile identity: strange*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 return FALSE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 return TRUE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 }/* pg_decode_imsi*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 | Function : pg_handle_classB_NMO_III |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 | Description : Handles NMO III for Class B mobile |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 GLOBAL void pg_handle_classB_NMO_III(T_PG_TRANS transition) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 TRACE_FUNCTION("pg_handle_classB_NMO_III"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 switch(transition) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 case T3172_PTM: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 case ACCESS_PTM: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 case IDLE_PTM: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 if(grr_data->ms.reverts_NMO_III) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 * The MS reverts to CC or CG in NMO III |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 * In this state IDLE->TRANSFER it can be only a CG mobile |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 * it shall stop PCCCH reading, if available |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 * it shall stop also CCCH reading, if running |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 TRACE_EVENT("IDLE/ACCESS->PTM: NMO III Class B reverts. Stop CCCH (and PCCCH)"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 if(grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 * Stop monitoring PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 pg_send_stop(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 * Stop monitoring CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 sig_pg_ctrl_stop_mon_ccch(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 * This is non reverting Class B |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 * If PBCCH is present it should stop PCCCH and start CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 * else it should only monitor CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 TRACE_EVENT("IDLE/ACCESS->PTM: NMO III Class B. Start CCCH (and stop PCCCH)"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 if(grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 * Stop monitoring PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 pg_send_stop(); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 if( grr_data->ms.tbf_mon_ccch |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 #ifdef REL99 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 AND |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 !psc_db->gprs_cell_opt.gprs_ext_bits.gprs_ext_info.bss_paging_coord |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 #endif |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 sig_pg_ctrl_start_mon_ccch(PAG_MODE_PTM_NP); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 case NULL_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 case PTM_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 if(grr_data->ms.reverts_NMO_III) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 * The MS reverts to CC or CG in NMO III |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 * In this state TRANSFER/NULL->IDLE it can be only a CG mobile |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 * it shall start PCCCH reading, if available |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 * it shall start also CCCH reading, if NO PBCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 TRACE_EVENT("PTM/NULL->IDLE: NMO III Class B reverts. Start (P) or CCCH"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 if(grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 * Start monitoring PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 sig_pg_ctrl_start_mon_ccch(PAG_MODE_DEFAULT); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 * This is non reverting Class B |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 * If PBCCH is present it should start PCCCH and start CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 * else it should only monitor CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 TRACE_EVENT("PTM/NULL->IDLE: NMO III Class B. Start (P) and CCCH"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 if(grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 * Start monitoring PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 * Start monitoring CCCH (Normal Paging), before doing this use PAG_MODE_PIM_NP |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 * to enter later to idle mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 * Exceptional situation: if NON DRX is used, REORG is only for PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 sig_pg_ctrl_start_mon_ccch(PAG_MODE_PIM_NP); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 * Normal Paging |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 sig_pg_ctrl_start_mon_ccch(PAG_MODE_DEFAULT); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 case ACCESS_IDLE: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 if(grr_data->ms.reverts_NMO_III) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 * The MS reverts to CC or CG in NMO III |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 * In this state ACCESS->IDLE it can be only a CG mobile |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 * it shall start PCCCH reading, if available |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 * it shall start CCCH reading, if NO PBCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 TRACE_EVENT("ACCESS->IDLE: NMO III Class B reverts. Start (P) or CCCH"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 if(!grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 sig_pg_ctrl_start_mon_ccch(PAG_MODE_DEFAULT); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 * This is non reverting Class B |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 * If PBCCH is present it should start PCCCH and start CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 * else it should only monitor CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 TRACE_EVENT("ACCESS->IDLE: NMO III Class B. Start (P) and CCCH"); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 if(grr_is_pbcch_present()) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 * Start monitoring PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 * Exceptional situation: if NON DRX is used, we RORG is only for PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 if(grr_data->ms.tbf_mon_ccch |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 #ifdef REL99 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 AND |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 !psc_db->gprs_cell_opt.gprs_ext_bits.gprs_ext_info.bss_paging_coord |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 #endif |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 sig_pg_ctrl_start_mon_ccch(PAG_MODE_PTM_NP); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 * Start monitoring CCCH (Normal Paging) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 * Normal Paging |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 sig_pg_ctrl_start_mon_ccch(PAG_MODE_DEFAULT); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 case PTM_ACCESS: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 case IDLE_ACCESS: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 * Not necessary |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 }/*switch*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 | Function : pg_handle_access_mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 | Description : Handles the paging when entering the packet access mode. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 | Parameters : void |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 GLOBAL void pg_handle_access_mode ( void ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 TRACE_FUNCTION( "pg_handle_access_mode" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 if( !grr_data->is_pg_started OR psc_db->last_pg_mode NEQ REORG_PAGING ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 * enable the L1 reading USF values |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 pg_send_start( PG_REORG ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 * start monitoring CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 sig_pg_ctrl_start_mon_ccch( PAG_MODE_REORG ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 } /* pg_handle_access_mode() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 | Function : pg_set_l1_ref_tn |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 | Description : The function pg_set_l1_ref_tn () .... |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 | Parameters : |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 GLOBAL void pg_set_l1_ref_tn ( UBYTE* out_tn, UBYTE in_tn ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 TRACE_FUNCTION( "pg_set_l1_ref_tn" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 if( in_tn NEQ *out_tn ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 grr_data->pg.is_l1_ref_tn_changed = TRUE; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 *out_tn = in_tn; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 } /* pg_set_l1_ref_tn */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 | Function : pg_handle_idle_mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 | Description : |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 | Parameters : |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 GLOBAL void pg_handle_idle_mode ( T_PG_TRANS transition ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 TRACE_FUNCTION( "pg_handle_idle_mode" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 switch( grr_data->pg.nmo ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 case GMMRR_NET_MODE_I: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 * NMOI: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 * ==== |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 * Paging on ( CCCH or PCCCH ) and PACCH, GPRS attached MS should |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 * monitor one paging channel, so we have to stop monitoring CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 * channel if PCCCH is present. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 sig_pg_ctrl_start_mon_ccch( PAG_MODE_DEFAULT ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 case GMMRR_NET_MODE_II: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 * NMOII: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 * ===== |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 * Paging on CCCH, paging for both circuit switched and packet data |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 * will be sent on CCCH, PCCCH has been not allocated in the cell. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 switch( grr_data->ms.class_of_mode ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 case GMMRR_CLASS_A: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 /* BEGIN GRR_NMO_III */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 case GMMRR_CLASS_B: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 /* END GRR_NMO_III */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 case GMMRR_CLASS_BG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 case GMMRR_CLASS_BC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 case GMMRR_CLASS_CG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 case GMMRR_CLASS_CC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 sig_pg_ctrl_start_mon_ccch( PAG_MODE_DEFAULT ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 case GMMRR_NET_MODE_III: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 * NMOIII: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 * ======= |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 * If PBCCH not present paging for both circuit switched and packet |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 * data will be sent on CCCH, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 * if PBCCH is present paging for circuit switched data is sent on |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 * CCCH and for packet data on PCCCH. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 TRACE_EVENT( "GMMRR_NET_MODE_III PBCCH" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 switch(grr_data->ms.class_of_mode) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 case GMMRR_CLASS_A: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 sig_pg_ctrl_start_mon_ccch( PAG_MODE_PIM_NP ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 * We need to check whether the MS class B mobile |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 * reverts to CG or CC in NMO III. If not it should monitor PCCCH and CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 * else it needs to monitor either CCCH or PCCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 /* BEGIN GRR_NMO_III */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 case GMMRR_CLASS_B: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 /* END GRR_NMO_III */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 case GMMRR_CLASS_BG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 case GMMRR_CLASS_BC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 pg_handle_classB_NMO_III( transition ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 case GMMRR_CLASS_CG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 sig_pg_ctrl_stop_mon_ccch( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 pg_send_start( psc_db->last_pg_mode ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 case GMMRR_CLASS_CC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 sig_pg_ctrl_start_mon_ccch( PAG_MODE_DEFAULT ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 TRACE_EVENT ( "GMMRR_NET_MODE_III BCCH" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 sig_pg_ctrl_start_mon_ccch( PAG_MODE_DEFAULT ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 } /* pg_handle_idle_mode() */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 | Function : pg_handle_transfer_mode |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 | Description : |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 | Parameters : |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 | |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 +------------------------------------------------------------------------------ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 GLOBAL void pg_handle_transfer_mode ( T_PG_TRANS transition ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 TRACE_FUNCTION( "pg_handle_transfer_mode" ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 switch( grr_data->pg.nmo ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 case GMMRR_NET_MODE_I: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 * NMOI: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 * ==== |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 * Paging on ( CCCH or PCCCH ) and PACCH, GPRS attached MS should |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 * monitor one paging channel, so we have to stop monitoring CCCH |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 * channel if PCCCH is present. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 pg_send_stop( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 sig_pg_ctrl_stop_mon_ccch( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 case GMMRR_NET_MODE_II: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 * NMOII: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 * ===== |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 * Paging on CCCH, paging for both circuit switched and packet data |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 * will be sent on CCCH, PCCCH has been not allocated in the cell. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 * |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 * The MS should monitor CCCH except for the CLASS_CG. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 switch( grr_data->ms.class_of_mode ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 case GMMRR_CLASS_A: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 /* BEGIN GRR_NMO_III*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 case GMMRR_CLASS_B: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 /* END GRR_NMO_III*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 case GMMRR_CLASS_BG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 case GMMRR_CLASS_BC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 if( grr_data->ms.tbf_mon_ccch |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 #ifdef REL99 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 AND |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 !psc_db->gprs_cell_opt.gprs_ext_bits.gprs_ext_info.bss_paging_coord |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 #endif |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 sig_pg_ctrl_start_mon_ccch( PAG_MODE_PTM_NP ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 sig_pg_ctrl_stop_mon_ccch( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 case GMMRR_CLASS_CG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 sig_pg_ctrl_stop_mon_ccch( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 case GMMRR_NET_MODE_III: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 /* |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 * NMOIII: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 * ======= |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 * If PBCCH not present paging for both circuit switched and packet |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 * data will be sent on CCCH, |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 * if PBCCH is present paging for circuit switched data is sent on |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 * CCCH and for packet data on PCCCH. |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 */ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 switch( grr_data->ms.class_of_mode ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 case GMMRR_CLASS_A: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 pg_send_stop( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 sig_pg_ctrl_start_mon_ccch( PAG_MODE_PTM_NP ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 /* BEGIN GRR_NMO_III*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 case GMMRR_CLASS_B: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 /* END GRR_NMO_III*/ |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 case GMMRR_CLASS_BG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 case GMMRR_CLASS_BC: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 pg_handle_classB_NMO_III( transition ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 case GMMRR_CLASS_CG: |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 if( grr_is_pbcch_present( ) ) |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 pg_send_stop( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 else |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 { |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 sig_pg_ctrl_stop_mon_ccch( ); |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 break; |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 } |
d393cd9bb723
src/g23m-*: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 } /* pg_handle_transfer_mode() */ |