| /***************************************************************************** |
| * 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: |
| * --------- |
| * |
| * |
| * Project: |
| * -------- |
| * MAUI |
| * |
| * Description: |
| * ------------ |
| * |
| * |
| * Author: |
| * ------- |
| * |
| * |
| *============================================================================ |
| * HISTORY |
| * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *------------------------------------------------------------------------------ |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| *------------------------------------------------------------------------------ |
| * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *============================================================================ |
| ****************************************************************************/ |
| #ifndef __D2_NVRAM_DEF_H__ |
| #define __D2_NVRAM_DEF_H__ |
| |
| #ifdef __cplusplus |
| extern "C" |
| { |
| #endif /* __cplusplus */ |
| |
| |
| #include "nvram_defs.h" |
| #include "nvram_enums.h" |
| #include "ps_public_enum.h" |
| #include "device.h" |
| // LID Enums |
| |
| |
| typedef enum |
| { |
| NVRAM_EF_D2_START_LID = NVRAM_LID_GRP_D2(0), |
| NVRAM_EF_D2_DATA_LID = NVRAM_LID_GRP_D2(1), |
| NVRAM_EF_D2_APNINFO_LID = NVRAM_LID_GRP_D2(2), |
| NVRAM_EF_D2_FOP_LID = NVRAM_LID_GRP_D2(3), |
| NVRAM_EF_D2_DEFAULT_PDP_PROFILE_LID = NVRAM_LID_GRP_D2(4), |
| NVRAM_EF_D2_APNSETTING_LID = NVRAM_LID_GRP_D2(6), |
| NVRAM_EF_D2_CFG_LID = NVRAM_LID_GRP_D2(7), |
| NVRAM_EF_D2_IMSTEST_LID = NVRAM_LID_GRP_D2(8), |
| NVRAM_EF_D2_IMSCFG_LID = NVRAM_LID_GRP_D2(9), |
| NVRAM_EF_D2_MCF_DATARETRY_INFO_LID = NVRAM_LID_GRP_D2(11), |
| NVRAM_EF_D2_DDM_QOS_IND_LID = NVRAM_LID_GRP_D2(14), |
| NVRAM_EF_D2_MCF_APN_CFG_LID = NVRAM_LID_GRP_D2(15), |
| NVRAM_EF_D2_URSP_LID = NVRAM_LID_GRP_D2(16), |
| NVRAM_EF_D2_MCF_TEST_HO_CFG_LID = NVRAM_LID_GRP_D2(17), |
| NVRAM_EF_D2_MCF_NORMAL_HO_CFG_LID = NVRAM_LID_GRP_D2(18), |
| NVRAM_EF_D2_VZW_APN_CFG_LID = NVRAM_LID_GRP_D2(19), |
| NVRAM_EF_D2_MCF_MTU_CFG_LID = NVRAM_LID_GRP_D2(20), |
| NVRAM_EF_D2_DNS_CFG_LID = NVRAM_LID_GRP_D2(21), |
| NVRAM_EF_D2_MCF_KEEP_INTERNET_LID = NVRAM_LID_GRP_D2(22), |
| NVRAM_EF_D2_LAST_LID = NVRAM_LID_GRP_D2(63) |
| } nvram_lid_d2m_enum; |
| |
| // VERNO |
| #define NVRAM_EF_D2_DATA_LID_VERNO "001" |
| #define NVRAM_EF_D2_APNINFO_LID_VERNO "003" |
| #define NVRAM_EF_D2_FOP_LID_VERNO "000" |
| #define NVRAM_EF_D2_DEFAULT_PDP_PROFILE_LID_VERNO "000" |
| #define NVRAM_EF_D2_APNSETTING_LID_VERNO "000" |
| #define NVRAM_EF_D2_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_IMSTEST_LID_VERNO "000" |
| #define NVRAM_EF_D2_IMSCFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_MCF_APN_CFG_LID_VERNO "001" |
| #define NVRAM_EF_D2_MCF_DATARETRY_INFO_LID_VERNO "000" |
| #define NVRAM_EF_D2_DDM_QOS_IND_LID_VERNO "000" |
| #define NVRAM_EF_D2_URSP_LID_VERNO "000" |
| #define NVRAM_EF_D2_MCF_NORMAL_HO_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_MCF_TEST_HO_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_VZW_APN_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_MCF_MTU_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_DNS_CFG_LID_VERNO "000" |
| #define NVRAM_EF_D2_MCF_KEEP_INTERNET_LID_VERNO "002" |
| |
| // Hash Key |
| #define NVRAM_EF_D2_DATA_LID_HASH 0xE2120E70 |
| #define NVRAM_EF_D2_APNINFO_LID_HASH 0x8754028C |
| #define NVRAM_EF_D2_FOP_LID_HASH 0xAF094EF7 |
| #define NVRAM_EF_D2_DEFAULT_PDP_PROFILE_LID_HASH 0xAD27E22E |
| #define NVRAM_EF_D2_APNSETTING_LID_HASH 0xEDBEA7A8 |
| #define NVRAM_EF_D2_CFG_LID_HASH 0x7F267B87 |
| #define NVRAM_EF_D2_IMSTEST_LID_HASH 0x019A18D1 |
| #define NVRAM_EF_D2_IMSCFG_LID_HASH 0xF26D36EA |
| #define NVRAM_EF_D2_MCF_APN_CFG_LID_HASH 0xF9BF2D63 |
| #define NVRAM_EF_D2_MCF_DATARETRY_INFO_LID_HASH 0x790B131C |
| #define NVRAM_EF_D2_DDM_QOS_IND_LID_HASH 0x342067A4 |
| #define NVRAM_EF_D2_URSP_LID_HASH 0xBE69BC10 |
| #define NVRAM_EF_D2_MCF_NORMAL_HO_CFG_LID_HASH 0xF8D6F88E |
| #define NVRAM_EF_D2_MCF_TEST_HO_CFG_LID_HASH 0x6E517E3C |
| #define NVRAM_EF_D2_VZW_APN_CFG_LID_HASH 0x20845324 |
| #define NVRAM_EF_D2_MCF_MTU_CFG_LID_HASH 0x57FBAFEE |
| #define NVRAM_EF_D2_DNS_CFG_LID_HASH 0x55596088 |
| #define NVRAM_EF_D2_MCF_KEEP_INTERNET_LID_HASH 0xDC04A686 |
| |
| // Data Structure of Each LID |
| typedef struct |
| { |
| kal_uint8 iccid[128]; |
| kal_uint8 imsi[128]; |
| kal_uint8 slot_id; // ap slot view 1, 2, 3... |
| } nvram_d2_data_struct; |
| |
| typedef struct |
| { |
| kal_uint8 ID[8]; /* IE_STRING_LEN = 5 */ |
| kal_uint8 contents[32]; /* EGPCO_IE_CONTENTS_STRING_LEN = 32 */ |
| }nvram_d2_pco_ie_struct; |
| |
| typedef struct |
| { |
| kal_uint8 iccid[64]; |
| kal_uint8 imsi[64]; |
| kal_uint8 apn[128]; |
| kal_uint8 apn_type[128]; |
| kal_uint8 pdp_type[128]; |
| kal_uint8 roam_prot[128]; |
| kal_uint8 auth_type; |
| kal_uint8 username[128]; |
| kal_uint8 passwd[128]; |
| kal_uint8 p_cscf_discovery; |
| kal_uint8 im_cn_signalling_flag; |
| kal_uint8 emergency_flag; |
| kal_uint8 op_id; |
| kal_bool is_pco_present; /* PCO flag */ |
| kal_uint8 IE_count; /* PCO IE count */ |
| nvram_d2_pco_ie_struct IE[16]; /* PCO IE, MAX_IE_COUNT = 16 */ |
| } nvram_d2_apninfo_struct; |
| |
| typedef struct |
| { |
| kal_uint32 fop; |
| } nvram_d2_fop_struct; |
| |
| typedef struct |
| { |
| kal_uint8 qos_enabled_value; |
| kal_uint8 qos_data_string[255]; |
| } nvram_ddm_qos_enable_struct; |
| |
| typedef struct |
| { |
| kal_uint8 context_id; |
| kal_uint8 pdp_type[10]; |
| kal_uint8 apn_len; |
| kal_uint8 apn[100]; |
| kal_uint8 p_cscf_discovery; |
| kal_uint8 im_cn_signalling_flag; |
| kal_uint8 request_type; |
| kal_uint8 emergency_flag; |
| kal_uint8 auth_type; |
| kal_uint8 username[128]; |
| kal_uint8 passwd[128]; |
| } nvram_d2_default_pdp_profile_struct; |
| |
| typedef struct |
| { |
| kal_uint32 wapn; |
| kal_uint8 apn[128]; |
| kal_uint8 pdp_type[128]; |
| kal_uint8 roam_prot[128]; |
| kal_uint8 auth_type; |
| kal_uint8 username[128]; |
| kal_uint8 passwd[128]; |
| kal_uint8 carrier_enabled; |
| kal_uint32 apncl; |
| kal_uint8 apnni[128]; |
| kal_uint8 apn_type[128]; |
| kal_uint8 apnbear[128]; |
| kal_uint8 apnenable[128]; |
| kal_uint32 apntime; |
| kal_uint32 max_conn; |
| kal_uint32 max_conn_t; |
| kal_uint32 wait_time; |
| kal_uint32 throttle_time; |
| } nvram_d2_apnsetting_struct; |
| |
| typedef struct |
| { |
| kal_uint8 iccid[128]; |
| kal_uint8 mobile_data; |
| kal_uint8 data_roaming; |
| kal_uint8 volte; |
| kal_uint8 ims_test_mode; |
| kal_uint8 reserved[124]; |
| } nvram_d2_cfg_struct; |
| |
| typedef struct |
| { |
| kal_uint8 mode; |
| } nvram_d2_imstest_struct; |
| |
| typedef struct |
| { |
| kal_uint8 iccid[128]; |
| kal_uint8 volte_enable; |
| kal_uint8 vilte_enable; |
| kal_uint8 vowifi_enable; |
| kal_uint8 viwifi_enable; |
| kal_uint8 ims_sms_enable; |
| kal_uint8 eims_enable; |
| } nvram_d2_imscfg_struct; |
| |
| typedef struct |
| { |
| kal_bool is_valid; /* Whether this config. is valid or not*/ |
| kal_uint32 type; /* APN Type, defined in ddm_apn_type_enum */ |
| kal_uint8 protocol; /* Protocol (PDP) Type, IPV4:0x21, IPV6:0x57, IPV4V6:0x8D (enum) */ |
| kal_uint8 roaming_protocol; /* Rroaming Protocol Type, IPV4:0x21, IPV6:0x57, IPV4V6:0x8D (enum) */ |
| kal_uint8 authtype; /* Auth Type, 0:NONE, 1:PAP, 2:CHAP (enum) */ |
| kal_uint32 network_type_bitmask; /* Network Type Bitmask */ |
| kal_uint8 mvno_type; /* MVNO type {PNN, SPN, GID, IMSI} */ |
| kal_uint8 mvno_match_data[100]; /* Match data of corresponding MVNO type */ |
| kal_uint8 apn[128]; /* APN Name */ |
| kal_uint8 user[128]; /* Username */ |
| kal_uint8 password[128]; /* Password */ |
| } nvram_d2_mcf_apn_cfg_entry_struct; |
| |
| typedef struct |
| { |
| nvram_d2_mcf_apn_cfg_entry_struct apn_cfg[10]; |
| } nvram_d2_mcf_apn_cfg_struct; |
| |
| typedef struct |
| { |
| kal_uint8 dataretry_info[256]; |
| } nvram_ddm_mcf_dataretry_info_struct; |
| typedef struct |
| { |
| nvram_ddm_mcf_dataretry_info_struct dataretry_info; |
| } nvram_ddm_mcf_pdn_dataretry_info_struct; |
| |
| typedef struct |
| { |
| kal_uint8 data[15000]; |
| } nvram_d2_ursp_struct; |
| |
| typedef struct |
| { |
| kal_uint32 ddc_time; |
| kal_uint32 retrytime[32]; |
| kal_uint32 retry1stran_time; |
| kal_uint32 fail_noipv6_retrytime; |
| } nvram_d2_mcf_normal_ho_cfg_struct; |
| |
| typedef nvram_d2_mcf_normal_ho_cfg_struct nvram_d2_mcf_test_ho_cfg_struct; |
| |
| typedef struct |
| { |
| kal_uint32 wapn; /* WAPN, could treat it as APN index */ |
| kal_uint32 apncl; /* APN Class */ |
| kal_uint8 apntype; /* PDP Type */ |
| kal_uint8 apnni[128]; /* APN Name */ |
| kal_bool apned; /* APN Enable/Disable */ |
| kal_uint8 apnb[16]; /* APN Bearer */ |
| kal_uint32 apntimer; /* APN Timer */ |
| kal_uint32 max_conn; /* Max Conn. */ |
| kal_uint32 max_conn_t; /* Max Conn. T */ |
| kal_uint32 wait_time; /* Wait Time */ |
| kal_uint32 throttle_time; /* Throttle Time */ |
| } nvram_d2_vzw_apn_cfg_entry_struct; |
| |
| typedef struct |
| { |
| nvram_d2_vzw_apn_cfg_entry_struct apn_cfg[8]; |
| } nvram_d2_vzw_apn_cfg_struct; |
| |
| typedef struct |
| { |
| kal_uint8 apn[128]; |
| kal_uint32 mtu_v4; |
| kal_uint32 mtu_v6; |
| } nvram_d2_mcf_mtu_cfg_entry_struct; |
| |
| typedef struct |
| { |
| kal_bool is_valid; /* Whether this config. is valid or not*/ |
| kal_bool is_mcf_first; /* Whether this config. is first or network*/ |
| kal_bool is_apn_valid; /* Whether this config. need by APN*/ |
| nvram_d2_mcf_mtu_cfg_entry_struct mtu_cfg[10]; /* MTU config */ |
| |
| } nvram_d2_mcf_mtu_cfg_struct; |
| |
| typedef struct |
| { |
| kal_bool is_valid; /* Whether this config. is valid or not*/ |
| kal_bool enable_keep; /* 0:disable, 1:enable */ |
| kal_uint8 rat; /* 0:all rat, 1:2/3G, 2:4G, 3:5G */ |
| } nvram_d2_mcf_keep_internet_struct; |
| |
| typedef struct |
| { |
| kal_uint8 dns_v4_prim[4]; |
| kal_uint8 dns_v4_sec[4]; |
| kal_uint8 dns_v6_prim[16]; |
| kal_uint8 dns_v6_sec[16]; |
| } nvram_d2_dns_cfg_struct; |
| |
| // Size and Total |
| #define NVRAM_EF_D2_DATA_SIZE sizeof(nvram_d2_data_struct) |
| #define NVRAM_EF_D2_DATA_TOTAL 1 |
| #define NVRAM_EF_D2_APNINFO_SIZE sizeof(nvram_d2_apninfo_struct) |
| #define NVRAM_EF_D2_APNINFO_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_FOP_SIZE sizeof(nvram_d2_fop_struct) |
| #define NVRAM_EF_D2_FOP_TOTAL 1 |
| #define NVRAM_EF_D2_DEFAULT_PDP_PROFILE_SIZE sizeof(nvram_d2_default_pdp_profile_struct) |
| #define NVRAM_EF_D2_DEFAULT_PDP_PROFILE_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_APNSETTING_SIZE sizeof(nvram_d2_apnsetting_struct) |
| #define NVRAM_EF_D2_APNSETTING_TOTAL (8*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_CFG_SIZE sizeof(nvram_d2_cfg_struct) |
| #define NVRAM_EF_D2_CFG_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_IMSTEST_SIZE sizeof(nvram_d2_imstest_struct) |
| #define NVRAM_EF_D2_IMSTEST_TOTAL (1) |
| #define NVRAM_EF_D2_IMSCFG_SIZE sizeof(nvram_d2_imscfg_struct) |
| #define NVRAM_EF_D2_IMSCFG_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_MCF_APN_CFG_SIZE sizeof(nvram_d2_mcf_apn_cfg_struct) |
| #define NVRAM_EF_D2_MCF_APN_CFG_TOTAL 1 |
| #define NVRAM_EF_D2_MCF_DATARETRY_INFO_SIZE sizeof(nvram_ddm_mcf_pdn_dataretry_info_struct) |
| #define NVRAM_EF_D2_MCF_DATARETRY_INFO_TOTAL 1 * MAX_SIM_NUM |
| #define NVRAM_EF_D2_DDM_QOS_IND_SIZE sizeof(nvram_ddm_qos_enable_struct) |
| #define NVRAM_EF_D2_DDM_QOS_IND_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_URSP_SIZE sizeof(nvram_d2_ursp_struct) |
| #define NVRAM_EF_D2_URSP_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_MCF_NORMAL_HO_CFG_SIZE sizeof(nvram_d2_mcf_normal_ho_cfg_struct) |
| #define NVRAM_EF_D2_MCF_NORMAL_HO_CFG_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_MCF_TEST_HO_CFG_SIZE sizeof(nvram_d2_mcf_test_ho_cfg_struct) |
| #define NVRAM_EF_D2_MCF_TEST_HO_CFG_TOTAL (1*MAX_SIM_NUM) |
| #define NVRAM_EF_D2_VZW_APN_CFG_SIZE sizeof(nvram_d2_vzw_apn_cfg_struct) |
| #define NVRAM_EF_D2_VZW_APN_CFG_TOTAL 1 |
| #define NVRAM_EF_D2_MCF_MTU_CFG_SIZE sizeof(nvram_d2_mcf_mtu_cfg_struct) |
| #define NVRAM_EF_D2_MCF_MTU_CFG_TOTAL 1 |
| #define NVRAM_EF_D2_MCF_KEEP_INTERNET_SIZE sizeof(nvram_d2_mcf_keep_internet_struct) |
| #define NVRAM_EF_D2_MCF_KEEP_INTERNET_TOTAL 1 |
| #define NVRAM_EF_D2_DNS_CFG_SIZE sizeof(nvram_d2_dns_cfg_struct) |
| #define NVRAM_EF_D2_DNS_CFG_TOTAL (1*MAX_SIM_NUM) |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif /* __D2_NVRAM_DEF_H__ */ |