yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /****************************************************************************** |
| 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) 2007 |
| 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 | * Filename: |
| 38 | * -------------------------------------------------------- |
| 39 | * mrs_utility.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------------------------------------------------------- |
| 43 | * Multimode |
| 44 | * |
| 45 | * Description: |
| 46 | * -------------------------------------------------------- |
| 47 | * Declaration of funcitons of the utilities in MRS. |
| 48 | * |
| 49 | * Author: |
| 50 | * -------------------------------------------------------- |
| 51 | * ------- |
| 52 | * |
| 53 | * -------------------------------------------------------- |
| 54 | * $Log$ |
| 55 | * |
| 56 | * 01 28 2022 ot_krishna.charan |
| 57 | * [MOLY00685488] cloned from ALPS05677217 [B210622-876][?????]UE CSFB CALL MT???RR??????????????????????????? |
| 58 | * |
| 59 | * 01 18 2022 tom.wu |
| 60 | * [MOLY00735828] SBP_MRS_AFR_TO_5G_CONTROL return error |
| 61 | * |
| 62 | * . |
| 63 | * |
| 64 | * 10 07 2020 tero.miettinen |
| 65 | * [MOLY00570382] [Gen97]Apply BW customization setting from NVRAM to report capability |
| 66 | * [MRS] Update in BW setting list handling. |
| 67 | * |
| 68 | * 10 07 2020 bo-yao.tsai |
| 69 | * [MOLY00565738] [MODEM][Assert] Assert fail: errc_cel_cscom.c 6572 - ERRC |
| 70 | * - Channel protection fixing |
| 71 | * |
| 72 | * 10 01 2020 tero.miettinen |
| 73 | * [MOLY00560032] ????SA??? |
| 74 | * MRS - PLMN based 5G band disabling. |
| 75 | * |
| 76 | * 09 22 2020 vend_mtb_aritha031 |
| 77 | * [MOLY00561862] [Gen97][MP7][VzW][AFR] feature check-in, (check-in approved: item_344) |
| 78 | * |
| 79 | * 09 22 2020 vend_mtb_aritha031 |
| 80 | * [MOLY00561862] [Gen97][MP7][VzW][AFR] feature check-in, (check-in approved: item_344) |
| 81 | * |
| 82 | * 09 18 2020 vend_mtb_aritha031 |
| 83 | * [MOLY00561862] [Gen97][MP7][VzW][AFR] feature check-in, (check-in approved: item_344) |
| 84 | * |
| 85 | * 09 18 2020 tom.wu |
| 86 | * [MOLY00554348] [Colgin] cell measure and white cell lock feature development |
| 87 | * |
| 88 | * . |
| 89 | * |
| 90 | * 06 29 2020 vend_mtb_aritha002 |
| 91 | * [MOLY00536615] [MCF] user flow enhancement |
| 92 | * |
| 93 | * . |
| 94 | * |
| 95 | * 06 12 2020 vend_mtb_mobiveil015 |
| 96 | * [MOLY00528344] [URGENT][SSI][MT6885][Petrus][Q0][MP2][AT&T][10776v20_1][R3MP][PTN][simulation][inhouse][RnS][ATTACH/RESTART][LTE-BTR-1-8220]Test case failed due to ## LTE ## RRCConnectionRequest TimeOut |
| 97 | * |
| 98 | * [MOLY00535086] ?DM?34G?? |
| 99 | * |
| 100 | * . |
| 101 | * |
| 102 | * 04 04 2020 farming.tseng |
| 103 | * [MOLY00509534] [MT6875][Margaux][Q0][MP3][SQC]][Internal][China][Shenzhen][MDST][SWIFT][CU+CT][ErrorTimes:1][ASSERT] file:mcu/l1/nl1/internal/md97/src/rx/nr_rx_scheduler_rtb.c line:6045 |
| 104 | * |
| 105 | * . |
| 106 | * |
| 107 | * 03 24 2020 farming.tseng |
| 108 | * [MOLY00506815] [MT6875][Margaux][Q0][SQC][MP3][Gemini][N+L][NTC_SA_Gemini_0022]Margaux doesn't support SA+L DSDA. |
| 109 | * |
| 110 | * 01 06 2020 harish.reddy |
| 111 | * [MOLY00469528] [Gen97][VMOLY][SA][hVolte] hVolte revise for SA |
| 112 | * |
| 113 | * 12 09 2019 kun-lin.wu |
| 114 | * [MOLY00464345] [Gen97] Gemini MP2/MP3 features phase-in |
| 115 | * |
| 116 | * 12 09 2019 jutta.liuska |
| 117 | * [MOLY00448654] [6297][NRRC] Implementation for VoNR capabilities and enhancements |
| 118 | * [MRS] VoNR enhancements |
| 119 | * |
| 120 | * 12 09 2019 elle.sun |
| 121 | * [MOLY00464443] [ERRC][MRS][NL1MOB] move operator table to mrs |
| 122 | * |
| 123 | * [ERRC/MRS] move oprator table. |
| 124 | * |
| 125 | * 12 09 2019 vend_mtb_aritha002 |
| 126 | * [MOLY00458503] [CODE SYNC][MH4P-POS] patch request about ALPS04309026 |
| 127 | * |
| 128 | * Band Configuration to VMOLY |
| 129 | * |
| 130 | * 12 02 2019 vinayak.bandagi |
| 131 | * [MOLY00459945] [Gen97][AFR][RDIT] NAS-SV reset MRS AFR CNTX |
| 132 | * |
| 133 | * 10 14 2019 prime.xiao |
| 134 | * [MOLY00447831] [Rose][Petrus]BSP+][Q0]The ECC call calling 3 mintues and not connected. |
| 135 | * |
| 136 | * . |
| 137 | * |
| 138 | * 09 26 2019 kun-lin.wu |
| 139 | * [MOLY00443062] [Gemini] SA+L DR-DSDS/DSDA |
| 140 | * |
| 141 | * 07 18 2019 emily.lu |
| 142 | * [MOLY00422928] [Gen97 Patch back][ERRC_CEL] Code Sync to VMOLY |
| 143 | * |
| 144 | * .merge CL#7709556 (MRS) |
| 145 | * |
| 146 | * 07 01 2019 jiawei.he |
| 147 | * [MOLY00415509] [CODE SYNC][VMOLY][MOLY00370411][MOLY00377605][MOLY00394234][MOLY00397043][MOLY00398281]eCSFB related patch-back from Gen93 |
| 148 | * |
| 149 | * . |
| 150 | * |
| 151 | * 05 30 2019 kun-lin.wu |
| 152 | * [MOLY00402003] [VMOLY] GEMINI N+L DSDS |
| 153 | * |
| 154 | * 04 30 2019 muneeswaraiah.dama |
| 155 | * [MOLY00402590] [Gen97] reset AFR target rat and ongoing status by service |
| 156 | * . |
| 157 | * |
| 158 | * 04 17 2019 puneet.t |
| 159 | * [MOLY00399390] [CODE SYNC] [VMOLY][Eiger RD IT][GEMINI & AFR]LAU request has been rejected with cause AS_IN_SUSPEND_MODE and it never camped on 2G. |
| 160 | * |
| 161 | * GEMINI RDIT code changes in VMOLY TRUNK |
| 162 | * |
| 163 | * 04 16 2019 otto.liu |
| 164 | * [MOLY00399190] [GEN97] GEN95 to GEN97 sync patch |
| 165 | * |
| 166 | * . |
| 167 | * |
| 168 | * 02 18 2019 muneeswaraiah.dama |
| 169 | * [MOLY00384995] [VMOLY] GEMINI 3.0, AFR, Unify Frequency scan, BGSEARCH |
| 170 | * . |
| 171 | * |
| 172 | * 10 03 2018 muneeswaraiah.dama |
| 173 | * [MOLY00356286] [Gen97] background search feature |
| 174 | * . |
| 175 | * |
| 176 | * 05 25 2018 otto.liu |
| 177 | * [MOLY00325228] [UMOLYE] Remove NVRAM group header file |
| 178 | * |
| 179 | * . |
| 180 | * |
| 181 | * 05 09 2018 amit.sharma |
| 182 | * [MOLY00325096] [Gen95][GAS]FAST_IRCR and LG+WG CMCC feature change for I-RAT RESEL to be merged and replaced by STORED SI. |
| 183 | * . |
| 184 | * |
| 185 | * 04 18 2018 morton.lin |
| 186 | * [MOLY00320662] [Gen93][P40][UMOLYE] Gionee blacklist feature - MRS |
| 187 | * [MRS] Gionee Blacklist feature phase-in |
| 188 | * |
| 189 | * 01 23 2018 muneeswaraiah.dama |
| 190 | * [MOLY00302582] [Gen93][Huawei][CHR] Index 8, Index 9 - header/ interface files |
| 191 | * . |
| 192 | * |
| 193 | * 10 31 2017 amit.sharma |
| 194 | * [MOLY00285547] [P170518-04585]airplane mode search network times fail |
| 195 | * . |
| 196 | * |
| 197 | * 07 06 2017 morton.lin |
| 198 | * [MOLY00261305] [Gen93] B71 development |
| 199 | * MRS and NVRAM phase in |
| 200 | * |
| 201 | * 04 26 2017 rujing.zhao |
| 202 | * [MOLY00243767] [TDD GAS]RACH fail bar cell feature patch back UMOLYA |
| 203 | * . |
| 204 | * |
| 205 | * 04 25 2017 mu.ding |
| 206 | * [MOLY00244356] [6293][Gemini][T+W] Phase 2: T+W Changes Check in |
| 207 | * |
| 208 | * . |
| 209 | * |
| 210 | * 11 10 2016 vend_mtb_aricent_05 |
| 211 | * [MOLY00212319] [MT6293] Channel Lock feature porting and enhancement -MRS |
| 212 | * |
| 213 | * . |
| 214 | * |
| 215 | * 10 24 2016 menghau.wu |
| 216 | * [MOLY00208768] [MT6293] [B66] Band66 porting (ERRC part) |
| 217 | * complement of CL 3008555 |
| 218 | * |
| 219 | * 06 24 2016 cookie.chen |
| 220 | * [MOLY00185901] UMOLYA errc relevant latest code sync from UMOLY |
| 221 | * . |
| 222 | * |
| 223 | * 12 10 2015 tim.huang |
| 224 | * [MOLY00150157] VZ_REQ_LTEDATA_38498 (MT6291 Verizon Jun-2015 baseline) |
| 225 | * . |
| 226 | * |
| 227 | * 10 07 2015 titi.wu |
| 228 | * [MOLY00141786] [MT6755][SRLTE][L+C] Support connectivity of C2K on dual SIM |
| 229 | * . |
| 230 | * |
| 231 | * 09 18 2015 ming.lee |
| 232 | * [MOLY00140707] [GAS][PLMN search enhancement II] Search info reuse |
| 233 | * . |
| 234 | * |
| 235 | * 08 06 2015 claud.li |
| 236 | * [MOLY00125612] [PS1][91plus] core change modification |
| 237 | * 1. from l1core_is_test_sim to is_test_sim. |
| 238 | * 2. from l1core_query_ps_sim_type to sim_query_type |
| 239 | * 3. remove shared variable "l1core_sim_type_info" and "l1core_is_test_sim_info_ready" |
| 240 | * 4. remove mrs_update_l1core_SIM_type |
| 241 | * 5. from l1core_is_ps_conf_xta_mode() to is_ps_conf_test_xta_mode() |
| 242 | * 6. from l1core_query_ps_conf_test_mode() to query_ps_conf_test_mode() |
| 243 | * 7. from l1core_query_ps_conf_test_profile_setting() to query_ps_conf_test_profile_setting() |
| 244 | * 8. remove shared variable: "l1core_ps_conf_test_xta_mode", "l1core_is_test_mode_info_ready", "l1core_ps_conf_test_profile_setting", "l1core_ps_conf_test_mode" |
| 245 | * 9. remove mrs_update_l1core_test_mode() |
| 246 | * 10. remove l1core_is_mmdc_mode() |
| 247 | * |
| 248 | * 08 06 2015 claud.li |
| 249 | * [MOLY00125612] [PS1][91plus] core change modification |
| 250 | * 1. remove l1core_is_vsim() : could use L4/sim's API: is_vsim_on() |
| 251 | * 2. remove l1core_test_mode_consider_sim() : could use L4/sim's API: test_mode_consider_sim() |
| 252 | * |
| 253 | * 07 14 2015 bruce.li |
| 254 | * [MOLY00128246] [eCSFB]LU Reduction Enhancement |
| 255 | * Implemented 2 enhancements: |
| 256 | * 1. If there is successful call on the black cell, add it to bleach list; |
| 257 | * the priority order is: white list > bleach list > gray list > black list; |
| 258 | * 2. If the decoded BSIC of white cell or bleach cell does not match the stored, |
| 259 | * add it to retry list; the retry list would be tried after white list and |
| 260 | * bleach list have been done. |
| 261 | * |
| 262 | * 06 21 2015 alan.peng |
| 263 | * [MOLY00122048] [6795] Request new feature to improve registration time of roaming case |
| 264 | * _MRS part. |
| 265 | * |
| 266 | * 05 29 2015 shin.chen |
| 267 | * [MOLY00115617] [6291] Dynamic SIM switch without modem reset |
| 268 | * . |
| 269 | * |
| 270 | * 05 14 2015 henry.lai |
| 271 | * [MOLY00113630] [MT6291] Add IS_TEST_SIM and IS_VSIM for l1core |
| 272 | * . |
| 273 | * |
| 274 | * 04 20 2015 shin.chen |
| 275 | * [MOLY00087882] [Universal Bin] MRS general developement |
| 276 | * .Remove tabs |
| 277 | * |
| 278 | * 02 16 2015 doug.shih |
| 279 | * [MOLY00091463] [MT6291] ERRC RCM/MRS development |
| 280 | * MOLY CR Code Sync to UMOLY (OA domain): |
| 281 | * [MOLY00079131] AT&T requirement connection reject |
| 282 | * [MOLY00083427] [ERRC][MOB] UMTS proximity indication |
| 283 | * [MOLY00084324] [ROHC] Modem load with configurable compile options: profile support and context number |
| 284 | * [MOLY00084416] [eCSFB]LU Reduction feature |
| 285 | * [MOLY00091967] Merge C2K IRAT code (CT specific UE cap SBP setting). |
| 286 | * |
| 287 | * 01 20 2015 henry.lai |
| 288 | * [MOLY00087668] [MT6291][UBIN] Check in ERRC/CEL modifications |
| 289 | * . |
| 290 | * |
| 291 | * 12 15 2014 henry.lai |
| 292 | * [MOLY00087668] [MT6291][UBIN] Check in ERRC/CEL modifications |
| 293 | * . |
| 294 | * |
| 295 | * 11 17 2014 shin.chen |
| 296 | * [MOLY00081154] [ATT_TMO_DEV] AT&T requirement merge back |
| 297 | * . |
| 298 | * |
| 299 | * 11 14 2014 henry.lai |
| 300 | * [MOLY00079072] [MT6291] Change EARFCN from kal_uint16 to kal_uint32 for CEL part |
| 301 | * . |
| 302 | * |
| 303 | * 11 12 2014 cooper.lin |
| 304 | * [MOLY00068710] [MT6291_DEV] Sync MOLY to MT6291_DEV |
| 305 | * Merge MT6291_DEV code to UMOLY trunk. |
| 306 | * |
| 307 | * 11 12 2014 henry.lai |
| 308 | * [MOLY00079071] [MT6291][U4G] Low Power Modification for CEL Paging |
| 309 | * . |
| 310 | * |
| 311 | * 05 23 2014 adeline.chang |
| 312 | * [MOLY00066214] [SBP] 4G background search |
| 313 | * . |
| 314 | * |
| 315 | * 10 29 2013 adeline.chang |
| 316 | * [MOLY00042471] [MT6290] CSFB_enhancements inject message extension |
| 317 | * . |
| 318 | * |
| 319 | * 10 21 2013 adeline.chang |
| 320 | * [MOLY00042471] [MT6290] CSFB_enhancements inject message extension |
| 321 | * . |
| 322 | * |
| 323 | * 10 18 2013 peng.pan |
| 324 | * [MOLY00041595] [MT6290E1][MMDS_DC] MMDC feature patch back to MOLY trunk |
| 325 | * MRS support MMDC. |
| 326 | * |
| 327 | * 08 30 2013 adeline.chang |
| 328 | * [MOLY00030187] [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return |
| 329 | * [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return - add new MRS API. |
| 330 | * |
| 331 | * 08 26 2013 adeline.chang |
| 332 | * [MOLY00030187] [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return |
| 333 | * [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return - add SIM index. |
| 334 | * |
| 335 | * 07 17 2013 adeline.chang |
| 336 | * [MOLY00030187] [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return |
| 337 | * . |
| 338 | * |
| 339 | * 07 17 2013 adeline.chang |
| 340 | * [MOLY00030187] [MT6290] CSFB Enhancement Implementation for Autonomous Fast Return |
| 341 | * . |
| 342 | * |
| 343 | * 03 18 2013 justin.li |
| 344 | * [MOLY00009222] [GAS][Multi-Mode Development] Merge GAS multi-mode development to MOLY |
| 345 | * . |
| 346 | * |
| 347 | * 02 05 2013 yenchih.yang |
| 348 | * [MOLY00009186] [SIBE/USIME/DBME] Multi-Mode CBr merge to MOLY |
| 349 | * . |
| 350 | * |
| 351 | * 01 22 2013 david.niu |
| 352 | * [MOLY00009205] [MRS] Code checked-in for MOLY branch |
| 353 | * . |
| 354 | * |
| 355 | *****************************************************************************/ |
| 356 | |
| 357 | #ifndef _MRS_UTILITY_H |
| 358 | #define _MRS_UTILITY_H |
| 359 | |
| 360 | #include "mrs_as_enums.h" |
| 361 | #include "mrs_as_struct.h" |
| 362 | #include "nvram_editor_data_item.h" |
| 363 | #include "kal_general_types.h" |
| 364 | #include "ps_em_enum.h" |
| 365 | #include "sim_common_enums.h" |
| 366 | #include "global_type.h" |
| 367 | #include "bitstream.h" |
| 368 | #include "mrs_as_inter_core_struct.h" |
| 369 | #include "errc_nvram_editor.h" |
| 370 | #include "asband_nvram_editor.h" |
| 371 | #include "ps_inter_core_public.h" |
| 372 | |
| 373 | #ifdef __CHR_AB_INFO__ |
| 374 | #include "nbr_public_struct.h" |
| 375 | #endif /* __CHR_AB_INFO__ */ |
| 376 | |
| 377 | |
| 378 | /* GLOBAL VARIABLE DECLARATIONS *********************************************/ |
| 379 | #ifdef UNIT_TEST |
| 380 | extern kal_bool modis_IT_mode; |
| 381 | #endif |
| 382 | |
| 383 | /* Type Definitions */ |
| 384 | |
| 385 | #define MD3_INVALID 0x00 |
| 386 | #define SIM1_MD3_VALID 0x01 |
| 387 | #define SIM2_MD3_VALID 0x02 |
| 388 | #define SIM3_MD3_VALID 0x04 |
| 389 | #define SIM4_MD3_VALID 0x08 |
| 390 | #define INVALID_PS_IDX 0xFF |
| 391 | |
| 392 | #define SBP_DATA_AFR_TO_4G_FOLLOW_NVRAM 0x01 |
| 393 | #define SBP_DATA_AFR_TO_4G_ENFORCE_ON 0x02 |
| 394 | #define SBP_DATA_AFR_TO_4G_ENFORCE_OFF 0x04 |
| 395 | |
| 396 | #define SBP_DATA_AFR_TO_5G_FOLLOW_NVRAM 0x01 |
| 397 | #define SBP_DATA_AFR_TO_5G_ENFORCE_ON 0x02 |
| 398 | #define SBP_DATA_AFR_TO_5G_ENFORCE_OFF 0x04 |
| 399 | |
| 400 | /* PUBLIC FUNCTION PROTOTYPES ***********************************************/ |
| 401 | extern void mrs_send_msg(kal_uint32 dest_mod_id, sap_type sap_id, msg_type msg_id, local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 402 | |
| 403 | #if defined(__3G_CSG_SUPPORT__) || defined(__LTE_RAT__) |
| 404 | extern void NPSI_newAcsglFromUSIM(MRS_SIM_INDEX sim_index, kal_uint8 acsglRecNum, kal_uint16 acsglSizePerRec |
| 405 | , kal_uint8* acsglData, csg_white_list_update_cause update_cause, kal_bool is_valid); |
| 406 | |
| 407 | extern void NPSI_newOcsglFromUSIM(MRS_SIM_INDEX sim_index, kal_uint8 ocsglRecNum, kal_uint16 ocsgalSizePerRec |
| 408 | , kal_uint8* ocsglData, csg_white_list_update_cause update_cause, kal_bool is_valid); |
| 409 | |
| 410 | extern white_list_update_type NPSI_updateCsgWhiteList(MRS_SIM_INDEX sim_index, |
| 411 | MRS_RAT_MODE_TYPE rat, |
| 412 | csg_update_type_enum csg_update_type, |
| 413 | mrs_plmn_id* plmn_id, |
| 414 | kal_uint32 csg_id); |
| 415 | |
| 416 | extern kal_uint8* NPSI_getEncodedAllowedCsgList(MRS_SIM_INDEX sim_index, |
| 417 | kal_uint8* recNum, |
| 418 | kal_uint16 *sizePerRec); |
| 419 | |
| 420 | extern void NPSI_deleteCSGList(MRS_SIM_INDEX sim_index); |
| 421 | |
| 422 | extern kal_uint8 NPSI_getValidCsgPlmn(MRS_SIM_INDEX sim_index, |
| 423 | mrs_plmn_id** plmns); |
| 424 | |
| 425 | extern csg_type_enum NPSI_checkCsgType(MRS_SIM_INDEX sim_index, |
| 426 | mrs_plmn_id *plmn_id, |
| 427 | kal_uint32 csg_id); |
| 428 | |
| 429 | kal_bool NPSI_isCsgListEmpty(MRS_SIM_INDEX sim_index); |
| 430 | |
| 431 | kal_uint16 NPSI_checkCsgNumberPerPlmn(MRS_SIM_INDEX sim_index, mrs_plmn_id *plmn_id); |
| 432 | |
| 433 | extern kal_bool mrs_write_next_csg_record_to_USIM(MRS_SIM_INDEX sim_index); |
| 434 | |
| 435 | extern void mrs_write_ue_based_csg_to_nvram(MRS_SIM_INDEX sim_index); |
| 436 | |
| 437 | |
| 438 | extern kal_bool mrs_write_csg_to_USIM(MRS_SIM_INDEX sim_index); |
| 439 | |
| 440 | extern void mrs_read_ue_based_nv(MRS_SIM_INDEX sim_index); |
| 441 | |
| 442 | extern void mrs_csg_read_nvram_cnf_handler(kal_uint8* data, kal_uint16 len); |
| 443 | |
| 444 | |
| 445 | #endif /* #if defined(__CSG_SUPPORT__) || defined(__LTE_RAT__) */ |
| 446 | |
| 447 | extern kal_bool MRS_occupy_lla(MRS_SIM_INDEX sim_index, |
| 448 | MRS_RAT_MODE_TYPE rat, |
| 449 | MRS_OCCUPY_PROCEDURE procedure); |
| 450 | |
| 451 | extern void MRS_release_lla(MRS_SIM_INDEX sim_index, |
| 452 | MRS_RAT_MODE_TYPE rat); |
| 453 | |
| 454 | extern kal_bool MRS_test_occupy_lla(MRS_SIM_INDEX sim_index, |
| 455 | MRS_OCCUPY_PROCEDURE procedure); |
| 456 | |
| 457 | extern MRS_RAT_MODE_TYPE MRS_get_lla_occupy_rat(MRS_SIM_INDEX sim_index); |
| 458 | |
| 459 | extern MRS_SIM_INDEX mrs_get_current_sim_index(void); |
| 460 | |
| 461 | extern void mrs_afr_reset_afr_list(MRS_SIM_INDEX sim_index); |
| 462 | |
| 463 | extern void mrs_afr_insert_freq(MRS_SIM_INDEX sim_index, EARFCN earfcn); |
| 464 | |
| 465 | extern void mrs_afr_get_afr_list(MRS_SIM_INDEX sim_index, mrs_afr_main_struct *afr_list_ptr); |
| 466 | |
| 467 | void mrs_set_csfb_enhancement_status(MRS_SIM_INDEX sim_index, csfb_enhancement_enum enhancement_item, kal_bool activate); |
| 468 | |
| 469 | void mrs_set_csfb_enhancement_status_in_test_mode(MRS_SIM_INDEX sim_index, csfb_enhancement_enum enhancement_item, kal_bool activate); |
| 470 | |
| 471 | kal_bool mrs_get_csfb_enhancement_status(MRS_SIM_INDEX sim_index, csfb_enhancement_enum enhancement_item); |
| 472 | |
| 473 | extern void mrs_afr_set_csfb_status(MRS_SIM_INDEX sim_index, kal_bool csfb_ongoing); |
| 474 | |
| 475 | extern kal_bool mrs_afr_get_csfb_status(MRS_SIM_INDEX sim_index); |
| 476 | |
| 477 | extern void mrs_set_background_search_status_in_test_mode(MRS_SIM_INDEX sim_index, background_search_enum background_search_type, kal_bool activate); |
| 478 | |
| 479 | extern void mrs_set_latest_camp_on_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat); |
| 480 | |
| 481 | extern void mrs_clear_latest_camp_on_rat(MRS_SIM_INDEX sim_index, kal_uint32 rat_bmp); |
| 482 | |
| 483 | extern MRS_RAT_MODE_TYPE mrs_get_latest_camp_on_rat(MRS_SIM_INDEX sim_index, kal_uint32 rat_type_bitmask); |
| 484 | |
| 485 | extern kal_bool mrs_get_background_search_status(MRS_SIM_INDEX sim_index, background_search_enum background_search_type); |
| 486 | |
| 487 | extern void mrs_ecsfb_add_2g_association(MRS_SIM_INDEX sim_index, kal_uint32 eas_cell_id, mrs_gas_cell_inf_struct *p_gas_cell_inf); |
| 488 | |
| 489 | extern void mrs_ecsfb_set_2g_association_call_flag(MRS_SIM_INDEX sim_index, kal_uint32 eas_cell_id, mrs_gas_cell_inf_struct *p_gas_cell_inf); |
| 490 | |
| 491 | extern kal_uint8 mrs_ecsfb_get_2g_lai(MRS_SIM_INDEX sim_index, kal_uint32 eas_cell_id, mrs_gas_cell_inf_struct *p_gas_cell_inf); |
| 492 | |
| 493 | extern kal_uint8 mrs_ecsfb_get_same_lai_2g(MRS_SIM_INDEX sim_index, mrs_lai_struct *lai, kal_uint32 valid_duration, mrs_gas_cell_inf_struct *p_gas_cell); |
| 494 | |
| 495 | extern void mrs_ecsfb_reset_association_info(MRS_SIM_INDEX sim_index); |
| 496 | |
| 497 | extern void mrs_fast_roaming_set_mcc(MRS_SIM_INDEX sim_index, mrs_nas_mcc_struct *mrs_nas_mcc); |
| 498 | |
| 499 | extern void mrs_fast_roaming_get_mcc(MRS_SIM_INDEX sim_index, mrs_as_mcc_struct *mrs_as_mcc_ptr); |
| 500 | /* used for setting and getting 4G cell id when CSFB to 2G by PLMN search scenario */ |
| 501 | extern void mrs_ecsfb_set_4g_cell_info(MRS_SIM_INDEX sim_index, kal_uint32 eas_cell_id); |
| 502 | extern kal_uint32 mrs_ecsfb_get_4g_cell_info(MRS_SIM_INDEX sim_index); |
| 503 | |
| 504 | extern kal_uint8 mrs_ecsfb_get_cur_2g_cell_association(MRS_SIM_INDEX sim_index, kal_uint32 *eas_cell_id, mrs_gas_cell_inf_struct *gas_cell_inf); |
| 505 | /* Fast mode switch. */ |
| 506 | extern void mrs_gas_fast_mode_switch_set_status(MRS_SIM_INDEX sim_index, mrs_gas_fast_mode_switch_status_enum status); |
| 507 | extern kal_bool mrs_gas_fast_mode_switch_check_allowed(MRS_SIM_INDEX sim_index, const kal_uint32 num_plmn, plmn_id_struct* plmn_id_ptr); |
| 508 | extern void mrs_gas_fast_mode_switch_set_plmn_id(MRS_SIM_INDEX sim_index, plmn_id_struct* plmn); |
| 509 | extern void mrs_gas_fast_mode_switch_set_arfcn(MRS_SIM_INDEX sim_index, kal_uint16 arfcn); |
| 510 | extern void mrs_gas_fast_mode_switch_set_bsic(MRS_SIM_INDEX sim_index, kal_uint8 bsic); |
| 511 | extern kal_uint16 mrs_gas_fast_mode_switch_get_arfcn(MRS_SIM_INDEX sim_index); |
| 512 | extern kal_uint8 mrs_gas_fast_mode_switch_get_bsic(MRS_SIM_INDEX sim_index); |
| 513 | extern kal_uint8 mrs_gas_fast_mode_switch_get_si_bitmap(MRS_SIM_INDEX sim_index); |
| 514 | extern kal_uint8* mrs_gas_fast_mode_switch_get_si_raw_data(MRS_SIM_INDEX sim_index, kal_uint8 si_type); |
| 515 | extern void mrs_gas_fast_mode_switch_store_essential_si(MRS_SIM_INDEX sim_index, bit_stream* bit_stream_ptr, kal_uint8 si_bitmap_pos); |
| 516 | extern void mrs_gas_fast_mode_switch_clean_stored_essential_si(MRS_SIM_INDEX sim_index, kal_uint8 si_bitmap_pos); |
| 517 | /* Fast mode switch. */ |
| 518 | |
| 519 | /* Support VzW: VZ_REQ_LTEDATA_38498 (MT6291 Verizon Jun-2015 baseline). */ |
| 520 | extern void mrs_nas_set_roaming_status(MRS_SIM_INDEX sim_index, kal_bool is_roaming); |
| 521 | extern kal_bool mrs_nas_get_roaming_status(MRS_SIM_INDEX sim_index); |
| 522 | /* Support VzW: VZ_REQ_LTEDATA_38498 (MT6291 Verizon Jun-2015 baseline). */ |
| 523 | |
| 524 | //#ifdef __LTE_R11__ |
| 525 | void mrs_ltea_son_set_reest_proc_status(MRS_SIM_INDEX sim_index, kal_bool lte_reest_ir_search); |
| 526 | void mrs_ltea_son_set_selected_cell(MRS_SIM_INDEX sim_index, kal_uint32 selected_arfcn, kal_uint16 selected_pci); |
| 527 | void mrs_ltea_son_reset_selected_cell(MRS_SIM_INDEX sim_index); |
| 528 | kal_bool mrs_ltea_son_get_selected_cell(MRS_SIM_INDEX sim_index, kal_uint32 *selected_arfcn_p, kal_uint16 *selected_pci_p); |
| 529 | //#endif |
| 530 | |
| 531 | //L1 call back function |
| 532 | extern kal_uint8 mrs_l1_query_ps_c2k_sim_config(); |
| 533 | |
| 534 | /* Common TFO API functions for all RATs */ |
| 535 | void mrs_tfo_cell_list_clear(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat_type); |
| 536 | |
| 537 | /* EAS specific TFO API functions */ |
| 538 | void mrs_tfo_cell_list_add_eas_cell(MRS_SIM_INDEX sim_index, EARFCN earfcn, kal_uint16 pci, kal_uint16 validity_time, kal_uint8 offset); |
| 539 | kal_uint8 mrs_tfo_cell_list_eas_cell_offset_get(MRS_SIM_INDEX sim_index, EARFCN earfcn, kal_uint16 pci); |
| 540 | |
| 541 | #ifdef __CHANNEL_LOCK__ |
| 542 | /******************************************************************************* |
| 543 | Description: |
| 544 | This function is used to write channel lock information to MRS. |
| 545 | |
| 546 | Parameters: |
| 547 | ch_lock_info: Pointer to channel lock information to be stored |
| 548 | |
| 549 | Return Value: None |
| 550 | *******************************************************************************/ |
| 551 | kal_bool mrs_ch_lock_info_set( MRS_SIM_INDEX sim_index, const mrs_ch_lock_info_struct* p_ch_lock_info); |
| 552 | |
| 553 | /******************************************************************************* |
| 554 | Description: |
| 555 | This function is used to read channel lock information from MRS. |
| 556 | |
| 557 | Parameters: |
| 558 | ch_lock_info: Pointer to where channel lock information shall be copied |
| 559 | |
| 560 | Return Value: None |
| 561 | *******************************************************************************/ |
| 562 | void mrs_ch_lock_info_get( MRS_SIM_INDEX sim_index, mrs_ch_lock_info_struct* p_ch_lock_info ); |
| 563 | |
| 564 | /******************************************************************************* |
| 565 | Description: |
| 566 | This function is used to read channel lock state from MRS. |
| 567 | |
| 568 | Parameters: None |
| 569 | |
| 570 | Return Value: Channel lock state |
| 571 | *******************************************************************************/ |
| 572 | MRS_CH_LOCK_STATE mrs_ch_lock_state_get(MRS_SIM_INDEX sim_index); |
| 573 | |
| 574 | /******************************************************************************* |
| 575 | Description: |
| 576 | This function is used to read channel lock mode from MRS. |
| 577 | |
| 578 | Parameters: None |
| 579 | |
| 580 | Return Value: Channel lock mode |
| 581 | *******************************************************************************/ |
| 582 | kal_uint8 mrs_ch_lock_mode_get(MRS_SIM_INDEX sim_index); |
| 583 | |
| 584 | |
| 585 | #ifdef __WHITE_CELL_LOCK__ |
| 586 | /******************************************************************************* |
| 587 | Description: |
| 588 | This function is used to write white cell lock information to MRS. |
| 589 | |
| 590 | Parameters: |
| 591 | ch_lock_info: Pointer to channel lock information to be stored |
| 592 | |
| 593 | Return Value: kal_bool |
| 594 | *******************************************************************************/ |
| 595 | kal_bool mrs_wh_cell_lock_info_set(MRS_SIM_INDEX sim_index, const mrs_ch_lock_info_struct* p_ch_lock_info); |
| 596 | |
| 597 | /******************************************************************************* |
| 598 | Description: |
| 599 | This function is used to read white cell lock state from MRS. |
| 600 | |
| 601 | Parameters: None |
| 602 | |
| 603 | Return Value: White cell lock state |
| 604 | *******************************************************************************/ |
| 605 | kal_uint8 mrs_wh_cell_lock_state_get(MRS_SIM_INDEX sim_index); |
| 606 | #endif /* __WHITE_CELL_LOCK__ */ |
| 607 | |
| 608 | #endif /* __CHANNEL_LOCK */ |
| 609 | /*the following 2 mrs functions are provided for T + W feature*/ |
| 610 | extern void mrs_update_gas_system_mode(MRS_SIM_INDEX sim_index,kal_uint8 system_mode); |
| 611 | |
| 612 | #ifdef __GAS_STORED_SI_FEAT__ |
| 613 | void mrs_gas_update_gsm_storedSI_list(MRS_SIM_INDEX sim_index, rrm_gsm_storedSI_struct *gas_candidate_list); |
| 614 | void mrs_gas_read_gsm_storedSI_list(MRS_SIM_INDEX sim_index, rrm_gsm_storedSI_struct *gas_candidate_list); |
| 615 | #endif |
| 616 | extern kal_uint8 mrs_get_gas_system_mode(MRS_SIM_INDEX sim_index); |
| 617 | |
| 618 | #ifdef __CHR_AB_INFO__ |
| 619 | //Huawei Index8 requirement: Inidication of reason for Not moving to 4G. |
| 620 | |
| 621 | /******************************************************************************* |
| 622 | Description: |
| 623 | This function NAS is used to set nas reason for not moving to LTE. |
| 624 | |
| 625 | Parameters: sim_index |
| 626 | |
| 627 | Return Value: none |
| 628 | *******************************************************************************/ |
| 629 | void mrs_set_nas_reason_not_moving_to_lte(MRS_SIM_INDEX sim_index, nas_reason_not_moving_to_lte_enum nas_reason); |
| 630 | |
| 631 | /******************************************************************************* |
| 632 | Description: |
| 633 | This function AS is used to set as reason for not moving to LTE. |
| 634 | |
| 635 | Parameters: sim_index |
| 636 | |
| 637 | Return Value: none |
| 638 | *******************************************************************************/ |
| 639 | void mrs_set_as_reason_not_moving_to_lte(MRS_SIM_INDEX sim_index, as_reason_not_moving_to_lte_enum as_reason); |
| 640 | |
| 641 | |
| 642 | /******************************************************************************* |
| 643 | Description: |
| 644 | This function L4C is used to get both nas and as reason for not moving to LTE. |
| 645 | |
| 646 | Parameters: sim_index |
| 647 | |
| 648 | Return Value: If returns KAL_TRUE mean as reason is valid and L4C has to indicate info to AP. |
| 649 | If return KAL_FALSE mean CSFB call is ongoing and L4C no need to idicate info to AP. |
| 650 | ps_reason: contains both NAS and AS reason for not moving LTE |
| 651 | *******************************************************************************/ |
| 652 | kal_bool mrs_get_ps_reason_not_moving_to_lte(MRS_SIM_INDEX sim_index, ps_reason_not_moving_to_lte_struct *ps_reason); |
| 653 | #endif /* __CHR_AB_INFO__ */ |
| 654 | |
| 655 | MRS_RAT_MODE_TYPE mrs_translate_nvram_rat_mode_to_mrs(const nvram_rat_enum nvm_rat); |
| 656 | nvram_rat_enum mrs_translate_mrs_rat_mode_to_nvram(const MRS_RAT_MODE_TYPE mrs_rat); |
| 657 | |
| 658 | //--------------NR-AFR API's------------------- |
| 659 | void mrs_afr_nr_init(MRS_SIM_INDEX sim_index); |
| 660 | |
| 661 | extern void mrs_afr_clear_all_afr_target_rat(MRS_SIM_INDEX sim_index); |
| 662 | |
| 663 | #ifdef __NR_RAT__ |
| 664 | extern void mrs_afr_reset_nr_priority_freq_list_from_lte(MRS_SIM_INDEX sim_index); |
| 665 | |
| 666 | extern void mrs_afr_insert_nr_priority_freq_list_from_lte(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_list_struct *afr_nr_freq_list); |
| 667 | |
| 668 | extern void mrs_afr_get_nr_priority_freq_list_from_lte(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_list_struct *afr_nr_freq_list); |
| 669 | #endif /* __NR_RAT__ */ |
| 670 | |
| 671 | extern void mrs_afr_reset_nr_freq_list(MRS_SIM_INDEX sim_index); |
| 672 | |
| 673 | extern void mrs_afr_insert_nr_freq_list(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_list_struct *afr_nr_freq_list); |
| 674 | |
| 675 | extern void mrs_afr_get_nr_freq_list(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_list_struct *afr_nr_freq_list); |
| 676 | |
| 677 | extern void mrs_afr_set_nr_serving_freq_info(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_info_struct nr_freq_info); |
| 678 | |
| 679 | extern void mrs_afr_get_nr_serving_freq_info(MRS_SIM_INDEX sim_index, mrs_afr_nr_freq_info_struct *p_nr_freq_info); |
| 680 | |
| 681 | void mrs_set_afr_enhancement_status(MRS_SIM_INDEX sim_index, afr_enhancement_enum enhancement_item, kal_bool activate); |
| 682 | |
| 683 | void mrs_set_afr_enhancement_status_in_test_mode(MRS_SIM_INDEX sim_index, afr_enhancement_enum enhancement_item, kal_bool activate); |
| 684 | |
| 685 | extern kal_bool mrs_get_afr_support_status(MRS_SIM_INDEX sim_index, kal_uint16 bitmask); |
| 686 | |
| 687 | kal_bool mrs_get_afr_enhancement_status(MRS_SIM_INDEX sim_index, afr_enhancement_enum enhancement_item); |
| 688 | |
| 689 | void mrs_afr_nas_update_service_table_start(MRS_SIM_INDEX sim_index, afr_service_enum service, MRS_RAT_MODE_TYPE target_rat); |
| 690 | |
| 691 | void mrs_afr_nas_update_service_table_end(MRS_SIM_INDEX sim_index, afr_service_enum service); |
| 692 | |
| 693 | void mrs_afr_reset_table_by_service(MRS_SIM_INDEX sim_index, afr_service_enum service); |
| 694 | |
| 695 | void mrs_afr_rat_fallback_triggerred(MRS_SIM_INDEX sim_index, afr_pre_cond_proc_enum procedure); |
| 696 | |
| 697 | void mrs_afr_update_by_high_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat); |
| 698 | |
| 699 | void mrs_afr_fail_update_by_low_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat); |
| 700 | |
| 701 | kal_uint32 mrs_afr_as_determine_afr_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE rat, kal_bool skip_voice_status); |
| 702 | |
| 703 | kal_uint32 mrs_afr_get_afr_to_4g_timer(MRS_SIM_INDEX sim_index); |
| 704 | void mrs_afr_set_afr_to_4g_timer(MRS_SIM_INDEX sim_index, kal_uint32 afr_to_4g_timer_val); |
| 705 | |
| 706 | kal_uint32 mrs_afr_get_afr_to_5g_timer(MRS_SIM_INDEX sim_index); |
| 707 | void mrs_afr_set_afr_to_5g_timer(MRS_SIM_INDEX sim_index, kal_uint32 afr_to_5g_timer_val); |
| 708 | |
| 709 | void mrs_afr_update_strict_constrain_triggered_by_high_rat(MRS_SIM_INDEX sim_index, MRS_RAT_MODE_TYPE high_rat); |
| 710 | |
| 711 | kal_bool mrs_afr_get_4g_csfb_status(MRS_SIM_INDEX sim_index); |
| 712 | kal_bool mrs_afr_get_5g_epsfb_status(MRS_SIM_INDEX sim_index); |
| 713 | //--------------NR-AFR------------------- |
| 714 | |
| 715 | /******************************************************************************* |
| 716 | Description: |
| 717 | This function is used to count RAT change for IRAT PINGPONG detection. |
| 718 | |
| 719 | Parameters: sim_index, irat_type |
| 720 | |
| 721 | Return Value: none |
| 722 | *******************************************************************************/ |
| 723 | extern void mrs_set_irat_pingpong_info(MRS_SIM_INDEX sim_index, mrs_irat_pingpong_type_enum irat_type); |
| 724 | /******************************************************************************* |
| 725 | Description: |
| 726 | This function is used to judge IRAT PINGPONG by count RAT change times during given period. |
| 727 | |
| 728 | Parameters: sim_index, irat_type, duration (unit: seconds), threshold (MAX: 8) |
| 729 | |
| 730 | Return Value: |
| 731 | TRUE: IRAT PINGPONG detected |
| 732 | FALSE: there's no PINGPONG or the corresponding SBP is not ON |
| 733 | *******************************************************************************/ |
| 734 | extern kal_bool mrs_query_irat_pingpong_status(MRS_SIM_INDEX sim_index, mrs_irat_pingpong_type_enum irat_type,kal_uint32 duration, kal_uint8 pingpong_thres); |
| 735 | |
| 736 | |
| 737 | // DR-DSDS/DSDA APIs |
| 738 | /** |
| 739 | * @brief This function is used by each RRC to check if the indicated frequency could be searched without gap with peer SIM connection ongoing. |
| 740 | * @param[in] sim_index |
| 741 | * @param[in] rat |
| 742 | * @param[in] band |
| 743 | * @param[in] arfcn: For RAT_NR, it means NRARFCN. For LTE, it means EARFCN |
| 744 | * @return KAL_TRUE: if search w/o GAP is supported. KAL_FALSE: if search w/o GAP is not supported |
| 745 | */ |
| 746 | kal_bool mrs_is_freq_search_allowed_with_peer_sim_connection ( |
| 747 | MRS_SIM_INDEX sim_index, |
| 748 | MRS_RAT_MODE_TYPE rat, |
| 749 | kal_uint16 band, |
| 750 | kal_uint32 arfcn |
| 751 | ); |
| 752 | |
| 753 | /** |
| 754 | * @brief This function is if there are more than one SIM card are inserted. |
| 755 | * @param[in] none |
| 756 | * @return KAL_TRUE: if more than one SIM card are inserted. KAL_FALSE: if no or only one SIM card is inserted. |
| 757 | */ |
| 758 | kal_bool mrs_is_multi_sim_inserted(void); |
| 759 | |
| 760 | /** |
| 761 | * @brief This function is to check whether DSDA is supported. |
| 762 | * @param[in] p_cell_cc_info: check DSDA support status by p_cell_cc_info and stored peer SIM cell cc info. If p_cell_cc_info is NULL, check DSDA status by all stored cell cc info. |
| 763 | * @param[in] is_test_rfdb_query: If current SIM need to check gemini_mode by using mrs_gemini_ie_check_cell_cc_config_db |
| 764 | * @param[in] ps_id: current sim_index. MRS only use this parameter when is_test_rfdb_query is TRUE. |
| 765 | * @return mrs_gemini_mode_enum: If DSDA support is returned, DR-DSDS is also supported. If DR-DSDS is returned, DSDA is not supported. |
| 766 | */ |
| 767 | mrs_gemini_mode_enum mrs_query_support_gemini_mode(mrs_cell_cc_info_struct *p_cell_cc_info, kal_bool is_test_rfdb_query, protocol_id_enum ps_id); |
| 768 | |
| 769 | void mrs_set_test_rfdb_to_config_rfdb(protocol_id_enum sim_index); |
| 770 | |
| 771 | rat_enum mrs_get_active_rat_for_dr_dsds_dsda(protocol_id_enum ps_id); |
| 772 | |
| 773 | protocol_id_enum mrs_get_peer_sim_index_for_dr_dsds_dsda(protocol_id_enum ps_id); |
| 774 | |
| 775 | kal_bool mrs_take_channel_protect_sem(protocol_id_enum ps_id, rat_enum rat); |
| 776 | |
| 777 | void mrs_give_channel_protect_sem(protocol_id_enum ps_id, rat_enum rat); |
| 778 | |
| 779 | /******************************************************************************* |
| 780 | Description: |
| 781 | This function is used to query if a specific feature is turned on. |
| 782 | For inter-RAT or cross module features that needs to be triggered by the other modules, this API could be applied. |
| 783 | |
| 784 | Parameters: |
| 785 | [sim_index] SIM index |
| 786 | [feature_enum] The enum value of the querying feature |
| 787 | |
| 788 | Return Value: |
| 789 | TRUE: feature ON |
| 790 | FALSE: feature OFF |
| 791 | *******************************************************************************/ |
| 792 | kal_bool mrs_get_feature_status_by_sim(MRS_SIM_INDEX sim_index, mrs_feature_enum feature_enum); |
| 793 | |
| 794 | /******************************************************************************* |
| 795 | Description: |
| 796 | This function is used to set if a specific feature is turned on. |
| 797 | For inter-RAT or cross module features that needs to be executed by the other modules, this API could be applied. |
| 798 | |
| 799 | Parameters: |
| 800 | [sim_index] SIM index |
| 801 | [feature_enum] The enum value of the querying feature |
| 802 | [value] The staus we're going to set for this feature (TRUE: ON / FALSE: OFF) |
| 803 | |
| 804 | Return Value: void |
| 805 | *******************************************************************************/ |
| 806 | void mrs_set_feature_status_by_sim(MRS_SIM_INDEX sim_index, mrs_feature_enum feature_enum, kal_bool status); |
| 807 | |
| 808 | kal_bool mrs_check_disable_fast_plmn_list(MRS_SIM_INDEX sim_index); |
| 809 | |
| 810 | void mrs_l4c_send_capability_update_ind(MRS_SIM_INDEX sim_index); |
| 811 | void mrs_save_previous_region_to_nvram(void); |
| 812 | kal_bool mrs_umts_update_detected_band_for_plmn_region(mrs_plmn_id plmn_id, kal_uint32 bandIDBmp); |
| 813 | kal_bool mrs_gsm_update_detected_band_for_plmn_region(mrs_plmn_id plmn_id, kal_uint8 bandIDBmp); |
| 814 | kal_bool mrs_lte_update_detected_band_for_plmn_region( mrs_plmn_id plmn_id, kal_uint8 *bandID); |
| 815 | kal_bool mrs_get_all_the_lte_supported_bands_per_region(mrs_plmn_id plmn_id, kal_uint8 *bandID); |
| 816 | void mrs_copy_mrs_context_to_nvram(nvram_ef_band_setting_per_region_info_record_struct *pnvram_band); |
| 817 | kal_bool mrs_get_mcc_region_umts_bands(mrs_plmn_id plmn_id, kal_uint32 *UBandBitmask_FDD); |
| 818 | kal_bool mrs_get_mcc_region_gsm_bands(mrs_plmn_id plmn_id, kal_uint8 *gsmBandBitmask); |
| 819 | void mrs_as_band_setting_update_by_plmn( MRS_SIM_INDEX sim_index, function_caller_id_enum caller_id, mrs_plmn_id* hplmn, mrs_plmn_id_list* cplmn); |
| 820 | |
| 821 | /******************************************************************************* |
| 822 | Description: |
| 823 | This function is used to get operator ID for the PLMN. |
| 824 | |
| 825 | Parameters: |
| 826 | [operator_enum] operator id (input) |
| 827 | [p_plmn] Pointer to PLMN code (input) |
| 828 | |
| 829 | Return Value: |
| 830 | TRUE: plmn match operator id |
| 831 | FALSE: plmn does not belong to this operator |
| 832 | |
| 833 | *******************************************************************************/ |
| 834 | kal_bool mrs_check_if_plmn_match_operator_id(operator_id_enum operator_enum, const plmn_id_struct *p_plmn); |
| 835 | |
| 836 | /******************************************************************************* |
| 837 | Description: |
| 838 | This function is used to get operator ID for the PLMN. |
| 839 | |
| 840 | Parameters: |
| 841 | [p_plmn] Pointer to PLMN code |
| 842 | |
| 843 | Return Value: Operator ID |
| 844 | *******************************************************************************/ |
| 845 | operator_id_enum mrs_get_operator_id_of_plmn(const plmn_id_struct *p_plmn); |
| 846 | |
| 847 | /******************************************************************************* |
| 848 | Description: |
| 849 | This function is called during MRS task init, to check for OTA Update |
| 850 | |
| 851 | Parameters: |
| 852 | None |
| 853 | |
| 854 | Return Value: void |
| 855 | *******************************************************************************/ |
| 856 | extern void mrs_set_ota_update_during_init(); |
| 857 | |
| 858 | /******************************************************************************* |
| 859 | Description: |
| 860 | This function is used to reset the NVRAM values to through OTA during Init. |
| 861 | |
| 862 | Parameters: |
| 863 | LID Name and SIZE |
| 864 | |
| 865 | Return Value: void |
| 866 | *******************************************************************************/ |
| 867 | void mrs_update_nvram_with_ota_values(kal_uint16 nvram_id, kal_uint32 size); |
| 868 | |
| 869 | /******************************************************************************* |
| 870 | Description: |
| 871 | This function is used to check SBP bit state. |
| 872 | |
| 873 | Parameters: |
| 874 | [feature] Feature whose SBP bit is checked |
| 875 | [sim_index] MRS SIM index |
| 876 | |
| 877 | Return Value: |
| 878 | KAL_TRUE: if feature is turned on |
| 879 | KAL_FALSE: if feature is turned off |
| 880 | *******************************************************************************/ |
| 881 | kal_bool mrs_sbp_query_md_feature_by_ps(sbp_md_feature_enum feature, MRS_SIM_INDEX sim_index); |
| 882 | |
| 883 | /******************************************************************************* |
| 884 | Description: |
| 885 | This function compares two PLMNs. |
| 886 | |
| 887 | Parameters: |
| 888 | [ms_plmn_id] PLMN ID |
| 889 | [bcch_plmn_id] PLMN ID |
| 890 | |
| 891 | Return Value: |
| 892 | KAL_TRUE: PLMNs are the same |
| 893 | KAL_FALSE: PLMNs are different |
| 894 | *******************************************************************************/ |
| 895 | kal_bool mrs_is_plmn_id_match_with_bcch_plmn_id(const plmn_id_struct *ms_plmn_id, const plmn_id_struct *bcch_plmn_id); |
| 896 | |
| 897 | #endif /* _MRS_UTILITY_H */ |