rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [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_eas_capability.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------------------------------------------------------- |
| 43 | * Multimode |
| 44 | * |
| 45 | * Description: |
| 46 | * -------------------------------------------------------- |
| 47 | * The EAS capability stored in MRS context. |
| 48 | * |
| 49 | * Author: |
| 50 | * -------------------------------------------------------- |
| 51 | * ------- |
| 52 | * |
| 53 | * -------------------------------------------------------- |
| 54 | * $Log$ |
| 55 | * |
| 56 | * 05 13 2021 mandy.zheng |
| 57 | * [MOLY00627894] [Blocking][MT6885][Petrus][TMO-US][MP7 Excluded][q0][Lab IOT][Ericsson-Nokia][VoNR]VoNR PSHO to LTE failed because no B2 MR from UE |
| 58 | * R3-interface. |
| 59 | * |
| 60 | * 10 20 2020 yi-han.chung |
| 61 | * [MOLY00575501] [Xiaomi][J22][softbank] b41 ?¬q»Ý¨D |
| 62 | * |
| 63 | * SBM B41 partial band - MRS EAS |
| 64 | * |
| 65 | * 10 12 2020 gibran.chang |
| 66 | * [MOLY00571879] [Gen98][MT6880][Colgin][Internal][Machine][HQ][5GMM][RTD Test][Protocol Test System][General PTS] Sometimes UE is not able to camp on machine cell when two same EARFCN are present with different PLMN ID |
| 67 | * Todo#67 Check all PLMN in searched sib cell |
| 68 | * |
| 69 | * 10 01 2020 tero.miettinen |
| 70 | * [MOLY00560032] ????SA??? |
| 71 | * MRS - PLMN based 5G band disabling. |
| 72 | * |
| 73 | * 09 22 2020 mandy.zheng |
| 74 | * [MOLY00572471] [MakeFile] [Modify Common Makefile Rules] commincdirs_def.mak. |
| 75 | * |
| 76 | * Fix Macro |
| 77 | * |
| 78 | * 09 08 2020 mandy.zheng |
| 79 | * [MOLY00565038] ¡i19420¡j¡iES¡j ¡iMovistar¡j¡iOperator feedback¡j¡iIOT3°e?¥²¸Ñ¡j¡iP2¡j¡iFUNC¡j¡i5G¡jSome Network can not handle LTE CA report, following ALPS05267036 |
| 80 | * back out. |
| 81 | * |
| 82 | * 06 29 2020 yenchih.yang |
| 83 | * [MOLY00536627] [Gen97][MP6 feature] ?5G NSA > SA preferred? network search |
| 84 | * |
| 85 | * . |
| 86 | * |
| 87 | * 06 01 2020 yi-han.chung |
| 88 | * [MOLY00527121] LGE/FCC requirement for Band 41 AMPR |
| 89 | * |
| 90 | * ERRC/MRS |
| 91 | * |
| 92 | * 04 29 2020 plum.tseng |
| 93 | * [MOLY00515893] [HCR][MT6875][Margaux][Q0][MP5][R3][SQC][HQ][MTBF][Lab][Ericsson][ErrorTimes:4][ASSERT] file:mcu/protocol/lte_sec/errc/common/src/errc_asn1_wrapper.c line:159 |
| 94 | * |
| 95 | * [VMOLY_R3] UE capability restriction. (and recover enter connected mode) |
| 96 | * |
| 97 | * 02 07 2020 plum.tseng |
| 98 | * [MOLY00496701] [VMOLY][ERRC&NRRC][Capability] Gemini status sync between ERRC&NRRC |
| 99 | * |
| 100 | * 12 09 2019 ke-ting.lee |
| 101 | * [MOLY00458503] [CODE SYNC][MH4P-POS] patch request about ALPS04309026- RCM/MRS_EAS |
| 102 | * |
| 103 | * 12 02 2019 yung-chun.chang |
| 104 | * [MOLY00462472] [Gen97][95.OPPO patch back to VMOLY]¡i¤G?°e?¥²¸Ñ¡jFast return to 4G should be disabled on UE |
| 105 | * |
| 106 | * . |
| 107 | * |
| 108 | * 10 30 2019 mandy.zheng |
| 109 | * [MOLY00455171] [Remote FT][MT6885][Petrus][MP1][SQC][MSL][RFT][Test Plan][FDD][LWTGC][4GMM][Static][NCT] DUT does not camps on 4G network when 5G is selected as preferred network type |
| 110 | * |
| 111 | * . |
| 112 | * |
| 113 | * 09 25 2019 mandy.zheng |
| 114 | * [MOLY00443402] [Gen97]2019 Jun CR - Clarification on SA fallback BC support |
| 115 | * |
| 116 | * -[ERRC]LTE SA band combination derived from ENDC support check API. |
| 117 | * |
| 118 | * 09 23 2019 yung-chun.chang |
| 119 | * [MOLY00440687] VMOLY code sync CR |
| 120 | * |
| 121 | * 1. CA TBL V2 main part |
| 122 | * 2. fix rf_param_v1390 not reset problem |
| 123 | * |
| 124 | * 08 21 2019 ke-ting.lee |
| 125 | * [MOLY00431023] [ERRC] VMOLY code sync for VMOLY (MOLY00401482) |
| 126 | * -iQi LT29 UE category |
| 127 | * |
| 128 | * 06 13 2019 plum.tseng |
| 129 | * [MOLY00413522] [VMOLY][Code Sync][ERRC][RCM] CA HPUE class B/C clarify |
| 130 | * |
| 131 | * 03 28 2019 morton.lin |
| 132 | * [MOLY00393767] [MT6297] TS 36.331 2018 December baseline migration |
| 133 | * [ERRC][RCM] 2018DEC version upgrading (MPD) |
| 134 | * |
| 135 | * 03 14 2019 plum.tseng |
| 136 | * [MOLY00391178] [MCF][VMOLY][ERRC] custom disable band feature with MCF |
| 137 | * |
| 138 | * [MCF][COSTOM_DISABLE_BAND][RCM & MRS]. |
| 139 | * |
| 140 | * 01 21 2019 plum.tseng |
| 141 | * [MOLY00380403] Move XXX_PLMN_END definition from custom file to MRS_EAS |
| 142 | * |
| 143 | * [RCM&MRS] . |
| 144 | * |
| 145 | * 01 09 2019 sabrina.hsu |
| 146 | * [MOLY00377618] [VMOLY] RF partial band API for single band query change |
| 147 | * [MRS][EAS] change to use new API to get single band partial band parameter. |
| 148 | * |
| 149 | * 01 08 2019 sabrina.hsu |
| 150 | * [MOLY00377618] [VMOLY] RF partial band API for single band query change |
| 151 | * rollback for change header file. |
| 152 | * |
| 153 | * 12 27 2018 morton.lin |
| 154 | * [MOLY00375221] [Gen97][NSA] UE Capability development - Feature Set |
| 155 | * [ERRC][RCM] EUTRA Feature Set development |
| 156 | * |
| 157 | * 12 10 2018 morton.lin |
| 158 | * [MOLY00371624] [VMOLY][ERRC] provide API for NRRC to calculate P_compensation for LTE neighbor cells |
| 159 | * [ERRC][RCM][MRS] Pcompensation retrieval interface for 5G4 IRCR development |
| 160 | * |
| 161 | * 10 29 2018 sabrina.hsu |
| 162 | * [MOLY00345267] [6297][ERRC][RCM] LTE new feature |
| 163 | * [RCM] |
| 164 | * 1. LTE new custom CA report way by EL1D |
| 165 | * 2. LTE CA/partial band check API interface |
| 166 | * 3. F30 ASN feature merge |
| 167 | * |
| 168 | * 08 20 2018 plum.tseng |
| 169 | * [MOLY00346737] [ERRC][RCM] B41C HPUE |
| 170 | * |
| 171 | * [VMOLY] (OA) |
| 172 | * |
| 173 | * 08 17 2018 yenchih.yang |
| 174 | * [MOLY00346658] [VMOLY] Gen97 ERRC-CEL modifications |
| 175 | * |
| 176 | * 1) ERRC-CEL ENDC support. |
| 177 | * 2) MRS ERRC Up to Down Search Information. |
| 178 | * |
| 179 | * 07 19 2018 ke-ting.lee |
| 180 | * [MOLY00322830] [UMOLYE][ERRC] source code release |
| 181 | * - mrs eas |
| 182 | * |
| 183 | * 07 18 2018 plum.tseng |
| 184 | * [MOLY00338708] �i�t??�w�ʡjAssert fail: errc_cel_iscells.c 2108 - ERRC |
| 185 | * |
| 186 | * Fix reset part in band setting update by hplmn and cplmn. |
| 187 | * |
| 188 | * 07 03 2018 yung-chun.chang |
| 189 | * [MOLY00334670] [CV5a] block specific LTE bands for particular roaming plmns |
| 190 | * rcm/mrs part. |
| 191 | * |
| 192 | * 03 09 2018 morton.lin |
| 193 | * [MOLY00309570] [Gen93/95][UMOLYE][ERRC][RCM] WWLTEDB table movement for better customization |
| 194 | * 1. LTEBand and CAComb table movement |
| 195 | * 2. Introduce LTEBandExcl |
| 196 | * 3. Add new DL only bands: B75 & B76 |
| 197 | * |
| 198 | * 01 05 2018 otto.liu |
| 199 | * [MOLY00298065] [MT6293] VZW feature developement & patch back |
| 200 | * |
| 201 | * . |
| 202 | * |
| 203 | * 12 11 2017 morton.lin |
| 204 | * [MOLY00295077] [Gen93][ERRC][RCM] LTE support band and CA combination customization re-arch |
| 205 | * Common IF and MRS part (LR12A.R3.MP) (Not in V-List) |
| 206 | * |
| 207 | * 11 29 2017 yung-chun.chang |
| 208 | * [MOLY00292082] [Gen93][TMO] 2G disable with ecc enable |
| 209 | * rcm oa part |
| 210 | * |
| 211 | * 10 31 2017 otto.liu |
| 212 | * [MOLY00285011] ?iGIONEE_MODEM?j?iMT6755?j?i17G01?j ???BAND 41 |
| 213 | * |
| 214 | * . |
| 215 | * |
| 216 | * 10 31 2017 otto.liu |
| 217 | * [MOLY00285011] ?iGIONEE_MODEM?j?iMT6755?j?i17G01?j ???BAND 41 |
| 218 | * |
| 219 | * 10 13 2017 otto.liu |
| 220 | * [MOLY00283132] [Gen93] R3 US operator customization |
| 221 | * |
| 222 | * . |
| 223 | * |
| 224 | * 09 14 2017 otto.liu |
| 225 | * [MOLY00277983] [Market]��???��?TDD LTE�I?�U???�qFDD LTE band ��] |
| 226 | * |
| 227 | * OPPO disable band according to SIM and plmn |
| 228 | * |
| 229 | * 08 24 2017 morton.lin |
| 230 | * [MOLY00273532] [MT6763][Bianco][N1][in-FTA][4G PCT][Anritsu][HQ][E04][8.2.1.5] |
| 231 | * Add new extended version for MRS EAS APIs to reduce trace print (UMOLYA) |
| 232 | * |
| 233 | * 07 28 2017 morton.lin |
| 234 | * [MOLY00266852] [Bianco/Zion] fre sw check-in |
| 235 | * [MRS] B71 SW phase in (UMOLYA) |
| 236 | * |
| 237 | * 07 06 2017 morton.lin |
| 238 | * [MOLY00261305] [Gen93] B71 development |
| 239 | * MRS and NVRAM phase in |
| 240 | * |
| 241 | * 04 16 2017 menghau.wu |
| 242 | * [MOLY00241464] [MT6293]Code sync from LR12 (W15, phase 21)- bug only |
| 243 | * UMOLY CR : [MOLY00209939] [ERRC][CEL][LCEL] L+L |
| 244 | * UMOLY CL : 3733883, [MRS] L+L, clear black cell bug fix. |
| 245 | * |
| 246 | * 04 05 2017 dennis.weng |
| 247 | * [MOLY00238929] [BIANCO][MT6763][RDIT][PHONE][Overnight][HQ][MTBF][Lab][Ericsson]"[Fatal error(task)] err_code1:0x00000305 err_code2:0x888802C2 err_code3:0xCCCCCCCC" |
| 248 | * add API: mrs_eas_get_dl_earfcn_freq |
| 249 | * |
| 250 | * 03 14 2017 menghau.wu |
| 251 | * [MOLY00217129] [MT6293] code sync from UMOLY (Phase4) |
| 252 | * UMOLY CR : [MOLY00224474] [6291][MP3][Post MP] CU HST Patch - MRS and CUSTOM |
| 253 | * UMOLY CL : 3547100 |
| 254 | * |
| 255 | * 01 25 2017 menghau.wu |
| 256 | * [MOLY00217129] [MT6293] code sync from UMOLY (Phase4) |
| 257 | * UMOLY CR : [MOLY00223173] [6292][Gemini][L+L][Merge LR12][WCS/SE3/PS1~PS15] |
| 258 | * UMOLY CL : 3370203 |
| 259 | * |
| 260 | * 12 21 2016 menghau.wu |
| 261 | * [MOLY00217129] [MT6293] code sync from UMOLY (Phase4) |
| 262 | * UMOLY CR : [MOLY00210217] [MT6292] UE Capability preparation for Gen92 MP1 |
| 263 | * UMOLY CL : 3212767 |
| 264 | * |
| 265 | * 12 02 2016 adeline.chang |
| 266 | * [MOLY00214717] [6293] CHM modification for UT enhancement |
| 267 | * . |
| 268 | * |
| 269 | * 11 15 2016 menghau.wu |
| 270 | * [MOLY00213308] [6293] add MRS_EAS debug trace |
| 271 | * add MRS_EAS debug trace |
| 272 | * |
| 273 | * 11 10 2016 menghau.wu |
| 274 | * [MOLY00210784] [MT6293] code sync form UMOLY |
| 275 | * UMOLY CR : MOLY00209435 |
| 276 | * UMOLY CL : 3015617 |
| 277 | * |
| 278 | * 11 10 2016 menghau.wu |
| 279 | * [MOLY00210784] [MT6293] code sync form UMOLY |
| 280 | * UMOLY CR : MOLY00208743 |
| 281 | * UMOLY CL : 2997397 |
| 282 | * |
| 283 | * 11 09 2016 menghau.wu |
| 284 | * [MOLY00210784] [MT6293] code sync form UMOLY |
| 285 | * other parts of |
| 286 | * UMOLY CR : MOLY00200565 |
| 287 | * UMOLY CL : 2855909 |
| 288 | * |
| 289 | * 10 24 2016 menghau.wu |
| 290 | * [MOLY00208768] [MT6293] [B66] Band66 porting (ERRC part) |
| 291 | * UMOLY CL2892669 : Menghau's part |
| 292 | * |
| 293 | * 10 12 2016 menghau.wu |
| 294 | * [MOLY00207053] [MT6293] code sync form UMOLY |
| 295 | * UMOLY CR : [MOLY00188984] [ERRC][CEL] code sync for VIVO black cell |
| 296 | * UMOLY CL : 2577019 |
| 297 | * |
| 298 | * 09 26 2016 adeline.chang |
| 299 | * [MOLY00205093] [UMOLYA] merge CR from mw.hsu CBr |
| 300 | * . |
| 301 | * |
| 302 | * 09 13 2016 adeline.chang |
| 303 | * [MOLY00203230] [PS_DEV][6293] MRS critical section protect in mrs_eas_capability.c |
| 304 | * . |
| 305 | * |
| 306 | * 08 19 2016 hong-yuan.yang |
| 307 | * [MOLY00196550] [6293] ERRC CSR development |
| 308 | * |
| 309 | * . API replace -MRS_EAS_CAPABILITY.c |
| 310 | * |
| 311 | * 06 22 2016 maruco.tu |
| 312 | * [MOLY00185901] UMOLYA errc relevant latest code sync from UMOLY |
| 313 | * Help HY to integrate mrs_eas_capability.c/.h from UMOLY to UMOLYA |
| 314 | * |
| 315 | * 05 12 2016 morton.lin |
| 316 | * [MOLY00178939] [MT6797L]modem,md1:(MCU_L1CORE) [ASSERT] file:l1core/modem/el1/el1d/src/common/ldsp_err_chk_cm.c line:115 |
| 317 | * MT6797 setting correction (UMOLY) |
| 318 | * |
| 319 | * 03 18 2016 sabrina.hsu |
| 320 | * [MOLY00169952] [MT6292][FPGA][Phone Call][4G TDD][Normal][Sanity] Assert fail: errc_rcm_main.c 2700 - L4 |
| 321 | * remove R12 category extension for L4 CA icon query function |
| 322 | * |
| 323 | * 03 16 2016 ryan.ou |
| 324 | * [MOLY00159902] [ERRC][CEL] 2015 Q4 code sync from LR11 to UMOLY |
| 325 | * [MOLY00150744] [LTE-A] Limit device operation on partial band. |
| 326 | * |
| 327 | * 03 09 2016 sabrina.hsu |
| 328 | * [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY |
| 329 | * merge LR11 CL 1801342 [MOLY00148166]CT CA capability query support |
| 330 | * |
| 331 | * 02 17 2016 sabrina.hsu |
| 332 | * [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY |
| 333 | * AT+EPBSE |
| 334 | * |
| 335 | * 02 17 2016 sabrina.hsu |
| 336 | * [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY |
| 337 | * mrs/nvram/sbp merge |
| 338 | * |
| 339 | * 02 16 2016 nicky.chou |
| 340 | * [MOLY00160414] [ERRC][CONN] sync from LR11 to UMOLY |
| 341 | * [CL1929095][MOLY00154210] [MT6755][E2][GCF][Anritsu][4G][FDD][MP3][17.4.11.2][eMBMS][E01-E03] Fail on this case. |
| 342 | * |
| 343 | * 12 01 2015 sabrina.hsu |
| 344 | * [MOLY00151252] World Mode ID & Support Band collision check |
| 345 | * WMID band check. |
| 346 | * |
| 347 | * 10 12 2015 chi-chung.lin |
| 348 | * [MOLY00144274] [MOLY->UMOLY][MOLY00136067][SBM]New Feature : Partial Channel Bandwidth supported. |
| 349 | * . |
| 350 | * |
| 351 | * 10 06 2015 sabrina.hsu |
| 352 | * [MOLY00144311] [UMOLY][CEL][MRS] __RF_BYPASS__ option wrap modification for Elbrus DIQ/AIQ test |
| 353 | * remove chip option to enable __RF_BYPASS__ for ELbrus. |
| 354 | * |
| 355 | * 10 06 2015 chih-chien.lin |
| 356 | * [MOLY00132591] [ERRC][CEL]CMCC B38/B41 CA issue |
| 357 | * B38/41 CA Issue |
| 358 | * |
| 359 | * 09 21 2015 panu.peisa |
| 360 | * [MOLY00141214] DE6 code merge from LR11_VzW CBr to UMOLY trunk |
| 361 | * Integrated CL 1601909 from LR11_VzW CBr. VzW: Dynamic LTE band support when roaming in MRS |
| 362 | * |
| 363 | * 09 04 2015 roland.li |
| 364 | * [MOLY00139861] [MT6291][SBM] New Feature : Disable LTE B41 for roaming out side of Japan. |
| 365 | * . |
| 366 | * |
| 367 | * 08 20 2015 sabrina.hsu |
| 368 | * [MOLY00138312] [6292] UMOLY code sync |
| 369 | * disable #error check for ElBRUS build. |
| 370 | * |
| 371 | * 08 04 2015 chi-chung.lin |
| 372 | * [MOLY00133208] [RCM] Jade code revision |
| 373 | * . |
| 374 | * |
| 375 | * 06 01 2015 henry.lai |
| 376 | * [MOLY00092508] [MT6291][LTE-C2K] AS Inter RAT feature |
| 377 | * . |
| 378 | * |
| 379 | * 04 16 2015 doug.shih |
| 380 | * [MOLY00091463] [MT6291] ERRC RCM/MRS development |
| 381 | * 1. [CR1515] Network-requested CA Band Combination Capability Signalling |
| 382 | * 2. [CR1535] Introduction of UE capability for eMBMS reception on SCell and Non-Serving Cell |
| 383 | * 3. C2K FGI/Capability IE refinement |
| 384 | * (OA domain). |
| 385 | * |
| 386 | * 03 16 2015 justin.li |
| 387 | * [MOLY00098827] [MT6291][ERRC-CEL] Extension EARFCN feature |
| 388 | * . |
| 389 | * |
| 390 | * 03 09 2015 ivy.wang |
| 391 | * [MOLY00097236] [TK6291 FPGA][pre-1stCallTest][UMOLY][4G] Assert @ lcel_paging.c #910 |
| 392 | * [MOLY00091983] [VzW][6.2.16.1] FEMTO SYSTEM SELECTION(VZ_REQ_LTEDATA_6820) |
| 393 | * |
| 394 | * 02 10 2015 doug.shih |
| 395 | * [MOLY00091463] [MT6291] ERRC RCM/MRS development |
| 396 | * Extend encoded EUTRAN UE capability buffer size. |
| 397 | * |
| 398 | * 11 14 2014 henry.lai |
| 399 | * [MOLY00079072] [MT6291] Change EARFCN from kal_uint16 to kal_uint32 for CEL part |
| 400 | * . |
| 401 | * |
| 402 | * 11 13 2014 doug.shih |
| 403 | * [MOLY00068710] [MT6291_DEV] Sync MOLY to MT6291_DEV |
| 404 | * Merge MT6291_DEV code to UMOLY trunk. |
| 405 | * |
| 406 | * 08 01 2014 menghau.wu |
| 407 | * [MOLY00073987] [MT6290E2][MRS] Create mrs_eas_max_band_cap_for_user() to L4C for user friendly UI |
| 408 | * Create mrs_eas_max_band_cap_for_user() to L4C for user friendly UI |
| 409 | * |
| 410 | * 01 21 2014 wcpuser_integrator |
| 411 | * [MOLY00054475] SGLTE option rename |
| 412 | * . |
| 413 | * |
| 414 | * 11 13 2013 adeline.chang |
| 415 | * [MOLY00046027] [MT6290E1][MMDS_DC] MMDC feature patch back to MOLY trunk |
| 416 | * . |
| 417 | * |
| 418 | * 10 21 2013 hong-yuan.yang |
| 419 | * [MOLY00040050] [MultiMode] Dynamic band selection |
| 420 | * . |
| 421 | * |
| 422 | * 09 26 2013 adeline.chang |
| 423 | * [MOLY00038974] [LTE Gemini] Add SIM index as input parameter for two MRS API |
| 424 | * . |
| 425 | * |
| 426 | * 08 23 2013 adeline.chang |
| 427 | * [MOLY00034813] [MT6290] DL/UL EARFCN check using DL/UL BW |
| 428 | * . |
| 429 | * |
| 430 | * 07 12 2013 hong-yuan.yang |
| 431 | * [MOLY00028770] add eas fdd/tdd judge api in MRS |
| 432 | * .modify enum |
| 433 | * |
| 434 | * 07 05 2013 hong-yuan.yang |
| 435 | * [MOLY00028770] add eas fdd/tdd judge api in MRS |
| 436 | * .add fdd/tdd jdg api |
| 437 | * |
| 438 | * 07 05 2013 hong-yuan.yang |
| 439 | * [MOLY00028770] add eas fdd/tdd judge api in MRS |
| 440 | * .add eas fdd/tdd judge api in MRS |
| 441 | * |
| 442 | * 05 13 2013 shih-chieh.liao |
| 443 | * [MOLY00022028] LTE MM.IT errc merge to MOLY |
| 444 | * merge mrs |
| 445 | * |
| 446 | * 01 22 2013 david.niu |
| 447 | * [MOLY00009205] [MRS] Code checked-in for MOLY branch |
| 448 | * . |
| 449 | * |
| 450 | *****************************************************************************/ |
| 451 | |
| 452 | #ifndef _MRS_EAS_CAPABILITY_H |
| 453 | #define _MRS_EAS_CAPABILITY_H |
| 454 | |
| 455 | #include "mrs_as_inter_core_def.h" |
| 456 | #include "mrs_as_enums.h" |
| 457 | #include "mrs_as_struct.h" |
| 458 | #include "reg_base.h" |
| 459 | #include "global_type.h" |
| 460 | #include "mrs_common_capability.h" |
| 461 | //#include "el1d_rf_def.h" |
| 462 | #include "lte_rf_public.h" //for LTE_BIT_MASK_BUFFER_SIZE |
| 463 | #include "el1d_rf_public.h" |
| 464 | #if (CUR_GEN >= MD_GEN95) |
| 465 | #include "el1d_rf_def.h" //for LTE_CA_SIMUL_BAND_MAX |
| 466 | #include "nl1_ue_capability.h" |
| 467 | #endif |
| 468 | #include "errc_nvram_editor.h" |
| 469 | /***************************************************************************** |
| 470 | * Macros Without Parameters |
| 471 | *****************************************************************************/ |
| 472 | |
| 473 | /* Pcore reading */ |
| 474 | typedef volatile unsigned long* APBADDR32; |
| 475 | |
| 476 | #define MASK_1_BIT 0x0001 |
| 477 | |
| 478 | /* (This value should be aligned with EL1D_RF_GET_BAND_SUPPORT_MASK() interface |
| 479 | * and the LTE Band number in the NVRAM_EF_AS_BAND_SETTING_LID) |
| 480 | */ |
| 481 | #define LTE_BAND_MASK_WORD_COUNT LTE_BIT_MASK_BUFFER_SIZE |
| 482 | |
| 483 | // Because EAS srch Info only has 1 instance, but we want to reuse eas_mutex, so only choose SIM_IDX = 0 |
| 484 | #define MRS_EAS_SRCH_INFO_REF_SIM_IDX 0 |
| 485 | |
| 486 | #define MRS_EAS_SRCH_INFO_BAND_MAX 64 |
| 487 | #define MRS_EAS_SRCH_INFO_FREQ_MAX 256 |
| 488 | #define MRS_EAS_SRCH_INFO_CELL_MAX 128 |
| 489 | // The actual value of MRS_MAX_SUB_BAND_NUM is MAX_SUB_BAND_NUM in el1_cnst.h |
| 490 | // The actual value of MRS_BW_INVALID is BW_INVALID in el1_cnst.h |
| 491 | // The actual value of MRS_ERRC_PCI_INVALID is ERRC_PCI_INVALID in errc_lcommon_def.h |
| 492 | // Directly defined here to prevent dependancy problem. |
| 493 | #define MRS_MAX_SUB_BAND_NUM ((286/8)+1) |
| 494 | #define MRS_BW_INVALID 0xFF |
| 495 | #define MRS_ERRC_PCI_INVALID 0xFFFF |
| 496 | |
| 497 | /* Define the end of all PLMN config lists in custom files (containing custom_eas and wwltedb) */ |
| 498 | #define MRS_EAS_CUSTOM_PLMN_CFG_END "FFFFFF" |
| 499 | #define MRS_EAS_UE_CAT_INVALID NVRAM_LTE_UE_CAT_INVALID |
| 500 | |
| 501 | #define LTE_CA_MAX_NUM_SIMUL_BANDS 5 //align ERRC_CAP_EUTRA_CA_MAX_SIMUL_AGGR_BAND_NUM |
| 502 | #define MRDC_MAX_NUM_BAND_COMBINATIONS NL1_CAP_MAX_NUM_BAND_COMBINATIONS//align NL1_CAP_MAX_NUM_BAND_COMBINATIONS |
| 503 | /***************************************************************************** |
| 504 | * Macros With Parameters |
| 505 | *****************************************************************************/ |
| 506 | #define MRS_COMPILE_TIME_ASSERT(e) ((void)sizeof(char[1-2*!(e)])) |
| 507 | |
| 508 | /***************************************************************************** |
| 509 | * Enums without tags |
| 510 | *****************************************************************************/ |
| 511 | /* Workaround for MT6291 FGPA Digital IQ */ |
| 512 | /* #if defined(__RF_BYPASS__) */ |
| 513 | #define EAS_LOCK_MULTI_FREQ_NUM_MAX 4 |
| 514 | #define EAS_LOCK_MULTI_FREQ_NUM_EMPTY 0 |
| 515 | |
| 516 | typedef enum { |
| 517 | MRS_EAS_SRCH_INFO_BAND_NOT_SEARCHED, |
| 518 | MRS_EAS_SRCH_INFO_BAND_PARTIAL, |
| 519 | MRS_EAS_SRCH_INFO_BAND_COMPLETED |
| 520 | } mrs_eas_srch_info_band_status_enum; |
| 521 | |
| 522 | typedef enum { |
| 523 | MRS_EAS_SRCH_INFO_FREQ_UNKNOWN, |
| 524 | MRS_EAS_SRCH_INFO_FREQ_FOUND, |
| 525 | MRS_EAS_SRCH_INFO_FREQ_NOT_FOUND |
| 526 | } mrs_eas_srch_info_freq_status_enum; |
| 527 | |
| 528 | typedef enum { |
| 529 | BAND_SETTING_UPDATE, |
| 530 | READ_NVRAM_CNF, |
| 531 | MAX_BAND_CAP, |
| 532 | BAND_CTRL_FUNC, |
| 533 | ADD_REMOVE_BAND, |
| 534 | SET_CONTEXT_NVRAM, |
| 535 | GET_CONTEXT_NVRAM, |
| 536 | GET_LTE_SUPPORT_BAND, |
| 537 | IS_FDD_SUPPORT, |
| 538 | IS_TDD_SUPPORT, |
| 539 | SIM_PLMN_BAND_UPDATE, |
| 540 | DISABLE_B7_B38, |
| 541 | DISABLE_BAND_BY_PLMN, |
| 542 | PLMN_REGION_BAND |
| 543 | } eas_band_print_func_enum; |
| 544 | |
| 545 | typedef enum { |
| 546 | FUNC_INPUT, |
| 547 | COMP_OPT_FILTER, |
| 548 | RF_FILTER, |
| 549 | SWUSE_DUPLEX_FILTER, |
| 550 | MODEM_COMP_OPT_FILTER, |
| 551 | SWUSE_FILTER, |
| 552 | SCSI_INPUT, |
| 553 | SINGLE_BAND_TOGGLE, |
| 554 | NVRAM_OUTPUT, |
| 555 | RF_SWUSE_FILTER, |
| 556 | SCSI_OUTPUT, |
| 557 | MRS_NVRAM_STORED_BAND, |
| 558 | CUSTOM_PLMN_BAND, |
| 559 | RF_INPUT |
| 560 | } eas_band_print_check_point_enum; |
| 561 | |
| 562 | /***************************************************************************** |
| 563 | * Type Definitions |
| 564 | *****************************************************************************/ |
| 565 | |
| 566 | typedef struct { |
| 567 | // The actual type of csr_special_type is el1_csr_search_spcial_type_enum in el1_enum.h |
| 568 | // Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header) |
| 569 | kal_uint8 csr_special_type; |
| 570 | kal_bool skip_weak_freq; |
| 571 | kal_int16 rssi_threshold; |
| 572 | kal_uint8 subband_bandwidth; |
| 573 | kal_uint16 strong_n_subband_num; |
| 574 | } mrs_eas_srch_info_band_condition_struct; |
| 575 | |
| 576 | typedef struct { |
| 577 | kal_uint16 band; |
| 578 | kal_bool is_complete; |
| 579 | // cmpl_subband only valid when is_complete = FALSE |
| 580 | kal_uint8 cmpl_subband[MRS_MAX_SUB_BAND_NUM]; |
| 581 | // cond describe the band is searched during which setting of carrier_search_req |
| 582 | // It's valid no matter is_complete = FALSE or TRUE |
| 583 | mrs_eas_srch_info_band_condition_struct cond; |
| 584 | } mrs_eas_srch_info_band_struct; |
| 585 | |
| 586 | typedef struct { |
| 587 | // The actual type of srch_type is el1_csr_search_type_enum in el1_enum.h |
| 588 | // Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header) |
| 589 | kal_uint8 srch_type; |
| 590 | kal_bool skip_weak_freq; |
| 591 | kal_int16 rssi_threshold; |
| 592 | kal_bool is_endc_only_search; |
| 593 | } mrs_eas_srch_info_freq_condition_struct; |
| 594 | |
| 595 | typedef struct { |
| 596 | EARFCN earfcn; |
| 597 | kal_bool is_found; |
| 598 | // cond describe the earfcn is not found during which setting of carrier_search_req |
| 599 | // so it's only valid when is_found = FALSE |
| 600 | mrs_eas_srch_info_freq_condition_struct cond; |
| 601 | } mrs_eas_srch_info_freq_struct; |
| 602 | |
| 603 | typedef struct { |
| 604 | EARFCN earfcn; |
| 605 | kal_uint16 pci; |
| 606 | // The following collect from MIB |
| 607 | // The actual type of srch_type is el1_bandwidth_enum in el1_enum.h |
| 608 | // Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header) |
| 609 | kal_uint8 dl_bw; |
| 610 | // The following collect from SIB1 |
| 611 | mrs_plmn_id_list plmn_list; |
| 612 | kal_uint16 tac; |
| 613 | } mrs_eas_srch_info_cell_struct; |
| 614 | |
| 615 | // The MRS EAS searched info is divided to 3 lists (band/freq/cell) to prevent using a big ctrl buffer |
| 616 | // Besides, directly use the band->freq->cell hierarchy will cause a huge data structure |
| 617 | typedef struct { |
| 618 | kal_uint32 band_num; |
| 619 | mrs_eas_srch_info_band_struct *band_level_list; |
| 620 | kal_uint32 freq_num; |
| 621 | mrs_eas_srch_info_freq_struct *freq_level_list; |
| 622 | kal_uint32 cell_num; |
| 623 | mrs_eas_srch_info_cell_struct *cell_level_list; |
| 624 | } mrs_eas_srch_info_struct; |
| 625 | |
| 626 | typedef struct { |
| 627 | LOCAL_PARA_HDR |
| 628 | |
| 629 | kal_uint32 band_num; |
| 630 | mrs_eas_srch_info_band_struct band_level_list[MRS_EAS_SRCH_INFO_BAND_MAX]; |
| 631 | } mrs_eas_srch_info_band_ind_struct; |
| 632 | |
| 633 | typedef struct { |
| 634 | LOCAL_PARA_HDR |
| 635 | |
| 636 | kal_uint32 freq_num; |
| 637 | mrs_eas_srch_info_freq_struct freq_level_list[MRS_EAS_SRCH_INFO_FREQ_MAX]; |
| 638 | } mrs_eas_srch_info_freq_ind_struct; |
| 639 | |
| 640 | typedef struct { |
| 641 | LOCAL_PARA_HDR |
| 642 | |
| 643 | kal_uint32 cell_num; |
| 644 | mrs_eas_srch_info_cell_struct cell_level_list[MRS_EAS_SRCH_INFO_CELL_MAX]; |
| 645 | } mrs_eas_srch_info_cell_ind_struct; |
| 646 | |
| 647 | typedef struct { |
| 648 | kal_uint16 band; |
| 649 | EARFCN dl_lower_earfcn; |
| 650 | EARFCN dl_upper_earfcn; |
| 651 | EARFCN ul_lower_earfcn; |
| 652 | EARFCN ul_upper_earfcn; |
| 653 | } eas_partial_band_list_struct; |
| 654 | |
| 655 | typedef struct { |
| 656 | kal_uint8 valid_num; |
| 657 | eas_partial_band_list_struct band_list[EAS_EF_ERRC_PARTIAL_BAND_NUM]; |
| 658 | } eas_partial_band_inf_struct; |
| 659 | |
| 660 | typedef struct { |
| 661 | EARFCN earfcn; |
| 662 | kal_uint16 lte_band_num; |
| 663 | kal_uint16 *lte_band_list_ptr; |
| 664 | }earfcn_list_struct; |
| 665 | |
| 666 | |
| 667 | /* Workaround for MT6291 FGPA Digital IQ */ |
| 668 | /* #if defined(__RF_BYPASS__) */ |
| 669 | typedef struct { |
| 670 | kal_uint8 lock_multi_freq_num; |
| 671 | kal_uint16 lock_multi_freq[EAS_LOCK_MULTI_FREQ_NUM_MAX]; |
| 672 | } eas_lock_multi_freq_capa_struct; |
| 673 | |
| 674 | /* B66 support */ |
| 675 | typedef struct { |
| 676 | kal_uint8 lte_band_list[SIZE_LTE_BAND_MASK_TABLE_EXTENDED]; |
| 677 | } mrs_lte_band_list_struct; |
| 678 | |
| 679 | /*4G UE category*/ |
| 680 | |
| 681 | //mrs_eas_ue_category_max_struct should be the same as errc_rcm_ue_category_max_struct |
| 682 | typedef struct |
| 683 | { |
| 684 | kal_uint8 dl; |
| 685 | kal_uint8 ul; |
| 686 | }mrs_eas_ue_category_max_struct; |
| 687 | |
| 688 | typedef struct |
| 689 | { |
| 690 | kal_uint8 nvram_ue_category; // ue-category -> nvram_errc_ue_cat_enum |
| 691 | mrs_eas_ue_category_max_struct max_ue_category; |
| 692 | } mrs_eas_ue_category_struct; |
| 693 | |
| 694 | |
| 695 | typedef struct { |
| 696 | #ifdef UNIT_TEST |
| 697 | kal_uint32 eutra_capa_length; |
| 698 | #if (CUR_GEN >= MD_GEN95) |
| 699 | kal_uint8 eutra_capa[8000]; //shall be aligned to ERRC_RCM_EUTRA_CAPA_MAX_LEN |
| 700 | #else |
| 701 | kal_uint8 eutra_capa[4096]; //shall be aligned to ERRC_RCM_EUTRA_CAPA_MAX_LEN |
| 702 | #endif /* #if (CUR_GEN >= MD_GEN95) */ |
| 703 | #endif /* UNIT_TEST */ |
| 704 | kal_uint8 eea_support;/*MSB: EEA0, EEA1,.....EEA7*/ |
| 705 | kal_uint8 eia_support;/*MSB: EIA0, EIA1,.....EIA7*/ |
| 706 | kal_uint8 eas_power_class; |
| 707 | //#ifdef __SGLTE__ |
| 708 | kal_bool is_band_39_ori_support; |
| 709 | //#endif /* __SGLTE__ */ |
| 710 | kal_uint8 is_band_ori_support[SIZE_LTE_BAND_MASK_TABLE_EXTENDED]; |
| 711 | /* Workaround for MT6291 FGPA Digital IQ */ |
| 712 | /* #if defined(__RF_BYPASS__) */ |
| 713 | eas_lock_multi_freq_capa_struct lock_multi_dl_freq_capa; |
| 714 | kal_uint8 data[3]; // for LTE_CAP write back to NVRAM |
| 715 | kal_uint8 op_femtocell_system_selection; /* VzW : 6.2.16.1 FEMTOCELL SYSTEM SELECTION */ |
| 716 | kal_uint8 disable_bw_bmp[LTE_BAND_NUM_EXTENDED]; |
| 717 | eas_partial_band_inf_struct partial_band_inf; |
| 718 | eas_partial_band_inf_struct partial_band_inf_backup; |
| 719 | kal_uint8 nvram_lte_band[SIZE_LTE_BAND_MASK_TABLE_EXTENDED]; |
| 720 | mrs_eas_ue_category_struct eas_ue_category; |
| 721 | } eas_capability_context_struct; |
| 722 | |
| 723 | |
| 724 | #if (CUR_GEN >= MD_GEN95) |
| 725 | |
| 726 | typedef struct{ |
| 727 | kal_uint16 band; |
| 728 | kal_uint8 ca_bw_clas_ul; /* A=0, B=1, C=2, ....for cc num 0 set as 6*/ |
| 729 | kal_uint8 ca_bw_clas_dl; /* A=0, B=1, C=2, ....for cc num 0 set as 6*/ |
| 730 | }mrs_eas_ca_band_param_struct; |
| 731 | |
| 732 | typedef struct{ |
| 733 | kal_uint8 band_param_num; |
| 734 | mrs_eas_ca_band_param_struct band_param[LTE_CA_SIMUL_BAND_MAX]; |
| 735 | }mrs_eas_ca_band_comb_struct; |
| 736 | |
| 737 | #endif /* #if (CUR_GEN >= MD_GEN95) */ |
| 738 | |
| 739 | #if (CUR_GEN >= MD_GEN97) |
| 740 | |
| 741 | typedef struct{ |
| 742 | kal_uint8 band_param_num; |
| 743 | mrs_eas_ca_band_param_struct band_param[LTE_CA_MAX_NUM_SIMUL_BANDS]; |
| 744 | }mrs_eas_lte_band_comb_struct; |
| 745 | |
| 746 | typedef struct{ |
| 747 | kal_uint16 bc_num; |
| 748 | mrs_eas_lte_band_comb_struct lte_standalone_bc[MRDC_MAX_NUM_BAND_COMBINATIONS]; |
| 749 | kal_bool is_bc_support[MRDC_MAX_NUM_BAND_COMBINATIONS]; |
| 750 | }mrs_eas_mrdc_lte_standalone_bc_list; |
| 751 | |
| 752 | #endif /* #if (CUR_GEN >= MD_GEN97) */ |
| 753 | |
| 754 | typedef enum { |
| 755 | EAS_BAND_PHY_FREQ_MIN, |
| 756 | EAS_BAND_PHY_FREQ_MAX, |
| 757 | EAS_BAND_EARFCN_MIN, |
| 758 | EAS_BAND_EARFCN_MAX, |
| 759 | EAS_BAND_EARFCN_FREQ_INFO_NUM |
| 760 | } eas_band_earfcn_freq_info_enum; |
| 761 | |
| 762 | typedef enum { |
| 763 | EAS_CELL_MODE_UNKNOWN, |
| 764 | EAS_CELL_MODE_FDD, |
| 765 | EAS_CELL_MODE_TDD |
| 766 | } eas_cell_mode_enum; |
| 767 | |
| 768 | typedef enum { |
| 769 | EAS_COUNTRY_JAPAN, |
| 770 | EAS_COUNTRY_CHINA, |
| 771 | EAS_COUNTRY_USA, |
| 772 | EAS_COUNTRY_NORTH_AMERICA_BY_CUSTOMER |
| 773 | } eas_country_enum; |
| 774 | |
| 775 | typedef enum { |
| 776 | EAS_CAT_4 = 0, /* EAS_CAT_4 set to 0: means no CA support for L4 to display CT CA icon */ |
| 777 | EAS_CAT_6 = 1 /* EAS_CAT_6 set to 1: means CA support */ |
| 778 | } eas_category_enum; |
| 779 | |
| 780 | typedef enum { |
| 781 | EAS_CAP_SHORT_MEAS_GAP_R14, |
| 782 | |
| 783 | EAS_CAP_TOTAL_NUM |
| 784 | }eas_cap_feature_enum; |
| 785 | |
| 786 | #ifdef UNIT_TEST |
| 787 | typedef struct { |
| 788 | kal_uint32 band_mask_word_count; |
| 789 | kal_uint32 band_mask[LTE_BAND_MASK_WORD_COUNT]; |
| 790 | } eas_rf_supported_bands_struct; |
| 791 | #endif /* UNIT_TEST */ |
| 792 | |
| 793 | typedef struct{ |
| 794 | kal_uint32 dl_start_earfcn; |
| 795 | kal_uint32 dl_end_earfcn; |
| 796 | kal_uint32 ul_start_earfcn; |
| 797 | kal_uint32 ul_end_earfcn; |
| 798 | }eas_rf_partial_band_param_struct; |
| 799 | |
| 800 | |
| 801 | /***************************************************************************** |
| 802 | * Declarations Of Exported Globals |
| 803 | *****************************************************************************/ |
| 804 | |
| 805 | // no need mutex protection, use freely |
| 806 | eas_category_enum mrs_eas_ue_category(MRS_SIM_INDEX sim_index); |
| 807 | |
| 808 | |
| 809 | // no need mutex protection, use freely |
| 810 | kal_bool mrs_eas_is_supported_band(MRS_SIM_INDEX sim_index, |
| 811 | kal_uint16 lte_band); |
| 812 | |
| 813 | // no need mutex protection, use freely |
| 814 | kal_bool mrs_eas_is_supported_band_ext(MRS_SIM_INDEX sim_index, |
| 815 | kal_uint16 lte_band, |
| 816 | kal_bool show_trace); |
| 817 | |
| 818 | // no need mutex protection, use freely |
| 819 | kal_bool mrs_eas_is_rf_supported_band(kal_uint16 lte_band); |
| 820 | |
| 821 | |
| 822 | // no need mutex protection, use freely |
| 823 | kal_bool mrs_eas_get_unsupported_range(MRS_SIM_INDEX sim_index, kal_uint16 lte_band, EARFCN *l1, EARFCN *r1, EARFCN *l2, EARFCN *r2); |
| 824 | |
| 825 | |
| 826 | // no need mutex protection, use freely |
| 827 | void mrs_eas_convert_dl_earfcn(EARFCN dl_earfcn, |
| 828 | kal_uint16 *lte_band_ptr, |
| 829 | kal_uint32 *phy_freq_ptr); |
| 830 | |
| 831 | |
| 832 | // no need mutex protection, use freely |
| 833 | void mrs_eas_convert_ul_earfcn(EARFCN ul_earfcn, |
| 834 | kal_uint16 *lte_band_ptr, |
| 835 | kal_uint32 *phy_freq_ptr); |
| 836 | |
| 837 | |
| 838 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 839 | kal_bool mrs_eas_is_supported_dl_earfcn(MRS_SIM_INDEX sim_index, |
| 840 | EARFCN dl_earfcn); |
| 841 | |
| 842 | |
| 843 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 844 | kal_bool mrs_eas_is_supported_ul_earfcn(MRS_SIM_INDEX sim_index, |
| 845 | EARFCN ul_earfcn); |
| 846 | |
| 847 | |
| 848 | // no need mutex protection, use freely |
| 849 | kal_bool mrs_eas_is_dl_earfcn_overlap(EARFCN dl_earfcn1, |
| 850 | EARFCN dl_earfcn2); |
| 851 | |
| 852 | |
| 853 | // no need mutex protection, use freely |
| 854 | kal_bool mrs_eas_is_ul_earfcn_overlap(EARFCN ul_earfcn1, |
| 855 | EARFCN ul_earfcn2); |
| 856 | |
| 857 | |
| 858 | // no need mutex protection, use freely |
| 859 | kal_bool mrs_eas_partial_band_range_chk(kal_uint16 lte_band, |
| 860 | EARFCN dl_lower_earfcn, |
| 861 | EARFCN dl_upper_earfcn, |
| 862 | EARFCN ul_lower_earfcn, |
| 863 | EARFCN ul_upper_earfcn); |
| 864 | |
| 865 | |
| 866 | // no need mutex protection, use freely |
| 867 | kal_uint32 mrs_eas_convert_dl_earfcn_to_freq(EARFCN dl_earfcn); |
| 868 | |
| 869 | |
| 870 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 871 | EARFCN mrs_eas_convert_to_best_dl_earfcn_mfbi(MRS_SIM_INDEX sim_index, |
| 872 | EARFCN dl_earfcn, |
| 873 | kal_uint16 band_indicator, |
| 874 | kal_uint8 lte_band_num, |
| 875 | kal_uint16 *lte_band_list_ptr, |
| 876 | eas_bandwidth_enum band_width, |
| 877 | kal_bool allow_disabled_bands); |
| 878 | |
| 879 | |
| 880 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 881 | EARFCN mrs_eas_convert_to_best_dl_earfcn_mfbi_freq_pri(MRS_SIM_INDEX sim_index, |
| 882 | EARFCN dl_earfcn, |
| 883 | kal_uint16 band_indicator, |
| 884 | kal_uint8 lte_band_num, |
| 885 | kal_uint16 *lte_band_list_ptr, |
| 886 | kal_bool freq_pri, |
| 887 | eas_bandwidth_enum band_width, |
| 888 | kal_bool allow_disabled_bands); |
| 889 | |
| 890 | |
| 891 | // no need mutex protection, use freely |
| 892 | EARFCN mrs_eas_convert_dl_earfcn_to_target_band(EARFCN dl_earfcn, |
| 893 | kal_uint16 target_band); |
| 894 | |
| 895 | |
| 896 | // no need mutex protection, use freely |
| 897 | EARFCN mrs_eas_convert_ul_earfcn_to_target_band(EARFCN ul_earfcn, |
| 898 | kal_uint16 target_band); |
| 899 | |
| 900 | |
| 901 | // no need mutex protection, use freely |
| 902 | kal_bool mrs_eas_is_ca_supplemental_dl_earfcn(EARFCN dl_earfcn); |
| 903 | |
| 904 | |
| 905 | // no need mutex protection, use freely |
| 906 | kal_bool mrs_eas_is_ca_supplemental_dl_band(kal_uint16 lte_band); |
| 907 | |
| 908 | |
| 909 | // no need mutex protection, use freely |
| 910 | kal_bool mrs_eas_is_ca_supplemental_dl_band_ext(kal_uint16 lte_band, |
| 911 | kal_bool show_trace); |
| 912 | |
| 913 | |
| 914 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 915 | EARFCN mrs_eas_multi_band_conversion(MRS_SIM_INDEX sim_index, |
| 916 | EARFCN earfcn, |
| 917 | kal_uint16 lte_band_num, |
| 918 | kal_uint16 *lte_band_list_ptr); |
| 919 | |
| 920 | |
| 921 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 922 | EARFCN mrs_eas_multi_band_conversion_rej_redirection(MRS_SIM_INDEX sim_index, |
| 923 | EARFCN redirection_earfcn, |
| 924 | kal_uint8 freq_num, |
| 925 | earfcn_list_struct *earfcn_list_ptr); |
| 926 | |
| 927 | |
| 928 | // no need mutex protection, use freely |
| 929 | kal_bool mrs_eas_is_lte_fdd_support(MRS_SIM_INDEX sim_index); |
| 930 | |
| 931 | |
| 932 | // no need mutex protection, use freely |
| 933 | kal_bool mrs_eas_is_lte_tdd_support(MRS_SIM_INDEX sim_index); |
| 934 | |
| 935 | |
| 936 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 937 | kal_uint8 mrs_eas_get_eea_support(MRS_SIM_INDEX sim_index); |
| 938 | |
| 939 | |
| 940 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 941 | kal_uint8 mrs_eas_get_eia_support(MRS_SIM_INDEX sim_index); |
| 942 | |
| 943 | |
| 944 | kal_uint8 mrs_eas_get_powerclass(MRS_SIM_INDEX sim_index, kal_uint16 lte_band); |
| 945 | |
| 946 | #if (CUR_GEN >= MD_GEN95) |
| 947 | kal_uint8 mrs_eas_get_ca_comb_powerclass(MRS_SIM_INDEX sim_index, mrs_eas_ca_band_comb_struct *ca_band_comb); |
| 948 | |
| 949 | kal_uint8 mrs_eas_get_ca_comb_powerclass_by_carrier_info(MRS_SIM_INDEX sim_index, mrs_eas_ca_band_comb_struct *ca_band_comb); |
| 950 | #endif /* #if (CUR_GEN >= MD_GEN95) */ |
| 951 | |
| 952 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 953 | kal_uint8 mrs_eas_get_femtocell_system_selection(MRS_SIM_INDEX sim_index); |
| 954 | |
| 955 | |
| 956 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 957 | void mrs_eas_set_femtocell_system_selection(MRS_SIM_INDEX sim_index, kal_uint8 fss); |
| 958 | |
| 959 | |
| 960 | // only use in mrs init phase only, no need mutex protection |
| 961 | void mrs_eas_read_nvram_cnf_handler(kal_uint16 nvram_file_id, kal_uint8 *data, kal_uint16 len); |
| 962 | |
| 963 | |
| 964 | #ifdef UNIT_TEST |
| 965 | void mrs_eas_set_ue_eutra_capability(MRS_SIM_INDEX sim_index, kal_uint8 *p_ue_eutra_cap, kal_uint32 cap_length); |
| 966 | |
| 967 | void mrs_eas_set_eea_support(MRS_SIM_INDEX sim_index, kal_uint8 eea_support); |
| 968 | |
| 969 | void mrs_eas_set_eia_support(MRS_SIM_INDEX sim_index, kal_uint8 eia_support); |
| 970 | #endif /* UNIT_TEST */ |
| 971 | |
| 972 | #if 0 |
| 973 | /* under construction !*/ |
| 974 | /* under construction !*/ |
| 975 | #endif /* #if 0 */ |
| 976 | |
| 977 | // no need mutex protection, use freely |
| 978 | kal_uint32 mrs_eas_get_ue_eutra_capability_by_plmn(MRS_SIM_INDEX sim_index, kal_uint8 **pp_ue_eutra_capa, mrs_plmn_id_list *p_plmn_id_list, kal_bool is_disable_gsm); |
| 979 | |
| 980 | #if (CUR_GEN >= MD_GEN97) |
| 981 | kal_uint32 mrs_eas_get_ue_eutra_capability_for_nr( |
| 982 | MRS_SIM_INDEX sim_index, |
| 983 | mrs_plmn_id_list *p_plmn_id_list, |
| 984 | kal_bool is_disable_gsm, |
| 985 | mrs_nras_octet_string_struct cap_request_filter, |
| 986 | kal_uint8 **pp_ue_eutra_capa, |
| 987 | mrs_gemini_status_enum gemini_status, |
| 988 | kal_bool is_restriction_size_valid, |
| 989 | kal_uint32 restriction_size); |
| 990 | void mrs_eas_is_mrdc_lte_standalone_band_combination_support( |
| 991 | MRS_SIM_INDEX sim_index, |
| 992 | mrs_plmn_id_list *p_plmn_id_list, |
| 993 | mrs_eas_mrdc_lte_standalone_bc_list *p_band_comb_list); |
| 994 | |
| 995 | #endif /* (CUR_GEN >= MD_GEN97) */ |
| 996 | |
| 997 | // no need mutex protection, use freely |
| 998 | eas_cell_mode_enum mrs_eas_jdg_cell_mode_by_band(kal_uint16 lte_band); |
| 999 | |
| 1000 | |
| 1001 | // no need mutex protection, use freely |
| 1002 | eas_cell_mode_enum mrs_eas_jdg_cell_mode_by_earfcn(EARFCN earfcn); |
| 1003 | |
| 1004 | |
| 1005 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1006 | kal_bool mrs_eas_is_supported_dl_earfcn_with_bw_check(MRS_SIM_INDEX sim_index, |
| 1007 | EARFCN dl_earfcn, |
| 1008 | eas_bandwidth_enum band_width, |
| 1009 | kal_bool allow_disabled_bands); |
| 1010 | |
| 1011 | // no need mutex protection, use freely, but you need check input dl_earfcn is supported band by yourself |
| 1012 | kal_bool mrs_eas_dl_full_partial_band_check(kal_uint16 band, |
| 1013 | EARFCN dl_earfcn, |
| 1014 | eas_bandwidth_enum band_width, |
| 1015 | EARFCN start_earfcn, |
| 1016 | EARFCN end_earfcn, |
| 1017 | kal_bool skip_full_band_check); |
| 1018 | |
| 1019 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1020 | kal_bool mrs_eas_is_supported_ul_earfcn_with_bw_check(MRS_SIM_INDEX sim_index, |
| 1021 | EARFCN ul_earfcn, |
| 1022 | eas_bandwidth_enum band_width); |
| 1023 | |
| 1024 | |
| 1025 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1026 | kal_bool mrs_eas_is_supported_dl_bandwidth(MRS_SIM_INDEX sim_index, |
| 1027 | kal_uint16 lte_band, |
| 1028 | eas_bandwidth_enum band_width); |
| 1029 | |
| 1030 | |
| 1031 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 1032 | kal_bool mrs_eas_band_setting_update(MRS_SIM_INDEX sim_index, kal_uint8 *lte_band_bmp, kal_bool with_duplex_mode); |
| 1033 | |
| 1034 | |
| 1035 | // no need mutex protection, use freely |
| 1036 | void mrs_eas_max_band_cap_for_user_extended( mrs_lte_band_list_struct *lte_band ); |
| 1037 | |
| 1038 | //#ifdef __SGLTE__ |
| 1039 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1040 | kal_bool mrs_eas_is_supported_band_in_nvram_stored(MRS_SIM_INDEX sim_index, |
| 1041 | kal_uint16 lte_band); |
| 1042 | |
| 1043 | |
| 1044 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 1045 | kal_bool mrs_eas_is_supported_earfcn_in_nvram_stored(MRS_SIM_INDEX sim_index, |
| 1046 | EARFCN dl_earfcn); |
| 1047 | //#endif /* __SGLTE__ */ |
| 1048 | |
| 1049 | |
| 1050 | /* Workaround for MT6291 FGPA Digital IQ */ |
| 1051 | #if defined(__RF_BYPASS__) |
| 1052 | void mrs_eas_set_lock_multi_freq_capa(eas_lock_multi_freq_capa_struct *lock_multi_freq_capa); |
| 1053 | #endif /* #if defined(__RF_BYPASS__) */ |
| 1054 | |
| 1055 | |
| 1056 | // no need mutex protection, use freely |
| 1057 | kal_bool mrs_eas_is_supported_c2k_band(kal_uint8 band); |
| 1058 | |
| 1059 | |
| 1060 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 1061 | void mrs_eas_band_control_func(kal_uint16 lte_band, eas_band_control_enum band_ctrl_info, MRS_SIM_INDEX sim_index); |
| 1062 | |
| 1063 | |
| 1064 | // no need mutex protection, use freely |
| 1065 | kal_bool mrs_eas_is_mcc_match_country(eas_country_enum country, kal_uint8 mcc1, kal_uint8 mcc2, kal_uint8 mcc3); |
| 1066 | |
| 1067 | |
| 1068 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 1069 | void mrs_eas_add_remove_band(kal_uint16 lte_band, eas_band_control_enum band_ctrl_info, MRS_SIM_INDEX sim_index); |
| 1070 | |
| 1071 | void mrs_eas_get_rf_supported_band_mask(MRS_SIM_INDEX sim_index, kal_uint8 *p_lte_support_band); |
| 1072 | |
| 1073 | |
| 1074 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1075 | void mrs_eas_get_context_nvram_lte_band(kal_uint8 *p_lte_band_mask, MRS_SIM_INDEX sim_index); |
| 1076 | |
| 1077 | |
| 1078 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1079 | void mrs_eas_set_context_nvram_lte_band(kal_uint8 *p_lte_band_mask, MRS_SIM_INDEX sim_index); |
| 1080 | |
| 1081 | |
| 1082 | // need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively) |
| 1083 | void mrs_eas_get_em_lte_support_band(MRS_SIM_INDEX sim_index, kal_uint8 *p_lte_support_band); |
| 1084 | |
| 1085 | |
| 1086 | // need mutex protection, create new "mrs_eas_internal_yyy..." for internal use (to avoid taking mutex recursively) (refer to "mrs_eas_is_supported_dl_earfcn") |
| 1087 | kal_uint8 mrs_eas_WMID_lte_band_check(MRS_SIM_INDEX sim_index); |
| 1088 | |
| 1089 | void mrs_eas_add_black_cell_list_notification(void); |
| 1090 | |
| 1091 | void mrs_eas_clear_black_cell_list_notification(MRS_SIM_INDEX sim_index); |
| 1092 | |
| 1093 | EARFCN mrs_eas_get_dl_earfcn_freq(kal_uint16 lte_band, eas_band_earfcn_freq_info_enum idx); |
| 1094 | |
| 1095 | EARFCN mrs_eas_get_ul_earfcn_freq(kal_uint16 lte_band, eas_band_earfcn_freq_info_enum idx); |
| 1096 | |
| 1097 | /* LTE band conversion function */ |
| 1098 | kal_uint16 mrs_eas_cvrt_lte_band_to_uint(LTE_Band lte_band); |
| 1099 | |
| 1100 | void mrs_eas_clear_support_band_bit_by_cell_mode(kal_uint8 *supportBandBitmask, |
| 1101 | const eas_cell_mode_enum cellMode); |
| 1102 | |
| 1103 | extern void mrs_eas_retrieveLteBandBitmask_by_plmn(MRS_SIM_INDEX sim_index, |
| 1104 | void *pLBandBitmask, |
| 1105 | mrs_plmn_id_list *p_plmn_id_list); |
| 1106 | |
| 1107 | extern kal_bool mrs_eas_band_setting_update_by_hplmn_and_cplmn(function_caller_id_enum caller_id, |
| 1108 | MRS_SIM_INDEX sim_index, |
| 1109 | mrs_plmn_id* hplmn, |
| 1110 | mrs_plmn_id_list* cplmn); |
| 1111 | |
| 1112 | mrs_sim_partial_band_cfg_state_enum mrs_eas_get_sim_partial_band_state(MRS_SIM_INDEX sim_index); |
| 1113 | |
| 1114 | mrs_sim_band_cfg_state_enum mrs_eas_get_sim_band_state(MRS_SIM_INDEX sim_index); |
| 1115 | |
| 1116 | mrs_plmn_band_cfg_state_enum mrs_eas_get_plmn_band_state(MRS_SIM_INDEX sim_index); |
| 1117 | |
| 1118 | mrs_custom_disable_band_by_plmn_state_enum mrs_eas_get_custom_disable_band_by_plmn_state(MRS_SIM_INDEX sim_index); |
| 1119 | |
| 1120 | mrs_plmn_region_band_cfg_state_enum mrs_eas_get_plmn_region_band_state(MRS_SIM_INDEX sim_index); |
| 1121 | |
| 1122 | function_caller_id_enum mrs_eas_get_sim_band_last_caller_id(MRS_SIM_INDEX sim_index); |
| 1123 | |
| 1124 | void mrs_eas_update_partial_band_support_info(mrs_plmn_id_list plmn_id_list,MRS_SIM_INDEX sim_index); |
| 1125 | |
| 1126 | void mrs_eas_reset_partial_band_support_info(MRS_SIM_INDEX sim_index); |
| 1127 | |
| 1128 | kal_bool mrs_eas_get_rf_sw_unsupported_range(MRS_SIM_INDEX sim_index, kal_uint16 lte_band, EARFCN *l1, EARFCN *r1, EARFCN *l2, EARFCN *r2, EARFCN *l3, EARFCN *r3); |
| 1129 | |
| 1130 | kal_bool mrs_eas_judge_country_plmn(eas_country_enum eas_country,const mrs_plmn_id_list* target_plmn); |
| 1131 | |
| 1132 | kal_bool mrs_eas_get_lte_support_band_from_ca_sel_table( |
| 1133 | const MRS_SIM_INDEX sim_index, |
| 1134 | const mrs_plmn_id *p_plmn_id, |
| 1135 | kal_uint8 *p_lte_band_bitmask); |
| 1136 | |
| 1137 | kal_bool mrs_eas_check_special_plmn_excluded( |
| 1138 | const MRS_SIM_INDEX sim_index, |
| 1139 | const mrs_plmn_id_list *p_plmn_id_list); |
| 1140 | |
| 1141 | void mrs_eas_set_as_release(kal_uint8 as_rel, MRS_SIM_INDEX sim_index); |
| 1142 | |
| 1143 | mrs_as_release_enum mrs_eas_get_as_release(MRS_SIM_INDEX sim_index); |
| 1144 | |
| 1145 | void mrs_eas_clear_srch_info(void); |
| 1146 | |
| 1147 | void mrs_eas_print_srch_info(void); |
| 1148 | |
| 1149 | void mrs_eas_srch_info_band_level_add(const mrs_eas_srch_info_band_struct *b); |
| 1150 | |
| 1151 | mrs_eas_srch_info_band_status_enum mrs_eas_srch_info_band_level_query( |
| 1152 | const kal_uint16 band, |
| 1153 | mrs_eas_srch_info_band_struct *b); |
| 1154 | |
| 1155 | void mrs_eas_srch_info_freq_level_add(const mrs_eas_srch_info_freq_struct *f); |
| 1156 | |
| 1157 | mrs_eas_srch_info_freq_status_enum mrs_eas_srch_info_freq_level_query( |
| 1158 | const EARFCN earfcn, |
| 1159 | mrs_eas_srch_info_freq_struct *f); |
| 1160 | |
| 1161 | void mrs_eas_srch_info_cell_level_add_from_mib( |
| 1162 | const EARFCN earfcn, |
| 1163 | const kal_uint16 pci, |
| 1164 | const kal_uint8 dl_bw); |
| 1165 | |
| 1166 | void mrs_eas_srch_info_cell_level_add_from_sib1( |
| 1167 | const EARFCN earfcn, |
| 1168 | const kal_uint16 pci, |
| 1169 | const mrs_plmn_id_list *plmn_list, |
| 1170 | const kal_uint16 tac); |
| 1171 | |
| 1172 | kal_bool mrs_eas_srch_info_cell_level_query( |
| 1173 | const EARFCN earfcn, |
| 1174 | const kal_uint16 pci, |
| 1175 | mrs_eas_srch_info_cell_struct *c); |
| 1176 | |
| 1177 | kal_bool mrs_eas_srch_info_cell_level_is_plmn_identical_on_freq( |
| 1178 | const EARFCN earfcn, |
| 1179 | const plmn_id_struct plmn_id); |
| 1180 | |
| 1181 | void mrs_eas_mrs_plmn_id_to_plmn_id(const mrs_plmn_id *src, plmn_id_struct *dst); |
| 1182 | |
| 1183 | void mrs_eas_set_ue_category(mrs_eas_ue_category_struct* p_lte_ue_category, MRS_SIM_INDEX sim_index); |
| 1184 | |
| 1185 | kal_bool mrs_eas_get_ue_category(mrs_eas_ue_category_struct* p_lte_ue_category, MRS_SIM_INDEX sim_index); |
| 1186 | |
| 1187 | kal_bool mrs_eas_get_afr_by_custom_hplmn_and_splmn(MRS_SIM_INDEX sim_index, kal_bool *p_2g4_afr_status, kal_bool *p_3g4_afr_status); |
| 1188 | |
| 1189 | #ifdef __NR_RAT__ |
| 1190 | kal_int8 mrs_eas_calculate_p_compensation( |
| 1191 | MRS_SIM_INDEX sim_idx, |
| 1192 | EARFCN target_earfcn, |
| 1193 | kal_int8 pmax, |
| 1194 | eutra_multibandinfo_list_struct *p_multi_band_list, |
| 1195 | const plmn_id_struct *p_plmn_id); |
| 1196 | #endif /* __NR_RAT__ */ |
| 1197 | |
| 1198 | kal_bool mrs_eas_check_eutra_capability_supported(eas_cap_feature_enum feature); |
| 1199 | |
| 1200 | #endif /* _MRS_EAS_CAPABILITY_H */ |
| 1201 | |