custom_mm_config.c
12.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2008
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
*
* Filename:
* ---------
* custom_mm_config.c
*
* Project:
* --------
* MONZA
*
* Description:
* ------------
* This file is used to define the MM configuration.
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#include "kal_general_types.h"
#include "kal_public_defs.h"
#include "custom_mm_config.h"
/*****************************************************************************
* FUNCTION
* mm_custom_stay_on_la_of_regional_provisional_service
* DESCRIPTION
* This function is for customize MM behavior when entering forbidden LA of #12
*
* PARAMETERS
*
* RETURNS
* KAL_TRUE for following spec (enter limited service and stay on forbidden LA of #12)
* KAL_FALSE will allow MS retry other PLMN/RAT for normal service
* GLOBALS AFFECTED
* None
*****************************************************************************/
kal_bool mm_custom_stay_on_la_of_regional_provisional_service(void)
{
//suggest to use default setting [KAL_TRUE], change this setting might affect the result of FTA or IOT.
//may only be changed on production version of software after pass all lab test
return KAL_TRUE;
}
/*****************************************************************************
* FUNCTION
* mm_custom_allow_rplmn_hplmn_combined_search
* DESCRIPTION
* This function is used to configure whether search RPLMN and HPLMN together.
*
* PARAMETERS
*
* RETURNS
* kal_bool
* GLOBALS AFFECTED
* None
*****************************************************************************/
kal_bool mm_custom_allow_rplmn_hplmn_combined_search(void)
{
/*if search RPLMN and HPLMN together, it is more quickly to camp on HPLMN,
and no need to do high priority plmn search later.
But it may disobey test case 6.2.1.1 in spec 34.123.
*/
#ifdef __UMTS_TDD128_MODE__ /*for TDD project, this compile option is open*/
return KAL_FALSE;
#else
return KAL_TRUE;
#endif
}
/* MAUI_03014009 Russia Operator BeeLine request to use ECC with IMEI */
/*****************************************************************************
* FUNCTION
* mm_custom_force_ecc_with_imei
* DESCRIPTION
* This function configures emergency call force to use IMEI during phone lock period.
* default: KAL_FALSE (using TMSI->IMSI->IMEI)
*
* PARAMETERS
*
* RETURNS
* kal_bool
* GLOBALS AFFECTED
* None
*****************************************************************************/
kal_bool mm_custom_force_ecc_with_imei(void)
{
return KAL_FALSE;
}
/*************************************************************************
* International Higher Priorirty PLMN Search
*
* [Important!] Enable this option will violate TS23.122 and thus fail FTA cases
*
* - RPLMN_MCC_LIST / HPPLMN_MCC_LIST:
* - The UE is allowed to perform international HPPLMN search when the UE
* 1. registers on a PLMN belonging to one of the MCCs defined in RPLMN_MCC_LIST, and
* 2. the HPPLMN belongs to one of the MCCs defined in HPPLMN_MCC_LIST
*
* - If the MCC of RPLMN or HPPLMN is not restricted
* - RPLMN_MCC_LIST or HPPLMN_MCC_LIST shall contain only one entry {ALL_MCC_ALLOWED}
*
* - If the UE is not allowed to perform international HPPLMN search
* - RPLMN_MCC_LIST and HPPLMN_MCC_LIST shall contain only one entry {NO_MCC_ALLOWED}
*************************************************************************/
/* The UE is allowed to perform international HPPLMN search when the UE
* 1. registers on a PLMN belonging to any MCC, and
* 2. the HPPLMN belongs to any MCC
*/
#if defined (__HPPLMN_REGARDLESS_ANY_MCC__)
const kal_uint32 RPLMN_MCC_LIST[] = {ALL_MCC_ALLOWED};
const kal_uint32 HPPLMN_MCC_LIST[] = {ALL_MCC_ALLOWED};
/* The UE is allowed to perform international HPPLMN search when the UE
* 1. registers on a PLMN belonging to US/Canada/Mexico/British Virgin Islands, and
* 2. the HPPLMN belongs to any MCC
*/
#elif defined(__ATNT_HPPLMN_SEARCH__)
const kal_uint32 RPLMN_MCC_LIST[] = {310, 311, 312, 313, 314, 315, 316, 302, 334, 348};
const kal_uint32 HPPLMN_MCC_LIST[] = {ALL_MCC_ALLOWED};
/* The UE is allowed to perform international HPPLMN search when the UE
* 1. registers on a PLMN belonging to US, and
* 2. the HPPLMN belongs to Canada
*/
#elif defined(__MM_INTERNATIONAL_HPPLMN_SEARCH__)
const kal_uint32 RPLMN_MCC_LIST[] = {310, 311, 312, 313, 314, 315, 316};
const kal_uint32 HPPLMN_MCC_LIST[] = {302};
/* The UE is not allowed to perform international HPPLMN search */
#else
const kal_uint32 RPLMN_MCC_LIST[] = {NO_MCC_ALLOWED};
const kal_uint32 HPPLMN_MCC_LIST[] = {NO_MCC_ALLOWED};
#endif
const kal_uint32 RPLMN_MCC_NUM = sizeof(RPLMN_MCC_LIST)/sizeof(kal_uint32);
const kal_uint32 HPPLMN_MCC_NUM = sizeof(HPPLMN_MCC_LIST)/sizeof(kal_uint32);
/*****************************************************************************
* FUNCTION
* mm_custom_state_after_lu_abnormal
*
* DESCRIPTION
* According to 3GPP TS24.008 4.4.4.9, the UE may enter the MM IDLE sub-state ATTEMPTING TO UPDATE or
* optionally the MM IDLE sub-state PLMN SEARCH after LU abnormal 4 times.
*
* PARAMETERS
* none
*
* RETURNS
* MM_ENTER_STATE_DEPEND_ON_CONDITION - Default behavior
* MM_ENTER_STATE_PLMN_SEARCH - Always enter MM IDLE sub-state PLMN SEARCH and perform PLMN selection
* MM_ENTER_STATE_ATTEMPTING_TO_UPDATE - Always enter MM IDLE sub-state ATTEMPTING TO UPDATE and stay on current cell
*
* GLOBALS AFFECTED
* none
*****************************************************************************/
mm_state_after_lu_abnormal_enum mm_custom_state_after_lu_abnormal(void)
{
#ifdef __MM_PERFORM_PLMN_SEARCH_AFTER_LU_ABNORMAL__
return MM_ENTER_STATE_PLMN_SEARCH;
#else
return MM_ENTER_STATE_DEPEND_ON_CONDITION;
#endif
}
/*****************************************************************************
* FUNCTION
* mm_custom_is_try_abnormal_lai_once_more
* DESCRIPTION
* If abnormal LU 4 times happen, MS will try to search other available and allowable PLMNs. If no other PLMN is found,
* MS will go back to the abnormal-4-times PLMN and do registration with another 4 attempts.
*
* PARAMETERS
* none
* RETURNS
* kal_bool - indicate if "try abnormal lai once more" is enabled.
* GLOBALS AFFECTED
* none
*****************************************************************************/
kal_bool mm_custom_is_try_abnormal_lai_once_more(void)
{
#ifdef __MM_TRY_ABNORMAL_LAI_ONCE_MORE__
return KAL_TRUE;
#else
return KAL_FALSE;
#endif
}
/*****************************************************************************
* FUNCTION
* mm_custom_start_t3240_for_page
* DESCRIPTION
* This function is used to configure whether start T3240 for page.
*
* PARAMETERS
*
* RETURNS
* kal_bool
* GLOBALS AFFECTED
* None
*****************************************************************************/
kal_bool mm_custom_start_t3240_for_page(void)
{
/*work around CMCC 3G network issue
1. PS signaling exist, receive page for CS domain
2. send page response, enter MM_WAIT_FOR_NETWORK_COMMAND
3. handover to another LA, then no MM or CM message from network
4. can not process CM request until cs signaling or RRC release
*/
return KAL_TRUE;
}
/*************************************************************************
* HPLMN matching criteria enhance and customized equivalent PLMN definition
*
* [Important!] Inappropriate setting may violate spec and thus fail FTA cases
*
* - CUSTOM_EQ_PLMN[]
* Ex: CUSTOM_EQ_PLMN[] =
* {"001010", "00101F", "00202F", CUSTOM_EQ_PLMN_SET_END, //the first 3 PLMNs are regarded as eqivalent to each other
* "100011", "10002F", CUSTOM_EQ_PLMN_SET_END} //100011 and 10002F are regarded as equivalent.
*************************************************************************/
#ifdef __TMO_PLMN_MATCHING__
/* Regards 31026F and 310260 as eqivalent. To allow cell reselection between 310260 and 31026F (T-Mobile) */
const char *CUSTOM_EQ_PLMN[] = {"31026F", "310260", CUSTOM_EQ_PLMN_SET_END};
#else
/* Default. Follows TS23.122 Annex A. Eg. In 310260, MS can reselect to 31026F.
* But if in 31026F, MS can't reselect to 310260.
*/
const char *CUSTOM_EQ_PLMN[] = {CUSTOM_EQ_PLMN_SET_END};
#endif
const kal_uint32 CUSTOM_EQ_PLMN_NUM = sizeof(CUSTOM_EQ_PLMN)/sizeof(char *);
/*************************************************************************
* After abnormal LU 4 times, UE should wait T3212 timeout and then start next LU attempt round.
* Customization can be done here. Config the RETRY_ABNORMAL_LAI timer value as below. UE will
* start the next LU attempt when the RETRY_ABNORMAL_LAI timer expires.
*************************************************************************/
#if defined(__MM_DISABLE_RETRY_ABNORMAL_LAI__)
/* do not perform LU until T3212 timeout */
const kal_uint32 MM_RETRY_ABNORMAL_LAI_TIMER_PERIOD = MM_INVALID_TIMER_VALUE;
#else
/* default value: 10 minutes */
const kal_uint32 MM_RETRY_ABNORMAL_LAI_TIMER_PERIOD = 10 * KAL_TICKS_1_MIN;
#endif