blob: 972572d73f1ccf4ceb40c6eb95d565083d975a4d [file] [log] [blame]
/******************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2007
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*******************************************************************************/
/******************************************************************************
* Filename:
* --------------------------------------------------------
* mrs_eas_capability.h
*
* Project:
* --------------------------------------------------------
* Multimode
*
* Description:
* --------------------------------------------------------
* The EAS capability stored in MRS context.
*
* Author:
* --------------------------------------------------------
* -------
*
* --------------------------------------------------------
* $Log$
*
* 05 13 2021 mandy.zheng
* [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
* R3-interface.
*
* 10 20 2020 yi-han.chung
* [MOLY00575501] [Xiaomi][J22][softbank] b41 ­­?¬q»Ý¨D
*
* SBM B41 partial band - MRS EAS
*
* 10 12 2020 gibran.chang
* [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
* Todo#67 Check all PLMN in searched sib cell
*
* 10 01 2020 tero.miettinen
* [MOLY00560032] ????SA???
* MRS - PLMN based 5G band disabling.
*
* 09 22 2020 mandy.zheng
* [MOLY00572471] [MakeFile] [Modify Common Makefile Rules] commincdirs_def.mak.
*
* Fix Macro
*
* 09 08 2020 mandy.zheng
* [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
* back out.
*
* 06 29 2020 yenchih.yang
* [MOLY00536627] [Gen97][MP6 feature] ?5G NSA > SA preferred? network search
*
* .
*
* 06 01 2020 yi-han.chung
* [MOLY00527121] LGE/FCC requirement for Band 41 AMPR
*
* ERRC/MRS
*
* 04 29 2020 plum.tseng
* [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
*
* [VMOLY_R3] UE capability restriction. (and recover enter connected mode)
*
* 02 07 2020 plum.tseng
* [MOLY00496701] [VMOLY][ERRC&NRRC][Capability] Gemini status sync between ERRC&NRRC
*
* 12 09 2019 ke-ting.lee
* [MOLY00458503] [CODE SYNC][MH4P-POS] patch request about ALPS04309026- RCM/MRS_EAS
*
* 12 02 2019 yung-chun.chang
* [MOLY00462472] [Gen97][95.OPPO patch back to VMOLY]¡i¤G?°e?¥²¸Ñ¡jFast return to 4G should be disabled on UE
*
* .
*
* 10 30 2019 mandy.zheng
* [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
*
* .
*
* 09 25 2019 mandy.zheng
* [MOLY00443402] [Gen97]2019 Jun CR - Clarification on SA fallback BC support
*
* -[ERRC]LTE SA band combination derived from ENDC support check API.
*
* 09 23 2019 yung-chun.chang
* [MOLY00440687] VMOLY code sync CR
*
* 1. CA TBL V2 main part
* 2. fix rf_param_v1390 not reset problem
*
* 08 21 2019 ke-ting.lee
* [MOLY00431023] [ERRC] VMOLY code sync for VMOLY (MOLY00401482)
* -iQi LT29 UE category
*
* 06 13 2019 plum.tseng
* [MOLY00413522] [VMOLY][Code Sync][ERRC][RCM] CA HPUE class B/C clarify
*
* 03 28 2019 morton.lin
* [MOLY00393767] [MT6297] TS 36.331 2018 December baseline migration
* [ERRC][RCM] 2018DEC version upgrading (MPD)
*
* 03 14 2019 plum.tseng
* [MOLY00391178] [MCF][VMOLY][ERRC] custom disable band feature with MCF
*
* [MCF][COSTOM_DISABLE_BAND][RCM & MRS].
*
* 01 21 2019 plum.tseng
* [MOLY00380403] Move XXX_PLMN_END definition from custom file to MRS_EAS
*
* [RCM&MRS] .
*
* 01 09 2019 sabrina.hsu
* [MOLY00377618] [VMOLY] RF partial band API for single band query change
* [MRS][EAS] change to use new API to get single band partial band parameter.
*
* 01 08 2019 sabrina.hsu
* [MOLY00377618] [VMOLY] RF partial band API for single band query change
* rollback for change header file.
*
* 12 27 2018 morton.lin
* [MOLY00375221] [Gen97][NSA] UE Capability development - Feature Set
* [ERRC][RCM] EUTRA Feature Set development
*
* 12 10 2018 morton.lin
* [MOLY00371624] [VMOLY][ERRC] provide API for NRRC to calculate P_compensation for LTE neighbor cells
* [ERRC][RCM][MRS] Pcompensation retrieval interface for 5G4 IRCR development
*
* 10 29 2018 sabrina.hsu
* [MOLY00345267] [6297][ERRC][RCM] LTE new feature
* [RCM]
* 1. LTE new custom CA report way by EL1D
* 2. LTE CA/partial band check API interface
* 3. F30 ASN feature merge
*
* 08 20 2018 plum.tseng
* [MOLY00346737] [ERRC][RCM] B41C HPUE
*
* [VMOLY] (OA)
*
* 08 17 2018 yenchih.yang
* [MOLY00346658] [VMOLY] Gen97 ERRC-CEL modifications
*
* 1) ERRC-CEL ENDC support.
* 2) MRS ERRC Up to Down Search Information.
*
* 07 19 2018 ke-ting.lee
* [MOLY00322830] [UMOLYE][ERRC] source code release
* - mrs eas
*
* 07 18 2018 plum.tseng
* [MOLY00338708] �i�t??�w�ʡjAssert fail: errc_cel_iscells.c 2108 - ERRC
*
* Fix reset part in band setting update by hplmn and cplmn.
*
* 07 03 2018 yung-chun.chang
* [MOLY00334670] [CV5a] block specific LTE bands for particular roaming plmns
* rcm/mrs part.
*
* 03 09 2018 morton.lin
* [MOLY00309570] [Gen93/95][UMOLYE][ERRC][RCM] WWLTEDB table movement for better customization
* 1. LTEBand and CAComb table movement
* 2. Introduce LTEBandExcl
* 3. Add new DL only bands: B75 & B76
*
* 01 05 2018 otto.liu
* [MOLY00298065] [MT6293] VZW feature developement & patch back
*
* .
*
* 12 11 2017 morton.lin
* [MOLY00295077] [Gen93][ERRC][RCM] LTE support band and CA combination customization re-arch
* Common IF and MRS part (LR12A.R3.MP) (Not in V-List)
*
* 11 29 2017 yung-chun.chang
* [MOLY00292082] [Gen93][TMO] 2G disable with ecc enable
* rcm oa part
*
* 10 31 2017 otto.liu
* [MOLY00285011] ?iGIONEE_MODEM?j?iMT6755?j?i17G01?j ???BAND 41
*
* .
*
* 10 31 2017 otto.liu
* [MOLY00285011] ?iGIONEE_MODEM?j?iMT6755?j?i17G01?j ???BAND 41
*
* 10 13 2017 otto.liu
* [MOLY00283132] [Gen93] R3 US operator customization
*
* .
*
* 09 14 2017 otto.liu
* [MOLY00277983] [Market]��???��?TDD LTE�I?�U???�qFDD LTE band ��]
*
* OPPO disable band according to SIM and plmn
*
* 08 24 2017 morton.lin
* [MOLY00273532] [MT6763][Bianco][N1][in-FTA][4G PCT][Anritsu][HQ][E04][8.2.1.5]
* Add new extended version for MRS EAS APIs to reduce trace print (UMOLYA)
*
* 07 28 2017 morton.lin
* [MOLY00266852] [Bianco/Zion] fre sw check-in
* [MRS] B71 SW phase in (UMOLYA)
*
* 07 06 2017 morton.lin
* [MOLY00261305] [Gen93] B71 development
* MRS and NVRAM phase in
*
* 04 16 2017 menghau.wu
* [MOLY00241464] [MT6293]Code sync from LR12 (W15, phase 21)- bug only
* UMOLY CR : [MOLY00209939] [ERRC][CEL][LCEL] L+L
* UMOLY CL : 3733883, [MRS] L+L, clear black cell bug fix.
*
* 04 05 2017 dennis.weng
* [MOLY00238929] [BIANCO][MT6763][RDIT][PHONE][Overnight][HQ][MTBF][Lab][Ericsson]"[Fatal error(task)] err_code1:0x00000305 err_code2:0x888802C2 err_code3:0xCCCCCCCC"
* add API: mrs_eas_get_dl_earfcn_freq
*
* 03 14 2017 menghau.wu
* [MOLY00217129] [MT6293] code sync from UMOLY (Phase4)
* UMOLY CR : [MOLY00224474] [6291][MP3][Post MP] CU HST Patch - MRS and CUSTOM
* UMOLY CL : 3547100
*
* 01 25 2017 menghau.wu
* [MOLY00217129] [MT6293] code sync from UMOLY (Phase4)
* UMOLY CR : [MOLY00223173] [6292][Gemini][L+L][Merge LR12][WCS/SE3/PS1~PS15]
* UMOLY CL : 3370203
*
* 12 21 2016 menghau.wu
* [MOLY00217129] [MT6293] code sync from UMOLY (Phase4)
* UMOLY CR : [MOLY00210217] [MT6292] UE Capability preparation for Gen92 MP1
* UMOLY CL : 3212767
*
* 12 02 2016 adeline.chang
* [MOLY00214717] [6293] CHM modification for UT enhancement
* .
*
* 11 15 2016 menghau.wu
* [MOLY00213308] [6293] add MRS_EAS debug trace
* add MRS_EAS debug trace
*
* 11 10 2016 menghau.wu
* [MOLY00210784] [MT6293] code sync form UMOLY
* UMOLY CR : MOLY00209435
* UMOLY CL : 3015617
*
* 11 10 2016 menghau.wu
* [MOLY00210784] [MT6293] code sync form UMOLY
* UMOLY CR : MOLY00208743
* UMOLY CL : 2997397
*
* 11 09 2016 menghau.wu
* [MOLY00210784] [MT6293] code sync form UMOLY
* other parts of
* UMOLY CR : MOLY00200565
* UMOLY CL : 2855909
*
* 10 24 2016 menghau.wu
* [MOLY00208768] [MT6293] [B66] Band66 porting (ERRC part)
* UMOLY CL2892669 : Menghau's part
*
* 10 12 2016 menghau.wu
* [MOLY00207053] [MT6293] code sync form UMOLY
* UMOLY CR : [MOLY00188984] [ERRC][CEL] code sync for VIVO black cell
* UMOLY CL : 2577019
*
* 09 26 2016 adeline.chang
* [MOLY00205093] [UMOLYA] merge CR from mw.hsu CBr
* .
*
* 09 13 2016 adeline.chang
* [MOLY00203230] [PS_DEV][6293] MRS critical section protect in mrs_eas_capability.c
* .
*
* 08 19 2016 hong-yuan.yang
* [MOLY00196550] [6293] ERRC CSR development
*
* . API replace -MRS_EAS_CAPABILITY.c
*
* 06 22 2016 maruco.tu
* [MOLY00185901] UMOLYA errc relevant latest code sync from UMOLY
* Help HY to integrate mrs_eas_capability.c/.h from UMOLY to UMOLYA
*
* 05 12 2016 morton.lin
* [MOLY00178939] [MT6797L]modem,md1:(MCU_L1CORE) [ASSERT] file:l1core/modem/el1/el1d/src/common/ldsp_err_chk_cm.c line:115
* MT6797 setting correction (UMOLY)
*
* 03 18 2016 sabrina.hsu
* [MOLY00169952] [MT6292][FPGA][Phone Call][4G TDD][Normal][Sanity] Assert fail: errc_rcm_main.c 2700 - L4
* remove R12 category extension for L4 CA icon query function
*
* 03 16 2016 ryan.ou
* [MOLY00159902] [ERRC][CEL] 2015 Q4 code sync from LR11 to UMOLY
* [MOLY00150744] [LTE-A] Limit device operation on partial band.
*
* 03 09 2016 sabrina.hsu
* [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY
* merge LR11 CL 1801342 [MOLY00148166]CT CA capability query support
*
* 02 17 2016 sabrina.hsu
* [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY
* AT+EPBSE
*
* 02 17 2016 sabrina.hsu
* [MOLY00156230] [6292] ERRC code sync LR11 to UMOLY
* mrs/nvram/sbp merge
*
* 02 16 2016 nicky.chou
* [MOLY00160414] [ERRC][CONN] sync from LR11 to UMOLY
* [CL1929095][MOLY00154210] [MT6755][E2][GCF][Anritsu][4G][FDD][MP3][17.4.11.2][eMBMS][E01-E03] Fail on this case.
*
* 12 01 2015 sabrina.hsu
* [MOLY00151252] World Mode ID & Support Band collision check
* WMID band check.
*
* 10 12 2015 chi-chung.lin
* [MOLY00144274] [MOLY->UMOLY][MOLY00136067][SBM]New Feature : Partial Channel Bandwidth supported.
* .
*
* 10 06 2015 sabrina.hsu
* [MOLY00144311] [UMOLY][CEL][MRS] __RF_BYPASS__ option wrap modification for Elbrus DIQ/AIQ test
* remove chip option to enable __RF_BYPASS__ for ELbrus.
*
* 10 06 2015 chih-chien.lin
* [MOLY00132591] [ERRC][CEL]CMCC B38/B41 CA issue
* B38/41 CA Issue
*
* 09 21 2015 panu.peisa
* [MOLY00141214] DE6 code merge from LR11_VzW CBr to UMOLY trunk
* Integrated CL 1601909 from LR11_VzW CBr. VzW: Dynamic LTE band support when roaming in MRS
*
* 09 04 2015 roland.li
* [MOLY00139861] [MT6291][SBM] New Feature : Disable LTE B41 for roaming out side of Japan.
* .
*
* 08 20 2015 sabrina.hsu
* [MOLY00138312] [6292] UMOLY code sync
* disable #error check for ElBRUS build.
*
* 08 04 2015 chi-chung.lin
* [MOLY00133208] [RCM] Jade code revision
* .
*
* 06 01 2015 henry.lai
* [MOLY00092508] [MT6291][LTE-C2K] AS Inter RAT feature
* .
*
* 04 16 2015 doug.shih
* [MOLY00091463] [MT6291] ERRC RCM/MRS development
* 1. [CR1515] Network-requested CA Band Combination Capability Signalling
* 2. [CR1535] Introduction of UE capability for eMBMS reception on SCell and Non-Serving Cell
* 3. C2K FGI/Capability IE refinement
* (OA domain).
*
* 03 16 2015 justin.li
* [MOLY00098827] [MT6291][ERRC-CEL] Extension EARFCN feature
* .
*
* 03 09 2015 ivy.wang
* [MOLY00097236] [TK6291 FPGA][pre-1stCallTest][UMOLY][4G] Assert @ lcel_paging.c #910
* [MOLY00091983] [VzW][6.2.16.1] FEMTO SYSTEM SELECTION(VZ_REQ_LTEDATA_6820)
*
* 02 10 2015 doug.shih
* [MOLY00091463] [MT6291] ERRC RCM/MRS development
* Extend encoded EUTRAN UE capability buffer size.
*
* 11 14 2014 henry.lai
* [MOLY00079072] [MT6291] Change EARFCN from kal_uint16 to kal_uint32 for CEL part
* .
*
* 11 13 2014 doug.shih
* [MOLY00068710] [MT6291_DEV] Sync MOLY to MT6291_DEV
* Merge MT6291_DEV code to UMOLY trunk.
*
* 08 01 2014 menghau.wu
* [MOLY00073987] [MT6290E2][MRS] Create mrs_eas_max_band_cap_for_user() to L4C for user friendly UI
* Create mrs_eas_max_band_cap_for_user() to L4C for user friendly UI
*
* 01 21 2014 wcpuser_integrator
* [MOLY00054475] SGLTE option rename
* .
*
* 11 13 2013 adeline.chang
* [MOLY00046027] [MT6290E1][MMDS_DC] MMDC feature patch back to MOLY trunk
* .
*
* 10 21 2013 hong-yuan.yang
* [MOLY00040050] [MultiMode] Dynamic band selection
* .
*
* 09 26 2013 adeline.chang
* [MOLY00038974] [LTE Gemini] Add SIM index as input parameter for two MRS API
* .
*
* 08 23 2013 adeline.chang
* [MOLY00034813] [MT6290] DL/UL EARFCN check using DL/UL BW
* .
*
* 07 12 2013 hong-yuan.yang
* [MOLY00028770] add eas fdd/tdd judge api in MRS
* .modify enum
*
* 07 05 2013 hong-yuan.yang
* [MOLY00028770] add eas fdd/tdd judge api in MRS
* .add fdd/tdd jdg api
*
* 07 05 2013 hong-yuan.yang
* [MOLY00028770] add eas fdd/tdd judge api in MRS
* .add eas fdd/tdd judge api in MRS
*
* 05 13 2013 shih-chieh.liao
* [MOLY00022028] LTE MM.IT errc merge to MOLY
* merge mrs
*
* 01 22 2013 david.niu
* [MOLY00009205] [MRS] Code checked-in for MOLY branch
* .
*
*****************************************************************************/
#ifndef _MRS_EAS_CAPABILITY_H
#define _MRS_EAS_CAPABILITY_H
#include "mrs_as_inter_core_def.h"
#include "mrs_as_enums.h"
#include "mrs_as_struct.h"
#include "reg_base.h"
#include "global_type.h"
#include "mrs_common_capability.h"
//#include "el1d_rf_def.h"
#include "lte_rf_public.h" //for LTE_BIT_MASK_BUFFER_SIZE
#include "el1d_rf_public.h"
#if (CUR_GEN >= MD_GEN95)
#include "el1d_rf_def.h" //for LTE_CA_SIMUL_BAND_MAX
#include "nl1_ue_capability.h"
#endif
#include "errc_nvram_editor.h"
/*****************************************************************************
* Macros Without Parameters
*****************************************************************************/
/* Pcore reading */
typedef volatile unsigned long* APBADDR32;
#define MASK_1_BIT 0x0001
/* (This value should be aligned with EL1D_RF_GET_BAND_SUPPORT_MASK() interface
* and the LTE Band number in the NVRAM_EF_AS_BAND_SETTING_LID)
*/
#define LTE_BAND_MASK_WORD_COUNT LTE_BIT_MASK_BUFFER_SIZE
// Because EAS srch Info only has 1 instance, but we want to reuse eas_mutex, so only choose SIM_IDX = 0
#define MRS_EAS_SRCH_INFO_REF_SIM_IDX 0
#define MRS_EAS_SRCH_INFO_BAND_MAX 64
#define MRS_EAS_SRCH_INFO_FREQ_MAX 256
#define MRS_EAS_SRCH_INFO_CELL_MAX 128
// The actual value of MRS_MAX_SUB_BAND_NUM is MAX_SUB_BAND_NUM in el1_cnst.h
// The actual value of MRS_BW_INVALID is BW_INVALID in el1_cnst.h
// The actual value of MRS_ERRC_PCI_INVALID is ERRC_PCI_INVALID in errc_lcommon_def.h
// Directly defined here to prevent dependancy problem.
#define MRS_MAX_SUB_BAND_NUM ((286/8)+1)
#define MRS_BW_INVALID 0xFF
#define MRS_ERRC_PCI_INVALID 0xFFFF
/* Define the end of all PLMN config lists in custom files (containing custom_eas and wwltedb) */
#define MRS_EAS_CUSTOM_PLMN_CFG_END "FFFFFF"
#define MRS_EAS_UE_CAT_INVALID NVRAM_LTE_UE_CAT_INVALID
#define LTE_CA_MAX_NUM_SIMUL_BANDS 5 //align ERRC_CAP_EUTRA_CA_MAX_SIMUL_AGGR_BAND_NUM
#define MRDC_MAX_NUM_BAND_COMBINATIONS NL1_CAP_MAX_NUM_BAND_COMBINATIONS//align NL1_CAP_MAX_NUM_BAND_COMBINATIONS
/*****************************************************************************
* Macros With Parameters
*****************************************************************************/
#define MRS_COMPILE_TIME_ASSERT(e) ((void)sizeof(char[1-2*!(e)]))
/*****************************************************************************
* Enums without tags
*****************************************************************************/
/* Workaround for MT6291 FGPA Digital IQ */
/* #if defined(__RF_BYPASS__) */
#define EAS_LOCK_MULTI_FREQ_NUM_MAX 4
#define EAS_LOCK_MULTI_FREQ_NUM_EMPTY 0
typedef enum {
MRS_EAS_SRCH_INFO_BAND_NOT_SEARCHED,
MRS_EAS_SRCH_INFO_BAND_PARTIAL,
MRS_EAS_SRCH_INFO_BAND_COMPLETED
} mrs_eas_srch_info_band_status_enum;
typedef enum {
MRS_EAS_SRCH_INFO_FREQ_UNKNOWN,
MRS_EAS_SRCH_INFO_FREQ_FOUND,
MRS_EAS_SRCH_INFO_FREQ_NOT_FOUND
} mrs_eas_srch_info_freq_status_enum;
typedef enum {
BAND_SETTING_UPDATE,
READ_NVRAM_CNF,
MAX_BAND_CAP,
BAND_CTRL_FUNC,
ADD_REMOVE_BAND,
SET_CONTEXT_NVRAM,
GET_CONTEXT_NVRAM,
GET_LTE_SUPPORT_BAND,
IS_FDD_SUPPORT,
IS_TDD_SUPPORT,
SIM_PLMN_BAND_UPDATE,
DISABLE_B7_B38,
DISABLE_BAND_BY_PLMN,
PLMN_REGION_BAND
} eas_band_print_func_enum;
typedef enum {
FUNC_INPUT,
COMP_OPT_FILTER,
RF_FILTER,
SWUSE_DUPLEX_FILTER,
MODEM_COMP_OPT_FILTER,
SWUSE_FILTER,
SCSI_INPUT,
SINGLE_BAND_TOGGLE,
NVRAM_OUTPUT,
RF_SWUSE_FILTER,
SCSI_OUTPUT,
MRS_NVRAM_STORED_BAND,
CUSTOM_PLMN_BAND,
RF_INPUT
} eas_band_print_check_point_enum;
/*****************************************************************************
* Type Definitions
*****************************************************************************/
typedef struct {
// The actual type of csr_special_type is el1_csr_search_spcial_type_enum in el1_enum.h
// Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header)
kal_uint8 csr_special_type;
kal_bool skip_weak_freq;
kal_int16 rssi_threshold;
kal_uint8 subband_bandwidth;
kal_uint16 strong_n_subband_num;
} mrs_eas_srch_info_band_condition_struct;
typedef struct {
kal_uint16 band;
kal_bool is_complete;
// cmpl_subband only valid when is_complete = FALSE
kal_uint8 cmpl_subband[MRS_MAX_SUB_BAND_NUM];
// cond describe the band is searched during which setting of carrier_search_req
// It's valid no matter is_complete = FALSE or TRUE
mrs_eas_srch_info_band_condition_struct cond;
} mrs_eas_srch_info_band_struct;
typedef struct {
// The actual type of srch_type is el1_csr_search_type_enum in el1_enum.h
// Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header)
kal_uint8 srch_type;
kal_bool skip_weak_freq;
kal_int16 rssi_threshold;
kal_bool is_endc_only_search;
} mrs_eas_srch_info_freq_condition_struct;
typedef struct {
EARFCN earfcn;
kal_bool is_found;
// cond describe the earfcn is not found during which setting of carrier_search_req
// so it's only valid when is_found = FALSE
mrs_eas_srch_info_freq_condition_struct cond;
} mrs_eas_srch_info_freq_struct;
typedef struct {
EARFCN earfcn;
kal_uint16 pci;
// The following collect from MIB
// The actual type of srch_type is el1_bandwidth_enum in el1_enum.h
// Here use uint8 to prevent dependancy problem (L4/LBS include mrs_eas_capability.h but could not access L1 header)
kal_uint8 dl_bw;
// The following collect from SIB1
mrs_plmn_id_list plmn_list;
kal_uint16 tac;
} mrs_eas_srch_info_cell_struct;
// The MRS EAS searched info is divided to 3 lists (band/freq/cell) to prevent using a big ctrl buffer
// Besides, directly use the band->freq->cell hierarchy will cause a huge data structure
typedef struct {
kal_uint32 band_num;
mrs_eas_srch_info_band_struct *band_level_list;
kal_uint32 freq_num;
mrs_eas_srch_info_freq_struct *freq_level_list;
kal_uint32 cell_num;
mrs_eas_srch_info_cell_struct *cell_level_list;
} mrs_eas_srch_info_struct;
typedef struct {
LOCAL_PARA_HDR
kal_uint32 band_num;
mrs_eas_srch_info_band_struct band_level_list[MRS_EAS_SRCH_INFO_BAND_MAX];
} mrs_eas_srch_info_band_ind_struct;
typedef struct {
LOCAL_PARA_HDR
kal_uint32 freq_num;
mrs_eas_srch_info_freq_struct freq_level_list[MRS_EAS_SRCH_INFO_FREQ_MAX];
} mrs_eas_srch_info_freq_ind_struct;
typedef struct {
LOCAL_PARA_HDR
kal_uint32 cell_num;
mrs_eas_srch_info_cell_struct cell_level_list[MRS_EAS_SRCH_INFO_CELL_MAX];
} mrs_eas_srch_info_cell_ind_struct;
typedef struct {
kal_uint16 band;
EARFCN dl_lower_earfcn;
EARFCN dl_upper_earfcn;
EARFCN ul_lower_earfcn;
EARFCN ul_upper_earfcn;
} eas_partial_band_list_struct;
typedef struct {
kal_uint8 valid_num;
eas_partial_band_list_struct band_list[EAS_EF_ERRC_PARTIAL_BAND_NUM];
} eas_partial_band_inf_struct;
typedef struct {
EARFCN earfcn;
kal_uint16 lte_band_num;
kal_uint16 *lte_band_list_ptr;
}earfcn_list_struct;
/* Workaround for MT6291 FGPA Digital IQ */
/* #if defined(__RF_BYPASS__) */
typedef struct {
kal_uint8 lock_multi_freq_num;
kal_uint16 lock_multi_freq[EAS_LOCK_MULTI_FREQ_NUM_MAX];
} eas_lock_multi_freq_capa_struct;
/* B66 support */
typedef struct {
kal_uint8 lte_band_list[SIZE_LTE_BAND_MASK_TABLE_EXTENDED];
} mrs_lte_band_list_struct;
/*4G UE category*/
//mrs_eas_ue_category_max_struct should be the same as errc_rcm_ue_category_max_struct
typedef struct
{
kal_uint8 dl;
kal_uint8 ul;
}mrs_eas_ue_category_max_struct;
typedef struct
{
kal_uint8 nvram_ue_category; // ue-category -> nvram_errc_ue_cat_enum
mrs_eas_ue_category_max_struct max_ue_category;
} mrs_eas_ue_category_struct;
typedef struct {
#ifdef UNIT_TEST
kal_uint32 eutra_capa_length;
#if (CUR_GEN >= MD_GEN95)
kal_uint8 eutra_capa[8000]; //shall be aligned to ERRC_RCM_EUTRA_CAPA_MAX_LEN
#else
kal_uint8 eutra_capa[4096]; //shall be aligned to ERRC_RCM_EUTRA_CAPA_MAX_LEN
#endif /* #if (CUR_GEN >= MD_GEN95) */
#endif /* UNIT_TEST */
kal_uint8 eea_support;/*MSB: EEA0, EEA1,.....EEA7*/
kal_uint8 eia_support;/*MSB: EIA0, EIA1,.....EIA7*/
kal_uint8 eas_power_class;
//#ifdef __SGLTE__
kal_bool is_band_39_ori_support;
//#endif /* __SGLTE__ */
kal_uint8 is_band_ori_support[SIZE_LTE_BAND_MASK_TABLE_EXTENDED];
/* Workaround for MT6291 FGPA Digital IQ */
/* #if defined(__RF_BYPASS__) */
eas_lock_multi_freq_capa_struct lock_multi_dl_freq_capa;
kal_uint8 data[3]; // for LTE_CAP write back to NVRAM
kal_uint8 op_femtocell_system_selection; /* VzW : 6.2.16.1 FEMTOCELL SYSTEM SELECTION */
kal_uint8 disable_bw_bmp[LTE_BAND_NUM_EXTENDED];
eas_partial_band_inf_struct partial_band_inf;
eas_partial_band_inf_struct partial_band_inf_backup;
kal_uint8 nvram_lte_band[SIZE_LTE_BAND_MASK_TABLE_EXTENDED];
mrs_eas_ue_category_struct eas_ue_category;
} eas_capability_context_struct;
#if (CUR_GEN >= MD_GEN95)
typedef struct{
kal_uint16 band;
kal_uint8 ca_bw_clas_ul; /* A=0, B=1, C=2, ....for cc num 0 set as 6*/
kal_uint8 ca_bw_clas_dl; /* A=0, B=1, C=2, ....for cc num 0 set as 6*/
}mrs_eas_ca_band_param_struct;
typedef struct{
kal_uint8 band_param_num;
mrs_eas_ca_band_param_struct band_param[LTE_CA_SIMUL_BAND_MAX];
}mrs_eas_ca_band_comb_struct;
#endif /* #if (CUR_GEN >= MD_GEN95) */
#if (CUR_GEN >= MD_GEN97)
typedef struct{
kal_uint8 band_param_num;
mrs_eas_ca_band_param_struct band_param[LTE_CA_MAX_NUM_SIMUL_BANDS];
}mrs_eas_lte_band_comb_struct;
typedef struct{
kal_uint16 bc_num;
mrs_eas_lte_band_comb_struct lte_standalone_bc[MRDC_MAX_NUM_BAND_COMBINATIONS];
kal_bool is_bc_support[MRDC_MAX_NUM_BAND_COMBINATIONS];
}mrs_eas_mrdc_lte_standalone_bc_list;
#endif /* #if (CUR_GEN >= MD_GEN97) */
typedef enum {
EAS_BAND_PHY_FREQ_MIN,
EAS_BAND_PHY_FREQ_MAX,
EAS_BAND_EARFCN_MIN,
EAS_BAND_EARFCN_MAX,
EAS_BAND_EARFCN_FREQ_INFO_NUM
} eas_band_earfcn_freq_info_enum;
typedef enum {
EAS_CELL_MODE_UNKNOWN,
EAS_CELL_MODE_FDD,
EAS_CELL_MODE_TDD
} eas_cell_mode_enum;
typedef enum {
EAS_COUNTRY_JAPAN,
EAS_COUNTRY_CHINA,
EAS_COUNTRY_USA,
EAS_COUNTRY_NORTH_AMERICA_BY_CUSTOMER
} eas_country_enum;
typedef enum {
EAS_CAT_4 = 0, /* EAS_CAT_4 set to 0: means no CA support for L4 to display CT CA icon */
EAS_CAT_6 = 1 /* EAS_CAT_6 set to 1: means CA support */
} eas_category_enum;
typedef enum {
EAS_CAP_SHORT_MEAS_GAP_R14,
EAS_CAP_TOTAL_NUM
}eas_cap_feature_enum;
#ifdef UNIT_TEST
typedef struct {
kal_uint32 band_mask_word_count;
kal_uint32 band_mask[LTE_BAND_MASK_WORD_COUNT];
} eas_rf_supported_bands_struct;
#endif /* UNIT_TEST */
typedef struct{
kal_uint32 dl_start_earfcn;
kal_uint32 dl_end_earfcn;
kal_uint32 ul_start_earfcn;
kal_uint32 ul_end_earfcn;
}eas_rf_partial_band_param_struct;
/*****************************************************************************
* Declarations Of Exported Globals
*****************************************************************************/
// no need mutex protection, use freely
eas_category_enum mrs_eas_ue_category(MRS_SIM_INDEX sim_index);
// no need mutex protection, use freely
kal_bool mrs_eas_is_supported_band(MRS_SIM_INDEX sim_index,
kal_uint16 lte_band);
// no need mutex protection, use freely
kal_bool mrs_eas_is_supported_band_ext(MRS_SIM_INDEX sim_index,
kal_uint16 lte_band,
kal_bool show_trace);
// no need mutex protection, use freely
kal_bool mrs_eas_is_rf_supported_band(kal_uint16 lte_band);
// no need mutex protection, use freely
kal_bool mrs_eas_get_unsupported_range(MRS_SIM_INDEX sim_index, kal_uint16 lte_band, EARFCN *l1, EARFCN *r1, EARFCN *l2, EARFCN *r2);
// no need mutex protection, use freely
void mrs_eas_convert_dl_earfcn(EARFCN dl_earfcn,
kal_uint16 *lte_band_ptr,
kal_uint32 *phy_freq_ptr);
// no need mutex protection, use freely
void mrs_eas_convert_ul_earfcn(EARFCN ul_earfcn,
kal_uint16 *lte_band_ptr,
kal_uint32 *phy_freq_ptr);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_dl_earfcn(MRS_SIM_INDEX sim_index,
EARFCN dl_earfcn);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_ul_earfcn(MRS_SIM_INDEX sim_index,
EARFCN ul_earfcn);
// no need mutex protection, use freely
kal_bool mrs_eas_is_dl_earfcn_overlap(EARFCN dl_earfcn1,
EARFCN dl_earfcn2);
// no need mutex protection, use freely
kal_bool mrs_eas_is_ul_earfcn_overlap(EARFCN ul_earfcn1,
EARFCN ul_earfcn2);
// no need mutex protection, use freely
kal_bool mrs_eas_partial_band_range_chk(kal_uint16 lte_band,
EARFCN dl_lower_earfcn,
EARFCN dl_upper_earfcn,
EARFCN ul_lower_earfcn,
EARFCN ul_upper_earfcn);
// no need mutex protection, use freely
kal_uint32 mrs_eas_convert_dl_earfcn_to_freq(EARFCN dl_earfcn);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
EARFCN mrs_eas_convert_to_best_dl_earfcn_mfbi(MRS_SIM_INDEX sim_index,
EARFCN dl_earfcn,
kal_uint16 band_indicator,
kal_uint8 lte_band_num,
kal_uint16 *lte_band_list_ptr,
eas_bandwidth_enum band_width,
kal_bool allow_disabled_bands);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
EARFCN mrs_eas_convert_to_best_dl_earfcn_mfbi_freq_pri(MRS_SIM_INDEX sim_index,
EARFCN dl_earfcn,
kal_uint16 band_indicator,
kal_uint8 lte_band_num,
kal_uint16 *lte_band_list_ptr,
kal_bool freq_pri,
eas_bandwidth_enum band_width,
kal_bool allow_disabled_bands);
// no need mutex protection, use freely
EARFCN mrs_eas_convert_dl_earfcn_to_target_band(EARFCN dl_earfcn,
kal_uint16 target_band);
// no need mutex protection, use freely
EARFCN mrs_eas_convert_ul_earfcn_to_target_band(EARFCN ul_earfcn,
kal_uint16 target_band);
// no need mutex protection, use freely
kal_bool mrs_eas_is_ca_supplemental_dl_earfcn(EARFCN dl_earfcn);
// no need mutex protection, use freely
kal_bool mrs_eas_is_ca_supplemental_dl_band(kal_uint16 lte_band);
// no need mutex protection, use freely
kal_bool mrs_eas_is_ca_supplemental_dl_band_ext(kal_uint16 lte_band,
kal_bool show_trace);
// 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")
EARFCN mrs_eas_multi_band_conversion(MRS_SIM_INDEX sim_index,
EARFCN earfcn,
kal_uint16 lte_band_num,
kal_uint16 *lte_band_list_ptr);
// 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")
EARFCN mrs_eas_multi_band_conversion_rej_redirection(MRS_SIM_INDEX sim_index,
EARFCN redirection_earfcn,
kal_uint8 freq_num,
earfcn_list_struct *earfcn_list_ptr);
// no need mutex protection, use freely
kal_bool mrs_eas_is_lte_fdd_support(MRS_SIM_INDEX sim_index);
// no need mutex protection, use freely
kal_bool mrs_eas_is_lte_tdd_support(MRS_SIM_INDEX sim_index);
// 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")
kal_uint8 mrs_eas_get_eea_support(MRS_SIM_INDEX sim_index);
// 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")
kal_uint8 mrs_eas_get_eia_support(MRS_SIM_INDEX sim_index);
kal_uint8 mrs_eas_get_powerclass(MRS_SIM_INDEX sim_index, kal_uint16 lte_band);
#if (CUR_GEN >= MD_GEN95)
kal_uint8 mrs_eas_get_ca_comb_powerclass(MRS_SIM_INDEX sim_index, mrs_eas_ca_band_comb_struct *ca_band_comb);
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);
#endif /* #if (CUR_GEN >= MD_GEN95) */
// 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")
kal_uint8 mrs_eas_get_femtocell_system_selection(MRS_SIM_INDEX sim_index);
// 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")
void mrs_eas_set_femtocell_system_selection(MRS_SIM_INDEX sim_index, kal_uint8 fss);
// only use in mrs init phase only, no need mutex protection
void mrs_eas_read_nvram_cnf_handler(kal_uint16 nvram_file_id, kal_uint8 *data, kal_uint16 len);
#ifdef UNIT_TEST
void mrs_eas_set_ue_eutra_capability(MRS_SIM_INDEX sim_index, kal_uint8 *p_ue_eutra_cap, kal_uint32 cap_length);
void mrs_eas_set_eea_support(MRS_SIM_INDEX sim_index, kal_uint8 eea_support);
void mrs_eas_set_eia_support(MRS_SIM_INDEX sim_index, kal_uint8 eia_support);
#endif /* UNIT_TEST */
#if 0
/* under construction !*/
/* under construction !*/
#endif /* #if 0 */
// no need mutex protection, use freely
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);
#if (CUR_GEN >= MD_GEN97)
kal_uint32 mrs_eas_get_ue_eutra_capability_for_nr(
MRS_SIM_INDEX sim_index,
mrs_plmn_id_list *p_plmn_id_list,
kal_bool is_disable_gsm,
mrs_nras_octet_string_struct cap_request_filter,
kal_uint8 **pp_ue_eutra_capa,
mrs_gemini_status_enum gemini_status,
kal_bool is_restriction_size_valid,
kal_uint32 restriction_size);
void mrs_eas_is_mrdc_lte_standalone_band_combination_support(
MRS_SIM_INDEX sim_index,
mrs_plmn_id_list *p_plmn_id_list,
mrs_eas_mrdc_lte_standalone_bc_list *p_band_comb_list);
#endif /* (CUR_GEN >= MD_GEN97) */
// no need mutex protection, use freely
eas_cell_mode_enum mrs_eas_jdg_cell_mode_by_band(kal_uint16 lte_band);
// no need mutex protection, use freely
eas_cell_mode_enum mrs_eas_jdg_cell_mode_by_earfcn(EARFCN earfcn);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_dl_earfcn_with_bw_check(MRS_SIM_INDEX sim_index,
EARFCN dl_earfcn,
eas_bandwidth_enum band_width,
kal_bool allow_disabled_bands);
// no need mutex protection, use freely, but you need check input dl_earfcn is supported band by yourself
kal_bool mrs_eas_dl_full_partial_band_check(kal_uint16 band,
EARFCN dl_earfcn,
eas_bandwidth_enum band_width,
EARFCN start_earfcn,
EARFCN end_earfcn,
kal_bool skip_full_band_check);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_ul_earfcn_with_bw_check(MRS_SIM_INDEX sim_index,
EARFCN ul_earfcn,
eas_bandwidth_enum band_width);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_dl_bandwidth(MRS_SIM_INDEX sim_index,
kal_uint16 lte_band,
eas_bandwidth_enum band_width);
// 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")
kal_bool mrs_eas_band_setting_update(MRS_SIM_INDEX sim_index, kal_uint8 *lte_band_bmp, kal_bool with_duplex_mode);
// no need mutex protection, use freely
void mrs_eas_max_band_cap_for_user_extended( mrs_lte_band_list_struct *lte_band );
//#ifdef __SGLTE__
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
kal_bool mrs_eas_is_supported_band_in_nvram_stored(MRS_SIM_INDEX sim_index,
kal_uint16 lte_band);
// 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")
kal_bool mrs_eas_is_supported_earfcn_in_nvram_stored(MRS_SIM_INDEX sim_index,
EARFCN dl_earfcn);
//#endif /* __SGLTE__ */
/* Workaround for MT6291 FGPA Digital IQ */
#if defined(__RF_BYPASS__)
void mrs_eas_set_lock_multi_freq_capa(eas_lock_multi_freq_capa_struct *lock_multi_freq_capa);
#endif /* #if defined(__RF_BYPASS__) */
// no need mutex protection, use freely
kal_bool mrs_eas_is_supported_c2k_band(kal_uint8 band);
// 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")
void mrs_eas_band_control_func(kal_uint16 lte_band, eas_band_control_enum band_ctrl_info, MRS_SIM_INDEX sim_index);
// no need mutex protection, use freely
kal_bool mrs_eas_is_mcc_match_country(eas_country_enum country, kal_uint8 mcc1, kal_uint8 mcc2, kal_uint8 mcc3);
// 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")
void mrs_eas_add_remove_band(kal_uint16 lte_band, eas_band_control_enum band_ctrl_info, MRS_SIM_INDEX sim_index);
void mrs_eas_get_rf_supported_band_mask(MRS_SIM_INDEX sim_index, kal_uint8 *p_lte_support_band);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
void mrs_eas_get_context_nvram_lte_band(kal_uint8 *p_lte_band_mask, MRS_SIM_INDEX sim_index);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
void mrs_eas_set_context_nvram_lte_band(kal_uint8 *p_lte_band_mask, MRS_SIM_INDEX sim_index);
// need mutex protection, call "mrs_eas_internal_xxx..." for internal use (to avoid taking mutex recursively)
void mrs_eas_get_em_lte_support_band(MRS_SIM_INDEX sim_index, kal_uint8 *p_lte_support_band);
// 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")
kal_uint8 mrs_eas_WMID_lte_band_check(MRS_SIM_INDEX sim_index);
void mrs_eas_add_black_cell_list_notification(void);
void mrs_eas_clear_black_cell_list_notification(MRS_SIM_INDEX sim_index);
EARFCN mrs_eas_get_dl_earfcn_freq(kal_uint16 lte_band, eas_band_earfcn_freq_info_enum idx);
EARFCN mrs_eas_get_ul_earfcn_freq(kal_uint16 lte_band, eas_band_earfcn_freq_info_enum idx);
/* LTE band conversion function */
kal_uint16 mrs_eas_cvrt_lte_band_to_uint(LTE_Band lte_band);
void mrs_eas_clear_support_band_bit_by_cell_mode(kal_uint8 *supportBandBitmask,
const eas_cell_mode_enum cellMode);
extern void mrs_eas_retrieveLteBandBitmask_by_plmn(MRS_SIM_INDEX sim_index,
void *pLBandBitmask,
mrs_plmn_id_list *p_plmn_id_list);
extern kal_bool mrs_eas_band_setting_update_by_hplmn_and_cplmn(function_caller_id_enum caller_id,
MRS_SIM_INDEX sim_index,
mrs_plmn_id* hplmn,
mrs_plmn_id_list* cplmn);
mrs_sim_partial_band_cfg_state_enum mrs_eas_get_sim_partial_band_state(MRS_SIM_INDEX sim_index);
mrs_sim_band_cfg_state_enum mrs_eas_get_sim_band_state(MRS_SIM_INDEX sim_index);
mrs_plmn_band_cfg_state_enum mrs_eas_get_plmn_band_state(MRS_SIM_INDEX sim_index);
mrs_custom_disable_band_by_plmn_state_enum mrs_eas_get_custom_disable_band_by_plmn_state(MRS_SIM_INDEX sim_index);
mrs_plmn_region_band_cfg_state_enum mrs_eas_get_plmn_region_band_state(MRS_SIM_INDEX sim_index);
function_caller_id_enum mrs_eas_get_sim_band_last_caller_id(MRS_SIM_INDEX sim_index);
void mrs_eas_update_partial_band_support_info(mrs_plmn_id_list plmn_id_list,MRS_SIM_INDEX sim_index);
void mrs_eas_reset_partial_band_support_info(MRS_SIM_INDEX sim_index);
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);
kal_bool mrs_eas_judge_country_plmn(eas_country_enum eas_country,const mrs_plmn_id_list* target_plmn);
kal_bool mrs_eas_get_lte_support_band_from_ca_sel_table(
const MRS_SIM_INDEX sim_index,
const mrs_plmn_id *p_plmn_id,
kal_uint8 *p_lte_band_bitmask);
kal_bool mrs_eas_check_special_plmn_excluded(
const MRS_SIM_INDEX sim_index,
const mrs_plmn_id_list *p_plmn_id_list);
void mrs_eas_set_as_release(kal_uint8 as_rel, MRS_SIM_INDEX sim_index);
mrs_as_release_enum mrs_eas_get_as_release(MRS_SIM_INDEX sim_index);
void mrs_eas_clear_srch_info(void);
void mrs_eas_print_srch_info(void);
void mrs_eas_srch_info_band_level_add(const mrs_eas_srch_info_band_struct *b);
mrs_eas_srch_info_band_status_enum mrs_eas_srch_info_band_level_query(
const kal_uint16 band,
mrs_eas_srch_info_band_struct *b);
void mrs_eas_srch_info_freq_level_add(const mrs_eas_srch_info_freq_struct *f);
mrs_eas_srch_info_freq_status_enum mrs_eas_srch_info_freq_level_query(
const EARFCN earfcn,
mrs_eas_srch_info_freq_struct *f);
void mrs_eas_srch_info_cell_level_add_from_mib(
const EARFCN earfcn,
const kal_uint16 pci,
const kal_uint8 dl_bw);
void mrs_eas_srch_info_cell_level_add_from_sib1(
const EARFCN earfcn,
const kal_uint16 pci,
const mrs_plmn_id_list *plmn_list,
const kal_uint16 tac);
kal_bool mrs_eas_srch_info_cell_level_query(
const EARFCN earfcn,
const kal_uint16 pci,
mrs_eas_srch_info_cell_struct *c);
kal_bool mrs_eas_srch_info_cell_level_is_plmn_identical_on_freq(
const EARFCN earfcn,
const plmn_id_struct plmn_id);
void mrs_eas_mrs_plmn_id_to_plmn_id(const mrs_plmn_id *src, plmn_id_struct *dst);
void mrs_eas_set_ue_category(mrs_eas_ue_category_struct* p_lte_ue_category, MRS_SIM_INDEX sim_index);
kal_bool mrs_eas_get_ue_category(mrs_eas_ue_category_struct* p_lte_ue_category, MRS_SIM_INDEX sim_index);
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);
#ifdef __NR_RAT__
kal_int8 mrs_eas_calculate_p_compensation(
MRS_SIM_INDEX sim_idx,
EARFCN target_earfcn,
kal_int8 pmax,
eutra_multibandinfo_list_struct *p_multi_band_list,
const plmn_id_struct *p_plmn_id);
#endif /* __NR_RAT__ */
kal_bool mrs_eas_check_eutra_capability_supported(eas_cap_feature_enum feature);
#endif /* _MRS_EAS_CAPABILITY_H */