blob: f66cb380753e86499b197d3604b16946b769f36f [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!
yu.dongc592bc72024-04-24 22:45:13 -070062 *
rjw6c1fd8f2022-11-30 14:33:01 +080063 * removed!
64 *
65 * removed!
66 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070067 *
rjw6c1fd8f2022-11-30 14:33:01 +080068 * removed!
69 *
70 * removed!
71 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070072 *
rjw6c1fd8f2022-11-30 14:33:01 +080073 * removed!
74 *
75 * removed!
76 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070077 *
rjw6c1fd8f2022-11-30 14:33:01 +080078 * removed!
79 *
80 * removed!
81 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070082 *
rjw6c1fd8f2022-11-30 14:33:01 +080083 * removed!
84 *
85 * removed!
86 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070087 *
rjw6c1fd8f2022-11-30 14:33:01 +080088 * removed!
89 *
90 * removed!
91 * removed!
92 * removed!
93 *
94 * removed!
95 * removed!
yu.dongc592bc72024-04-24 22:45:13 -070096 *
rjw6c1fd8f2022-11-30 14:33:01 +080097 * removed!
98 *
99 * removed!
100 * removed!
101 * removed!
102 * removed!
103 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700104 *
rjw6c1fd8f2022-11-30 14:33:01 +0800105 * removed!
106 *
107 * removed!
108 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700109 *
rjw6c1fd8f2022-11-30 14:33:01 +0800110 * removed!
111 *
112 * removed!
113 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700114 *
rjw6c1fd8f2022-11-30 14:33:01 +0800115 * removed!
116 *
117 * removed!
118 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700119 *
rjw6c1fd8f2022-11-30 14:33:01 +0800120 * removed!
121 *
122 * removed!
123 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700124 *
rjw6c1fd8f2022-11-30 14:33:01 +0800125 * removed!
126 *
127 * removed!
128 * removed!
129 * removed!
130 *
131 * removed!
132 * removed!
133 * removed!
134 *
135 * removed!
136 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700137 *
rjw6c1fd8f2022-11-30 14:33:01 +0800138 * removed!
139 *
140 * removed!
141 * removed!
142 * removed!
143 *
144 * removed!
145 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700146 *
rjw6c1fd8f2022-11-30 14:33:01 +0800147 * removed!
yu.dongc592bc72024-04-24 22:45:13 -0700148 *
149 * removed!
150 * removed!
151 *
152 * removed!
153 *
154 * removed!
155 * removed!
156 *
157 * removed!
158 *
159 * removed!
160 * removed!
161 *
162 * removed!
163 *
164 * removed!
165 * removed!
166 *
rjw6c1fd8f2022-11-30 14:33:01 +0800167 * removed!
168 *
169 * removed!
170 * removed!
171 * removed!
rjw6c1fd8f2022-11-30 14:33:01 +0800172 *
173 * removed!
rjw6c1fd8f2022-11-30 14:33:01 +0800174 *
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);
yu.dongc592bc72024-04-24 22:45:13 -0700528extern kal_bool nvram_custom_reconfig_c2k_nam_para(sbp_reconfig_custom_param_struct *param_ptr);
rjw6c1fd8f2022-11-30 14:33:01 +0800529#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);
yu.dongc592bc72024-04-24 22:45:13 -0700572extern kal_bool nvram_custom_config_nwsel_nas_whitelist_dsbp_profile(sbp_reconfig_custom_param_struct *param_ptr);
rjw6c1fd8f2022-11-30 14:33:01 +0800573
574#ifdef __IPC_ADAPTER__
575extern kal_bool ss_nvram_custom_config_non_sbp_nv(protocol_id_enum ps_id, kal_uint32 sim_sbp_id);
576#endif
yu.dongc592bc72024-04-24 22:45:13 -0700577extern kal_bool nvram_custom_config_ps_conformance_setting(sbp_reconfig_custom_param_struct *param_ptr);
rjw6c1fd8f2022-11-30 14:33:01 +0800578
579/* For MoDIS UT, SAP_INFO(xxx_SAP,MOD_A,ANY)
580 * If MOD_A is the test module and send msg to non test modules with above SAP INFO,
581 * the msg can NOT be trapped and non test modules will receive the msg.
582 * <solution>:
583 * 1. use an unique SAP between MOD_A and each non-test module instead of xxx_SAP for ANY
584 * 2. use an dummy SAP which is not defined in sap_info.h
585 * solution#1 needs many dummy SAPs, for general purpose, we adopt solution#2
586 */
587#if UNIT_TEST
588#define SBP_RECONFIGURE_SAP DUMMY_SAP
589#else
590#define SBP_RECONFIGURE_SAP L4C_ME_SAP
591#endif /* UNIT_TEST*/
592
593/*
594 * to be feasible to send DSBP_RECONFIGURE_REQ in order in the future,
595 * to duplicate from reconfig_mod_info_tbl[] in custom_l4_utility.c
596 * the sending order would be tbl[0]->tbl[1]->tbl[2]...
597 */
598sbp_reconfigure_module_info_struct sbp_reconfigure_mod_info_tbl[] =
599{
600 // add dummy module and unused reconfigure type for build error: zero size of table if __IMS_SUPPORT__ is not defined
601 {MOD_RAC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rac_dsbp_profile},
602 {MOD_L4C, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_l4c_dsbp_profile},
603 {MOD_VDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_vdm_ads_profile},
604#ifdef __IMS_SUPPORT__
605#ifdef __MULTIPLE_IMS_SUPPORT__
606 {MOD_IMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_ims_profile},
607 {MOD_SDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sdm_ads_profile},
608#if defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) // LTECSR is not created in MoDIS, can't send msg to LTECSR
609 {MOD_LTECSR, L4C_ME_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, nvram_custom_config_ltecsr_profile},
610#endif /* defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) */
611#else
612 {MOD_IMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_ims_profile},
613 {MOD_SDM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sdm_ads_profile},
614#if defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) // LTECSR is not created in MoDIS, can't send msg to LTECSR
615 {MOD_LTECSR, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_ltecsr_profile},
616#endif /* defined(__MTK_TARGET__) && defined(__VOLTE_SUPPORT__) && !defined(__TC01_IMS_SUPPORT__) */
617#endif /* __MULTIPLE_IMS_SUPPORT__ */
618#endif
619 #ifdef __N3GPP_OFFLOAD_ENABLE__
620 {MOD_N3CF, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_DSBP_NOT_OCCUR, CFG_GEMINI_MOD, nvram_custom_config_n3cf_profile},
621 #endif
622 {MOD_IWLAN, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE | RECONFIG_PRE_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_iwlan_profile},
623 {MOD_EL2PORTAL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_LTE_MOD, NULL},
624#ifndef __MTK_TARGET__
625 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
626 {MOD_SBP, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_PRE_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
627#endif
628 {MOD_SMS, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sms_profile},
629 {MOD_SMSAL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_smsal_common_profile},
630#ifdef __LTE_RAT__
631 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_errc_dsbp_profile},
632#endif /* __LTE_RAT__ */
633#ifdef __NR_RAT__
634 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_nrrc_dsbp_profile},
635#endif /* __NR_RAT__ */
636#if defined(__MTK_TARGET__) && defined(__BIP_SUPPORT__)
637 {MOD_BIP_DS_MGR, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_config_bip_profile},
638#endif
639 {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},
640 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, custom_config_cc_profile},
641 {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},
642#ifdef __FIVEG_NAS__
643 {MOD_VGMM, SBP_RECONFIGURE_SAP, RECONFIG_PRE_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_vgmm_profile},
644#endif
645#if defined(__XCAP_SUPPORT__)
646 {MOD_XCAP_CONFIG, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, nvram_custom_config_xcap_profile},
647#endif
648 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_rsra_profile},
649 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrc_dsbp_profile},
650#ifdef __CDMA2000_RAT__
651 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_hlp_profile},
652 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_cval_para_mcf},
yu.dongc592bc72024-04-24 22:45:13 -0700653 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_SINGLE_MOD, nvram_custom_reconfig_c2k_nam_para},
rjw6c1fd8f2022-11-30 14:33:01 +0800654#endif
655 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_mrs_profile},
656 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_a54_smc_whitelist_plmn},
657#if defined(__GSM_RAT__)
658#if defined(__UMTS_TDD128_MODE__) || defined(__TDD_MODEM__) || defined(__TDD_2G_OP01__)
659
660 {MOD_RRM_TDD, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrm_profile},
661#endif
662 {MOD_RRM_FDD, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_rrm_profile},
663#endif
664#if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
665 /*SSDS*/
666 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_ssds_profile},
667#endif
668#if defined(__SASE_SUPPORT__)
669 /* SASE */
670 {MOD_SASE_CLIENT, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, NULL},
671#endif
672 /*SIM*/
673 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_sim_terminal_profile},
674 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_tcm_profile},
675 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_sm_profile},
676 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, custom_config_atci_profile},
677 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_LTE_MOD, nvram_custom_config_esm_profile},
678 {MOD_CSM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_csm_plmn_for_esvc},
679#ifdef __L5_SUPPORT__
680 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL , CFG_GEMINI_MOD, nvram_custom_config_l5_profile},
681#endif
682 {MOD_MM, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD, nvram_custom_config_mm_dsbp_profile},
yu.dongc592bc72024-04-24 22:45:13 -0700683 {MOD_TMC, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL, CFG_GEMINI_MOD | CFG_CO_GEMINI_MOD, NULL},
684 {MOD_NIL, SBP_RECONFIGURE_SAP, RECONFIG_DSBP_CHANGE_ALL | RECONFIG_DSBP_CHANGE, CFG_GEMINI_MOD, nvram_custom_config_ps_conformance_setting},
rjw6c1fd8f2022-11-30 14:33:01 +0800685};
686
687sbp_reconfigure_module_info_struct *sbp_get_sbp_reconfigure_mod_tbl()
688{
689 return sbp_reconfigure_mod_info_tbl;
690}
691
692kal_uint8 sbp_get_num_of_sbp_reconfigure_mod_tbl()
693{
694 return sizeof(sbp_reconfigure_mod_info_tbl)/sizeof(sbp_reconfigure_mod_info_tbl[0]);
695}
696
697
698/*This part is to declare the functions and data structures for NVRAM Reset
699 if the SBP ID(From CCCI or NVRAM) changes from previous one after the boot up*/
700extern void nvram_custom_reset_sample_para(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
701extern void nvram_custom_reset_mscap(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
702extern void nvram_custom_reset_rrc_dynamic_cap(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
703extern void nvram_custom_reset_regional_phone_mode(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
704#ifdef __LTE_RAT__
705extern void nvram_custom_reset_errc_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
706extern void nvram_custom_reset_lte_pref(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
707extern void nvram_custom_reset_el1c_para(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
708#endif
709#ifdef __NR_RAT__
710extern void nvram_custom_reset_as_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
711extern void nvram_custom_reset_nrrc_lid(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
712#endif /* __NR_RAT__ */
713
714#ifdef __VOLTE_SUPPORT__
715extern void nvram_custom_reset_ltecsr_profile(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
716#endif /* __VOLTE_SUPPORT__ */
717extern void nvram_custom_reset_vdm_ads_profile(kal_uint32 old_sbp_id, protocol_id_enum ps_id);
718
719void custom_reset_nvram_lids(kal_uint32 sbp_id);
720
721typedef void(*SBP_RESET_NVRAM_LID)(kal_uint32, protocol_id_enum);
722
723SBP_RESET_NVRAM_LID nvram_lid_reset_func_tbl[] =
724{
725 nvram_custom_reset_mscap,
726 nvram_custom_reset_rrc_dynamic_cap,
727 nvram_custom_reset_regional_phone_mode,
728 nvram_custom_reset_vdm_ads_profile,
729#ifdef __VOLTE_SUPPORT__
730 nvram_custom_reset_ltecsr_profile,
731#endif
732#ifdef __LTE_RAT__
733 nvram_custom_reset_errc_lid,
734 nvram_custom_reset_lte_pref,
735 nvram_custom_reset_el1c_para,
736#endif
737#ifdef __NR_RAT__
738 nvram_custom_reset_as_lid,
739 nvram_custom_reset_nrrc_lid,
740#endif
741
742};
743
744SBP_RESET_NVRAM_LID nvram_lid_reset_with_new_sbp_id_func_tbl[] =
745{
746 nvram_custom_reset_sample_para,
747#ifdef __CDMA2000_RAT__
748 nvram_custom_config_c2k_nam_para,
749#endif /* __CDMA2000_RAT__ */
750};
751
752/* NVRAM RESET Declaration ends here*/
753
754/*****************************************************************************
755 * FUNCTION
756 * custom_nvram_init_sbp_id
757 * DESCRIPTION
758 * Set SBP features and data according to SBP ID and SIM SBP ID.
759 * PARAMETERS
760 * sbp_id [IN]
761 * RETURNS
762 * Void
763 *****************************************************************************/
764void custom_nvram_init_sbp_id(kal_uint32 sbp_id)
765{
766 protocol_id_enum ps_id;
767 sbp_reconfig_custom_param_struct sbp_reconfig_custom_param;
768 kal_uint8 num_of_dsbp_tbl, i;
769 kal_uint32 sim_sbp_id;
770
771 sbp_init_contexts();
772
773 /*this modification is used in operator specific NWSIM, only define these compile option in VzW/ATT/Sprint/TMO NWSIM project*/
774#ifdef __ATT_ENNWSIM__
775 sbp_id = 7;
776#endif
777
778#ifdef __SPRINT_ENNWSIM__
779 sbp_id = 20;
780#endif
781
782#ifdef __TMO_ENNWSIM__
783 sbp_id = 8;
784#endif
785
786#ifdef __VZW_ENNWSIM__
787 sbp_id = 12;
788#endif
789
790 /* sbp_id is not set from CCCI or MODIS so we use default_sbp_id,
791 which is initialized in the sbp_init_contexts() from NVRAM*/
792 if (sbp_id == SBP_ID_INVALID)
793 sbp_id = default_sbp_id;
794
795 /******************************************************************
796 Update SBP ID first and then WorldMode ID
797 Otherwise NVRAM_EF_SBP_MODEM_DATA_CONFIG_LID would be overwrite
798 PS. WorldMode ID is saved in NVRAM_EF_SBP_MODEM_DATA_CONFIG_LID
799 ******************************************************************/
800 // reset SBP related setting if needed
801 custom_reset_nvram_lids(sbp_id);// this will reset the NVRAM LIDs if the SBP ID is changed from previous one
802
803 // set SBP ID
804 sbp_set_sbp_id(sbp_id);
805
806 // Configure SBP feature set
807 sbp_reconfig_custom_param.sbp_id = sbp_id;
808 sbp_reconfig_custom_param.sbp_sub_id = sbp_query_sub_id();
809 sbp_reconfig_custom_param.is_in_dynamic_sbp = KAL_FALSE;
810 sbp_reconfig_custom_param.ps_id = PROTOCOL_1;
811 kal_mem_set(sbp_reconfig_custom_param.mcc, 0, MAX_MCC_STR_LEN);
812 kal_mem_set(sbp_reconfig_custom_param.mnc, 0, MAX_MNC_STR_LEN);
813 kal_mem_set(sbp_reconfig_custom_param.iccid, 0, 21);
814 sbp_reconfig_custom_param.trans_id = 0; // operation not related to SIM card, use 0
815 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
816
817 // Notify MCF for MCF auto select bin before any DSBP NVRAM operation takes place
818 nvram_custom_config_mcf_profile(&sbp_reconfig_custom_param);
819 nvram_custom_config_sbp(&sbp_reconfig_custom_param);
820
821 num_of_dsbp_tbl = sbp_get_num_of_sbp_reconfigure_mod_tbl();
822 /* SBP Multiple context */
823 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
824 {
825 custom_nvram_set_sbp_id(sbp_id, KAL_FALSE, NULL, ps_id);
826
827 sim_sbp_id = sbp_get_sim_sbp_id_for_all(ps_id);
828
829#ifndef __L1_STANDALONE__
830 l4bsbp_update_bootup_em_dsbp_result(KAL_TRUE, EM_L4BSBP_MODE_BOOTUP,
831 EM_L4BSBP_RESULT_UNKNOWN, sim_sbp_id, ps_id);
832#endif
833 if (sim_sbp_id != SBP_ID_INVALID)
834 {
835 // prepare MCC/MNC/ICCID
836 sbp_get_reconfig_param(ps_id, &sbp_reconfig_custom_param);
837 // set other information
838 sbp_reconfig_custom_param.sbp_id = sim_sbp_id;
839 sbp_reconfig_custom_param.ps_id = ps_id;
840 sbp_reconfig_custom_param.is_in_dynamic_sbp = KAL_TRUE;
841 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
842
843 // Notify MCF for MCF auto select bin before any DSBP NVRAM operation takes place
844 nvram_custom_config_mcf_profile(&sbp_reconfig_custom_param);
845 nvram_custom_config_sbp(&sbp_reconfig_custom_param);
846
847 for (i=0; i< num_of_dsbp_tbl; i++)
848 {
849 /* Only handle RECONFIG_IMS_CHANGE type */
850 if ((sbp_reconfigure_mod_info_tbl[i].reconfig_type & RECONFIG_DSBP_CHANGE_ALL) == 0)
851 {
852 continue;
853 }
854
855 /* Check if Gemini module and right protocol id */
856 if ((sbp_reconfigure_mod_info_tbl[i].gemini_check & CFG_MASK_MOD) == CFG_SINGLE_MOD)
857 {
858 if (ps_id != PROTOCOL_1)
859 {
860 continue;
861 }
862 }
863 // Check the numbers of GEMINI_LTE that this module supports:
864 else if ((sbp_reconfigure_mod_info_tbl[i].gemini_check & CFG_MASK_MOD) == CFG_GEMINI_LTE_MOD)
865 {
866 if (ps_id >= MAX_LTE_NUM)
867 {
868 continue;
869 }
870 }
871
872 if (sbp_reconfigure_mod_info_tbl[i].custom_func_ptr != NULL)
873 {
874 sbp_reconfigure_mod_info_tbl[i].custom_func_ptr(&sbp_reconfig_custom_param);
875 }
876
877 }
878 }
879
880 // update EM INFO (stored in SIM1 of l4bsbp)
881#ifndef __L1_STANDALONE__
882 l4bsbp_update_bootup_em_dsbp_result(KAL_FALSE, EM_L4BSBP_MODE_BOOTUP,
883 EM_L4BSBP_RESULT_SUCCESS, sim_sbp_id, ps_id);
884#endif
885
886 // titan project Network Code custom function
887#ifdef __IPC_ADAPTER__
888 ss_nvram_custom_config_non_sbp_nv(ps_id, sim_sbp_id);
889#endif /* __IPC_ADAPTER__ */
890 }
891
892 nvram_custom_config_sbp_by_model_id(md_product_model_id);
893
894}
895
896/*****************************************************************************
897 * FUNCTION
898 * custom_nvram_set_sbp_id
899 * DESCRIPTION
900 * Set SBP features and data according to SBP ID.
901 * PARAMETERS
902 * sbp_mode [IN]
903 * RETURNS
904 * KAL_TRUE : Set SBP ID successfully
905 * KAL_FALSE : Error happens when setting SBP ID
906 *****************************************************************************/
907kal_bool custom_nvram_set_sbp_id(kal_uint32 sbp_id, kal_bool is_in_dynamic_sbp, kal_uint8 *imsi, protocol_id_enum ps_id)
908{
909 sbp_reconfig_custom_param_struct sbp_reconfig_custom_param;
910
911 sbp_reconfig_custom_param.sbp_id = sbp_id;
912 sbp_reconfig_custom_param.sbp_sub_id = sbp_query_sub_id();
913 sbp_reconfig_custom_param.is_in_dynamic_sbp = is_in_dynamic_sbp;
914 sbp_reconfig_custom_param.ps_id = ps_id;
915
916 sbp_reconfig_custom_param.mcc[0] = 0;
917 sbp_reconfig_custom_param.mnc[0] = 0;
918 sbp_reconfig_custom_param.trans_id = 0; // operation not related to SIM card, use 0
919
920 if ( kal_get_active_module_id() == MOD_NIL)
921 sbp_reconfig_custom_param.is_boot_up = KAL_TRUE;
922 else
923 sbp_reconfig_custom_param.is_boot_up = KAL_FALSE;
924
925 if (sbp_id != SBP_ID_INVALID && ps_id != PROTOCOL_1)
926 {
927 /* For Dual IMS, IMC/LTECSR/VDM/SDM has multiple record in NV LID */
928 nvram_custom_config_vdm_ads_profile(&sbp_reconfig_custom_param);
929 #ifdef __VOLTE_SUPPORT__
930 #ifdef __MULTIPLE_IMS_SUPPORT__
931 nvram_custom_config_ltecsr_profile(&sbp_reconfig_custom_param);
932 #endif
933 nvram_custom_config_sdm_ads_profile(&sbp_reconfig_custom_param);
934 #endif
935 #if defined (__MOD_IMC__)
936 #ifdef __MULTIPLE_IMS_SUPPORT__
937 if(sbp_id != 0){
938 nvram_custom_config_ims_profile(&sbp_reconfig_custom_param);
939 }
940 #endif
941 #endif
942 nvram_custom_config_iwlan_profile(&sbp_reconfig_custom_param);
943 #ifdef __N3GPP_OFFLOAD_ENABLE__
944 nvram_custom_config_n3cf_profile(&sbp_reconfig_custom_param);
945 #endif
946 #ifdef __XCAP_SUPPORT__
947 nvram_custom_config_xcap_profile(&sbp_reconfig_custom_param);
948 #endif
949 #if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
950 /*SSDS*/
951 nvram_custom_config_ssds_profile(&sbp_reconfig_custom_param);
952 #endif
953 #ifdef __GEMINI_LTE__
954 if ((ps_id-PROTOCOL_1)< MAX_LTE_NUM) //PROTOCOL_1 : 0x00
955 {
956 #ifdef __LTE_RAT__
957 nvram_custom_config_errc_profile(&sbp_reconfig_custom_param);
958 nvram_custom_config_lte_pref(&sbp_reconfig_custom_param);
959 #endif /* __LTE_RAT__ */
960 nvram_custom_config_as_profile(&sbp_reconfig_custom_param);
961 }
962 #endif /* __GEMINI_LTE__ */
963
964 nvram_custom_config_l4c_dsbp_profile(&sbp_reconfig_custom_param);
965#ifdef __NR_RAT__
966#ifdef __GEMINI__
967 if ((ps_id - PROTOCOL_1) < MAX_NR_NUM)
968 {
969 nvram_custom_config_nrrc_profile(&sbp_reconfig_custom_param);
970 }
971#endif /* __GEMINI__ */
972#endif /* __NR_RAT__ */
973 nvram_custom_config_rsra_profile(&sbp_reconfig_custom_param);
974
975 #ifdef __L5_SUPPORT__
976 nvram_custom_config_l5_profile(&sbp_reconfig_custom_param);
977 #endif
978
979 }
980 else if (sbp_id != SBP_ID_INVALID && ps_id == PROTOCOL_1)
981 {
982 #ifdef __LTE_RAT__
983 /* update ERRC parameters */
984 nvram_custom_config_errc_profile(&sbp_reconfig_custom_param);
985 nvram_custom_config_lte_pref(&sbp_reconfig_custom_param);
986 /* Update EL1C parameter for only PROTOCOL_1 - Only one copy */
987 nvram_custom_config_el1c_para(&sbp_reconfig_custom_param);
988 #endif
989 nvram_custom_config_as_profile(&sbp_reconfig_custom_param);
990
991 nvram_custom_config_vdm_ads_profile(&sbp_reconfig_custom_param);
992 #ifdef __VOLTE_SUPPORT__
993 nvram_custom_config_sdm_ads_profile(&sbp_reconfig_custom_param);
994 nvram_custom_config_ltecsr_profile(&sbp_reconfig_custom_param);
995 #endif
996 nvram_custom_config_iwlan_profile(&sbp_reconfig_custom_param);
997 #ifdef __N3GPP_OFFLOAD_ENABLE__
998 nvram_custom_config_n3cf_profile(&sbp_reconfig_custom_param);
999 #endif
1000 #ifdef __XCAP_SUPPORT__
1001 nvram_custom_config_xcap_profile(&sbp_reconfig_custom_param);
1002 #endif
1003 #if !defined(SSDS_NOT_PRESENT) && !defined(__SSDS_TASK_DISABLE__)
1004 /*SSDS*/
1005 nvram_custom_config_ssds_profile(&sbp_reconfig_custom_param);
1006 #endif
1007 #if defined (__MOD_IMC__)
1008 if(sbp_id != 0)
1009 {
1010 nvram_custom_config_ims_profile(&sbp_reconfig_custom_param);
1011 }
1012 #endif /* __MOD_IMC__ */
1013
1014 nvram_custom_config_rrc_dynamic_cap(&sbp_reconfig_custom_param);
1015 nvram_custom_config_rrc_band_priority_order(&sbp_reconfig_custom_param);
1016 //nvram_custom_config_e911_profile(&sbp_reconfig_custom_param);
1017 nvram_custom_config_mscap(&sbp_reconfig_custom_param);
1018 nvram_custom_config_regional_phone_mode(&sbp_reconfig_custom_param);
1019 nvram_custom_config_l4c(&sbp_reconfig_custom_param);
1020 nvram_custom_config_l4c_dsbp_profile(&sbp_reconfig_custom_param);
1021#ifdef __BIP_SUPPORT__
1022 nvram_custom_config_bip_profile(&sbp_reconfig_custom_param);
1023#endif
1024#ifdef __NR_RAT__
1025 nvram_custom_config_nrrc_profile(&sbp_reconfig_custom_param);
1026#endif /* __NR_RAT__ */
1027#ifdef __MD_TCPIP_SUPPORT__
1028 nvram_custom_config_rsra_profile(&sbp_reconfig_custom_param);
yu.dongc592bc72024-04-24 22:45:13 -07001029#endif
rjw6c1fd8f2022-11-30 14:33:01 +08001030
1031#ifdef __L5_SUPPORT__
1032 nvram_custom_config_l5_profile(&sbp_reconfig_custom_param);
1033#endif
1034 }
1035 else
1036 {
1037 return KAL_FALSE;
1038 }
1039
1040 return KAL_TRUE;
1041
1042}
1043
1044
1045/*****************************************************************************
1046 * FUNCTION
1047 * custom_reset_nvram_lids
1048 * DESCRIPTION
1049 * This function will reset nvram parameters to the default value for the lids present in the table nvram_lid_reset_func_tbl
1050 * please don't use this API if you don't get the permission from SBP FPM.
1051 * PARAMETERS
1052 * SBP ID: this is the new sbp_id received from the CCCI
1053 * RETURNS
1054 *****************************************************************************/
1055void custom_reset_nvram_lids(kal_uint32 sbp_id)
1056{
1057 kal_uint8 table_size = 0, table_size_new = 0, i = 0;
1058 protocol_id_enum ps_id;
1059
1060 old_default_sbp_id = sbp_query_id();
1061
1062 /* This Prompt trace is for Testing Purpose and will be omitted in MAIN branch Check-in*/
1063 //kal_prompt_trace(MOD_SBP, "Old SBP_ID = %d , New SBP_ID = %d", old_default_sbp_id, sbp_id);
1064
1065 if(old_default_sbp_id != sbp_id)
1066 {
1067 table_size = sizeof(nvram_lid_reset_func_tbl)/sizeof(SBP_RESET_NVRAM_LID);
1068 table_size_new = sizeof(nvram_lid_reset_with_new_sbp_id_func_tbl)/sizeof(SBP_RESET_NVRAM_LID);
1069
1070 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
1071 {
1072 for(i = 0; i < table_size; i++)
1073 {
1074 nvram_lid_reset_func_tbl[i](old_default_sbp_id, ps_id);
1075 }
1076 }
1077
1078 // Reset functions using new CCCI sbp id
1079 for (ps_id = PROTOCOL_1; ps_id < MAX_SIM_NUM ; ps_id++)
1080 {
1081 for(i = 0; i < table_size_new; i++)
1082 {
1083 nvram_lid_reset_with_new_sbp_id_func_tbl[i](sbp_id, ps_id);
1084 }
1085 }
1086 }
1087}
1088
1089/*****************************************************************************
1090 * FUNCTION
1091 * nvram_custom_reset_sample_para
1092 * DESCRIPTION
1093 * Sample function to reset nvram parameters to the default value.
1094 * PARAMETERS
1095 * sbp_id SBP ID from CCCI
1096 * RETURNS
1097 *****************************************************************************/
1098void nvram_custom_reset_sample_para(kal_uint32 sbp_id, protocol_id_enum ps_id)
1099{
1100 // sample function, remove when reset table is not empty
1101 return;
1102}