annotate gsm-fw/g23m-gsm/mm/mm_gmm.c @ 1034:405b5469abc4 default tip

top README: repository change notice
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 12 Jun 2016 19:06:34 +0000
parents 2f7df7a314f8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
673
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 | Project : GSM-PS (8410)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 | Modul : MM_GMM.C
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 | All rights reserved.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 | Instruments Berlin, AG
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 | Purpose : This module defines the functions for the communication
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 | of MM with GMM. All communications from MM to GMM will
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 | be through this file.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 +-----------------------------------------------------------------------------
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #ifndef MM_GMM_C
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #define MM_GMM_C
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #define ENTITY_MM
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 /*==== INCLUDES ===================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #include <string.h>
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "typedefs.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "pconst.cdg"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "message.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "ccdapi.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #include "vsi.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #include "custom.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #include "gsm.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "prim.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "cnf_mm.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #include "mon_mm.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #include "pei.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #include "tok.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #include "mm.h"
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 /*==== EXPORT =====================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 /*==== TEST =====================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 /*==== PRIVAT =====================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 /*==== VARIABLES ==================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 /*==== FUNCTIONS ==================================================*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #if defined(GPRS)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 | STATE : code ROUTINE : mm_send_mmgmm_reg_cnf |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 PURPOSE : sends the MMGMM_REG_CNF primitive
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 GLOBAL void mm_send_mmgmm_reg_cnf (UBYTE bootup_cause)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 TRACE_FUNCTION ("mm_send_mmgmm_reg_cnf()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 PALLOC (mmgmm_reg_cnf, MMGMM_REG_CNF); /* T_MMGMM_REG_CNF */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 if (bootup_cause NEQ PWR_SCAN_START)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 mmgmm_reg_cnf->plmn.v_plmn = V_PLMN_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 memcpy (mmgmm_reg_cnf->plmn.mcc, mm_data->mm.lai.mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 memcpy (mmgmm_reg_cnf->plmn.mnc, mm_data->mm.lai.mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 mmgmm_reg_cnf->plmn.v_plmn = V_PLMN_NOT_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 mmgmm_reg_cnf->lac = mm_data->mm.lai.lac;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 mmgmm_reg_cnf->cid = mm_data->mm.cid;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 mmgmm_reg_cnf->resumption = mm_data->gprs.resumption;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 mmgmm_reg_cnf->gprs_indicator = mm_data->mm.gprs_indication;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 mmgmm_reg_cnf->bootup_cause = bootup_cause;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 PSENDX (GMM, mmgmm_reg_cnf);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 | STATE : code ROUTINE : mm_mmgmm_reg_cnf |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 PURPOSE : This function indicates change in service or change in PLMN
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 to the GMREG SAP. This is suppressed if the
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 registration type is REG_CELL_SEARCH_ONLY, in this
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 case GMM is not interested in the MM service information.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 GLOBAL void mm_mmgmm_reg_cnf (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 TRACE_FUNCTION ("mm_mmgmm_reg_cnf()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 if (GET_STATE (STATE_REG_TYPE) NEQ REG_CELL_SEARCH_ONLY)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 /* Issue 20792 : Added condition mm_data->plmn_scan_mmi. If network search requested by user
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 is pending then after RR release MM should initiate network search and after getting
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 proper PLMN list it should inform GMM followed by successful Registration. Else there will be
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 collision in RR between network search and GPRS Attach resulting in abortion of network
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 search and hence empty list by RR will be returned.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 if ( mm_data->plmn_scan_mmi )
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 mm_data->gprs.reg_cnf_on_idle_entry = TRUE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 if ((mm_data->reg.full_service_indicated EQ FALSE) OR
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 (mm_data->reg.new_cell_ind EQ TRUE))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 * Either no full service was indicated to the MMI,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 * or the PLMN has changed from that what was indicated before.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 mm_send_mmgmm_reg_cnf (REG_END);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 mm_data->reg.full_service_indicated = TRUE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 mm_data->reg.new_cell_ind = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 mm_data->gprs.reg_cnf_on_idle_entry = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 /* Disallow establishment for own location updating and CM services */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 if (GET_STATE (STATE_REG_TYPE) EQ REG_REMOTE_CONTROLLED)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 SET_STATE (STATE_REG_TYPE, REG_CELL_SEARCH_ONLY);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 SET_STATE (STATE_GPRS_CM_EST, CM_GPRS_EST_IDLE);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 } /* else */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 | STATE : code ROUTINE : mm_send_mmgmm_nreg_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 PURPOSE : This procedure builds ans sends the MMGMM_NREG_IND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 primitive without having any side effects.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 LOCAL void mm_send_mmgmm_nreg_ind (UBYTE service,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 UBYTE search_running,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 UBYTE forb_ind)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 PALLOC (mmgmm_nreg_ind, MMGMM_NREG_IND); /* T_MMGMM_NREG_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 TRACE_FUNCTION ("mm_send_mmgmm_nreg_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 mmgmm_nreg_ind->service = service;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 mmgmm_nreg_ind->search_running = search_running;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 if (forb_ind EQ FORB_PLMN_INCLUDED)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 mmgmm_nreg_ind->new_forb_plmn.v_plmn = V_PLMN_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 memcpy (mmgmm_nreg_ind->new_forb_plmn.mcc, mm_data->mm.lai.mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 memcpy (mmgmm_nreg_ind->new_forb_plmn.mnc, mm_data->mm.lai.mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 mmgmm_nreg_ind->new_forb_plmn.v_plmn = V_PLMN_NOT_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 memset (mmgmm_nreg_ind->new_forb_plmn.mcc, 0x0f, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 memset (mmgmm_nreg_ind->new_forb_plmn.mnc, 0x0f, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 mmgmm_nreg_ind->cause = mm_data->limited_cause;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 /* No GPRS resumption field in MMGMM_NREG_IND as in MMGMM_REG_REJ */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 PSENDX (GMM, mmgmm_nreg_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 | STATE : code ROUTINE : mm_send_mmgmm_reg_rej |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 PURPOSE : This procedure builds ans sends the MMGMM_REG_REJ
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 primitive without having any side effects.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 LOCAL void mm_send_mmgmm_reg_rej (UBYTE service,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 UBYTE search_running,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 UBYTE forb_ind)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 PALLOC (mmgmm_reg_rej, MMGMM_REG_REJ); /* T_MMGMM_REG_REJ */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 TRACE_FUNCTION ("mm_send_mmgmm_reg_rej()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 mmgmm_reg_rej->service = service;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 mmgmm_reg_rej->search_running = search_running;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 if (forb_ind EQ FORB_PLMN_INCLUDED)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221 mmgmm_reg_rej->new_forb_plmn.v_plmn = V_PLMN_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 memcpy (mmgmm_reg_rej->new_forb_plmn.mcc, mm_data->mm.lai.mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 memcpy (mmgmm_reg_rej->new_forb_plmn.mnc, mm_data->mm.lai.mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 mmgmm_reg_rej->new_forb_plmn.v_plmn = V_PLMN_NOT_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 memset (mmgmm_reg_rej->new_forb_plmn.mcc, 0x0f, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 memset (mmgmm_reg_rej->new_forb_plmn.mnc, 0x0f, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 mmgmm_reg_rej->cause = mm_data->limited_cause;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 mmgmm_reg_rej->resumption = mm_data->gprs.resumption;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 PSENDX (GMM, mmgmm_reg_rej);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 | STATE : code ROUTINE : mm_mmgmm_nreg_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 PURPOSE : This is the common procedure for MMGMM_NREG_IND and
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 MMGMM_REG_REJ. MMGMM_REG_REJ is sent if the procedure
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 war a remote controlled location updating procedure,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 otherwise MMGMM_NREG_IND is sent.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 GLOBAL void mm_mmgmm_nreg_ind (UBYTE service,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 UBYTE search_running,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 UBYTE forb_ind)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 TRACE_FUNCTION ("mm_mmgmm_nreg_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 if (GET_STATE (STATE_REG_TYPE) EQ REG_REMOTE_CONTROLLED)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 mm_send_mmgmm_reg_rej (service, search_running, forb_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 mm_send_mmgmm_nreg_ind (service, search_running, forb_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 TRACE_EVENT_P1 (" service=%d", service);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 TRACE_EVENT_P1 (" search_running=%d", search_running);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 TRACE_EVENT_P1 (" limited_cause=%d", mm_data->limited_cause);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 TRACE_EVENT_P1 (" resumption=%d", mm_data->gprs.resumption);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 #endif /* #ifdef WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 * Delete the limited cause if it was not fatal, as
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 * on the next cell selection the reason may be another than
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 * the one now indicated.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 if (mm_data->reg.op.sim_ins EQ SIM_INSRT)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 mm_data->limited_cause = MMCS_INT_NOT_PRESENT;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 mm_data->reg.full_service_indicated = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 mm_data->gprs.reg_cnf_on_idle_entry = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 /* Disallow establishment for own location updating and CM services */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 if (GET_STATE (STATE_REG_TYPE) EQ REG_REMOTE_CONTROLLED)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 SET_STATE (STATE_REG_TYPE, REG_CELL_SEARCH_ONLY);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 SET_STATE (STATE_GPRS_CM_EST, CM_GPRS_EST_IDLE);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 | STATE : code ROUTINE : mm_mmgmm_nreg_cnf |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 PURPOSE : If GPRS is enabled, send MMGMM_NREG_CNF.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 Otherwise send MMR_NREG_CNF.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 GLOBAL void mm_mmgmm_nreg_cnf (UBYTE detach_cause)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 TRACE_FUNCTION ("mm_mmgmm_nreg_cnf()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 if (mm_data->nreg_request)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 PALLOC (mmgmm_nreg_cnf, MMGMM_NREG_CNF); /* T_MMGMM_NREG_CNF */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 mmgmm_nreg_cnf->detach_cause = detach_cause;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 " detach_cause=%d", mmgmm_nreg_cnf->detach_cause);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 #endif /* WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 PSENDX (GMM, mmgmm_nreg_cnf);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 mm_data->nreg_request = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 | STATE : code ROUTINE : mm_mmgmm_plmn_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 PURPOSE : If GPRS is enabled, send MMGMM_PLMN_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 Otherwise send MMR_PLMN_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 GLOBAL void mm_mmgmm_plmn_ind (USHORT cause,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 const T_RR_ABORT_IND *rr_abort_ind)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 TRACE_FUNCTION ("mm_mmgmm_plmn_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 if (mm_data->plmn_scan_mmi)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 USHORT i;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 PALLOC (mmgmm_plmn_ind, MMGMM_PLMN_IND); /* T_MMGMM_PLMN_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 /* Issue 20792 : If there was any network search request pending during specific
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 prorcedure then on getting RR_RELEASE_IND that would be processed first and
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 MMGMM_REG_CNF will be held till that is done. Once PLMN list is receieved by RR
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 MM should send MMGMM_PLMN_IND to GMM followed by MMGMM_REG_CNF .
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 if ( mm_data->gprs.reg_cnf_on_idle_entry )
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
353 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 mm_data->plmn_scan_mmi = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 mm_data->reg.full_service_indicated = FALSE;/* Force MMGMM_REG_CNF */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 mm_mmgmm_reg_cnf();
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 /* Net Search Result */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 mmgmm_plmn_ind->cause = cause;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 // See comment for MMR_PLMN_IND!!!
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 memset (mmgmm_plmn_ind->plmn, NOT_PRESENT_8BIT,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 sizeof (mmgmm_plmn_ind->plmn));
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 /* Make testcases happy, initialize all unused data */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 memset (mmgmm_plmn_ind->forb_ind, FORB_PLMN_NOT_INCLUDED,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 sizeof (mmgmm_plmn_ind->forb_ind));
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 memset (mmgmm_plmn_ind->rxlevel, 0x00,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 sizeof (mmgmm_plmn_ind->rxlevel));
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 memset (mmgmm_plmn_ind->gprs_status, MMGMM_GPRS_GSM,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 sizeof (mmgmm_plmn_ind->gprs_status));
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 if (cause EQ MMCS_SUCCESS)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 /* Create the PLMN list for the MMI and sent it */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 reg_create_plmn_list (rr_abort_ind, WITH_ALL_PLMNS);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 for (i = 0; i < mm_data->reg.plmn_cnt; i++)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 /* Copy the PLMN information itself from registration data
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 * This may be too complicated, one memcpy() may be sufficient */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 reg_unpack_plmn (&mmgmm_plmn_ind->plmn[i], mm_data->reg.plmn, i);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 /* Process forbidden PLMN information */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 if (reg_plmn_in_list (mm_data->reg.forb_plmn,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 MAX_FORB_PLMN_ID,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 &mmgmm_plmn_ind->plmn[i]))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 mmgmm_plmn_ind->forb_ind[i] = FORB_PLMN_INCLUDED;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 * PLMN not member of forbidden list (cause #11), if GPRS is
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 * active, consider GPRS forbidden list also (cause #14)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 if (!mm_gsm_alone() AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 (mm_data->gprs.mobile_class EQ MMGMM_CLASS_CG) AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 reg_plmn_in_list (mm_data->reg.gprs_forb_plmn,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 MAX_GPRS_FORB_PLMN_ID,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 &mmgmm_plmn_ind->plmn[i]))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 mmgmm_plmn_ind->forb_ind[i] = FORB_PLMN_INCLUDED;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 mmgmm_plmn_ind->forb_ind[i] = FORB_PLMN_NOT_INCLUDED;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 /* Copy the rx level from registration data */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 mmgmm_plmn_ind->rxlevel[i] = mm_data->reg.plmn_rx [i];
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 mmgmm_plmn_ind->lac_list[i] = mm_data->reg.plmn_lac [i]; //LOL 02.01.2003: added for EONS support
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 /* Copy the GPRS capabilities from registration data */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419 mmgmm_plmn_ind->gprs_status[i] = mm_data->reg.gprs_status[i];
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 } /* for */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 /* Do not consider the forbidden PLMNs for MM's internal operation */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 reg_create_plmn_list (rr_abort_ind, WITH_OTHER_PLMNS);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 } /* if */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 PSENDX (GMM, mmgmm_plmn_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 reg_check_plmn_search (cause, rr_abort_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 | STATE : code ROUTINE : mm_mmgmm_auth_rej_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 PURPOSE : If GPRS is enabled, send MMGMM_AUTH_REJ_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 Otherwise this is compiled to a dummy function and will
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 return without further action.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 GLOBAL void mm_mmgmm_auth_rej_ind (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 TRACE_FUNCTION ("mm_mmgmm_auth_rej_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 PALLOC (mmgmm_auth_rej_ind, MMGMM_AUTH_REJ_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 PSENDX (GMM, mmgmm_auth_rej_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 mm_data->reg.full_service_indicated = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 mm_data->gprs.reg_cnf_on_idle_entry = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 | STATE : code ROUTINE : mm_mmgmm_cm_establish_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 PURPOSE : If GPRS is enabled, send MMGMM_CM_ESTABLISH_IND if
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 not already done. A GSM only protocol stack doesn't
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 need this function.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 By the primitive MMGMM_CM_ESTABLISH_IND GMM is informed
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470 that a circuit switched call has to be started.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
472 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 GLOBAL void mm_mmgmm_cm_establish_ind (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 TRACE_FUNCTION ("mm_mmgmm_establish_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 switch (GET_STATE (STATE_GPRS_CM_EST))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 case CM_GPRS_EST_IDLE:
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 PALLOC (mmgmm_establish_ind, MMGMM_CM_ESTABLISH_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 PSENDX (GMM, mmgmm_establish_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 SET_STATE (STATE_GPRS_CM_EST, CM_GPRS_EST_PEND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 break;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 default: /* Maybe CM establishment is already allowed etc. */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490 break;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498 | STATE : code ROUTINE : mm_mmgmm_cm_emergency_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
501 PURPOSE : If GPRS is enabled, send MMGMM_CM_EMERGENCY_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 Otherwise this is compiled to a dummy function and will
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 return without further action.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 By this primitive GMM is informed that a circuit switched
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 emergency call has to be started.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509 GLOBAL void mm_mmgmm_cm_emergency_ind (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
511 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 TRACE_FUNCTION ("mm_mmgmm_emergency_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 switch (GET_STATE (STATE_GPRS_CM_EST))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 case CM_GPRS_EST_IDLE:
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 case CM_GPRS_EST_PEND:
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 PALLOC (mmgmm_emergency_ind, MMGMM_CM_EMERGENCY_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520 PSENDX (GMM, mmgmm_emergency_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 SET_STATE (STATE_GPRS_CM_EST, CM_GPRS_EMERGE_PEND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 break;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 default: /* MMGMM_CM_EMERGENCY_IND has already been sent */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 break;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 | STATE : code ROUTINE : mm_mmgmm_cm_release_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 PURPOSE : If GPRS is enabled, send MMGMM_CM_RELEASE_IND if the
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 conditions are met.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 Otherwise this is compiled to a dummy function and will
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 return without further action.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 GLOBAL void mm_mmgmm_cm_release_ind (UBYTE resumption)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 TRACE_FUNCTION ("mm_mmgmm_cm_release_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 if (!mm_gsm_alone() AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 (GET_STATE (STATE_GPRS_CM_EST) NEQ CM_GPRS_EST_IDLE) AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 (mm_count_connections (CM_NOT_IDLE) EQ 0))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 PALLOC (mmgmm_cm_release_ind, MMGMM_CM_RELEASE_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 mmgmm_cm_release_ind->resumption = resumption;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 " resumption=%d", mmgmm_cm_release_ind->resumption);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 #endif /* WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 PSENDX (GMM, mmgmm_cm_release_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 SET_STATE (STATE_GPRS_CM_EST, CM_GPRS_EST_IDLE);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 | STATE : code ROUTINE : mm_mmgmm_activate_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
572
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573 PURPOSE : If GPRS is enabled, send MMGMM_ACTIVATE_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 Otherwise this is compiled to a dummy function and will
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 return without further action.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 The t3212_val here is to be given in the same form as it
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 is to be received from the network, this means in steps of
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 6 minutes, it will be scaled to milliseconds for GMM here.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 GLOBAL void mm_mmgmm_activate_ind (UBYTE status)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 TRACE_FUNCTION ("mm_mmgmm_activate_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 if (!mm_gsm_alone())
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 PALLOC (mmgmm_activate_ind, MMGMM_ACTIVATE_IND); /* T_MMGMM_ACTIVATE_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 mmgmm_activate_ind->plmn.v_plmn = V_PLMN_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
590 memcpy (mmgmm_activate_ind->plmn.mcc, mm_data->mm.lai.mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 memcpy (mmgmm_activate_ind->plmn.mnc, mm_data->mm.lai.mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
592 mmgmm_activate_ind->lac = mm_data->mm.lai.lac;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 mmgmm_activate_ind->cid = mm_data->mm.cid;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 if (mm_data->t3212_cfg_counter NEQ 0 AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
595 mm_data->mm.mm_info.t3212 NEQ 0)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 mmgmm_activate_ind->t3212_val = mm_data->t3212_cfg_counter * 10000;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 mmgmm_activate_ind->t3212_val = mm_data->mm.mm_info.t3212 * 360000;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599 mmgmm_activate_ind->status = status;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
600 mmgmm_activate_ind->gprs_indicator = mm_data->mm.gprs_indication;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 if (status NEQ MMGMM_LIMITED_SERVICE)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
603 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604 mm_data->reg.actual_plmn = mmgmm_activate_ind->plmn; /* Struct copy */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
606
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609 " MCC=%x%x%x MNC=%x%x%x LAC=%04x",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
610 mmgmm_activate_ind->plmn.mcc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 mmgmm_activate_ind->plmn.mcc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 mmgmm_activate_ind->plmn.mcc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613 mmgmm_activate_ind->plmn.mnc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 mmgmm_activate_ind->plmn.mnc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
615 mmgmm_activate_ind->plmn.mnc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
616 mmgmm_activate_ind->lac);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
617
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 " t3212_val=%d",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 mmgmm_activate_ind->t3212_val);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
621
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
622 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 " status=%d",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
624 mmgmm_activate_ind->status);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627 " gprs_indicator=%d",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 mmgmm_activate_ind->gprs_indicator);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
629 #endif /* #ifdef WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
630
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
631 PSENDX (GMM, mmgmm_activate_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
632 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
635
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
638 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639 | STATE : code ROUTINE : mm_mmgmm_t3212_val_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
641
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 PURPOSE : If GPRS is enabled, send MMGMM_T3212_VAL_IND always T3212
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
643 changes, but no cell selection by RR was performed.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
644 For a GSM only protocol stack, this function doesn't exist.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 The time to be sent to GMM is scaled in units of milliseconds.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 GLOBAL void mm_mmgmm_t3212_val_ind (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
650 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 TRACE_FUNCTION ("mm_mmgmm_t3212_val_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 /* T_MMGMM_T3212_VAL_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 PALLOC (mmgmm_t3212_val_ind, MMGMM_T3212_VAL_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 if (mm_data->t3212_cfg_counter NEQ 0 AND
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 mm_data->mm.mm_info.t3212 NEQ 0)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
661 mmgmm_t3212_val_ind->t3212_val = mm_data->t3212_cfg_counter * 10000;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
664 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 mmgmm_t3212_val_ind->t3212_val = mm_data->mm.mm_info.t3212 * 360000;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
666 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
667
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
670 " t3212_val=%d", mmgmm_t3212_val_ind->t3212_val);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
671 #endif /* WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
672
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 PSENDX (GMM, mmgmm_t3212_val_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
681 | STATE : code ROUTINE : mm_mmgmm_lup_accept_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
682 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684 PURPOSE : If GPRS is enabled, send MMGMM_LUP_ACCEPT_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
685 For a GSM only protocol stack, this function doesn't exist.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
686 It is assumed that the networks sends a location updating
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
687 accept message for the location area of the current serving
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
688 cell here, this assumption should be true always.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
689
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
691
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
692 GLOBAL void mm_mmgmm_lup_accept_ind (void)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
693 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
694 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
695 TRACE_FUNCTION ("mm_mmgmm_lup_accept_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
696
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697 if ((mm_data->reg.full_service_indicated EQ FALSE) OR
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
698 (mm_data->reg.new_cell_ind EQ TRUE))
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
699 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
700 /* T_MMGMM_LUP_ACCEPT_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
701 PALLOC (mmgmm_lup_accept_ind, MMGMM_LUP_ACCEPT_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
702 mmgmm_lup_accept_ind->plmn.v_plmn = V_PLMN_PRES;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703 memcpy (mmgmm_lup_accept_ind->plmn.mcc, mm_data->mm.lai.mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
704 memcpy (mmgmm_lup_accept_ind->plmn.mnc, mm_data->mm.lai.mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 mmgmm_lup_accept_ind->lac = mm_data->mm.lai.lac;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
706 mmgmm_lup_accept_ind->cid = mm_data->mm.cid;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
707
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
708 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
709 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 " MCC=%x%x%x MNC=%x%x%x LAC=%04x",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
711 mmgmm_lup_accept_ind->plmn.mcc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
712 mmgmm_lup_accept_ind->plmn.mcc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713 mmgmm_lup_accept_ind->plmn.mcc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714 mmgmm_lup_accept_ind->plmn.mnc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
715 mmgmm_lup_accept_ind->plmn.mnc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 mmgmm_lup_accept_ind->plmn.mnc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
717 mmgmm_lup_accept_ind->lac);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 #endif /* #ifdef WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
719
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720 PSENDX (GMM, mmgmm_lup_accept_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
721
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
722 mm_data->reg.full_service_indicated = TRUE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
723 mm_data->reg.new_cell_ind = FALSE;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
724 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
725 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
726
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
727
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
729 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
731 | STATE : code ROUTINE : mm_mmgmm_lup_needed_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
732 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
733
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
734 PURPOSE : If GPRS is enabled, send MMGMM_LUP_NEEDED_IND.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
735 For a GSM only protocol stack, this function doesn't exist.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736 This function is used if GMM has to be informed about the
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
737 fact that a location updating procedure is needed by MM,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
738 eg. a CM SERVICE REJECT message with the cause "IMSI unknown
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
739 in VLR" has been received or simply T3212 has expired.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
740 A cell selection was not the cause for the need to update.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
741 If the location updating is neccessary due to an incoming
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
742 establish request by the CM entities in state
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
743 MM_IDLE_ATTEMPT_TO_UPDATE, this is indicated by
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
744 MMGMM_CM_ESTABLISH_IND and should cause a registration by GMM
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
745 as GMM should know that MM needs an update in this situation.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
746
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
747 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
749 GLOBAL void mm_mmgmm_lup_needed_ind (UBYTE reason)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
750 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
752 TRACE_FUNCTION ("mm_mmgmm_lup_needed_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
753
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
754 if (!mm_lup_allowed_by_gmm ())
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
755 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
756 /* T_MMGMM_LUP_NEEDED_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
757 PALLOC (mmgmm_lup_needed_ind, MMGMM_LUP_NEEDED_IND);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
758 mmgmm_lup_needed_ind->reason = reason;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
759
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
760 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
761 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
762 " reason=%d", mmgmm_lup_needed_ind->reason);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
763 #endif /* WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
764
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
765 PSENDX (GMM, mmgmm_lup_needed_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
766 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
767 else
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
768 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
769 /* This is an internal MM error, harmless, but should be fixed if seen */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
770 TRACE_ERROR ("MMGMM_LUP_NEEDED_IND suppressed");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
771 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
772 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
773
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
774
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
775 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
776 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
777 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
778 | STATE : code ROUTINE : mm_mmgmm_tmsi_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
779 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
780
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
781 PURPOSE : Send MMGMM_TMSI_IND with the new TMSI
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
782 whenever the TMSI changes after SIM insertion.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
783
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
784 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
785
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
786 GLOBAL void mm_mmgmm_tmsi_ind (ULONG tmsi)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
787 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
788 GET_INSTANCE_DATA;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
789 TRACE_FUNCTION ("mm_mmgmm_tmsi_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
790
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
791 if (tmsi NEQ mm_data->reg.indicated_tmsi)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
792 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
793 PALLOC (mmgmm_tmsi_ind, MMGMM_TMSI_IND); /* T_MMGMM_TMSI_IND */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
794 mmgmm_tmsi_ind->tmsi = tmsi;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
795 PSENDX (GMM, mmgmm_tmsi_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
796
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
797 mm_data->reg.indicated_tmsi = tmsi;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
798 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
799 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
800
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
801
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
802 /*
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
803 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
804 | PROJECT : GSM-PS (6147) MODULE : MM_MM |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
805 | STATE : code ROUTINE : mm_mmgmm_ahplmn_ind |
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
806 +--------------------------------------------------------------------+
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
807
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
808 PURPOSE : Send MMGMM_AHPLMN_IND with the new AHPLMN
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
809 at poweron if valid AHPLMN and whenever the
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
810 AHPLMN changes.
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
811 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
812
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
813 GLOBAL void mm_mmgmm_ahplmn_ind (T_plmn *acting_hplmn)
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
814 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
815
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
816 TRACE_FUNCTION ("mm_mmgmm_ahplmn_ind()");
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
817 {
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
818 PALLOC(mmgmm_ahplmn_ind, MMGMM_AHPLMN_IND); /*T_MMGMM_AHPLMN_IND*/
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
819
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
820 mmgmm_ahplmn_ind->ahplmn.v_plmn = acting_hplmn->v_plmn;
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
821 memcpy(mmgmm_ahplmn_ind->ahplmn.mcc, acting_hplmn->mcc, SIZE_MCC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
822 memcpy(mmgmm_ahplmn_ind->ahplmn.mnc, acting_hplmn->mnc, SIZE_MNC);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
823
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
824
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
825
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
826 #ifdef WIN32
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
827 vsi_o_ttrace (VSI_CALLER TC_FUNC,
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
828 " MCC=%x%x%x MNC=%x%x%x v_plmn=%x",
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
829 mmgmm_ahplmn_ind->ahplmn.mcc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
830 mmgmm_ahplmn_ind->ahplmn.mcc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
831 mmgmm_ahplmn_ind->ahplmn.mcc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
832 mmgmm_ahplmn_ind->ahplmn.mnc[0],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
833 mmgmm_ahplmn_ind->ahplmn.mnc[1],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
834 mmgmm_ahplmn_ind->ahplmn.mnc[2],
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
835 mmgmm_ahplmn_ind->ahplmn.v_plmn);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
836
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
837 #endif /* #ifdef WIN32 */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
838
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
839 PSENDX(GMM, mmgmm_ahplmn_ind);
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
840 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
841
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
842 }
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
843
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
844 #endif /* defined(GPRS) */
2f7df7a314f8 gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
845 #endif /* MM_GMM_C */