blob: 91956f0eab352e157956be4c694298487966af3f [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 *
41 *
42 * Project:
43 * --------
44 * MAUI
45 *
46 * Description:
47 * ------------
48 *
49 *
50 * Author:
51 * -------
52 *
53 *
54 *============================================================================
55 * HISTORY
56 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
57 *------------------------------------------------------------------------------
58 * removed!
59 *
60 * removed!
61 * removed!
62 * removed!
63 * removed!
64 *
65 * removed!
66 * removed!
67 * removed!
68 * removed!
69 *
70 * removed!
71 * removed!
72 * removed!
73 * removed!
74 *
75 * removed!
76 * removed!
77 * removed!
78 * removed!
79 *
80 * removed!
81 * removed!
82 * removed!
83 * removed!
84 *
85 * removed!
86 * removed!
87 * removed!
88 * removed!
89 *
90 * removed!
91 * removed!
92 * removed!
93 *
94 * removed!
95 * removed!
96 * removed!
97 * removed!
98 *
99 * removed!
100 * removed!
101 * removed!
102 * removed!
103 * removed!
104 * removed!
105 * removed!
106 *
107 * removed!
108 * removed!
109 * removed!
110 * removed!
111 *
112 * removed!
113 * removed!
114 * removed!
115 * removed!
116 *
117 * removed!
118 * removed!
119 * removed!
120 * removed!
121 *
122 * removed!
123 * removed!
124 * removed!
125 * removed!
126 *
127 * removed!
128 * removed!
129 * removed!
130 *
131 * removed!
132 * removed!
133 * removed!
134 *
135 * removed!
136 * removed!
137 * removed!
138 * removed!
139 *
140 * removed!
141 * removed!
142 * removed!
143 *
144 * removed!
145 * removed!
146 * removed!
147 * removed!
148 *
149 * removed!
150 * removed!
151 * removed!
152 * removed!
153 *
154 * removed!
155 * removed!
156 * removed!
157 * removed!
158 *
159 * removed!
160 * removed!
161 * removed!
162 * removed!
163 *
164 * removed!
165 * removed!
166 * removed!
167 * removed!
168 *
169 * removed!
170 * removed!
171 * removed!
172 * removed!
173 * removed!
174 *
175 * removed!
176 * removed!
177 *
178 * removed!
179 *
180 * removed!
181 * removed!
182 *
183 * removed!
184 *
185 * removed!
186 * removed!
187 * removed!
188 *
189 * removed!
190 * removed!
191 * removed!
192 *
193 * removed!
194 * removed!
195 *
196 * removed!
197 *
198 * removed!
199 * removed!
200 *
201 * removed!
202 *
203 * removed!
204 * removed!
205 *
206 * removed!
207 *
208 * removed!
209 * removed!
210 *
211 * removed!
212 *
213 * removed!
214 * removed!
215 *
216 * removed!
217 *
218 * removed!
219 * removed!
220 *
221 * removed!
222 *
223 * removed!
224 * removed!
225 * removed!
226 *
227 * removed!
228 * removed!
229 *
230 * removed!
231 *
232 * removed!
233 * removed!
234 *
235 * removed!
236 *
237 * removed!
238 * removed!
239 * removed!
240 *
241 * removed!
242 * removed!
243 * removed!
244 *
245 * removed!
246 * removed!
247 *
248 * removed!
249 *
250 * removed!
251 * removed!
252 *
253 * removed!
254 * removed!
255 * removed!
256 *
257 * removed!
258 * removed!
259 *
260 * removed!
261 *
262 * removed!
263 * removed!
264 *
265 * removed!
266 * removed!
267 * removed!
268 * removed!
269 * removed!
270 * removed!
271 *
272 * removed!
273 * removed!
274 *
275 * removed!
276 *
277 * removed!
278 * removed!
279 * removed!
280 *
281 * removed!
282 * removed!
283 *
284 * removed!
285 *
286 * removed!
287 * removed!
288 *
289 * removed!
290 * removed!
291 * removed!
292 *
293 * removed!
294 * removed!
295 * removed!
296 *
297 *
298 *
299 * removed!
300 * removed!
301 * removed!
302 *
303 * removed!
304 * removed!
305 * removed!
306 *
307 * removed!
308 * removed!
309 * removed!
310 *
311 * removed!
312 * removed!
313 * removed!
314 *
315 * removed!
316 * removed!
317 *
318 * removed!
319 * removed!
320 * removed!
321 *
322 * removed!
323 * removed!
324 *
325 * removed!
326 *
327 * removed!
328 * removed!
329 *
330 * removed!
331 *
332 * removed!
333 * removed!
334 *
335 * removed!
336 *
337 * removed!
338 * removed!
339 * removed!
340 *
341 * removed!
342 * removed!
343 *
344 * removed!
345 *
346 * removed!
347 * removed!
348 * removed!
349 *
350 * removed!
351 * removed!
352 * removed!
353 *
354 * removed!
355 * removed!
356 *
357 * removed!
358 *
359 * removed!
360 * removed!
361 *
362 * removed!
363 * removed!
364 * removed!
365 *
366 * removed!
367 * removed!
368 * removed!
369 *
370 * removed!
371 * removed!
372 * removed!
373 *
374 * removed!
375 * removed!
376 * removed!
377 *
378 * removed!
379 * removed!
380 *
381 * removed!
382 *
383 * removed!
384 * removed!
385 * removed!
386 *
387 * removed!
388 * removed!
389 *
390 * removed!
391 *
392 * removed!
393 * removed!
394 * removed!
395 *
396 * removed!
397 * removed!
398 * removed!
399 *
400 * removed!
401 * removed!
402 *
403 * removed!
404 *
405 * removed!
406 * removed!
407 * removed!
408 *
409 * removed!
410 * removed!
411 *
412 * removed!
413 *
414 * removed!
415 * removed!
416 * removed!
417 *
418 * removed!
419 * removed!
420 * removed!
421 *
422 * removed!
423 * removed!
424 * removed!
425 *
426 * removed!
427 * removed!
428 * removed!
429 *
430 * removed!
431 * removed!
432 * removed!
433 *
434 * removed!
435 * removed!
436 * removed!
437 *
438 * removed!
439 * removed!
440 *
441 * removed!
442 *
443 * removed!
444 * removed!
445 *
446 * removed!
447 *
448 * removed!
449 * removed!
450 *
451 * removed!
452 *
453 * removed!
454 * removed!
455 *
456 * removed!
457 *
458 * removed!
459 * removed!
460 * removed!
461 *
462 *------------------------------------------------------------------------------
463 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
464 *============================================================================
465 ****************************************************************************/
466
467#include "kal_general_types.h"
468#include "sbp_public_utility.h"
469#include "kal_public_api.h"
470#include "ps_em_enum.h"
471#include "nvram_interface.h"
472#include "nvram_data_items.h"
473#include "sbp_nvram_def.h"
474#include "nvram_enums.h"
475#include "nvram_editor_data_item.h"
476#include "sim_ps_api.h"
477#include "custom_imc_config.h"
478#include "md_sap.h"
479#include "kal_trace.h"
480#include "ps_public_struct.h"
481#include "em_sbp_public_struct.h"
482#ifdef __IPC_ADAPTER__
483#include "ipca_nvram_def.h"
484#endif
485
486extern kal_uint32 md_product_model_id;
487extern kal_uint32 default_sbp_id;
488
489extern void sbp_get_reconfig_param(protocol_id_enum ps_id, sbp_reconfig_custom_param_struct *param);
490
491#ifndef __L1_STANDALONE__
492extern void l4bsbp_update_bootup_em_dsbp_result(kal_bool is_start,
493 em_l4bsbp_mode_type_enum mode,
494 em_l4bsbp_result_type_enum result,
495 kal_uint32 sim_sbp_id,
496 protocol_id_enum ps_id);
497#endif
498
499kal_uint32 old_default_sbp_id = SBP_ID_INVALID;
500
501extern kal_bool nvram_custom_config_mcf_profile(sbp_reconfig_custom_param_struct *param_ptr); // for bootup DSBP
502
503#if defined (__MOD_IMC__)
504extern kal_bool nvram_custom_config_ims_profile(sbp_reconfig_custom_param_struct *param_ptr);
505#endif /* __MOD_IMC__ */
506extern kal_bool nvram_custom_config_ims_other_profile(sbp_reconfig_custom_param_struct *param_ptr);
507
508#ifdef __VOLTE_SUPPORT__
509extern kal_bool nvram_custom_config_ltecsr_profile(sbp_reconfig_custom_param_struct *param_ptr);
510extern kal_bool nvram_custom_config_sdm_ads_profile(sbp_reconfig_custom_param_struct *param_ptr);
511#endif /* __VOLTE_SUPPORT__ */
512extern kal_bool nvram_custom_config_vdm_ads_profile(sbp_reconfig_custom_param_struct *param_ptr);
513
514#ifdef __LTE_RAT__
515extern kal_bool nvram_custom_config_errc_profile(sbp_reconfig_custom_param_struct *param_ptr);
516extern kal_bool nvram_custom_config_el1c_para(sbp_reconfig_custom_param_struct *param_ptr);
517extern kal_bool nvram_custom_config_lte_pref(sbp_reconfig_custom_param_struct *param_ptr);
518extern kal_bool nvram_custom_config_errc_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
519#endif
520#ifdef __NR_RAT__
521extern kal_bool nvram_custom_config_as_para(sbp_reconfig_custom_param_struct *param_ptr);
522extern kal_bool nvram_custom_config_as_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
523extern kal_bool nvram_custom_config_nrrc_profile(sbp_reconfig_custom_param_struct *param_ptr);
524extern kal_bool nvram_custom_config_nrrc_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
525#endif /* __NR_RAT__ */
526#ifdef __CDMA2000_RAT__
527extern void nvram_custom_config_c2k_nam_para(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
528extern kal_bool nvram_custom_reconfig_c2k_nam_para(sbp_reconfig_custom_param_struct *param_ptr);
529#endif
530extern kal_bool nvram_custom_config_umts(sbp_reconfig_custom_param_struct *param_ptr);
531extern kal_bool nvram_custom_config_sbp(sbp_reconfig_custom_param_struct *param_ptr);
532extern kal_bool nvram_custom_config_rrc_dynamic_cap(sbp_reconfig_custom_param_struct *param_ptr);
533extern kal_bool nvram_custom_config_iwlan_profile(sbp_reconfig_custom_param_struct *param_ptr);
534extern kal_bool nvram_custom_config_l4c_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
535extern kal_bool nvram_custom_config_rac_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
536extern kal_bool nvram_custom_config_mscap(sbp_reconfig_custom_param_struct *param_ptr);
537extern kal_bool nvram_custom_config_regional_phone_mode(sbp_reconfig_custom_param_struct *param_ptr);
538extern kal_bool nvram_custom_config_n3cf_profile(sbp_reconfig_custom_param_struct *param_ptr);
539extern kal_bool nvram_custom_config_l4c(sbp_reconfig_custom_param_struct *param_ptr);
540extern kal_bool nvram_custom_config_bip_profile(sbp_reconfig_custom_param_struct *param_ptr);
541extern kal_bool nvram_custom_config_rsra_profile(sbp_reconfig_custom_param_struct *param_ptr);
542extern kal_bool nvram_custom_config_d2_profile(sbp_reconfig_custom_param_struct *param_ptr);
543extern kal_bool nvram_custom_config_rrc_band_priority_order(sbp_reconfig_custom_param_struct *param_ptr);
544extern kal_bool nvram_custom_config_nwsel_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
545#ifdef __FIVEG_NAS__
546extern kal_bool nvram_custom_config_vgmm_profile(sbp_reconfig_custom_param_struct *param_ptr);
547#endif
548extern kal_bool nvram_custom_config_xcap_profile(sbp_reconfig_custom_param_struct *param_ptr);
549extern kal_bool custom_config_cc_profile(sbp_reconfig_custom_param_struct *param_ptr);
550extern kal_bool nvram_custom_config_sms_profile(sbp_reconfig_custom_param_struct *param_ptr);
551extern kal_bool nvram_custom_config_rrc_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
552extern kal_bool nvram_custom_config_ssds_profile(sbp_reconfig_custom_param_struct *param_ptr);
553#ifdef __CDMA2000_RAT__
554extern kal_bool nvram_custom_config_hlp_profile(sbp_reconfig_custom_param_struct *param_ptr);
555extern kal_bool nvram_custom_config_cval_para_mcf(sbp_reconfig_custom_param_struct *param_ptr);
556#endif
557extern kal_bool nvram_custom_config_mrs_profile(sbp_reconfig_custom_param_struct *param_ptr);
558extern kal_bool nvram_custom_config_rrm_profile(sbp_reconfig_custom_param_struct *param_ptr);
559extern kal_bool nvram_custom_config_smsal_common_profile(sbp_reconfig_custom_param_struct *param_ptr);
560extern kal_bool nvram_custom_config_sim_terminal_profile(sbp_reconfig_custom_param_struct *param_ptr);
561extern kal_bool nvram_custom_config_tcm_profile(sbp_reconfig_custom_param_struct *param_ptr);
562extern kal_bool nvram_custom_config_sm_profile(sbp_reconfig_custom_param_struct *param_ptr);
563extern kal_bool custom_config_atci_profile(sbp_reconfig_custom_param_struct *param_ptr);
564extern kal_bool nvram_custom_config_a54_smc_whitelist_plmn(sbp_reconfig_custom_param_struct *param_ptr);
565extern kal_bool nvram_custom_config_esm_profile(sbp_reconfig_custom_param_struct *param_ptr);
566extern kal_bool nvram_custom_config_csm_plmn_for_esvc(sbp_reconfig_custom_param_struct *param_ptr);
567extern kal_bool nvram_custom_config_mm_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
568#ifdef __L5_SUPPORT__
569extern kal_bool nvram_custom_config_l5_profile(sbp_reconfig_custom_param_struct *param_ptr);
570#endif
571extern kal_bool nvram_custom_config_as_profile(sbp_reconfig_custom_param_struct *param_ptr);
572
573#ifdef __IPC_ADAPTER__
574extern kal_bool ss_nvram_custom_config_non_sbp_nv(protocol_id_enum ps_id, kal_uint32 sim_sbp_id);
575#endif
576
577/* For MoDIS UT, SAP_INFO(xxx_SAP,MOD_A,ANY)
578 * If MOD_A is the test module and send msg to non test modules with above SAP INFO,
579 * the msg can NOT be trapped and non test modules will receive the msg.
580 * <solution>:
581 * 1. use an unique SAP between MOD_A and each non-test module instead of xxx_SAP for ANY
582 * 2. use an dummy SAP which is not defined in sap_info.h
583 * solution#1 needs many dummy SAPs, for general purpose, we adopt solution#2
584 */
585#if UNIT_TEST
586#define SBP_RECONFIGURE_SAP DUMMY_SAP
587#else
588#define SBP_RECONFIGURE_SAP L4C_ME_SAP
589#endif /* UNIT_TEST*/
590
591/*
592 * to be feasible to send DSBP_RECONFIGURE_REQ in order in the future,
593 * to duplicate from reconfig_mod_info_tbl[] in custom_l4_utility.c
594 * the sending order would be tbl[0]->tbl[1]->tbl[2]...
595 */
596sbp_reconfigure_module_info_struct sbp_reconfigure_mod_info_tbl[] =
597{
598 // add dummy module and unused reconfigure type for build error: zero size of table if __IMS_SUPPORT__ is not defined
599 {MOD_RAC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rac_dsbp_profile},
600 {MOD_L4C, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_l4c_dsbp_profile},
601 {MOD_VDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_vdm_ads_profile},
602#ifdef __IMS_SUPPORT__
603#ifdef __MULTIPLE_IMS_SUPPORT__
604 {MOD_IMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_ims_profile},
605 {MOD_SDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sdm_ads_profile},
606#if defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) // LTECSR is not created in MoDIS, can't send msg to LTECSR
607 {MOD_LTECSR, L4C_ME_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, nvram_custom_config_ltecsr_profile},
608#endif /* defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) */
609#else
610 {MOD_IMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_ims_profile},
611 {MOD_SDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sdm_ads_profile},
612#if defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) // LTECSR is not created in MoDIS, can't send msg to LTECSR
613 {MOD_LTECSR, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_ltecsr_profile},
614#endif /* defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) */
615#endif /* __MULTIPLE_IMS_SUPPORT__ */
616#endif
617 #ifdef __N3GPP_OFFLOAD_ENABLE__
618 {MOD_N3CF, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_DSBP_NOT_OCCUR, CFG_GEMINI_MOD, nvram_custom_config_n3cf_profile},
619 #endif
620 {MOD_IWLAN, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_iwlan_profile},
621 {MOD_EL2PORTAL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_LTE_MOD, NULL},
622#ifndef __MTK_TARGET__
623 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
624 {MOD_SBP, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_PRE_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
625#endif
626 {MOD_SMS, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sms_profile},
627 {MOD_SMSAL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_smsal_common_profile},
628#ifdef __LTE_RAT__
629 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_errc_dsbp_profile},
630#endif /* __LTE_RAT__ */
631#ifdef __NR_RAT__
632 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_nrrc_dsbp_profile},
633#endif /* __NR_RAT__ */
634#if defined(__MTK_TARGET__) && defined(__BIP_SUPPORT__)
635 {MOD_BIP_DS_MGR, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_bip_profile},
636#endif
637 {MOD_DDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_PRE_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE | RECONFIG_DSBP_NOT_OCCUR, CFG_GEMINI_MOD, nvram_custom_config_d2_profile},
638 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, custom_config_cc_profile},
639 {MOD_NWSEL, SBP_RECONFIGURE_SAP, RECONFIG_PRE_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_NOT_OCCUR, CFG_GEMINI_MOD, nvram_custom_config_nwsel_dsbp_profile},
640#ifdef __FIVEG_NAS__
641 {MOD_VGMM, SBP_RECONFIGURE_SAP, RECONFIG_PRE_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_vgmm_profile},
642#endif
643#if defined(__XCAP_SUPPORT__)
644 {MOD_XCAP_CONFIG, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, nvram_custom_config_xcap_profile},
645#endif
646 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_rsra_profile},
647 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrc_dsbp_profile},
648#ifdef __CDMA2000_RAT__
649 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_hlp_profile},
650 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_cval_para_mcf},
651 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_reconfig_c2k_nam_para},
652#endif
653 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_mrs_profile},
654 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_a54_smc_whitelist_plmn},
655#if defined(__GSM_RAT__)
656#if defined(__UMTS_TDD128_MODE__) || defined(__TDD_MODEM__) || defined(__TDD_2G_OP01__)
657
658 {MOD_RRM_TDD, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrm_profile},
659#endif
660 {MOD_RRM_FDD, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrm_profile},
661#endif
662#if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
663 /*SSDS*/
664 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_ssds_profile},
665#endif
666#if defined(__SASE_SUPPORT__)
667 /* SASE */
668 {MOD_SASE_CLIENT, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
669#endif
670 /*SIM*/
671 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_sim_terminal_profile},
672 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_tcm_profile},
673 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sm_profile},
674 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, custom_config_atci_profile},
675 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_LTE_MOD, nvram_custom_config_esm_profile},
676 {MOD_CSM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_csm_plmn_for_esvc},
677#ifdef __L5_SUPPORT__
678 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL , CFG_GEMINI_MOD, nvram_custom_config_l5_profile},
679#endif
680 {MOD_MM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_mm_dsbp_profile},
681 {MOD_TMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, NULL}
682};
683
684sbp_reconfigure_module_info_struct *sbp_get_sbp_reconfigure_mod_tbl()
685{
686 return sbp_reconfigure_mod_info_tbl;
687}
688
689kal_uint8 sbp_get_num_of_sbp_reconfigure_mod_tbl()
690{
691 return sizeof(sbp_reconfigure_mod_info_tbl)/sizeof(sbp_reconfigure_mod_info_tbl[0]);
692}
693
694
695/*This part is to declare the functions and data structures for NVRAM Reset
696 if the SBP ID(From CCCI or NVRAM) changes from previous one after the boot up*/
697extern void nvram_custom_reset_sample_para(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
698extern void nvram_custom_reset_mscap(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
699extern void nvram_custom_reset_rrc_dynamic_cap(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
700extern void nvram_custom_reset_regional_phone_mode(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
701#ifdef __LTE_RAT__
702extern void nvram_custom_reset_errc_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
703extern void nvram_custom_reset_lte_pref(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
704extern void nvram_custom_reset_el1c_para(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
705#endif
706#ifdef __NR_RAT__
707extern void nvram_custom_reset_as_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
708extern void nvram_custom_reset_nrrc_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
709#endif /* __NR_RAT__ */
710
711#ifdef __VOLTE_SUPPORT__
712extern void nvram_custom_reset_ltecsr_profile(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
713#endif /* __VOLTE_SUPPORT__ */
714extern void nvram_custom_reset_vdm_ads_profile(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
715
716void custom_reset_nvram_lids(kal_uint32 sbp_id);
717
718typedef void(*SBP_RESET_NVRAM_LID)(kal_uint32, protocol_id_enum);
719
720SBP_RESET_NVRAM_LID nvram_lid_reset_func_tbl[] =
721{
722 nvram_custom_reset_mscap,
723 nvram_custom_reset_rrc_dynamic_cap,
724 nvram_custom_reset_regional_phone_mode,
725 nvram_custom_reset_vdm_ads_profile,
726#ifdef __VOLTE_SUPPORT__
727 nvram_custom_reset_ltecsr_profile,
728#endif
729#ifdef __LTE_RAT__
730 nvram_custom_reset_errc_lid,
731 nvram_custom_reset_lte_pref,
732 nvram_custom_reset_el1c_para,
733#endif
734#ifdef __NR_RAT__
735 nvram_custom_reset_as_lid,
736 nvram_custom_reset_nrrc_lid,
737#endif
738
739};
740
741SBP_RESET_NVRAM_LID nvram_lid_reset_with_new_sbp_id_func_tbl[] =
742{
743 nvram_custom_reset_sample_para,
744#ifdef __CDMA2000_RAT__
745 nvram_custom_config_c2k_nam_para,
746#endif /* __CDMA2000_RAT__ */
747};
748
749/* NVRAM RESET Declaration ends here*/
750
751/*****************************************************************************
752 * FUNCTION
753 * custom_nvram_init_sbp_id
754 * DESCRIPTION
755 * Set SBP features and data according to SBP ID and SIM SBP ID.
756 * PARAMETERS
757 * sbp_id [IN]
758 * RETURNS
759 * Void
760 *****************************************************************************/
761void custom_nvram_init_sbp_id(kal_uint32 sbp_id)
762{
763 protocol_id_enum ps_id;
764 sbp_reconfig_custom_param_struct sbp_reconfig_custom_param;
765 kal_uint8 num_of_dsbp_tbl, i;
766 kal_uint32 sim_sbp_id;
767
768 sbp_init_contexts();
769
770 /*this modification is used in operator specific NWSIM, only define these compile option in VzW/ATT/Sprint/TMO NWSIM project*/
771#ifdef __ATT_ENNWSIM__
772 sbp_id = 7;
773#endif
774
775#ifdef __SPRINT_ENNWSIM__
776 sbp_id = 20;
777#endif
778
779#ifdef __TMO_ENNWSIM__
780 sbp_id = 8;
781#endif
782
783#ifdef __VZW_ENNWSIM__
784 sbp_id = 12;
785#endif
786
787 /* sbp_id is not set from CCCI or MODIS so we use default_sbp_id,
788 which is initialized in the sbp_init_contexts() from NVRAM*/
789 if (sbp_id == SBP_ID_INVALID)
790 sbp_id = default_sbp_id;
791
792 /******************************************************************
793 Update SBP ID first and then WorldMode ID
794 Otherwise NVRAM_EF_SBP_MODEM_DATA_CONFIG_LID would be overwrite
795 PS. WorldMode ID is saved in NVRAM_EF_SBP_MODEM_DATA_CONFIG_LID
796 ******************************************************************/
797 // reset SBP related setting if needed
798 custom_reset_nvram_lids(sbp_id);// this will reset the NVRAM LIDs if the SBP ID is changed from previous one
799
800 // set SBP ID
801 sbp_set_sbp_id(sbp_id);
802
803 // Configure SBP feature set
804 sbp_reconfig_custom_param.sbp_id = sbp_id;
805 sbp_reconfig_custom_param.sbp_sub_id = sbp_query_sub_id();
806 sbp_reconfig_custom_param.is_in_dynamic_sbp = KAL_FALSE;
807 sbp_reconfig_custom_param.ps_id = PROTOCOL_1;
808 kal_mem_set(sbp_reconfig_custom_param.mcc, 0, MAX_MCC_STR_LEN);
809 kal_mem_set(sbp_reconfig_custom_param.mnc, 0, MAX_MNC_STR_LEN);
810 kal_mem_set(sbp_reconfig_custom_param.iccid, 0, 21);
811 sbp_reconfig_custom_param.trans_id = 0; // operation not related to SIM card, use 0
812 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
813
814 // Notify MCF for MCF auto select bin before any DSBP NVRAM operation takes place
815 nvram_custom_config_mcf_profile(&sbp_reconfig_custom_param);
816 nvram_custom_config_sbp(&sbp_reconfig_custom_param);
817
818 num_of_dsbp_tbl = sbp_get_num_of_sbp_reconfigure_mod_tbl();
819 /* SBP Multiple context */
820 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
821 {
822 custom_nvram_set_sbp_id(sbp_id, KAL_FALSE, NULL, ps_id);
823
824 sim_sbp_id = sbp_get_sim_sbp_id_for_all(ps_id);
825
826#ifndef __L1_STANDALONE__
827 l4bsbp_update_bootup_em_dsbp_result(KAL_TRUE, EM_L4BSBP_MODE_BOOTUP,
828 EM_L4BSBP_RESULT_UNKNOWN, sim_sbp_id, ps_id);
829#endif
830 if (sim_sbp_id != SBP_ID_INVALID)
831 {
832 // prepare MCC/MNC/ICCID
833 sbp_get_reconfig_param(ps_id, &sbp_reconfig_custom_param);
834 // set other information
835 sbp_reconfig_custom_param.sbp_id = sim_sbp_id;
836 sbp_reconfig_custom_param.ps_id = ps_id;
837 sbp_reconfig_custom_param.is_in_dynamic_sbp = KAL_TRUE;
838 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
839
840 // Notify MCF for MCF auto select bin before any DSBP NVRAM operation takes place
841 nvram_custom_config_mcf_profile(&sbp_reconfig_custom_param);
842 nvram_custom_config_sbp(&sbp_reconfig_custom_param);
843
844 for (i=0; i< num_of_dsbp_tbl; i++)
845 {
846 /* Only handle RECONFIG_IMS_CHANGE type */
847 if ((sbp_reconfigure_mod_info_tbl[i].reconfig_type & RECONFIG_DSBP_CHANGE_ALL) == 0)
848 {
849 continue;
850 }
851
852 /* Check if Gemini module and right protocol id */
853 if ((sbp_reconfigure_mod_info_tbl[i].gemini_check & CFG_MASK_MOD) == CFG_SINGLE_MOD)
854 {
855 if (ps_id != PROTOCOL_1)
856 {
857 continue;
858 }
859 }
860 // Check the numbers of GEMINI_LTE that this module supports:
861 else if ((sbp_reconfigure_mod_info_tbl[i].gemini_check & CFG_MASK_MOD) == CFG_GEMINI_LTE_MOD)
862 {
863 if (ps_id >= MAX_LTE_NUM)
864 {
865 continue;
866 }
867 }
868
869 if (sbp_reconfigure_mod_info_tbl[i].custom_func_ptr != NULL)
870 {
871 sbp_reconfigure_mod_info_tbl[i].custom_func_ptr(&sbp_reconfig_custom_param);
872 }
873
874 }
875 }
876
877 // update EM INFO (stored in SIM1 of l4bsbp)
878#ifndef __L1_STANDALONE__
879 l4bsbp_update_bootup_em_dsbp_result(KAL_FALSE, EM_L4BSBP_MODE_BOOTUP,
880 EM_L4BSBP_RESULT_SUCCESS, sim_sbp_id, ps_id);
881#endif
882
883 // titan project Network Code custom function
884#ifdef __IPC_ADAPTER__
885 ss_nvram_custom_config_non_sbp_nv(ps_id, sim_sbp_id);
886#endif /* __IPC_ADAPTER__ */
887 }
888
889 nvram_custom_config_sbp_by_model_id(md_product_model_id);
890
891}
892
893/*****************************************************************************
894 * FUNCTION
895 * custom_nvram_set_sbp_id
896 * DESCRIPTION
897 * Set SBP features and data according to SBP ID.
898 * PARAMETERS
899 * sbp_mode [IN]
900 * RETURNS
901 * KAL_TRUE : Set SBP ID successfully
902 * KAL_FALSE : Error happens when setting SBP ID
903 *****************************************************************************/
904kal_bool custom_nvram_set_sbp_id(kal_uint32 sbp_id, kal_bool is_in_dynamic_sbp, kal_uint8 *imsi, protocol_id_enum ps_id)
905{
906 sbp_reconfig_custom_param_struct sbp_reconfig_custom_param;
907
908 sbp_reconfig_custom_param.sbp_id = sbp_id;
909 sbp_reconfig_custom_param.sbp_sub_id = sbp_query_sub_id();
910 sbp_reconfig_custom_param.is_in_dynamic_sbp = is_in_dynamic_sbp;
911 sbp_reconfig_custom_param.ps_id = ps_id;
912
913 sbp_reconfig_custom_param.mcc[0] = 0;
914 sbp_reconfig_custom_param.mnc[0] = 0;
915 sbp_reconfig_custom_param.trans_id = 0; // operation not related to SIM card, use 0
916
917 if ( kal_get_active_module_id() == MOD_NIL)
918 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
919 else
920 sbp_reconfig_custom_param.is_boot_up = KAL_FALSE;
921
922 if (sbp_id != SBP_ID_INVALID && ps_id != PROTOCOL_1)
923 {
924 /* For Dual IMS, IMC/LTECSR/VDM/SDM has multiple record in NV LID */
925 nvram_custom_config_vdm_ads_profile(&sbp_reconfig_custom_param);
926 #ifdef __VOLTE_SUPPORT__
927 #ifdef __MULTIPLE_IMS_SUPPORT__
928 nvram_custom_config_ltecsr_profile(&sbp_reconfig_custom_param);
929 #endif
930 nvram_custom_config_sdm_ads_profile(&sbp_reconfig_custom_param);
931 #endif
932 #if defined (__MOD_IMC__)
933 #ifdef __MULTIPLE_IMS_SUPPORT__
934 if(sbp_id != 0){
935 nvram_custom_config_ims_profile(&sbp_reconfig_custom_param);
936 }
937 #endif
938 #endif
939 nvram_custom_config_iwlan_profile(&sbp_reconfig_custom_param);
940 #ifdef __N3GPP_OFFLOAD_ENABLE__
941 nvram_custom_config_n3cf_profile(&sbp_reconfig_custom_param);
942 #endif
943 #ifdef __XCAP_SUPPORT__
944 nvram_custom_config_xcap_profile(&sbp_reconfig_custom_param);
945 #endif
946 #if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
947 /*SSDS*/
948 nvram_custom_config_ssds_profile(&sbp_reconfig_custom_param);
949 #endif
950 #ifdef __GEMINI_LTE__
951 if ((ps_id-PROTOCOL_1)< MAX_LTE_NUM) //PROTOCOL_1 : 0x00
952 {
953 #ifdef __LTE_RAT__
954 nvram_custom_config_errc_profile(&sbp_reconfig_custom_param);
955 nvram_custom_config_lte_pref(&sbp_reconfig_custom_param);
956 #endif /* __LTE_RAT__ */
957 nvram_custom_config_as_profile(&sbp_reconfig_custom_param);
958 }
959 #endif /* __GEMINI_LTE__ */
960
961 nvram_custom_config_l4c_dsbp_profile(&sbp_reconfig_custom_param);
962#ifdef __NR_RAT__
963#ifdef __GEMINI__
964 if ((ps_id - PROTOCOL_1) < MAX_NR_NUM)
965 {
966 nvram_custom_config_nrrc_profile(&sbp_reconfig_custom_param);
967 }
968#endif /* __GEMINI__ */
969#endif /* __NR_RAT__ */
970 nvram_custom_config_rsra_profile(&sbp_reconfig_custom_param);
971
972 #ifdef __L5_SUPPORT__
973 nvram_custom_config_l5_profile(&sbp_reconfig_custom_param);
974 #endif
975
976 }
977 else if (sbp_id != SBP_ID_INVALID && ps_id == PROTOCOL_1)
978 {
979 #ifdef __LTE_RAT__
980 /* update ERRC parameters */
981 nvram_custom_config_errc_profile(&sbp_reconfig_custom_param);
982 nvram_custom_config_lte_pref(&sbp_reconfig_custom_param);
983 /* Update EL1C parameter for only PROTOCOL_1 - Only one copy */
984 nvram_custom_config_el1c_para(&sbp_reconfig_custom_param);
985 #endif
986 nvram_custom_config_as_profile(&sbp_reconfig_custom_param);
987
988 nvram_custom_config_vdm_ads_profile(&sbp_reconfig_custom_param);
989 #ifdef __VOLTE_SUPPORT__
990 nvram_custom_config_sdm_ads_profile(&sbp_reconfig_custom_param);
991 nvram_custom_config_ltecsr_profile(&sbp_reconfig_custom_param);
992 #endif
993 nvram_custom_config_iwlan_profile(&sbp_reconfig_custom_param);
994 #ifdef __N3GPP_OFFLOAD_ENABLE__
995 nvram_custom_config_n3cf_profile(&sbp_reconfig_custom_param);
996 #endif
997 #ifdef __XCAP_SUPPORT__
998 nvram_custom_config_xcap_profile(&sbp_reconfig_custom_param);
999 #endif
1000 #if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
1001 /*SSDS*/
1002 nvram_custom_config_ssds_profile(&sbp_reconfig_custom_param);
1003 #endif
1004 #if defined (__MOD_IMC__)
1005 if(sbp_id != 0)
1006 {
1007 nvram_custom_config_ims_profile(&sbp_reconfig_custom_param);
1008 }
1009 #endif /* __MOD_IMC__ */
1010
1011 nvram_custom_config_rrc_dynamic_cap(&sbp_reconfig_custom_param);
1012 nvram_custom_config_rrc_band_priority_order(&sbp_reconfig_custom_param);
1013 //nvram_custom_config_e911_profile(&sbp_reconfig_custom_param);
1014 nvram_custom_config_mscap(&sbp_reconfig_custom_param);
1015 nvram_custom_config_regional_phone_mode(&sbp_reconfig_custom_param);
1016 nvram_custom_config_l4c(&sbp_reconfig_custom_param);
1017 nvram_custom_config_l4c_dsbp_profile(&sbp_reconfig_custom_param);
1018#ifdef __BIP_SUPPORT__
1019 nvram_custom_config_bip_profile(&sbp_reconfig_custom_param);
1020#endif
1021#ifdef __NR_RAT__
1022 nvram_custom_config_nrrc_profile(&sbp_reconfig_custom_param);
1023#endif /* __NR_RAT__ */
1024#ifdef __MD_TCPIP_SUPPORT__
1025 nvram_custom_config_rsra_profile(&sbp_reconfig_custom_param);
1026#endif
1027
1028#ifdef __L5_SUPPORT__
1029 nvram_custom_config_l5_profile(&sbp_reconfig_custom_param);
1030#endif
1031 }
1032 else
1033 {
1034 return KAL_FALSE;
1035 }
1036
1037 return KAL_TRUE;
1038
1039}
1040
1041
1042/*****************************************************************************
1043 * FUNCTION
1044 * custom_reset_nvram_lids
1045 * DESCRIPTION
1046 * This function will reset nvram parameters to the default value for the lids present in the table nvram_lid_reset_func_tbl
1047 * please don't use this API if you don't get the permission from SBP FPM.
1048 * PARAMETERS
1049 * SBP ID: this is the new sbp_id received from the CCCI
1050 * RETURNS
1051 *****************************************************************************/
1052void custom_reset_nvram_lids(kal_uint32 sbp_id)
1053{
1054 kal_uint8 table_size = 0, table_size_new = 0, i = 0;
1055 protocol_id_enum ps_id;
1056
1057 old_default_sbp_id = sbp_query_id();
1058
1059 /* This Prompt trace is for Testing Purpose and will be omitted in MAIN branch Check-in*/
1060 //kal_prompt_trace(MOD_SBP, "Old SBP_ID = %d , New SBP_ID = %d", old_default_sbp_id, sbp_id);
1061
1062 if(old_default_sbp_id != sbp_id)
1063 {
1064 table_size = sizeof(nvram_lid_reset_func_tbl)/sizeof(SBP_RESET_NVRAM_LID);
1065 table_size_new = sizeof(nvram_lid_reset_with_new_sbp_id_func_tbl)/sizeof(SBP_RESET_NVRAM_LID);
1066
1067 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
1068 {
1069 for(i = 0; i < table_size; i++)
1070 {
1071 nvram_lid_reset_func_tbl[i](old_default_sbp_id, ps_id);
1072 }
1073 }
1074
1075 // Reset functions using new CCCI sbp id
1076 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
1077 {
1078 for(i = 0; i < table_size_new; i++)
1079 {
1080 nvram_lid_reset_with_new_sbp_id_func_tbl[i](sbp_id, ps_id);
1081 }
1082 }
1083 }
1084}
1085
1086/*****************************************************************************
1087 * FUNCTION
1088 * nvram_custom_reset_sample_para
1089 * DESCRIPTION
1090 * Sample function to reset nvram parameters to the default value.
1091 * PARAMETERS
1092 * sbp_id SBP ID from CCCI
1093 * RETURNS
1094 *****************************************************************************/
1095void nvram_custom_reset_sample_para(kal_uint32 sbp_id, protocol_id_enum ps_id)
1096{
1097 // sample function, remove when reset table is not empty
1098 return;
1099}