rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2016 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS (""MEDIATEK SOFTWARE"") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN ""AS-IS"" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSKAL_TRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | |
| 36 | /****************************************************************************** |
| 37 | * Filename: |
| 38 | * -------------------------------------------------------- |
| 39 | * mrs_cas_capability.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------------------------------------------------------- |
| 43 | * Multimode |
| 44 | * |
| 45 | * Description: |
| 46 | * -------------------------------------------------------- |
| 47 | * The C2K AS capability stored in MRS context. |
| 48 | * |
| 49 | * Author: |
| 50 | * -------------------------------------------------------- |
| 51 | * ------- |
| 52 | * |
| 53 | * -------------------------------------------------------- |
| 54 | * $Log$ |
| 55 | * |
| 56 | * 07 03 2018 yanfeng.xu |
| 57 | * [MOLY00335660] ¡¾BD091¡¿¡¾Êý¾ÝÍøÂç¡¿¡¾Êг¡·´À¡¡¿¿Í»§ÊÖ»úʹÓÃÊý¾ÝÍøÂçÉÏqq»á³öÏÖÁ¬½Ó³¬Ê±ºÍÓïÒôͨ»°ÑÓʱÎÊÌâ¡£ |
| 58 | * |
| 59 | * 12 09 2016 guanglong.wu |
| 60 | * [MOLY00211482] [6293][C2K AS re-arch item] Add API in MRS for checking C2K supported band |
| 61 | * |
| 62 | * Updated C2K default support band for UT TEST |
| 63 | * |
| 64 | * 11 10 2016 guanglong.wu |
| 65 | * [MOLY00211482] [6293][C2K AS re-arch item] Add API in MRS for checking C2K supported band |
| 66 | * modifed cas capability strcucture name. |
| 67 | * |
| 68 | *****************************************************************************/ |
| 69 | |
| 70 | #ifndef _MRS_CAS_CAPABILITY_H |
| 71 | #define _MRS_CAS_CAPABILITY_H |
| 72 | |
| 73 | #include "mrs_as_inter_core_def.h" |
| 74 | #include "mrs_as_enums.h" |
| 75 | #include "mrs_as_struct.h" |
| 76 | #include "reg_base.h" |
| 77 | #include "global_type.h" |
| 78 | #include "mrs_common_capability.h" |
| 79 | |
| 80 | /***************************************************************************** |
| 81 | * Macros Without Parameters |
| 82 | *****************************************************************************/ |
| 83 | #ifdef UNIT_TEST |
| 84 | /*supported band 0 ,1, 4, 6 and band 10 for UT test*/ |
| 85 | #define C2K_UT_TEST_SUPPORTED_BAND_MASK 0x00000453 |
| 86 | #endif |
| 87 | /***************************************************************************** |
| 88 | * Macros With Parameters |
| 89 | *****************************************************************************/ |
| 90 | #define mrs_get_cas_band_bitmask(cas_band) (0x0001 << (cas_band)) |
| 91 | |
| 92 | /***************************************************************************** |
| 93 | * Enums without tags |
| 94 | *****************************************************************************/ |
| 95 | |
| 96 | /***************************************************************************** |
| 97 | * Type Definitions |
| 98 | *****************************************************************************/ |
| 99 | typedef enum |
| 100 | { |
| 101 | CAS_BAND_CLASS_0 = 0, /* 800 MHz cellular band */ |
| 102 | CAS_BAND_CLASS_1, /* 1.8 to 2.0 GHz band */ |
| 103 | CAS_BAND_CLASS_2, /* 872 to 960 MHz TACS band */ |
| 104 | CAS_BAND_CLASS_3, /* 832 to 925 MHz JTACS band */ |
| 105 | CAS_BAND_CLASS_4, /* 1.75 to 1.87 GHz Korean PCS */ |
| 106 | CAS_BAND_CLASS_5, /* 450 MHz NMT band */ |
| 107 | CAS_BAND_CLASS_6, /* 2 GHz IMT-2000 band */ |
| 108 | CAS_BAND_CLASS_7, /* 700 MHz band */ |
| 109 | CAS_BAND_CLASS_8, /* 1800 MHz band */ |
| 110 | CAS_BAND_CLASS_9, /* 900 MHz band */ |
| 111 | CAS_BAND_CLASS_10, /* Secondary 800 MHz NMT band */ |
| 112 | CAS_BAND_CLASS_11, /* 400 MHz European PARM band */ |
| 113 | CAS_BAND_CLASS_12, /* 800 MHz PAMR band */ |
| 114 | CAS_BAND_CLASS_13, /* 2.5 GHz IMT-2000 */ |
| 115 | CAS_BAND_CLASS_14, /* US PCS 1.9 GHz band */ |
| 116 | CAS_BAND_CLASS_15, /* AWS band */ |
| 117 | CAS_BAND_CLASS_16, /* US 2.5 GHz band */ |
| 118 | CAS_BAND_CLASS_17, /* US 2.5GHz Forward Link Only Band */ |
| 119 | CAS_BAND_CLASS_18, /* 700 MHz Public Safety Band */ |
| 120 | CAS_BAND_CLASS_19, /* Lower 700 MHz Band */ |
| 121 | CAS_BAND_CLASS_20, /* L-Band */ |
| 122 | CAS_BAND_CLASS_MAX, |
| 123 | CAS_BAND_CLASS_NOT_USED = CAS_BAND_CLASS_MAX, |
| 124 | CAS_BAND_CLASS_UNSUPPORTED /* MUST be DIFFERENT than CAS_BAND_CLASS_MAX / CAS_BAND_CLASS_NOT_USED */ |
| 125 | } cas_band_enum; |
| 126 | |
| 127 | #define MAX_A21_MS_SUBS_INFO_LEN 35 |
| 128 | |
| 129 | typedef struct |
| 130 | { |
| 131 | kal_uint8 length; |
| 132 | kal_uint8 sub_info[MAX_A21_MS_SUBS_INFO_LEN]; |
| 133 | } a21_mobile_sub_info_struct; |
| 134 | |
| 135 | typedef struct{ |
| 136 | kal_uint32 cas_rf_support_band_bitmask; /*All Support band of C2k RF*/ |
| 137 | kal_uint32 cas_support_band_bitmask; /*configured to active band */ |
| 138 | a21_mobile_sub_info_struct a21_cap; |
| 139 | }cas_capability_context_struct; |
| 140 | |
| 141 | /***************************************************************************** |
| 142 | * Declarations Of Exported Globals |
| 143 | *****************************************************************************/ |
| 144 | |
| 145 | kal_uint32 mrs_cas_all_rf_supported_band(void); |
| 146 | |
| 147 | kal_uint32 mrs_cas_all_supported_band(void); |
| 148 | |
| 149 | kal_bool mrs_cas_is_rf_supported_band(kal_uint8 cas_band); |
| 150 | |
| 151 | kal_bool mrs_cas_is_supported_band(kal_uint8 cas_band) ; |
| 152 | |
| 153 | void mrs_cas_update_rf_supported_band(kal_uint32 rf_supported_band_mask); |
| 154 | |
| 155 | void mrs_cas_update_supported_band(kal_uint32 supported_band_mask); |
| 156 | |
| 157 | kal_uint8 mrs_cas_get_a21_mobile_sub_info_length(MRS_SIM_INDEX sim_index); |
| 158 | |
| 159 | void mrs_cas_get_a21_mobile_sub_info(MRS_SIM_INDEX sim_index, kal_uint8 **a21_mobile_sub_info); |
| 160 | |
| 161 | void mrs_cas_set_a21_cap_info(kal_uint8 length, kal_uint8 *a21_mobile_sub_info); |
| 162 | |
| 163 | #endif /* _MRS_CAS_CAPABILITY_H */ |
| 164 | |
| 165 | |