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 CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | /************************************************************* |
| 36 | * |
| 37 | * This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc. |
| 38 | * |
| 39 | * Any unauthorized use inconsistent with the terms of such license is strictly prohibited. |
| 40 | * |
| 41 | * Copyright (c) 1999-2010 VIA Telecom, Inc. All rights reserved. |
| 42 | * |
| 43 | *************************************************************/ |
| 44 | /**************************************************************************** |
| 45 | * |
| 46 | * Filename: longcode.h |
| 47 | * |
| 48 | * Purpose: Definition of LONGCODE and supporting routines. |
| 49 | * |
| 50 | **************************************************************************** |
| 51 | * |
| 52 | * PVCS Header Information |
| 53 | * |
| 54 | * $Workfile$ |
| 55 | * $Revision: 1.2 $ |
| 56 | * $Modtime$ |
| 57 | * $Author: fpeng $ |
| 58 | * |
| 59 | * $Log: longcode.h $ |
| 60 | * |
| 61 | * 07 06 2017 sue.zhong |
| 62 | * [MOLY00259241] [6293][C2K]Replace with KAL data type |
| 63 | * Correct copyright file header |
| 64 | * Revision 1.2 2004/03/25 12:09:38 fpeng |
| 65 | * Updated from 6.0 CP 2.5.0 |
| 66 | * Revision 1.1 2003/05/12 15:38:52 fpeng |
| 67 | * Initial revision |
| 68 | * Revision 1.4 2002/06/06 13:13:31 chinh |
| 69 | * Changed and Added Copyright |
| 70 | * Revision 1.3 2001/08/03 15:15:08 dstecker |
| 71 | * Modifications for IS2000 handoffs |
| 72 | * Revision 1.2 2001/01/29 18:20:53 dstecker |
| 73 | * new access probe architecture |
| 74 | * Revision 1.1 2001/01/17 10:59:00 plabarbe |
| 75 | * Initial revision |
| 76 | * Revision 1.2 2000/11/13 14:26:07 byang |
| 77 | * IS-2000A Idle Mode and LAC intergration - Initial Release. |
| 78 | * Revision 1.1 2000/10/24 21:11:19Z fpeng |
| 79 | * Initial revision |
| 80 | * Revision 1.3 2000/08/23 22:09:18Z RSATTARI |
| 81 | * Isotel release 2.8 plus LSI applicable IS-95B changes. |
| 82 | * Revision 1.14 1999/08/16 23:47:08 scotvold |
| 83 | * Cleaned up Long Code Transition processing. |
| 84 | * Long Code Transition to Public does not use Ordq. |
| 85 | * |
| 86 | * Revision 1.13 1999/04/12 13:31:46 scotvold |
| 87 | * Added T53 HSPD support. |
| 88 | * Added 95B SCAM support. |
| 89 | * Added 95B GHDM support and consolidated with EHDM. |
| 90 | * |
| 91 | * Revision 1.12 1999/01/26 18:50:30 scotvold |
| 92 | * R1.2 API changes. |
| 93 | * |
| 94 | * Revision 1.11 1998/11/02 22:07:59 scotvold |
| 95 | * Used ENG_IND_LONG_CODE_CHANGED event instead of action timeout. |
| 96 | * |
| 97 | * Revision 1.10 1998/10/20 23:58:23 mhayduk |
| 98 | * Added T53 support. |
| 99 | * |
| 100 | * Revision 1.9 1998/10/16 17:10:46 scotvold |
| 101 | * Made ftcOrderData global. |
| 102 | * |
| 103 | * Revision 1.8 1998/08/18 16:58:53 scotvold |
| 104 | * Added accessor lcGetTCLongCodeState(). |
| 105 | * |
| 106 | * Revision 1.7 1998/08/17 23:03:36 scotvold |
| 107 | * Added User long code support. |
| 108 | * |
| 109 | * Revision 1.6 1998/07/14 18:51:45 scotvold |
| 110 | * Typo correction. |
| 111 | * |
| 112 | * Revision 1.5 1998/07/14 17:24:01 scotvold |
| 113 | * Added voice privacy support. |
| 114 | * |
| 115 | * Revision 1.4 1998/06/08 21:48:25 scotvold |
| 116 | * Updated for Release 0.06. |
| 117 | * |
| 118 | * Revision 1.3 1998/03/30 23:26:03 mhayduk |
| 119 | * Release 0.03. |
| 120 | * |
| 121 | * Revision 1.1 1997/11/06 17:49:24 mhayduk |
| 122 | * Initial revision |
| 123 | * |
| 124 | * |
| 125 | **************************************************************************** |
| 126 | ****************************************************************************/ |
| 127 | |
| 128 | #ifndef _LONGCODE_H_ |
| 129 | |
| 130 | #define _LONGCODE_H_ 1 |
| 131 | |
| 132 | /***************************************************************************** |
| 133 | * Includes |
| 134 | ****************************************************************************/ |
| 135 | |
| 136 | |
| 137 | /***************************************************************************** |
| 138 | * Longcode structure definition ACH physical channel |
| 139 | ****************************************************************************/ |
| 140 | #define CP_LONGCODE_LEN 6 |
| 141 | |
| 142 | typedef struct |
| 143 | { |
| 144 | kal_uint8 mask[CP_LONGCODE_LEN]; /* data space for 42 bits ordered as 0..47 */ |
| 145 | /* where bits 0..41 are used */ |
| 146 | } Longcode; |
| 147 | |
| 148 | /***************************************************************************** |
| 149 | * Longcode structure definition EACH physical channel |
| 150 | ****************************************************************************/ |
| 151 | #define EACH_LONG_CODE_MASK_PAR_SIZE 2 /* long code mask size in bytes */ |
| 152 | |
| 153 | typedef struct |
| 154 | { |
| 155 | kal_uint32 MaskPar [EACH_LONG_CODE_MASK_PAR_SIZE]; /* long code mask parameter */ |
| 156 | } EACHlongCodeMaskParT; |
| 157 | |
| 158 | |
| 159 | typedef enum |
| 160 | { |
| 161 | PLCM_ESN = 0, |
| 162 | PLCM_BS = 1, |
| 163 | PLCM_IMSI_M = 2, |
| 164 | PLCM_IMSI_T = 3, |
| 165 | PLCM_MEID = 4 |
| 166 | } PlcmTypeT; |
| 167 | |
| 168 | /***************************************************************************** |
| 169 | * Longcode interface prototypes |
| 170 | ****************************************************************************/ |
| 171 | void copyLongCodeState(Longcode *toMask,kal_uint8 *fromMask); |
| 172 | |
| 173 | void setBCCHLongCode(Longcode *pBcchLcode,kal_uint8 bcch,kal_uint16 pilotPN); |
| 174 | void setFCCCHLongCode(Longcode *pFccchLcode); |
| 175 | |
| 176 | void setPCHLongCode(Longcode *pchLcode,kal_uint8 pageCh,kal_uint16 pilotPN); |
| 177 | void setACHLongCode(Longcode *pchLcode,kal_uint8 acn,kal_uint8 pcn,kal_uint16 base, |
| 178 | kal_uint16 pilotPN); |
| 179 | |
| 180 | void lcPermuteESN (kal_uint32 esn); |
| 181 | void lcTCLongCodeInitialization (void); |
| 182 | void lcTransitionRequestAck (void); |
| 183 | kal_bool lcGetTCLongCodeState (void); |
| 184 | kal_bool lcLongCodeTransitionInProgress (void); |
| 185 | void lcGetTCPublicLongCodeMask (Longcode* longcode); |
| 186 | void lcGetTCPrivateLongCodeMask (Longcode* longcode); |
| 187 | void lcMSLongCodeTransitionRequest (kal_uint8 lcRequest); |
| 188 | void lcBSLongCodeTransitionRequest (void); |
| 189 | void lcLongCodeTransitionComplete (void); |
| 190 | |
| 191 | void lcSetLongCodeState(kal_bool state); |
| 192 | |
| 193 | kal_uint32 lcMeidToPseudoESN(kal_uint8 *MEID); |
| 194 | void lcSetLongCodeMaskType(PlcmTypeT type); |
| 195 | void lcSetLongCodeMask(kal_uint8 *plcm39); |
| 196 | kal_bool lcIsPLCMTypeChanged(PlcmTypeT type); |
| 197 | kal_bool lcIsPLCMChanged(kal_uint8 *plcm39); |
| 198 | void lcSavePLCMParams(void); |
| 199 | void lcRestorePLCMParams(void); |
| 200 | |
| 201 | #endif /*_LONGCODE_H_ */ |
| 202 | |