| /***************************************************************************** |
| * 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) 2005 |
| * |
| * 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: |
| * --------- |
| * sbp_public_utility.h |
| * |
| * Description: |
| * ------------ |
| * This file is intends for put the header of SBP public API |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| *============================================================================ |
| *****************************************************************************/ |
| |
| #ifndef _SBP_PUBLIC_UTILITY_H |
| #define _SBP_PUBLIC_UTILITY_H |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #include "kal_general_types.h" |
| #include "kal_public_defs.h" |
| #include "sim_exported_enum.h" |
| |
| #define SBP_ID_INVALID 0xffffffff |
| #define SBP_SIM_SLOT_ID_INVALID 0xff |
| |
| |
| /***************************************************************************** |
| * DESCRIPTION |
| * This enum is defined for Single Binary Platform (SBP) features |
| * NVRAM saves one binary value for each feature |
| *****************************************************************************/ |
| typedef enum |
| { |
| //Please add SBP features in sbp_feature.def |
| |
| #define SBP_FEATURE_DEF_BEGIN(x) |
| #define SBP_FEATURE_DEF(FEATURE, ATTR, DESC, DESC_V0,DESC_V1, DEFAULT_VAL) FEATURE, |
| #define SBP_FEATURE_DEF_END(x) |
| |
| #include "sbp_feature.def" |
| #undef SBP_FEATURE_DEF_BEGIN |
| #undef SBP_FEATURE_DEF |
| #undef SBP_FEATURE_DEF_END |
| |
| |
| SBP_MAX_MD_FEATURE |
| }sbp_md_feature_enum; |
| |
| /***************************************************************************** |
| * DESCRIPTION |
| * This enum is defined for Single Binary Platform (SBP) features |
| * NVRAM saves one byte value for each feature |
| *****************************************************************************/ |
| typedef enum |
| { |
| //Please add SBP data in sbp_data.def |
| |
| #define SBP_DATA_DEF(ID, FEATURE, ATTR, DESC) FEATURE, |
| #define SBP_DATA_DEF_BIT(ID, FEATURE, ATTR) FEATURE, |
| |
| #include "sbp_data.def" |
| #undef SBP_DATA_DEF |
| #undef SBP_DATA_DEF_BIT |
| |
| SBP_DATA_MAX_MD_FEATURE |
| }sbp_md_feature_data_enum; |
| |
| #if defined (__TC01_NVRAM__) || defined(__TC01__) // __TC01_CUST_SBP__ |
| /***************************************************************************** |
| * DESCRIPTION |
| * This enum is defined for SBP by the customer itself. |
| * NVRAM saves one binary value for each feature |
| *****************************************************************************/ |
| typedef enum |
| { |
| //Please add SBP features in sbp_feature_cust.def |
| #define SBP_FEATURE_DEF_BEGIN(x) |
| #define SBP_FEATURE_DEF(FEATURE, ATTR, DESC, DESC_V0,DESC_V1, DEFAULT_VAL) FEATURE, |
| #define SBP_FEATURE_DEF_END(x) |
| |
| #include "sbp_feature_cust.def" |
| #undef SBP_FEATURE_DEF_BEGIN |
| #undef SBP_FEATURE_DEF |
| #undef SBP_FEATURE_DEF_END |
| |
| SBP_CUSTOM_MAX_MD_FEATURE |
| }sbp_md_feature_custom_enum; |
| #endif |
| |
| |
| /* SBP Test Mode Enum */ |
| typedef enum |
| { |
| SBP_TEST_MODE_NONE = 0, |
| SBP_TEST_MODE_1, // Obsolete, use NVRAM_EF_SBP_CUSTOM_MODEM_CONFIG_LID to specify test feature value |
| SBP_TEST_MODE_2, // To skip hard coded feature changes |
| SBP_TEST_MODE_MAX |
| }sbp_test_mode_enum; |
| |
| /* SBP ATTRIBUTE Bitmask */ |
| typedef enum |
| { |
| SBP_ATTR_NONE = 0, |
| SBP_ATTR_NOT_SUPPORT_DYNAMIC_SBP = 0x01, /* bit 1 is for current SBP NV will keep when Dynamic SBP change */ |
| SBP_ATTR_ALL = 0xff |
| }sbp_attribute_enum; |
| |
| /** |
| * DESCRIPTION |
| * This enum is TO define RUIM configuration. |
| **/ |
| typedef enum |
| { |
| SBP_RUIM_DISABLED = 0x00, /* Non-RUIM configuration */ |
| SBP_RUIM_ENABLED = 0x01 /* RUIM configuration */ |
| }c2k_sbp_ruim_config_enum; |
| |
| /** |
| * SBP(Single Binary Platform) modem configuration |
| * a bitmap for all modem configurable feature |
| **/ |
| typedef struct |
| { |
| kal_uint32 sbp_mode; //reserved for usage |
| kal_uint8 modem_sbp_config[(SBP_MAX_MD_FEATURE/8)+1]; //the size depends on SBP_MAX_MD_FEATURE |
| } nvram_ef_sbp_modem_config_struct; |
| |
| #if defined (__TC01_NVRAM__) || defined(__TC01__) // __TC01_CUST_SBP__ |
| /*MUSE - ALPS0144925 */ |
| /*Customer's specific Single Binary Platform (SBP) features */ |
| #define NVRAM_EF_SBP_MODEM_CONFIG_TOTAL (2) |
| #define NVRAM_CUST_SBP_IDX 2 |
| |
| #else /* __TC01__ */ |
| #define NVRAM_EF_SBP_MODEM_CONFIG_TOTAL (1) |
| #endif /* __TC01__ */ |
| |
| #define NVRAM_EF_SBP_MODEM_CONFIG_SIZE sizeof(nvram_ef_sbp_modem_config_struct) |
| |
| /** |
| * SBP(Single Binary Platform) modem data configuration |
| * a byte for each modem configurable feature |
| **/ |
| typedef struct |
| { |
| kal_uint32 sbp_mode; //reserved for usage |
| kal_uint8 modem_sbp_data_config[SBP_DATA_MAX_MD_FEATURE]; |
| } nvram_ef_sbp_modem_data_config_struct; |
| |
| #define NVRAM_EF_SBP_MODEM_DATA_CONFIG_TOTAL (1) |
| #define NVRAM_EF_SBP_MODEM_DATA_CONFIG_SIZE sizeof(nvram_ef_sbp_modem_data_config_struct) |
| |
| /** |
| * SBP(Single Binary Platform) modem feature/data customization |
| * a list of customized SBP feature / feature data |
| * priorirty: customization > DSBP > SBP |
| **/ |
| |
| #define SBP_MAX_CUSTOM_CONFIG (100) // allows 100 custom configurations |
| |
| typedef enum |
| { |
| SBP_CUST_CFG_TYPE_NONE = 0, |
| SBP_CUST_CFG_TYPE_FEATURE, |
| SBP_CUST_CFG_TYPE_DATA |
| }sbp_cust_cfg_type_enum; |
| |
| typedef struct{ |
| kal_uint32 sbp_id; |
| sbp_cust_cfg_type_enum sbp_cust_cfg_type; |
| kal_uint16 sbp_cust_cfg_feature; // enum for SBP feature or SBP feature data |
| kal_uint8 sbp_cust_cfg_feature_val; |
| }sbp_custom_config_struct; |
| |
| typedef struct{ |
| sbp_custom_config_struct sbp_custom_config[SBP_MAX_CUSTOM_CONFIG]; |
| }nvram_ef_sbp_custom_modem_config_struct; |
| |
| #define NVRAM_EF_SBP_CUSTOM_MODEM_CONFIG_TOTAL (1) |
| #define NVRAM_EF_SBP_CUSTOM_MODEM_CONFIG_SIZE sizeof(nvram_ef_sbp_custom_modem_config_struct) |
| |
| |
| typedef struct{ |
| kal_uint32 mcf_dsbp_dr_time; |
| kal_uint32 max_mcf_dsbp_dr_time; |
| }nvram_ef_sbp_dsbp_config_struct; |
| |
| #define NVRAM_EF_SBP_DSBP_CONFIG_TOTAL (1) |
| #define NVRAM_EF_SBP_DSBP_CONFIG_SIZE sizeof(nvram_ef_sbp_dsbp_config_struct) |
| |
| /** |
| * SBP(Single Binary Platform) ID - plmn_id/iccid customization |
| * a customized SBP_ID - plmn_id/iccid mapping table |
| * priorirty: customization > internal static g_l4bsbp_iccid_prefix_table > internal static g_l4bsbp_plmn_table |
| **/ |
| |
| #define SBP_MAX_CUSTOM_SBP_ID_ICCID_MAPPING (100) // allows 100 custom mapping |
| #define SBP_MAX_CUSTOM_SBP_ID_PLMN_MAPPING (500) // allows 500 custom mapping |
| #define SBP_MAX_CUSTOM_ICCID_LEN 21 |
| |
| typedef struct{ |
| kal_uint8 iccid_prefix[SBP_MAX_CUSTOM_ICCID_LEN]; |
| kal_uint32 sbp_id; |
| }sbp_custom_sbp_id_iccid_mapping_struct; |
| |
| typedef struct{ |
| kal_uint32 plmn_range_start; |
| kal_uint32 plmn_range_end; |
| kal_uint32 sbp_id; |
| }sbp_custom_sbp_id_plmn_mapping_struct; |
| |
| typedef struct{ |
| kal_uint32 num_of_iccid_map; |
| sbp_custom_sbp_id_iccid_mapping_struct sbp_custom_sbp_id_iccid_map_table[SBP_MAX_CUSTOM_SBP_ID_ICCID_MAPPING]; |
| kal_uint32 num_of_plmn_map; |
| sbp_custom_sbp_id_plmn_mapping_struct sbp_custom_sbp_id_plmn_map_table[SBP_MAX_CUSTOM_SBP_ID_PLMN_MAPPING]; |
| }nvram_ef_sbp_custom_sbp_id_mapping_struct; |
| |
| #define NVRAM_EF_SBP_CUSTOM_SBP_ID_MAPPING_TOTAL (1) |
| #define NVRAM_EF_SBP_CUSTOM_SBP_ID_MAPPING_SIZE sizeof(nvram_ef_sbp_custom_sbp_id_mapping_struct) |
| |
| /** |
| * SBP(Single Binary Platform) ID list which need MD CXP reboot flow |
| **/ |
| |
| #define SBP_MAX_MDCXP_SBP_ID_NUM (100) // allows 100 operators |
| |
| typedef struct{ |
| kal_uint32 sbp_id_list[SBP_MAX_MDCXP_SBP_ID_NUM]; |
| }nvram_ef_sbp_mdcxp_sbp_id_list_struct; |
| |
| #define NVRAM_EF_SBP_MDCXP_SBP_ID_LIST_TOTAL (1) |
| #define NVRAM_EF_SBP_MDCXP_SBP_ID_LIST_SIZE sizeof(nvram_ef_sbp_mdcxp_sbp_id_list_struct) |
| |
| typedef struct |
| { |
| kal_uint8 mcc_mnc[7]; |
| kal_uint32 sbp_id; |
| } mccmnc_to_sbp_id_struct; |
| |
| typedef struct |
| { |
| kal_char csc_salecode[3]; |
| kal_char network_code[3]; |
| kal_char network_code_2[3]; |
| } sbp_salecode_struct; |
| |
| typedef enum |
| { |
| SBP_ID_OM = 0, |
| SBP_ID_UNKNOWN = SBP_ID_OM, |
| |
| /* the Operator enum*/ |
| SBP_ID_CMCC = 1, |
| SBP_ID_CU = 2, |
| SBP_ID_ORANGE = 3, |
| SBP_ID_TMO_EU = 5, |
| SBP_ID_VODAFONE = 6, |
| SBP_ID_ATT = 7, |
| SBP_ID_TMO_US = 8, |
| SBP_ID_CT = 9, |
| SBP_ID_TIER_2 = 10, |
| SBP_ID_H3G = 11, |
| SBP_ID_VERIZON = 12, |
| SBP_ID_TELEFONICA = 15, |
| SBP_ID_EE = 16, |
| SBP_ID_DOCOMO = 17, |
| SBP_ID_RJL = 18, |
| SBP_ID_TELSTRA = 19, |
| SBP_ID_SPRINT = 20, |
| SBP_ID_DISH = 21, |
| SBP_ID_SOFTBANK = 50, |
| SBP_ID_CSL = 100, |
| SBP_ID_PCCW = 101, |
| SBP_ID_SMT = 102, |
| SBP_ID_SINGTEL = 103, |
| SBP_ID_STARHUB = 104, |
| SBP_ID_AMX = 105, |
| SBP_ID_3HK = 106, |
| SBP_ID_SFR = 107, |
| SBP_ID_TWN = 108, |
| SBP_ID_CHT = 109, |
| SBP_ID_FET = 110, |
| SBP_ID_VDF_INDIA = 111, |
| SBP_ID_TELCEL = 112, |
| SBP_ID_BEELINE = 113, |
| SBP_ID_KT = 114, |
| SBP_ID_SKT = 115, |
| SBP_ID_UPLUS = 116, |
| SBP_ID_SMARTFREN = 117, |
| SBP_ID_YTL = 118, |
| SBP_ID_NATCOM = 119, |
| SBP_ID_CLARO = 120, |
| SBP_ID_BELL = 121, |
| SBP_ID_AIS = 122, |
| SBP_ID_APTG = 124, |
| SBP_ID_DTAC = 125, |
| SBP_ID_AVEA = 126, |
| SBP_ID_MEGAFON = 127, |
| SBP_ID_DNA = 128, |
| SBP_ID_KDDI = 129, |
| SBP_ID_TIM = 130, |
| SBP_ID_TRUEMOVER = 131, |
| SBP_ID_MOVISTAR = 132, |
| SBP_ID_DU = 133, |
| SBP_ID_ELISA = 134, |
| SBP_ID_MTS = 135, |
| SBP_ID_ENTEL = 136, |
| SBP_ID_TELE2 = 137, |
| SBP_ID_BOUYGUES = 139, |
| SBP_ID_MTN = 140, |
| SBP_ID_CELL_C = 141, |
| SBP_ID_TURKCELL = 143, |
| SBP_ID_SMILTE = 144, |
| SBP_ID_CRICKET = 145, |
| SBP_ID_ETISALAT = 146, |
| SBP_ID_AIRTEL = 147, |
| SBP_ID_SEATEL = 148, |
| SBP_ID_CMHK = 149, |
| SBP_ID_SWISSCOM_SCHWEIZ_AG = 150, |
| SBP_ID_M1 = 151, |
| SBP_ID_OPTUS = 152, |
| SBP_ID_VHA = 153, |
| SBP_ID_TELIA = 154, |
| SBP_ID_DIGI = 155, |
| SBP_ID_TELENOR = 156, |
| SBP_ID_TELUS = 157, |
| SBP_ID_ZAIN = 158, |
| SBP_ID_STC = 159, |
| SBP_ID_WEBE = 160, |
| SBP_ID_PLAY = 161, |
| SBP_ID_FREEDOM = 162, |
| SBP_ID_DIALOG = 163, |
| SBP_ID_TELENET = 164, |
| SBP_ID_SUNRISE = 165, |
| SBP_ID_SALT = 166, |
| SBP_ID_EIR = 168, |
| SBP_ID_VIPNET = 169, |
| SBP_ID_PARTNER = 170, |
| SBP_ID_WOM = 171, |
| SBP_ID_ALTICE = 172, |
| SBP_ID_NZ = 174, |
| SBP_ID_TDC = 175, |
| SBP_ID_TSTAR = 176, |
| SBP_ID_TELEKOM_EGYPT = 177, |
| SBP_ID_SMART = 178, |
| SBP_ID_ALLAI_NEWROZ = 179, |
| SBP_ID_SWAZI_MOBILE = 180, |
| SBP_ID_TELKOM_SA = 181, |
| SBP_ID_PROXIMUS = 182, |
| SBP_ID_PERSONAL = 183, |
| SBP_ID_VIETTEL = 184, |
| SBP_ID_2DEGREES = 185, |
| SBP_ID_IDEA = 186, |
| SBP_ID_SAFARICOM = 187, |
| SBP_ID_A1 = 188, |
| SBP_ID_UMOBILE = 189, |
| SBP_ID_TELKOM_KENYA = 190, |
| SBP_ID_GRAMEENPHONE = 191, |
| SBP_ID_ROBI = 192, |
| SBP_ID_BANGLALINK = 193, |
| SBP_ID_O2 = 195, |
| SBP_ID_FIRSTNET = 196, |
| SBP_ID_SBERBANK = 198, |
| SBP_ID_VIVACOM = 199, |
| SBP_ID_JTL_KENYA = 200, |
| SBP_ID_KPN_NETHERLANDS = 201, |
| SBP_ID_SPARK = 202, |
| SBP_ID_NOS = 203, |
| SBP_ID_ROGERS = 204, |
| SBP_ID_ALTAN = 205, |
| SBP_ID_SKY = 206, |
| SBP_ID_CTM = 207, |
| SBP_ID_3MACAU = 208, |
| SBP_ID_AVANTEL = 209, |
| SBP_ID_BSNL = 210, |
| SBP_ID_CW = 211, |
| SBP_ID_OPEN_MOBILE = 212, |
| SBP_ID_IDC = 214, |
| SBP_ID_MOTIV = 213, |
| SBP_ID_CELLCARD = 215, |
| SBP_ID_ZONG = 216, |
| SBP_ID_TELEKOM_SLOVENIA = 217, |
| SBP_ID_RAKUTEN = 218, |
| SBP_ID_MYTEL = 219, |
| SBP_ID_TIGO = 220, |
| SBP_ID_TPG = 221, |
| SBP_ID_ACG = 222, |
| SBP_ID_OOREDOO = 223, |
| SBP_ID_TELKOMSEL = 224, |
| SBP_ID_XL = 225, |
| SBP_ID_WIND = 227, |
| SBP_ID_CELCOM = 228, |
| SBP_ID_MAXIS = 231, |
| SBP_ID_MOBITEL = 232, |
| SBP_ID_PELEPHONE = 233, |
| SBP_ID_PLUS = 234, |
| SBP_ID_VIP = 235, |
| SBP_ID_USCC = 236, |
| SBP_ID_ICE = 237, |
| SBP_ID_VIDEOTRON = 238, |
| SBP_ID_EASTLINK = 239, |
| SBP_ID_XPLORE_MOBILE = 240, |
| SBP_ID_CLARO_PUERTO_RICO = 241, |
| SBP_ID_INWI = 242, |
| SBP_ID_GLOBE = 243, |
| SBP_ID_METFONE = 244, |
| SBP_ID_VIETNAMOBILE = 245, |
| SBP_ID_OOREDOO_QATAR = 246, |
| SBP_ID_MAROC_TELECOM = 247, |
| SBP_ID_EXECULINK = 248, |
| SBP_ID_WIGHTMAN = 249, |
| SBP_ID_UNION = 250, |
| SBP_ID_CORR = 251, |
| SBP_ID_PLATEAU = 252, |
| SBP_ID_GTA = 253, |
| SBP_ID_NEP = 254, |
| SBP_ID_CELLULAR_ONE_NEAZ = 255, |
| SBP_ID_CBW = 256, |
| SBP_ID_VIAERO = 257, |
| SBP_ID_CELLULAR_ONE_MTPCS = 258, |
| SBP_ID_EPIC = 259, |
| SBP_ID_IMMIX = 260, |
| SBP_ID_ASTAC = 261, |
| SBP_ID_IWIRELESS = 262, |
| SBP_ID_DTC = 263, |
| SBP_ID_PINE = 264, |
| SBP_ID_LONG_LINES = 265, |
| SBP_ID_CELLULAR_ONE_EIL = 266, |
| SBP_ID_GCI = 267, |
| SBP_ID_MOSAIC = 268, |
| SBP_ID_NEWCORE = 269, |
| SBP_ID_TELALASKA = 270, |
| SBP_ID_SAGEBRUSH = 271, |
| SBP_ID_GTT = 272, |
| SBP_ID_OPTIMERA = 273, |
| SBP_ID_YOIGO = 274, |
| SBP_ID_LIFECELL = 275, |
| SBP_ID_ALTICE_US = 276, |
| SBP_ID_TELEMACH = 277, |
| SBP_ID_JAZZ = 278, |
| SBP_ID_DITO = 279, |
| SBP_ID_OTZ = 280, |
| SBP_ID_KYIVSTAR = 281, |
| SBP_ID_MOBILY = 282, |
| SBP_ID_MEO = 283, |
| SBP_ID_MTS_SERBIA = 284, |
| SBP_ID_VINAPHONE = 285, |
| SBP_ID_MNSHUBS = 286, |
| SBP_ID_FREE = 287, |
| SBP_ID_VIRGIN = 288, |
| SBP_ID_BATELCO = 289, |
| SBP_ID_OMANTEL = 290, |
| SBP_ID_LMT = 291, |
| SBP_ID_CMHK_HKIA = 292, |
| SBP_ID_POST = 293, |
| SBP_ID_MPT = 294, |
| SBP_ID_NTC = 295, |
| SBP_ID_CAROLINA_WEST_WIRELESS = 296, |
| SBP_ID_FASTWEB = 297, |
| SBP_ID_UMNIAH = 298, |
| SBP_ID_NRJ = 299, |
| SBP_ID_TANGO = 301, |
| SBP_ID_OOREDOO_OMAN = 302, |
| SBP_ID_ILIAD = 303, |
| SBP_ID_CTMO = 304, |
| SBP_ID_CUHK = 306, |
| SBP_ID_CELLCOM = 307, |
| SBP_ID_HOTMOBILE = 310, |
| SBP_ID_BITE = 312, |
| SBP_ID_AXTEL = 313, |
| SBP_ID_TELE_GREENLAND = 314, |
| SBP_ID_TELE2_KAZAK = 315, |
| SBP_ID_NTWLS = 316, |
| SBP_ID_COMMNET_WIRELESS = 317, |
| SBP_ID_VIANOVA = 318, |
| SBP_ID_MONACO = 319, |
| SBP_ID_CORIOLIS = 320, |
| SBP_ID_ORA_VITI = 321, |
| SBP_ID_UPC = 322, |
| SBP_ID_LYCAMOBILE = 323, |
| SBP_ID_MOLDCELL = 324, |
| SBP_ID_JAMBOTEL = 325, |
| SBP_ID_9MOBILE = 326, |
| SBP_ID_SASKTEL = 327, |
| SBP_ID_VOO = 328, |
| SBP_ID_PLINTRON = 329, |
| SBP_ID_SOUTHERN_LINC = 332, |
| SBP_ID_CELLCOM_USA = 333, |
| SBP_ID_TASHICELL = 334, |
| SBP_ID_TOT = 335, |
| SBP_ID_MOBIFONE = 336, |
| SBP_ID_ANTEL = 337, |
| SBP_ID_SPUSU = 338, |
| SBP_ID_UNITEL = 339, |
| SBP_ID_VODAFONE_PNG = 340, |
| SBP_ID_UCELL = 341, |
| SBP_ID_4KA = 344, |
| SBP_ID_PRIMETEL = 345, |
| SBP_ID_AIRTEL_KENYA = 347, |
| SBP_ID_NCELL = 348, |
| SBP_ID_GIBTELECOM = 350, |
| SBP_ID_MOD_EGYPT = 352, |
| SBP_ID_WE4G = 353, |
| SBP_ID_POSTEMOBILE = 354, |
| SBP_ID_ALFA = 355, |
| SBP_ID_RAIN = 356, |
| SBP_ID_CNT = 357, |
| SBP_ID_TELMA = 358, |
| SBP_ID_ALIV = 359, |
| SBP_ID_CTEXCEL = 360, |
| SBP_ID_BMOBILE = 362, |
| SBP_ID_CSPIRE = 363, |
| SBP_ID_UNITED_WIRELESS = 364, |
| SBP_ID_IVCEL = 365, |
| SBP_ID_APPALACHIAN = 366, |
| SBP_ID_JAMES_VALLEY = 367, |
| SBP_ID_PIONEER = 368, |
| SBP_ID_PINE_BELT = 369, |
| SBP_ID_STRATA = 370, |
| SBP_ID_SILVER_STAR = 371, |
| SBP_ID_ONECOMM = 372, |
| SBP_ID_CORDOVA = 373, |
| SBP_ID_COPPER_VALLEY = 374, |
| SBP_ID_BLUE_WIRELESS = 375, |
| SBP_ID_INLAND = 376, |
| SBP_ID_OOREDOO_TUNISIA = 377, |
| SBP_ID_GEOVERSE = 378, |
| SBP_ID_PTCI = 379, |
| SBP_ID_ASIA_CELL = 381, |
| SBP_ID_ZEOP = 382, |
| SBP_ID_MAGTI = 383, |
| SBP_ID_BAKCEL = 384, |
| SBP_ID_BHMOBILE = 385, |
| SBP_ID_ENETWORKS = 386, |
| SBP_ID_WCW = 387, |
| SBP_ID_CBN = 388, |
| SBP_ID_UNITEL_LAOS = 389, |
| SBP_ID_MOBILE_NATION = 392, |
| SBP_ID_THUMB = 396, |
| SBP_ID_LICT = 398, |
| SBP_ID_IMAGINE = 403, |
| SBP_ID_PROGRESIF = 404, |
| SBP_ID_UNN = 405, |
| SBP_ID_DST = 406, |
| SBP_ID_AMERICANET = 407, |
| SBP_ID_BITEL = 408, |
| SBP_ID_MTEL = 410, |
| SBP_ID_EVOLVE_BROADBAND = 411, |
| SBP_ID_STANDING_ROCK_TELECOM = 412, |
| SBP_ID_BRISANET = 416, |
| SBP_ID_ATLAS_TELECOM = 417, |
| SBP_ID_EMTEL = 418, |
| SBP_ID_REDBULL = 420, |
| SBP_ID_NLC = 426, |
| |
| /* Lab testing SBP ID */ |
| SBP_ID_ERICSSON = 1001, |
| SBP_ID_NOKIA = 1002, |
| SBP_ID_MTK_HQLAB_ERICSSON = 1003, |
| SBP_ID_HUAWEI_IMS_LAB = 1004, |
| |
| |
| /* Legacy C2K SBP ID */ |
| SBP_ID_GENERIC = SBP_ID_OM, |
| SBP_ID_VERIZON_C2K = SBP_ID_VERIZON, |
| |
| #ifdef __TC10__ |
| /* START - allocated ID for Samsung 10000 ~ 20000 */ |
| |
| // SBP ID FOR CHINA 10001 ~ 10999 |
| SBP_ID_CHINA = 10000, |
| // SBP ID FOR GLOBAL 11001 ~ 11999 |
| SBP_ID_GLOBAL = 11000, |
| SBP_ID_TNZ, // TNZ - SPARK (Formerly Telecom New Zealand) |
| // SBP ID FOR JPN 12001 ~ 12999 |
| SBP_ID_JPN = 12000, |
| // SBP ID FOR KOR 13001 ~ 13999 |
| SBP_ID_KOR = 13000, |
| // SBP ID FOR LATIN_AMERICA 14001 ~ 14999 |
| SBP_ID_LATIN_AMERICA = 14000, |
| // SBP ID FOR N_AMERICA_CAN 15001 ~ 15999 |
| SBP_ID_N_AMERICA_CAN = 15000, |
| // SBP ID FOR N_AMERICA 16001 ~ 16999 |
| SBP_ID_N_AMERICA = 16000, |
| // SBP ID FOR N_AMERICA_3GPP2 17001 ~ 17999 |
| SBP_ID_N_AMERICA_3GPP2 = 17000, |
| |
| /* END - allocated ID for Samsung 10000 ~ 20000 */ |
| |
| SBP_ID_MAX = 20000, // MAX |
| #endif /* __TC10__ */ |
| |
| } sbp_id_enum; |
| |
| /* -------------------------- |
| * End of SBP Configuration |
| * --------------------------- */ |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature(sbp_md_feature_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_id() |
| * |
| * DESCRIPTION |
| * This function is used to query SBP ID received by modem |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * RETURNS |
| * the unsigned 4-byte value for the SBP ID |
| *****************************************************************************/ |
| extern kal_uint32 sbp_query_id(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_sub_id() |
| * |
| * DESCRIPTION |
| * This function is used to query SBP Sub ID received by modem |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * RETURNS |
| * the unsigned 4-byte value for the SBP Sub ID |
| *****************************************************************************/ |
| extern kal_uint32 sbp_query_sub_id(void); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_for_c2k() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration and used by C2K team only |
| * The function will judge current active PS using C2K's API and return the corresponding setting. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_for_c2k(sbp_md_feature_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration according to the PS ID |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * ps_id [IN] PS ID |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_by_ps(sbp_md_feature_enum feature, protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_no_overwrite() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration without overwrite |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_no_overwrite(sbp_md_feature_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_no_overwrite_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration without overwrite according to the PS ID |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * ps_id [IN] PS ID |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_no_overwrite_by_ps(sbp_md_feature_enum feature, protocol_id_enum ps_id); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature() |
| * |
| * DESCRIPTION |
| * This function is used to set modem configuration |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * is_turned_on [IN] |
| * sbp_feature_ptr [IN/OUT] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_set_md_feature(sbp_md_feature_enum feature, |
| kal_bool is_turned_on, |
| nvram_ef_sbp_modem_config_struct *sbp_feature_ptr); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_data() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * The byte value for the input feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_query_md_feature_data(sbp_md_feature_data_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_data_for_c2k() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration and used by C2K team only |
| * The function will judge current active PS using C2K's API and return the corresponding setting. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * the unsigned byte value for the feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_query_md_feature_data_for_c2k(sbp_md_feature_data_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_data_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration data |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * ps_id [IN] PS ID |
| * |
| * RETURNS |
| * the unsigned byte value for the feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_query_md_feature_data_by_ps(sbp_md_feature_data_enum feature, protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_data_no_overwrite() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration without overwrite |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * The byte value for the input feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_query_md_feature_data_no_overwrite(sbp_md_feature_data_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_data_no_overwrite_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration data without overwrite |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * ps_id [IN] PS ID |
| * |
| * RETURNS |
| * the unsigned byte value for the feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_query_md_feature_data_no_overwrite_by_ps(sbp_md_feature_data_enum feature, protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature_data() |
| * |
| * DESCRIPTION |
| * This function is used to query modem configuration |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * data [IN] |
| * sbp_data_ptr [IN/OUT] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_set_md_feature_data(sbp_md_feature_data_enum feature, |
| kal_uint8 data, |
| nvram_ef_sbp_modem_data_config_struct *sbp_data_ptr); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_general_set_md_feature_data() |
| * |
| * DESCRIPTION |
| * This function is used to set modem configuration data |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * the unsigned byte value for the feature |
| *****************************************************************************/ |
| extern kal_bool sbp_general_set_md_feature_data(sbp_md_feature_data_enum feature, kal_uint8 data); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * custom_nvram_set_sbp_id |
| * DESCRIPTION |
| * Set SBP features and data according to SBP ID. |
| * PARAMETERS |
| * sbp_mode [IN] |
| * RETURNS |
| * KAL_TRUE : Set SBP ID successfully |
| * KAL_FALSE : Error happens when setting SBP ID |
| *****************************************************************************/ |
| extern kal_bool custom_nvram_set_sbp_id(kal_uint32 sbp_id, kal_bool is_in_dynamic_sbp, kal_uint8 *imsi, protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * custom_nvram_init_sbp_id |
| * DESCRIPTION |
| * Set SBP features and data according to SBP ID and SIM SBP ID. |
| * PARAMETERS |
| * sbp_id [IN] |
| * RETURNS |
| * Void |
| *****************************************************************************/ |
| extern void custom_nvram_init_sbp_id(kal_uint32 sbp_id); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_sim_sbp_id_for_all() |
| * |
| * DESCRIPTION |
| * get SIM SBP ID which trigger DSBP for all modem (IMS/VoLTE + PS/L1) |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * the unsigned 4-byte value for the SIM SBP ID |
| * |
| *****************************************************************************/ |
| extern kal_uint32 sbp_get_sim_sbp_id_for_all(protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_current_sim_sbp_id() |
| * |
| * DESCRIPTION |
| * get SIM SBP ID which trigger DSBP for IMS/VoLTE |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * the unsigned 4-byte value for the SIM SBP ID |
| * |
| *****************************************************************************/ |
| extern kal_uint32 sbp_get_current_sim_sbp_id(protocol_id_enum ps_id); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_sim_sbp_id() |
| * |
| * DESCRIPTION |
| * get SIM SBP ID which trigger DSBP for IMS/VoLTE |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * the unsigned 4-byte value for the SIM SBP ID |
| * |
| *****************************************************************************/ |
| extern kal_uint32 sbp_get_sim_sbp_id(protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sim_sbp_id_for_all() |
| * |
| * DESCRIPTION |
| * set SIM SBP ID which trigger DSBP for all modem (IMS/VoLTE + PS/L1) |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * sim_sbp_id [IN] SIM SBP ID |
| * mcc [IN] MCC |
| * mnc [IN] MNC |
| * iccid [IN] ICCID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_set_sim_sbp_id_for_all(protocol_id_enum ps_id, kal_uint32 sim_sbp_id, kal_uint8 *mcc, kal_uint8 *mnc, kal_uint8 *iccid); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_current_sim_sbp_id() |
| * |
| * DESCRIPTION |
| * get SIM SBP ID which trigger DSBP for IMS/VoLTE |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * sim_sbp_id [IN] SIM SBP ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_set_current_sim_sbp_id(protocol_id_enum ps_id, kal_uint32 sim_sbp_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sim_sbp_id() |
| * |
| * DESCRIPTION |
| * set SIM SBP ID which trigger DSBP for IMS/VoLTE |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * sim_sbp_id [IN] SIM SBP ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_set_sim_sbp_id(protocol_id_enum ps_id, kal_uint32 sim_sbp_id, kal_uint8 *mcc, kal_uint8 *mnc, kal_uint8 *iccid); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_convert_mcc_mnc_string_from_imsi |
| * DESCRIPTION |
| * get mcc, mnc from imsi with string format |
| * PARAMETERS |
| * imsi |
| * RETURNS |
| * KAL_TRUE |
| *****************************************************************************/ |
| kal_bool sbp_convert_mcc_mnc_string_from_imsi(kal_uint8* mcc_ptr, kal_uint32 mcc_size, kal_uint8 *mnc_ptr, kal_uint32 mnc_size, kal_uint8* imsi_ptr, kal_uint8 mnc_len); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_sbp_feature_raw_config() |
| * |
| * DESCRIPTION |
| * Get SBP Feature Raw Data according to the ps_id |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_get_sbp_feature_raw_config(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sbp_feature_raw_config() |
| * |
| * DESCRIPTION |
| * Set SBP Feature Raw Data according to the ps_id |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern void sbp_set_sbp_feature_raw_config(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_sbp_data_raw_config() |
| * |
| * DESCRIPTION |
| * Get SBP Data Raw Data according to the ps_id |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_get_sbp_data_raw_config(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sbp_data_raw_config() |
| * |
| * DESCRIPTION |
| * Get SBP Data Raw Data according to the ps_id |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern void sbp_set_sbp_data_raw_config(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_general_set_md_feature() |
| * |
| * DESCRIPTION |
| * This function is used to set modem configuration. |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * is_turned_on [IN] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_general_set_md_feature(sbp_md_feature_enum feature, kal_bool is_turned_on); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_features_to_nvram() |
| * |
| * DESCRIPTION |
| * This function is used to store current config of features from SBP contexts into NVRAM_EF_SBP_MODEM_CONFIG_LID |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_update_features_to_nvram(); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_data_to_nvram() |
| * |
| * DESCRIPTION |
| * This function is used to store current config of data from SBP contexts into NVRAM_EF_SBP_MODEM_DATA_CONFIG_LID |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_update_data_to_nvram(); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_specific_feature_to_nvram() |
| * |
| * DESCRIPTION |
| * This function is used to write a single SBP feature to NVRAM, keeping all other features the same |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * is_turned_on [IN] |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| kal_bool sbp_update_specific_feature_to_nvram(sbp_md_feature_enum feature, kal_bool is_turned_on); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_specific_data_to_nvram() |
| * |
| * DESCRIPTION |
| * This function is used to write a single SBP feature data to NVRAM, keeping all other feature data the same |
| * |
| * PARAMETERS |
| * feature [IN] modem feature data |
| * data [IN] value of feature data |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| kal_bool sbp_update_specific_data_to_nvram(sbp_md_feature_data_enum feature, kal_uint8 data); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_init_contexts() |
| * |
| * DESCRIPTION |
| * This function is used to init SBP Contexts |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * |
| * RETURNS |
| * KAL_TRUE or KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_init_contexts(); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_dsbp_mode |
| * |
| * DESCRIPTION |
| * query dynamic SBP mode |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * RETURNS |
| * current DSBP mode : l4bsbp_dsbp_mode_enum |
| *****************************************************************************/ |
| extern kal_uint8 sbp_get_dsbp_mode(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_dsbp_mode |
| * |
| * DESCRIPTION |
| * Set dynamic SBP mode. |
| * |
| * PARAMETERS |
| * dsbp_mdoe [IN] l4bsbp_dsbp_mode_enum |
| * RETURNS |
| * KAL_TRUE : success |
| * KAL_FALSE : fail |
| *****************************************************************************/ |
| extern kal_bool sbp_set_dsbp_mode(kal_uint8 dspb_mode); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_test_mode |
| * |
| * DESCRIPTION |
| * query if it is under test mode or not |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * RETURNS |
| * current SBP test mode : sbp_test_mode_enum |
| *****************************************************************************/ |
| extern sbp_test_mode_enum sbp_get_test_mode(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_test_mode |
| * |
| * DESCRIPTION |
| * Set SBP to test mode. |
| * In test mode, we read current values of nvram files instead of using default values before applying SBP settings. |
| * |
| * PARAMETERS |
| * test_mdoe [IN] sbp_test_mode_enum |
| * RETURNS |
| * KAL_TRUE : success |
| * KAL_FALSE : fail |
| *****************************************************************************/ |
| extern kal_bool sbp_set_test_mode(sbp_test_mode_enum test_mode); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to set modem configuration by PS |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * is_turned_on [IN] |
| * sbp_feature_ptr [IN/OUT] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| kal_bool sbp_set_md_feature_by_ps(sbp_md_feature_enum feature, |
| kal_bool is_turned_on, |
| protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature_data_by_ps() |
| * |
| * DESCRIPTION |
| * This function is used to set modem configuration data by PS |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * |
| * RETURNS |
| * the unsigned byte value for the feature |
| *****************************************************************************/ |
| kal_bool sbp_set_md_feature_data_by_ps(sbp_md_feature_data_enum feature, |
| kal_uint8 data, |
| protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sbp_id() |
| * |
| * DESCRIPTION |
| * This function is used to set SBP ID into SBP contexts and its NVRAM |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * |
| * RETURNS |
| * KAL_TRUE or KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_set_sbp_id(kal_uint32 sbp_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_md_feature_overwrite() |
| * |
| * DESCRIPTION |
| * This function is used to overwrite the configuration for GCF or other test modes |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * enabled [IN] feature is turned on or not |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_md_feature_overwrite(sbp_md_feature_enum feature, kal_bool enabled); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_md_feature_data_overwrite() |
| * |
| * DESCRIPTION |
| * This function is used to overwrite the configuration for GCF or other test modes |
| * |
| * PARAMETERS |
| * feature [IN] modem feature |
| * value [IN] the value of the feature |
| * |
| * RETURNS |
| * the overwrited value for the feature |
| *****************************************************************************/ |
| extern kal_uint8 sbp_md_feature_data_overwrite(sbp_md_feature_data_enum feature, kal_uint8 value); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_reload_config() |
| * |
| * DESCRIPTION |
| * This function is used to reload SBP related feature/data configuration |
| * Please don't use this API if you don't get the permission from SBP FPM. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| void sbp_reload_config(); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * nvram_custom_config_sbp_by_model_id |
| * DESCRIPTION |
| * Set SBP features and data according to Model ID. |
| * PARAMETERS |
| * md_product_model_id [IN] |
| * RETURNS |
| * KAL_TRUE : Set SBP ID successfully |
| * KAL_FALSE : Error happens when setting SBP ID |
| *****************************************************************************/ |
| extern kal_bool nvram_custom_config_sbp_by_model_id(kal_uint32 md_product_model_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_custom_config_to_nvram |
| * |
| * DESCRIPTION |
| * This function updates sbp feature/data custom config to nvram |
| * |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * is_erase [IN] reset the feature/data item or not |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| kal_bool sbp_update_custom_config_to_nvram(sbp_custom_config_struct *sbp_custom_config_ptr, kal_bool is_erase); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_custom_config_nv_with_mcf |
| * |
| * DESCRIPTION |
| * This function reads NVRAM_EF_SBP_CUSTOM_MODEM_CONFIG_LID and applies MCF OTA by OP change |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| kal_bool sbp_get_custom_config_nv_with_mcf(protocol_id_enum ps_id, nvram_ef_sbp_custom_modem_config_struct * sbp_custom_modem_config_nv_ptr); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_max_custom_config |
| * |
| * DESCRIPTION |
| * This function gets MAX custom config NV entries |
| * |
| * PARAMETERS |
| * [IN] N/A |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| kal_uint16 sbp_get_max_custom_config(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_last_dsbp_sim_info() |
| * |
| * DESCRIPTION |
| * This function is used to get MCC/MNC/ICCID of last completed DSBP |
| * For mode2 device, this will include SIM info from last power up |
| * For mode1 device, only include SIM info in current sbp context |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * param [IN] mcc, mnc, iccid |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| extern void sbp_get_last_dsbp_sim_info(protocol_id_enum ps_id, kal_uint8 *mcc, kal_uint8 *mnc, kal_uint8 *iccid); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_last_mode2_dsbp_sim_info() |
| * |
| * DESCRIPTION |
| * This function is used to get SIM_SBP_ID/MCC/MNC/ICCID of last completed mode2 DSBP |
| * Can be used in DSBP callback function to compare with last mode2 DSBP result |
| * As part of mode2 design, this includes info from SIM insert of last power cycle |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * param [IN] sim_sbp_id, mcc, mnc, iccid |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| extern void sbp_get_last_mode2_dsbp_sim_info(protocol_id_enum ps_id, kal_uint32 *sim_sbp_id, kal_uint8 *mcc, kal_uint8 *mnc, kal_uint8 *iccid); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_dsbp_config() |
| * |
| * DESCRIPTION |
| * This function is used to get dsbp retry config |
| * |
| * PARAMETERS |
| * void |
| * RETURNS |
| * nvram_ef_sbp_dsbp_config_struct |
| * |
| *****************************************************************************/ |
| extern nvram_ef_sbp_dsbp_config_struct* sbp_get_dsbp_config(void); |
| /***************************************************************************** |
| * FUNCTION |
| * nvram_custom_config_refresh_sbp_id_mapping_when_mcf_ota_start() |
| * |
| * DESCRIPTION |
| * This function is used to re-read NVRAM and update the globle custom sbp_id mapping table |
| * when MCF default OTA triggered. |
| * |
| * PARAMETERS |
| * void |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| extern void nvram_custom_config_refresh_sbp_id_mapping_when_mcf_ota_start(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_custom_sbp_id_mapping_table |
| * |
| * DESCRIPTION |
| * This function is used to get the globle custom sbp_id mapping table |
| * |
| * PARAMETERS |
| * void |
| * RETURNS |
| * nvram_ef_sbp_custom_sbp_id_mapping_struct |
| * |
| *****************************************************************************/ |
| extern nvram_ef_sbp_custom_sbp_id_mapping_struct* sbp_get_custom_sbp_id_mapping_table(void); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_md_cxp_sbp_id |
| * |
| * DESCRIPTION |
| * This function is used to get trigger modem CXP (device) sbp_id |
| * |
| * PARAMETERS |
| * kal_uint32 sim_sbp_id |
| * RETURNS |
| * kal_uint32 md_cxp_sbp_id |
| * |
| *****************************************************************************/ |
| extern kal_uint32 sbp_get_md_cxp_sbp_id(kal_uint32 sim_sbp_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_cxp_sbp_id |
| * |
| * DESCRIPTION |
| * This function is used to add trigger modem CXP (device) sbp_id |
| * |
| * PARAMETERS |
| * kal_uint32 sbp_id |
| * RETURNS |
| * |
| *****************************************************************************/ |
| extern void sbp_set_md_cxp_sbp_id(kal_uint32 sbp_id); |
| |
| #if defined (__TC01_NVRAM__) || defined(__TC01__) // __TC01_CUST_SBP__ |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_query_md_feature() for customer's SBP. |
| * |
| * PARAMETERS |
| * feature [IN] customer's modem feature |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_custom(sbp_md_feature_custom_enum feature); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_query_md_feature_by_ps_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_query_md_feature_by_ps() for customer's SBP. |
| * |
| * PARAMETERS |
| * feature [IN] customer's modem feature |
| * ps_id [IN] PS ID |
| * |
| * RETURNS |
| * KAL_TRUE : if this feature is turned on |
| * KAL_FALSE : if this feature is turned off |
| *****************************************************************************/ |
| extern kal_bool sbp_query_md_feature_by_ps_custom(sbp_md_feature_custom_enum feature, protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_set_md_feature() for customer's SBP. |
| * |
| * PARAMETERS |
| * feature [IN] customer's modem feature |
| * is_turned_on [IN] |
| * sbp_feature_ptr [IN/OUT] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_set_md_feature_custom(sbp_md_feature_custom_enum feature, |
| kal_bool is_turned_on, |
| nvram_ef_sbp_modem_config_struct *sbp_feature_ptr); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_md_feature_by_ps_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_set_md_feature_by_ps() for customer's SBP. |
| * |
| * PARAMETERS |
| * feature [IN] customer's modem feature |
| * is_turned_on [IN] |
| * sbp_feature_ptr [IN/OUT] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_set_md_feature_by_ps_custom(sbp_md_feature_custom_enum feature, |
| kal_bool is_turned_on, |
| protocol_id_enum ps_id); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_general_set_md_feature_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_general_set_md_feature() for customer's SBP. |
| * |
| * PARAMETERS |
| * feature [IN] customer's modem feature |
| * is_turned_on [IN] |
| * |
| * RETURNS |
| * KAL_TRUE if success; otherwise KAL_FALSE |
| *****************************************************************************/ |
| extern kal_bool sbp_general_set_md_feature_custom(sbp_md_feature_custom_enum feature, kal_bool is_turned_on); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_update_features_to_nvram_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_update_features_to_nvram() for customer's SBP. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_update_features_to_nvram_custom(); |
| |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_sbp_feature_raw_config_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_get_sbp_feature_raw_config() for customer's SBP. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern kal_bool sbp_get_sbp_feature_raw_config_custom(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_set_sbp_feature_raw_config_custom() |
| * |
| * DESCRIPTION |
| * clone sbp_set_sbp_feature_raw_config() for customer's SBP. |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * |
| * RETURNS |
| * KAL_TRUE - success |
| * KAL_FALSE - failure |
| * |
| *****************************************************************************/ |
| extern void sbp_set_sbp_feature_raw_config_custom(protocol_id_enum ps_id, kal_uint8 *raw_config); |
| #endif /* (__TC01_NVRAM__) || defined(__TC01__) */ |
| |
| #ifdef __IPC_ADAPTER__ |
| /***************************************************************************** |
| * FUNCTION |
| * sbp_get_salecode() |
| * |
| * DESCRIPTION |
| * This function is used to get salecode of this ps_id |
| * If network code is present, network code is given |
| * otherwise, csc_salecode is given |
| * |
| * PARAMETERS |
| * ps_id [IN] protocol ID |
| * param [IN] salecode |
| * RETURNS |
| * void |
| * |
| *****************************************************************************/ |
| extern void sbp_get_salecode(kal_char *salecode, protocol_id_enum ps_id); |
| extern void sbp_get_csc_salecode(kal_char *salecode); |
| extern void sbp_get_network_code_salecode(kal_char *salecode, protocol_id_enum ps_id); |
| #endif /* __IPC_ADAPTER__ */ |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif /* _SBP_PUBLIC_UTILITY_H */ |
| |