| /***************************************************************************** |
| * 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) 2016 |
| * |
| * 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). |
| * |
| *****************************************************************************/ |
| /************************************************************* |
| * |
| * This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc. |
| * |
| * Any unauthorized use inconsistent with the terms of such license is strictly prohibited. |
| * |
| * Copyright (c) 1999-2010 VIA Telecom, Inc. All rights reserved. |
| * |
| *************************************************************/ |
| /**************************************************************************** |
| * |
| * Filename: pilots.h |
| * |
| * Purpose: Definition of Pilot structures and supporting routines. |
| * |
| **************************************************************************** |
| * |
| * PVCS Header Information |
| * |
| * |
| * $Log: pilots.h $ |
| * |
| * 07 06 2017 sue.zhong |
| * [MOLY00259241] [6293][C2K]Replace with KAL data type |
| * Correct copyright file header |
| * Revision 1.3 2004/04/06 14:02:19 dstecker |
| * CBP6.1 release 1 |
| * Revision 1.2 2004/03/25 12:09:40 fpeng |
| * Updated from 6.0 CP 2.5.0 |
| * Revision 1.2 2004/02/10 12:50:53 bcolford |
| * Merged CBP4.0 Release 8.05.0 changes. |
| * Revision 1.13 2003/12/04 18:18:44 blee |
| * Pilot search for remaining set added |
| * Revision 1.12 2002/12/30 19:07:48 akayvan |
| * Per CR570, corrected replacement of IS2000_ADDENDMENT_2 |
| * with IS2000_REV_A instead of IS2000_REV_0, and replaced |
| * IS2000_A_3X with IS2000_REV_A. |
| * Revision 1.11 2002/12/26 16:13:34 dstecker |
| * Conditional compile flag IS2000A replaced with IS_2000_REV_A and IS_2000_REV_0 |
| * Revision 1.10 2002/10/31 18:24:03 amala |
| * Changed RMS Error Phase parameter type to kal_uint8. |
| * Revision 1.9 2002/08/26 16:11:02 ameya |
| * Changed CP_MAX_STORED_NEIGHBORS to 40 from 64. Fixed CR# 635. |
| * Revision 1.8 2002/06/06 13:14:08 chinh |
| * Changed and Added Copyright |
| * Revision 1.7 2002/03/01 16:29:59 AMALA |
| * Added Location Services AFLT functionality. |
| * Revision 1.6 2001/09/04 15:27:21 byang |
| * Redefined HO_MAX_WALSH_CODE_LENGTH to be 2 |
| * instead of 65 since the maximum size is only 9 bits. |
| * |
| * Revision 1.5 2001/08/03 15:15:20 dstecker |
| * Modifications for IS2000 handoffs |
| * Revision 1.4 2001/07/18 15:14:11 chinh |
| * cbp3 porting for Idle and Access |
| * Revision 1.3 2001/06/29 12:02:56 byang |
| * Added compiler flag IS2000_A_AUX_PILOTfor all auxiliary |
| * pilot record structures declaration and processing code. |
| * Revision 1.2 2001/06/12 15:45:03 byang |
| * Update the maximum neighbor list from 20 to 40. |
| * Moved idle neighbor list structures to here to prevent circular |
| * dependency. |
| * Revision 1.1 2001/01/17 10:59:12 plabarbe |
| * Initial revision |
| * Revision 1.1 2000/10/24 14:11:23 fpeng |
| * Initial revision |
| * Revision 1.4 2000/09/23 02:38:43Z rnookala |
| * changed n8m to 20 |
| * Revision 1.3 2000/08/23 22:10:10Z RSATTARI |
| * Isotel release 2.8 plus LSI applicable IS-95B changes. |
| * Revision 1.13 2000/01/17 22:27:19 scotvold |
| * TC Backward Compatibility changes. |
| * |
| * Revision 1.12 1998/11/20 16:44:23 scotvold |
| * Moved HOTCPilot Structure definition from ho_tc.h to here. |
| * Removed tDrop for TEST_PILOT optimization. |
| * |
| * Revision 1.11 1998/10/31 02:19:17 scotvold |
| * Pilot Set maintenance optimization test. |
| * |
| * Revision 1.10 1998/10/20 23:58:23 mhayduk |
| * Added T53 support. |
| * |
| * Revision 1.9 1998/08/14 23:49:45 scotvold |
| * Added pilotPN to Remaining measurement. |
| * |
| * Revision 1.8 1998/07/03 16:57:30 dfischer |
| * New load |
| * |
| * Revision 1.7 1998/06/12 14:50:38 scotvold |
| * Updated for Release 0.07. |
| * |
| * Revision 1.6 1998/06/08 21:48:25 scotvold |
| * Updated for Release 0.06. |
| * |
| * Revision 1.5 1998/05/27 17:16:28 scotvold |
| * Updated for Release 0.05. |
| * |
| * Revision 1.4 1998/05/01 18:13:54 scotvold |
| * Update for release 0.04 |
| * |
| * Revision 1.3 1998/03/30 23:26:03 mhayduk |
| * Release 0.03. |
| * |
| * Revision 1.1 1997/11/06 17:49:24 mhayduk |
| * Initial revision |
| * |
| * |
| **************************************************************************** |
| ****************************************************************************/ |
| |
| |
| #ifndef _PILOTS_H_ |
| |
| #define _PILOTS_H_ 1 |
| |
| /***************************************************************************** |
| * Includes |
| ****************************************************************************/ |
| #include "channel.h" |
| #include "sync_msg.h" |
| #include "cptimer.h" |
| |
| /***************************************************************************** |
| * Defines |
| ****************************************************************************/ |
| #define CP_MAX_ACTIVE_SET N6m |
| #define CP_MAX_CANDIDATE_SET N7m |
| #define CP_MAX_NEIGHBOR_SET N8m |
| #define CP_MAX_ANALOG_NEIGHBOR_SET 7 |
| |
| #ifdef MTK_CBP |
| #define CP_MAX_REMAINING_SET 44 |
| #else |
| #define CP_MAX_REMAINING_SET 20 |
| #endif |
| |
| #define CP_MAX_CH_CHANGE_LIST CP_MAX_NEIGHBOR_SET |
| |
| /* Define CF Search Set and Neighbor Set to be of maximum size as the ** |
| ** maximum number of pilots that can be sent in a Candidate Frequency ** |
| ** Search Request Message = N8m as specified in 7.6.6.2.1.4 */ |
| #define CP_MAX_CANDIDATE_FREQUENCY_SEARCH_SET N8m |
| #define CP_MAX_CANDIDATE_FREQUENCY_NEIGHBOR_SET N8m |
| |
| typedef enum |
| { |
| CP_SM_NO_SEARCH_PRIORITIES_OR_SEARCH_WINDOWS, |
| CP_SM_SEARCH_PRIORITIES, |
| CP_SM_SEARCH_WINDOWS, |
| CP_SM_SEARCH_PRIORITIES_AND_SEARCH_WINDOWS |
| } NghbrSearchMode; |
| |
| /***************************************************************************** |
| * Pilot structure definitions |
| ****************************************************************************/ |
| typedef enum |
| { |
| PILOT_REC_1X_COMMON_TD, |
| PILOT_REC_1X_AUX_NON_TD, |
| PILOT_REC_1X_AUX_TD, |
| PILOT_REC_3X_COMMON, |
| PILOT_REC_3X_AUX |
| } PilotRecType; |
| |
| /* Information extracted from the Universal Neighbor List Message */ |
| typedef struct |
| { |
| Sr1TdPowerLevel tdPowerLevel; |
| Sr1TdModes tdMode; |
| } HONghbrPilotRecType000; |
| |
| /* The maximum Walsh Code size in octets */ |
| /* maximum of 3 bits + 6 bits = 9 bits */ |
| #define HO_MAX_WALSH_CODE_LENGTH 2 |
| |
| typedef struct |
| { |
| kal_uint8 qof; |
| kal_uint16 walshLength; |
| kal_uint8 auxPilotWalsh[ HO_MAX_WALSH_CODE_LENGTH ]; |
| } HONghbrPilotRecType001; |
| |
| typedef struct |
| { |
| kal_uint8 qof; |
| kal_uint16 walshLength; |
| kal_uint8 auxWalsh[ HO_MAX_WALSH_CODE_LENGTH ]; |
| kal_uint8 auxTdPowerLevel; |
| kal_uint8 tdMode; |
| } HONghbrPilotRecType010; |
| |
| typedef struct |
| { |
| kal_uint8 sr3PrimaryPilot; |
| kal_uint8 sr3PilotPower1; |
| kal_uint8 sr3PilotPower2; |
| } HONghbrPilotRecType011; |
| |
| typedef struct |
| { |
| kal_uint8 sr3PrimaryPilot; |
| kal_uint8 sr3PilotPower1; |
| kal_uint8 sr3PilotPower2; |
| kal_uint8 qof; |
| kal_uint16 walshLength; |
| kal_uint8 auxPilotWalsh[ HO_MAX_WALSH_CODE_LENGTH ]; |
| kal_bool addInfoIncl1; |
| kal_uint8 qof1; |
| kal_uint16 walshLength1; |
| kal_uint8 auxPilotWalsh1[ HO_MAX_WALSH_CODE_LENGTH ]; |
| kal_bool addInfoIncl2; |
| kal_uint8 qof2; |
| kal_uint16 walshLength2; |
| kal_uint8 auxPilotWalsh2[ HO_MAX_WALSH_CODE_LENGTH ]; |
| } HONghbrPilotRecType100; |
| |
| typedef union |
| { |
| HONghbrPilotRecType000 type000; |
| |
| HONghbrPilotRecType001 type001; |
| HONghbrPilotRecType010 type010; |
| |
| HONghbrPilotRecType011 type011; |
| HONghbrPilotRecType100 type100; |
| |
| } HONghbrPilotRec; |
| |
| /* structure used to set search windows for pilot searches */ |
| typedef struct |
| { |
| kal_uint8 activeWindow; |
| kal_uint8 neighborWindow; |
| kal_uint8 remainingWindow; |
| } PilotSearchWindow; |
| |
| /* structure to define content of the IDLE neighbor list */ |
| typedef struct |
| { |
| kal_uint16 pilotPN; |
| kal_bool freqIncluded; /* indicates if freq info is available */ |
| SysCdmaBandT band; /* CDMA band */ |
| kal_uint16 frequency; /* CDMA_CH frequency */ |
| kal_uint8 priority; /* search priority */ |
| kal_uint8 srchWinNghbr; /* Neighbor search window */ |
| kal_uint8 srchOffsetNghbr; |
| kal_bool timingIncl; |
| kal_uint8 nghbrTxOffset; |
| kal_uint8 nghbrTxDuration; |
| kal_uint8 nghbrTxPeriod; |
| kal_bool bcchSupport; |
| kal_bool addPilotRecIncl; |
| PilotRecType pilotRecType; |
| HONghbrPilotRec pilotRec; |
| } IdleNghbrConfig; |
| |
| /* R.Sattari, 6/29/00 */ |
| /* structure to define content of the Traffic Channel hopping neighbor list */ |
| typedef struct |
| { |
| kal_uint16 nghbrPN; |
| kal_uint8 searchPriority; |
| kal_uint8 srchWinNghbr; |
| kal_bool timeIncl; |
| kal_uint8 nghbrTxOffset; |
| kal_uint8 nghbrTxDuration; |
| kal_uint8 nghbrTxPeriod; |
| kal_uint8 srchOffsetNghbr; /* 0 means not included (only 3 bit value) */ |
| kal_uint8 otdPowerLevel; |
| } NghbrPilot; |
| |
| /* structure to combine Idle and TC neighbor lists */ |
| /* The Global Neighbor Search Window is not included in this structure ** |
| ** since it is sent down in the wbiosPilotSearchWindow() call */ |
| typedef struct |
| { |
| NghbrSearchMode nghbrSrchMode; /* NGHBR_SRCH_MODE */ |
| kal_uint8 numPilots; /* number of pilots provided in list */ |
| #ifdef MTK_CBP |
| NghbrPilot pilot[ SYS_CP_MAX_NEIGHBOR_LIST_PILOTS ]; |
| #else |
| NghbrPilot pilot[ CP_MAX_NEIGHBOR_SET ]; |
| #endif |
| } NghbrList; |
| |
| |
| /* structure to provide Active Pilot set list */ |
| typedef struct |
| { |
| kal_uint8 numPilots; /* number of pilots provided in list */ |
| kal_uint16 pilot[CP_MAX_ACTIVE_SET]; |
| } ActiveList; |
| |
| |
| /* structure to define content of Candidate Pilot set */ |
| typedef struct |
| { |
| kal_uint8 numPilots; /* number of pilots provided in list */ |
| kal_uint16 pilot[CP_MAX_CANDIDATE_SET]; /* list of pilots */ |
| } CandList; |
| |
| |
| /* Pilot lists used to define Idle pilot set*/ |
| typedef struct |
| { |
| kal_uint8 nghbrSrchMode; |
| kal_uint8 numPilots; |
| #ifdef MTK_CBP |
| IdleNghbrConfig idleNghbrPilot[ SYS_CP_MAX_NEIGHBOR_LIST_PILOTS ]; |
| #else |
| IdleNghbrConfig idleNghbrPilot[ CP_MAX_NEIGHBOR_SET ]; |
| #endif |
| } IdlePilotSet; |
| |
| |
| /* Pilots to be used for Idle channel change */ |
| typedef struct |
| { |
| kal_bool frequencyIncluded; |
| SysCdmaBandT band; |
| kal_uint16 frequency; |
| kal_uint8 numPilots; |
| kal_uint16 pilotPN[ CP_MAX_CH_CHANGE_LIST ]; |
| } IdleChangePilotSet; |
| |
| |
| /* Pilot lists used to define or update the searched Pilot Sets */ |
| typedef struct |
| { |
| ActiveList active; /* Active pilot list */ |
| CandList candidate; /* Candidate pilot list */ |
| NghbrList neighbor; /* Neighbor pilot list */ |
| } PilotSet; |
| |
| /* Amala K. 03/01/02 - AFLT */ |
| |
| /* individual pilot PILOT_PN & TIME_CORRECTION from BS ALMANAC */ |
| typedef struct |
| { |
| kal_uint16 PilotPN; |
| kal_int16 TimeCorrect; |
| } AfltPilotSet; |
| |
| /* AFLT Pilot list used to update the searched AFLT Pilot Sets */ |
| typedef struct |
| { |
| AfltPilotSet Pilot[SYS_CP_MAX_AFLT_LIST_PILOTS]; |
| } AfltPilotSetList; |
| /* Amala K. - AFLT END */ |
| |
| /* report content for a pilot measurement */ |
| /* Pilot Strength measurements = -8 * log10(PS) (8 bit resolution) */ |
| /* i.e., the WBIOS has already performed the logarithmic calculation */ |
| typedef struct |
| { |
| kal_bool stale; |
| kal_uint16 pnPhase; |
| kal_uint16 strength; /* Power of the pilot in Q16 linear units */ |
| } PilotMeasurement; |
| |
| /* pilot report structure defines a pilot measurement for each pilot in */ |
| /* all lists */ |
| typedef struct |
| { |
| kal_uint8 numActive; /* number of pilots in active list */ |
| kal_uint8 numCandidate; /* number of pilots in candidate list */ |
| kal_uint8 numNeighbor; /* number of pilots in neighbor list */ |
| kal_uint8 numRemaining; /* number of pilots in remaining list */ |
| PilotMeasurement activeList[ CP_MAX_ACTIVE_SET ]; |
| PilotMeasurement candidateList[ CP_MAX_CANDIDATE_SET ]; |
| PilotMeasurement neighborList[ CP_MAX_NEIGHBOR_SET ]; |
| PilotMeasurement remainingList[CP_MAX_REMAINING_SET]; |
| } PilotReport; |
| |
| |
| typedef struct |
| { |
| kal_uint16 pilotPN; |
| PilotMeasurement measure; |
| } HOTCPilot; |
| #endif /*_PILOTS_H_ */ |
| |