blob: ae1a8c7698b730ed0ac9811a26292403328683c1 [file] [log] [blame]
/*****************************************************************************
* 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.
*
*************************************************************/
/****************************************************************************
*
* Module: engine.h
*
* Purpose: Header file for the Protocol Engine.
*
****************************************************************************
*
* PVCS Header Information
*
*
* $Log: engine.h $
*
* 04 01 2020 yanfeng.xu
* [MOLY00509275] [MT6875][Margaux][Q0][MP3][SQC][China][Shanghai][Suburb][5GMM][NSA][Internal][FT][MDST][CAT][CU+CT][ASSERT] file:mcu/l1/ll1/src/mll1_main.c line:20892
*
* 07 25 2019 tina.ma
* [MOLY00424781] [GSMA TS.37] block illegal UE for multiple SIM
*
* GSMA C2K L3 part
*
* 01 17 2019 tina.ma
* [MOLY00379869] [Gen97]merge code from UMOLYE TRUNK
*
* merge to VMOLY
* 1. ECAM
* 2. UT
* 3. local release
* 4. does not trigger registration in sleep mode
*
* 09 11 2018 tina.ma
* [MOLY00350570] [SE3][SIP][Cervino][Sanity]In SRLTE mode,During sim2 CU mo call,always on the dialing interface and no voice prompts
*
* .
*
* 09 10 2018 yanfeng.xu
* [MOLY00348715] [UMOLYE][EVDO]remove assert on 97
*
* 12 15 2017 tina.ma
* [MOLY00296406] [MT6763][Bianco][O1][MP2.0][MP2 Regression][Overnight][SZ][CU+CT][4GMM][ASSERT] file:mcu/pcore/modem/common/rsva/rsvas/src/rsvas_utils.c line:482
*
* .
*
* 11 08 2017 tina.ma
* [MOLY00288039] [MT6763][Bianco][N1][MP1.5][WW FT][China][Shenzhen][SIM1:CU][SIM2:CT][ASSERT] file:mcu/pcore/modem/lte_sec/errc/conn/src/errc_conn_main.c line:1146
*
* .
*
* 07 06 2017 sue.zhong
* [MOLY00259241] [6293][C2K]Replace with KAL data type
* Correct copyright file header
*
* 07 04 2017 sue.zhong
* [MOLY00259241] [6293][C2K]Replace with KAL data type
* ::KAL type - L3, folder ps
*
* 05 19 2017 peijun.zheng
* [MOLY00249027] [BIACNO][MT6763][New feature]C2K code release code modification
*
* Fix L3 DHL trace enum description
*
* 05 05 2017 tina.ma
* [MOLY00247117] [Rose][Bianco N1]The Externel (EE),0,0,99,/data/core/,1,modem,Trigger time:[2017-04-13 14:33:14.932569]md1:(MCU_core0.vpe1.tc1(VPE1)) [ASSERT](Once)
*
* L1d_init_cnf.
*
* 04 27 2017 gavin.zhang
* [MOLY00245533] [BIANCO][MT6763][RDIT][C2K][SRLTE][Try run][CMW500]Assert fail: xl1fhrtbaw.c 474 0x1104 0xc 0x0
*
* .
*
* 04 18 2017 jacky.wu
* [MOLY00243091] [BIANCO][MT6763][C2K][RDIT][Stress][KAL][UE][core0,vpe0,tc0(vpe0)] Assert fail: l1dspage.c 772 0x1002 0x6 0x0 - L1D_MDM
*
* .Sync clock calibration state between L1 & L3.
*
* 03 06 2017 golden.yang
* [MOLY00226193] [6293][C2K]Merge C2K Feature£¨NST, Tx Pwr Meter etc£© Code CL from T0 to Trunck
* Merge the Code of NST to TRUNCK Branch
*
* 02 21 2017 golden.yang
* [MOLY00230944] [6293][C2K][BringUp]NSFT Mode BringUp Update for 1XRTT in 93m
*
* nst relation for 93M
*
* 01 05 2017 sue.zhong
* [MOLY00218409] [6293][C2K]Sync C2K code to UMOLYA TRUNK from C2K CBr (W1701)
* merge c2k source
*
* 12 01 2016 sue.zhong
* [MOLY00213777] [6293][C2K]Sync C2K code to UMOLYA TRUNK(W1648)
* Update C2K source
*
* 11 09 2016 sue.zhong
* [MOLY00208435] [6293][C2K]Sync C2K code to UMOLYA TRUNK
* Update C2K PS code (1/2)
* Revision 1.14 2006/03/16 11:59:10 mclee
* - Update prototype engRelayOutOfServiceAreaParameters() to include scan time.
* Revision 1.13 2006/01/24 12:38:51 wavis
* Fix GetNam to always get active NAM.
* Revision 1.12 2006/01/12 16:21:35 vxnguyen
* Fixed compile errors when AMPS was not included.
* Revision 1.11 2006/01/11 15:13:13 blee
* Changing function parameters
* Revision 1.10 2005/12/21 11:32:12 hans
* Updated qpch algorithm and new L1 interface.
* Revision 1.9 2005/08/17 14:10:36 hans
* CR6900 - Enhanced qpch indicator detection algorithm [DSPM/L1D/PSW]. CR6902 - Immediate PSW-L1D wake message for PCH/FCCCH
* Revision 1.8 2005/05/09 17:46:32 wfu
* Fix CR 6202: Add struct SilentRetryInfo. Add parameters passed in engRelaySRSetSilentRetryMsg().
* Add prototype for engRelayGetSRInf(). Delete engRelaySRIsSilentRetryEnabled() prototype.
* Revision 1.7 2005/04/06 16:33:04 dstecker
* Release A mods
* Revision 1.6 2005/03/18 11:43:59 hans
* Merged code changes from CBP4.05 revision 2.02 to CBP4.05 revision 4.21.
* Revision 1.5 2004/09/28 16:34:48 hans
* Changes from CBP6.0 merged.
* Revision 1.4 2004/06/21 17:22:34 dstecker
* Idle Handoff for Rev C Changes
* Revision 1.3 2004/04/06 14:02:03 dstecker
* CBP6.1 release 1
* Revision 1.2 2004/03/25 12:09:29 fpeng
* Updated from 6.0 CP 2.5.0
* Revision 1.3 2004/02/10 12:50:45 bcolford
* Merged CBP4.0 Release 8.05.0 changes.
* Revision 1.43 2003/12/02 18:02:55 akayvan
* Added engine event ENG_NO_IDLE_HANDOFF.
* Revision 1.42 2003/11/06 11:42:44 ameya
* Added ENG_SYS_REDIRECTION_END_TIME, ENG_IND_FORCE_ANALOG_MODE and ENG_IND_MORE_PREF_SCAN_TIMEOUT. Also prototypes for engRelayForceAnalogMode() and engRelaySRGetSilentRetryStatusMsg().
* Revision 1.41 2003/06/26 13:52:07 byang
* CR#2394: Modified engRelaySetNewIHOparameters() prototype
* declaration to include MinNghbrThr.
* Revision 1.40 2003/04/30 09:34:01 mclee
* Added Engine request RQ_PAGE_RESPONSE
* Revision 1.39 2003/04/25 14:11:25 byang
* CR#2171: Add two events: ENG_IND_FSCH_STARTED and
* ENG_IND_FSCH_TERMINATED.
* Revision 1.38 2003/03/07 11:39:04 byang
* CR #1810: Add function prototype declaration for
* engRelaySetAccessHoParams().
* Revision 1.37 2002/11/26 19:38:25 hans
* Engine relay function for resource control declared
* Revision 1.36 2002/09/30 15:15:26 mshaver
* Changes to support the single NAM data structure type
* definition PswIs95NamT, of type packed.
* Revision 1.35 2002/09/17 18:20:04 akayvan
* cpSetWakeData() parameters were updated for Spirent's QPCH
* Spy.
* Revision 1.34 2002/08/23 10:10:33 akayvan
* Per system's request added ETS capabilty to modify all QPCH thresholds.
* Revision 1.33 2002/07/15 13:11:53 chinh
* Removed compile switch CBP3_MERGE (CR598).
* Revision 1.32 2002/07/11 18:30:09 byang
* CR #889: Removed unused field from Callback data type.
* Revision 1.31 2002/06/18 18:07:59 akayvan
* QPCH Phase2 mods. Added new declaration for
* engRelayTestMode(), and cpSetWakeData().
* Revision 1.30 2002/06/14 17:14:17 chinh
* Added function prototype engRelayL1dAccessComplete().
* Revision 1.29 2002/06/13 13:51:17 hans
* Not used statistics function engRelayGetAccStats(), engRelayGetPagStats(), engRelayGetMux1FORStats() and engRelayGetMux2FORStats() removed.
* Revision 1.28 2002/06/06 13:12:11 chinh
* Changed and Added Copyright
* Revision 1.27 2002/06/04 20:03:36 hans
* Layer2 statistics not used anymore disabled with ifdef's.
* Revision 1.26 2002/05/31 20:07:35 akayvan
* QPCH/PI mods.
* Revision 1.25 2002/05/29 15:23:19 ameya
* Added events ENG_IND_SYNC_CSS_FAIL and ENG_IND_SYNC_CSS_PASS to report to the engine whether the sync message passed or failed CSS. Added prototype for engRelaySyncCssDone().
* Revision 1.24 2002/05/08 16:47:08 byang
* Modified engRelayPMRMParams() input parameter for F-SCH.
* Add data structure CPPmrmParms to accommodate F-SCH.
* Revision 1.23 2002/03/28 18:22:32 hans
* is2000 rev 0 add 2, retrievable and settable parameters implemented.
* CR503: get retrievable parameter implemented.
* CR508: set retrievable parameter implemented
* Revision 1.22 2002/01/28 11:36:11 byang
* Add constant ENG_IND_RSCH_STARTED and function prototypes for:
* engRelayHspdActiveControlHold(), engRelayRschRelInd(), engRelayDataBufferStatus(), and engRelayRevSchRequest().
* Revision 1.21 2002/01/17 17:17:44 akayvan
* Implemented Slotted Mode mods.
* Revision 1.20 2002/01/10 17:12:17 AMALA
* Added emergency mode processing for new system selection.
* Revision 1.19 2002/01/08 19:06:40 byang
* Renamed engRelaySCServiceControl() to
* engRelayServOptionControlResp().
* Revision 1.18 2002/01/08 17:03:32 ameya
* CBP3.0 merge to 4.0 to support Silent Retry.
* Revision 1.17 2002/01/02 10:12:38 AMALA
* Added new system selection changes.
* Revision 1.16 2001/12/14 17:09:25 mclee
* prototype engRelayGetPSInfo()
* Revision 1.15 2001/12/07 14:44:43 bcolford
* Change RSSI to an unsigned 16 bit value.
* Revision 1.14 2001/11/20 12:30:47 mclee
* Add prototypes engRelayGetNam, engRelayWriteNam
* engRelayMmiChangedNam Add ENG_IND_FORCE_BAND_MODE to status indication for wbios reports.
* Revision 1.13 2001/11/08 12:41:56 AMALA
* Added PRL processing support for SSPR functionality.
* Revision 1.12 2001/10/29 09:35:27 mclee
* Changed voiceActivity defined in typeInfo from kal_uint8 to kal_bool
* Revision 1.11 2001/10/08 14:46:27 mclee
* prototype engRelayGetPrlInfo()
* Revision 1.10 2001/09/24 15:19:04 kmar
* Update SMS to latest in CBP3.
* Added #define RQ_AUTO_ANSWER.
* Revision 1.9 2001/09/07 17:59:00 akayvan
* Added declaration for engRelayOuterLoopReportReqParams() per
* FPC.
* Revision 1.8 2001/08/03 15:14:35 dstecker
* Modifications for IS2000 handoffs
* Revision 1.7 2001/07/18 15:09:05 chinh
* cbp3 porting for Idle and Access
* Revision 1.6 2001/07/02 14:09:32 kmar
* Update SCC and SMS to CBP3 v360.
* Added fields related to Information Record support in
* RDTCH Origination Continuation Message.
* Revision 1.5 2001/06/12 15:39:39 byang
* Added new fields to HOIdleParams structure.
* Revision 1.4 2001/04/27 16:35:31 byang
* Added functionality to set the MS capability database from ETS
* and to stored the database into DBM when the MS is powerd-
* down. On power-up, the MS Cap. Db. is read from DBM.
* Revision 1.3 2001/03/16 11:29:10 akayvan
* Traffic code phase1 added.
* Revision 1.2 2001/01/29 18:20:52 dstecker
* new access probe architecture
* Revision 1.1 2001/01/17 10:58:25 plabarbe
* Initial revision
* Revision 1.2 2000/11/13 14:25:46 byang
* IS-2000A Idle Mode and LAC intergration - Initial Release.
* Revision 1.1 2000/10/24 21:11:12Z fpeng
* Initial revision
* Revision 1.7 2000/09/08 23:58:27Z RSATTARI
* Added define for full system time (36bit) request type and added data filed for the
* CP request structure.
* Revision 1.6 2000/08/31 23:41:52Z bcolford
* Replaced AMPS_SUPPORTED with SYS_OPTION_AMPS.
* Revision 1.5 2000/08/23 22:06:26Z RSATTARI
* Isotel release 2.8 plus LSI applicable IS-95B changes.
* Revision 1.4 2000/07/11 20:57:00Z bsharma
* Added CDMA to AMPS Handoff Macro definitions.
* Revision 1.3 2000/03/15 20:34:53Z bcolford
* Add a new indicator macro to handle the AMPS initialization
* acknowledgement.
* Revision 1.2 2000/03/01 18:06:12Z rsattari
* Isotel release 2.3 updates.
* Revision 1.53 2000/04/05 19:50:26 gfrye
* Moved Request Mode defined values from acc_asmb.h.
*
* Revision 1.52 2000/03/09 00:19:06 scotvold
* Removed SYS_OPTION_AMPS compile guards for ENG_IND_TC_TO_AVC_HO_START.
*
* Revision 1.51 2000/03/06 21:25:45 gfrye
* Changed value of PCR_UPDATED so that it didn't conflict with the
* value STATUS_UPDATED used b OTASP.
*
* Revision 1.50 2000/03/02 01:57:16 scotvold
* Added engRelay calls to extract CPE statistics.
*
* Revision 1.49 2000/03/01 01:52:59 scotvold
* CDMA -> AMPS handoff changes.
*
* Revision 1.48 2000/02/25 23:24:30 gfrye
* Added PCR_UPDATED flag for engRelayNamChanged to indicate that
* a NAM parameter may have changed and a parameter change
* registration may be required.
*
* Revision 1.47 2000/02/22 20:42:56 gfrye
* Added "AMPS" to name of all Analog SMS API functions.
*
* Revision 1.46 2000/02/19 02:07:57 scotvold
* Put in SYS_OPTION_AMPS guards.
*
* Revision 1.45 2000/02/19 00:03:23 gfrye
* Added new engRelay access functions to the API so that SMS can report
* the status of recently received Alert With Info SMS and Extended
* Protocol Info Services messages.
* Added new callback message types and data fields for the new API functions.
*
* Revision 1.44 2000/01/21 22:06:27 gfrye
* Added new functions to facillitate A-Key update from OTASP.
*
* Revision 1.43 2000/01/17 22:27:19 scotvold
* TC Backward Compatibility changes.
*
* Revision 1.42 1999/12/09 23:22:04 gfrye
* Added new fields to OrigParms to support OTASP and E911 calls.
* Added new prototype for when OTASP changes the NAM or PRL.
* Added new prototype to record the pilot strength on the sync channel.
*
* Revision 1.41 1999/08/27 19:45:26 gfrye
* Added parameters to engRelayOutOfServiceAreaParameters to support the change
* from 3 OOSA phases to 4.
*
* Revision 1.40 1999/07/28 20:07:39 gfrye
* Added prototype for new API function to set parameters for new Idle Handoff
* algorithm. Also added kal_bool immediateHo to handoff event structure to indicate
* if requested handoff is an "immediate" handoff or a "delayed" handoff.
*
* Revision 1.39 1999/07/07 21:22:38 scotvold
* Separation of HT_MAX and T_MAX for idle handoff.
*
* Revision 1.38 1999/06/16 00:36:07 scotvold
* Added Unacknowledged Data Burst send confirmation.
*
* Revision 1.37 1999/04/16 00:29:03 scotvold
* Added support for already encoded digits.
*
* Revision 1.36 1999/04/15 01:37:10 mhayduk
* Added encoded indication to orig parms.
*
* Revision 1.35 1999/04/13 19:15:27 scotvold
* New Idle Handoff Algorithm.
*
* Revision 1.34 1999/03/18 19:57:54 mhayduk
* Added support for Searching Out of Service Area operation.
*
* Revision 1.33 1999/03/04 00:31:24 mhayduk
* Added test mode support for setting Idle HO parmeters.
*
* Revision 1.32 1999/02/25 16:41:28 dfischer
* Changed SYS_B to 0
*
* Revision 1.31 1999/02/05 02:24:05 scotvold
* Test Mode Statistic Reporting API changes.
*
* Revision 1.30 1999/01/26 18:49:45 scotvold
* R1.2 API changes.
*
* Revision 1.29 1999/01/20 00:24:33 mhayduk
* Added numDigits to origParms.
*
* Revision 1.28 1999/01/09 00:33:00 scotvold
* Added AckInd qualification structure.
*
* Revision 1.27 1999/01/05 00:28:54 mhayduk
* Updated for new API release.
*
* Revision 1.26 1998/12/02 16:25:27 mhayduk
* Updated to remove non-T53 structures and calls.
*
* Revision 1.25 1998/12/02 01:51:30 scotvold
* Added T53 guards for #include.
*
* Revision 1.24 1998/12/02 00:05:18 scotvold
* Added engRelayReverseMultiplexParameters().
*
* Revision 1.23 1998/11/27 20:38:12 mhayduk
* Made SYS_A and SYS_B generally accessible.
*
* Revision 1.22 1998/11/20 16:36:34 mhayduk
* Removed TC pilot set maintenance drop interface and added
* slotted mode test flag.
*
* Revision 1.21 1998/10/31 02:19:17 scotvold
* Pilot Set maintenance optimization test.
*
* Revision 1.20 1998/10/23 14:43:12 mhayduk
* Added typedefs for amps structs.
*
* Revision 1.19 1998/10/20 23:58:23 mhayduk
* Added T53 support.
*
* Revision 1.18 1998/10/07 23:04:08 mhayduk
* Added event so access state is notified of received pilot
* measurement report.
*
* Revision 1.17 1998/10/07 22:53:50 tdaly
* Added OP_MODE2 to ENG_OP_MODE see #if defined(SYS_OPTION_AMPS).
*
* Revision 1.16 1998/09/22 18:44:57 tdaly
* Added IS-95 analog mode support.
*
* Revision 1.15 1998/09/11 16:23:17 scotvold
* Added Handoff Complete Indication event.
*
* Revision 1.14 1998/09/11 02:32:08 scotvold
* Candidate Frequency API changes. Test Mode changes.
*
* Revision 1.13 1998/08/14 23:47:01 scotvold
* Added Data Burst support.
*
* Revision 1.12 1998/08/13 00:12:31 scotvold
* Added DTMF support.
*
* Revision 1.11 1998/07/29 04:21:11 mhayduk
* Added new indications for access handoff support.
*
* Revision 1.10 1998/07/27 17:26:30 scotvold
* Added TX Acknowledgement failure support.
*
* Revision 1.9 1998/07/14 17:30:23 scotvold
* Minor changes.
*
* 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/13 18:11:50 mhayduk
* Added new error codes for bad NAM parameters.
*
* 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 _ENGINE_H_
#define _ENGINE_H_ 1
/*****************************************************************************
* Includes
****************************************************************************/
#include "pswapi.h"
#include "Serv_cfg.h"
#include "layer2.h"
#include "pilots.h"
#include "namdata.h"
#include "sync_msg.h"
#include "Msg_defn.h"
#include "ho_tc.h"
#include "stats.h"
#include "Field.h"
#include "cssapi.h"
#include "Ms_Cap_Db.h"
#include "Ds_Signaling.h"
#include "ho_cf.h"
#include "ho_ac.h"
#include "resource_control.h"
#include "loc_pars.h"
#include "sbp_public_utility.h"
#include "event_info_utility.h"
#ifdef MTK_DEV_C2K_IRAT
#include "c2k_rsvas.h"
#include "valiratapi.h"
#endif
#include "md_sap.h"
/*****************************************************************************
* Defines
****************************************************************************/
/* Request Mode codes - Table 6.7.1.3.2.4-1 */
#define CP_REQUEST_MODE_CDMA_ONLY 1
#define CP_REQUEST_MODE_WIDE 2
#define CP_REQUEST_MODE_CDMA_WIDE 3
#define CP_REQUEST_MODE_NARROW_ONLY 4
#define CP_REQUEST_MODE_CDMA_NARROW_ONLY 5
#define CP_REQUEST_MODE_NARROW_WIDE 6
#define CP_REQUEST_MODE_NARROW_WIDE_CDMA 7
/* Engine system errors */
#define ENG_ERR_BAD_PREF_BAND 1 /* pref band mismatch with op_mode */
#define ENG_ERR_BAD_PREF_MODE 2 /* pref mode mismatch with op_mode */
#define ENG_ERR_BAD_CUSTOM_OPMODE 3 /* bad opmode setting in custom.h */
#define ENG_ERR_INCOMPATIBLE_BAND_MODE 4 /* incompatible band/mode combo */
#define ENG_ERR_TUNE_RADIO 5 /* Can't tune Radio */
#define ENG_ERR_POWER_AMP 6 /* Can't control Power Amplifier */
#define ENG_ERR_OOSA_BAD_VALUE 7 /* Bad param value for OOSA select */
#define ENG_ERR_IHO_BAD_VALUE 8 /* Bad parm for Idle HandOff */
/* Call Processing Request types */
#define RQ_ENABLE 10 /* (+ NAM Parameter Data) */
#define RQ_DISABLE 11 /* (no data) */
#define RQ_ORIGINATE 12 /* (+ digits + service option) */
#define RQ_ANSWER 13 /* (no data) */
#define RQ_FLASH 14 /* (+ digits) */
#define RQ_TERMINATE 15 /* (no data) */
#define RQ_POWERDOWN 16 /* (no data) */
#define RQ_BURST_DTMF 17 /* (+ digits) */
#define RQ_CONT_DTMF_ON 18 /* (+ digit) */
#define RQ_CONT_DTMF_OFF 19 /* (no data) */
#define RQ_VP_ON 20 /* (no data) */
#define RQ_VP_OFF 21 /* (no data) */
#define RQ_DATA_BURST 22 /* (+ data burst data) */
#define RQ_DATA_BURST_UNACK 23 /* (+ data burst data) */
#define RQ_DATA_BURST_REJ 24 /* (no data) */
#define RQ_WIDE_ANALOG 25 /* (no data) */
#define RQ_AUTO_ANSWER 27 /* (no data) */
#define RQ_PAGE_RESPONSE 28 /* (no data) */
#define RQ_TERM_SVC_INACT 29 /* (no data) */
#define RQ_AFLT_SEARCH 30 /* (+ aflt info) */
#define RQ_LBS_1X_ACQ 31
#define RQ_NST_POWERUP 32
#define RQ_NST_EXIT 33
#define RQ_FULL_SYSTIME_GET 34
#define RQ_NST_FER_CFG 35
#define RQ_NST_RX_MEAS_CFG 36
#define RQ_NST_TX_MEAS_CFG 37
/* Status indication for different WBIOS Reports */
#define ENG_IND_ANTENNA_REQ_GRANTED 57
#define ENG_IND_ANTENNA_REQ_DENIED 58
#define ENG_IND_ANTENNA_RELEASED 59
#define ENG_IND_PILOT_ACQUIRE 60
#define ENG_IND_NO_PILOT 61
#define ENG_IND_SYNC_ACQUIRE_FAIL 62
#define ENG_IND_SYNC_TO_SYS_TIME 63
#define ENG_IND_SYNC_TO_SYS_TIME_FAIL 64
#define ENG_IND_PAGE_MONITOR 65
#define ENG_IND_PAGE_MONITOR_FAIL 66
#define ENG_IND_SEND_ACCESS_MSG_FAIL 67
#define ENG_IND_SEND_TC_MSG 68
#define ENG_IND_SEND_TC_MSG_FAIL 69
#define ENG_IND_TC_CONFIG 70
#define ENG_IND_LONG_CODE_CHANGED 71
#define ENG_IND_RADIO_TUNED 72
#define ENG_IND_RADIO_NOT_TUNED 73
#define ENG_IND_PILOT_LOST 74
#define ENG_IND_PUF_PROBE_SENT 75
#define ENG_IND_PUF_PROBE_SENT_MAX_PWR 76
#define ENG_IND_PUF_PROBE_NOT_SENT 77
#define ENG_IND_WAKEUP 78
#define ENG_IND_PILOT_SET 79
#define ENG_IND_IHO_COMPLETE 80
#define ENG_IND_OOSA_WAKEUP 81
#define ENG_IND_TC_TO_AVC_HO_START 82
#define ENG_IND_BCCH_MONITOR 83
#define ENG_IND_BCCH_MONITOR_FAIL 84
#define ENG_IND_FCCCH_MONITOR 85
#define ENG_IND_FCCCH_MONITOR_FAIL 86
#define ENG_IND_HO_FAIL 87
#define ENG_IND_FORCE_BAND_MODE 88
#define ENG_SYS_RESCAN_TIME 89
#define ENG_IND_DISABLE_E911MODE 90
#define ENG_IND_RSCH_STARTED 91
#define ENG_IND_SYNC_CSS_FAIL 92
#define ENG_IND_SYNC_CSS_PASS 93
#define ENG_IND_FSCH_STARTED 94
#define ENG_IND_FSCH_TERMINATED 95
#define ENG_SYS_REDIRECTION_END_TIME 96
#define ENG_IND_FORCE_ANALOG_MODE 97
#define ENG_IND_IDLE_HANDOFF_ACQUIRE 99 /* and from CPB6.0 Hans Christiansen 080404 */
/* Engine event notification request types for use in CALLBACK */
#define ENG_NULL_EVENT 100 /* event complete indicator */
#define ENG_IND_TIMEOUT 101 /* CP timer expiry indicator */
#define ENG_SYNC_MESSAGE 102 /* SYNC message received ind. */
#define ENG_PAGE_MESSAGE 103 /* PCH message received ind. */
#define ENG_FTC_MESSAGE 104 /* FTC message received ind. */
#define ENG_FCSCH_LOST 105 /* forword common control Ch lost ind. */
#define ENG_IDLE_HANDOFF 106 /* Idle handoff request ind. */
#define ENG_REGISTRATION_REQ 107 /* Registration access request */
#define ENG_ACCESS_FAIL 108 /* Access attempt failed */
#define ENG_FTC_N5M_FRAMES 109 /* Rcvd N5m consecutive good frames */
#define ENG_ACCESS_PSIST_FAIL 110 /* PSIST calculation = 0 */
#define ENG_FTC_LOST 111 /* FTC fade timer timed out */
#define ENG_IND_ACK_RECEIVED 112 /* Ack rcvd for a transmitted msg */
#define ENG_STRONGEST_PILOT_REPORT 113 /* Strongest pilot report */
#define ENG_ACCESS_HO_CANDIDATE 114 /* Access Entry HO candidate found */
#define ENG_ACCESS_HO_NO_CANDIDATE 115 /* no Access Entry HO candidate */
#define ENG_ACCESS_HO_LIST 116 /* access ho list pilot report */
#define ENG_ACCESS_PROBE_HO_FAIL 117 /* access probe ho fail ind. */
#define ENG_ACCESS_HO_DENIED 118 /* access ho attempt not allowed */
#define ENG_READ_ACCESS_OVERHEAD 119 /* selected overhead read after ho */
#define ENG_ACCESS_PROBE_FAIL 120 /* access probe too big */
#define ENG_IND_TC_ACK_FAILURE 121 /* TC transmission ACK failure */
#define ENG_IND_ACCESS_PILOT_MSMT 122 /* pilot msmt report in access */
#define ENG_START_SYS_RESELECT 123 /* Start Sys Reselect Procedures */
#define ENG_ACCESS_MODE_SEARCH_FAIL 125 /* access mode determination fail */
#define ENG_BCCH_MESSAGE 126 /* FCCCH message received ind. */
#define ENG_FCCCH_MESSAGE 127 /* BCCH message received ind. */
#define ENG_ACCESS_HANDOFF 128 /* Access handoff request ind. */
#define ENG_IND_QPCH_PI_STATUS 129 /* PI Status */
#define ENG_IND_SOFT_HO_COMPLETE 130
#define ENG_IND_HARD_HO_COMPLETE 131
#define ENG_IND_E911_ACCESS_FAIL 133 /* E911 Access Fail */
#define ENG_IND_AFLT_RESULT_RCVD 134 /* AFLT Srch Rslt Rcvd from L1d */
#define ENG_IND_OOSA_REQ 135
#define ENG_IND_MODEM_FAILURE 136
#define ENG_IND_MODEM_READY 137
#define ENG_IND_CLK_CAL_START 138
#define ENG_IND_CLK_CAL_DONE 139
#define ENG_IND_CSS_OTASP_ACQ_REQ 150
#define ENG_IND_CSS_SELECT_RSP 151
#define ENG_IND_CSS_VALIDATE_RSP 152
#define ENG_IND_CSS_SYS_ACQ_REQ 153
#define ENG_IND_FREEZE 154
#define ENG_IND_THAW 155
#define ENG_IND_RESYNC 156
#define ENG_IND_RESYNC_DENIED 157
#ifdef MTK_DEV_C2K_IRAT
#define ENG_IND_RSVAS_VIRTUAL_SUSPEND 160 /* inform to stop inter-freq meas if any*/
#define ENG_IND_RSVAS_RESUME 161 /* inform to start inter-freq meas if any */
#define ENG_IND_RSVAS_OCCUPY_IND 162 /* inform to start access procedure */
#define ENG_IND_EXIT_PS_REQ 163 /* inform to exit 1x PS during C2L MPSR procedure */
#define ENG_IND_L1D_RAKE_DDL_CNF 164 /* inform thant L1D rake ddl has complete */
#define ENG_IND_CSS_FORCE_POWER_DOWN 165 /* inform to do power down flow */
#define ENG_IND_LOCAL_RELEASE 166 /* inform PE to do local release */
#endif
#define ENG_IND_AMPS_VOICEACT 200
#define ENG_IND_AMPS_FSULOCK 202
#define ENG_IND_AMPS_RSSIVAL 203
#define ENG_IND_AMPS_FOCC 204
#define ENG_IND_AMPS_FVC 205
#define ENG_IND_AMPS_SCC 206
#define ENG_IND_AMPS_TXSTATUS 207
#define ENG_IND_AMPS_CARRIERSTATUS 208
#define ENG_IND_AMPS_CHANFORMAT 209
#define ENG_IND_AMPS_POWERLEVEL 210
#define ENG_IND_AMPS_WBIOS_INIT_COMPLETE 211 /* Wbios initialization completed */
#define ENG_IND_AMPS_HO_COMPLETE 212
#define ENG_IND_EPRL_ESPM_TIMEOUT 213
#define ENG_IND_MANUAL_AVOID_SYS 214
#define ENG_IND_L1D_DEACTIVE_CNF 215
#define ENG_IND_L1D_INIT_CNF 216
#define ENG_IND_L1D_OOSA_CNF 217
#define ENG_IND_LOCK_ORDER 218
#define ENG_IND_UNLOCK_ORDER 219
#define STARTUP_OOSA_TRAP_DURATION 1200 /* 120 seconds */
/* The following defines are used internally by the engine. */
/*==========================================================*/
/* Set Engine supported operating mode by OR'ing supported modes */
/* Support for PCS and Cellular CDMA */
#define ENG_OP_MODE ( OP_MODE0 + OP_MODE1 )
#define ENG_AMPS_START_SCAN 200 /* Start AMPS channel scanner */
#define ENG_AMPS_SCAN_COMPLETE 201 /* Channel scan complete */
#define ENG_AMPS_OMT 203 /* OMT received */
#define ENG_AMPS_FILLER 204 /* Control Filler received */
#define ENG_AMPS_MSCM 205 /* MSCM received */
#define ENG_AMPS_SMS_CNF 206 /* MSCM received */
#define ENG_AMPS_AWI_SMS_CNF 207 /* MSCM received */
#define ENG_NO_IDLE_HANDOFF 210 /* No Idle handoff request ind */
#define ENG_UIM_AUTHR 230 /*UIM AUTH Result*/
#define ENG_UIM_RANDBS 240
#define ENG_UIM_SSD_CONFIRM 241
#ifdef MTK_CBP_SYNC_OPTIMIZE
#define ENG_IND_SIB8_TIMING_CNF 250
#define ENG_IND_NO_SIB8_TIMING 251
#endif /* MTK_CBP_SYNC_OPTIMIZE */
/* Define protocol revisions */
#define CP_P_REV_IS95B 4 /* IS-95B revision level */
/*
* Updated Data Mask Bits Defined
*/
#ifndef NAM_UPDATED
#define NAM_UPDATED 0x01
#define IMSI_UPDATED 0x02
#define MDN_UPDATED 0x04
#define AUTH_UPDATED 0x08
#define SSPR_UPDATED 0x10
#endif
#define STATUS_UPDATED 0x20 /* used by OTASP */
/*****************************************************************************
* Engine structure definition
****************************************************************************/
/* Reconnect Message Service Configuration synchronization identifier */
#define CP_MAX_SYNC_ID 4
/* CDMA Structure Definitions */
/*==========================================================*/
/* structure to contain origination parameters */
typedef struct
{
PswCallModeT callMode; /* voice call type */
kal_uint8 requestMode; /* requested call type */
kal_bool specialService; /* special service option requested */
kal_uint16 serviceOption; /* requested service option */
kal_bool encoded; /* digits encoded indication */
kal_bool digitMode; /* digit encoding indicator */
kal_uint8 numberType; /* type of number */
kal_uint8 numberPlan; /* numbering plan */
char *digits; /* ascii digits, null terminated string */
kal_uint8 numDigits; /* number of digits to be dialled */
kal_bool sendCallingPartyNumber;
CallingPartyNumber callingPartyNumber;
kal_uint8 OtaspMode;
kal_bool MultipleCallingPartyNum;
kal_bool SendCallingPartySubaddr;
Subaddress CallingPartySubaddr;
kal_bool SendCalledPartySubaddr;
Subaddress CalledPartySubaddr;
} OrigParms;
/* Call Processing Request structure */
typedef struct
{
kal_uint8 type; /* Call Processing request type */
union
{
PswIs95NamT *nam; /* Enable Request: NAM Data */
OrigParms *origParms; /* Originate Parameters */
RTCContDTMFData *contDTMFParms; /* Continuous DTMF Parms */
RTCBurstDTMFData *burstDTMFParms; /* Burst DTMF Parameters */
RTCFlashData *flashParms; /* Flash Parameters */
DataBurstData *dataBurstParms; /* Data Burst Parameters */
/* R.Sattari, 9/7/00, added */
SessionType *afltParms; /* AFLT Request, LocSrv Data */
} requestInfo;
} CPRequest;
typedef CPRequest CP_REQUEST; /* for compatibility with IS-136 */
typedef struct
{
CHANNEL_DESC selectRspData;
PswCssValidationRsltT ValidateRspData;
}CssParameters;
/* structure to contain idle handoff parameters */
typedef struct
{
HOPilotInfo pilotInfo;
kal_uint8 nghbrConfigType; /* NLM, ENLM, GNLM, or UNLM */
kal_uint8 nghbrConfig; /* 000, 001, 010, or 011 */
kal_bool immediateHo;
kal_bool bcchSupported;
} IdleHOParms;
/* Message Transmitter notification structure */
typedef struct
{
RTCMessageType msgType;
ReverseOrderCode order;
} MTXNotify;
/* UIM Auth Result notification structure */
typedef struct
{
kal_uint16 Sw;
kal_uint32 result;
kal_uint16 caveMsgId;
} AuthResult;
/* Engine initialization data */
typedef struct
{
kal_bool rateSet1Supported; /* Indicates if rate set 1 is used */
kal_uint8 rateSet1ForRates; /* Rate set 1 supported forward rates */
kal_uint8 rateSet1RevRates; /* Rate set 1 supported reverse rates */
kal_bool rateSet2Supported; /* Indicates if rate set 2 is used */
kal_uint8 rateSet2ForRates; /* Rate set 2 supported forward rates */
kal_uint8 rateSet2RevRates; /* Rate set 2 supported reverse rates */
kal_uint8 *muxOptions; /* null term. list of supported options */
kal_uint16 *serviceOptions; /* null term. list of supported services */
} EngInit;
/* Engine Callback Notification Message structure. */
/* This structure is used internally by the engine. */
/*==========================================================*/
typedef struct
{
kal_uint8 type; /* Notification type */
union
{
kal_uint8 timer; /* Expired Timer Number */
PswIs95NamT *nam; /* Current NAM parameters */
void *messageP; /* pointer to any message type */
kal_uint8 regType; /* registration type */
OrigParms *origParms; /* Originate Parameters */
RTCFlashData *flashParms; /* Flash Parameters */
IdleHOParms *idleHOParms; /* pilot info for Idle HO */
RTCContDTMFData *contDTMFParms; /* Continuous DTMF Parms */
RTCBurstDTMFData *burstDTMFParms; /* Burst DTMF Parameters */
DataBurstData *dataBurstParms; /* Data Burst Parameters */
MTXNotify notify; /* MTX Notification */
AuthResult authr;
HOAccessHOList *accessHoList; /* access ho list msmt report */
CssParameters CssParms;
kal_bool piStatus; /* Status of Pi Signal */
SessionType *afltParms; /* AFLT Request, LocSrv Data */
} typeInfo;
} Callback;
typedef Callback CALLBACK; /* for compatibility with IS-136 */
typedef enum
{
TM_CAND_FREQ_SEARCH_REQUEST, /* Candidate Frequency Search Request */
TM_CAND_FREQ_SEARCH_CONTROL /* Candidate Frequency Search Control */
} TMInjectMsgType;
typedef struct
{
TMInjectMsgType msgType; /* Injected message type */
union
{
CFSRQMData* cfsrqmData;
CFSCNMData* cfscnmData;
} type;
} TMInjectMsg;
typedef struct
{
kal_uint8 schId;
kal_uint16 schBadFrames;
kal_uint16 schTotFrames;
} CPSchPmrmParms;
typedef struct
{
kal_bool fchMeasIncl;
kal_uint8 fchBadFrames;
kal_uint16 fchTotFrames;
kal_bool dcchMeasIncl;
kal_uint8 dcchBadFrames;
kal_uint16 dcchTotFrames;
kal_uint8 numForSch;
CPSchPmrmParms schPmrmParms[ CP_MAX_FOR_SCH ];
} CPPmrmParms;
/* Data structure for Silent Retry info */
typedef struct
{
kal_bool enabled;
kal_uint8 numAttempts;
kal_uint32 interval;
kal_uint32 timeToAbort;
} SilentRetryInfo;
typedef struct
{
kal_bool origInd;
kal_bool syncIdIncl;
kal_uint8 syncIdLen;
kal_uint8 syncId[ CP_MAX_SYNC_ID ];
kal_uint16 serviceOption;
kal_uint8 srId;
} ReconnectParms;
#ifdef MTK_DEV_C2K_IRAT
typedef enum
{
CSFB_STATE_NULL, /* No CSFB action */
CSFB_STATE_MT_INIT, /* There is a pending CSFB request to send in MT */
CSFB_STATE_MO_INIT, /* There is a pending CSFB request to send in MO */
CSFB_STATE_WAIT, /* Wait CSFB confirm */
CSFB_STATE_IDLE, /* In the call procedure, need send CSFB stop when call finish */
} CsfbState;
#endif
#ifdef MTK_CBP_REL_OPTIMIZE
typedef struct
{
kal_bool isOrigPended;
OrigParms OriginalParms;
}PendingOrigParms;
#endif
/*****************************************************************************
* Engine Callback function prototypes
****************************************************************************/
/* CDMA Callback function protypes */
/*==========================================================*/
void engInitialize(void);
void engRelayCPRequest(CPRequest *request);
void engRelaySCServiceConfigurationRequest (ServiceConfiguration* servCfg);
void engRelaySCServiceOptionRequest (kal_uint16 serviceOption);
void engRelayPageFrameIndication(PageFrame *frame);
void engRelayPilotMeasureReport (kal_int16 pilotSeq, kal_uint16 referencePN,
PilotReport *report);
void engRelayL1dAccessPreambleComplete(WbiosSystime sendtime);
void engRelayL1dAccessProbeComplete(WbiosSystime finishTime);
void engRelayReportStatus(kal_uint8 status);
void engRelaySyncFrameIndication(SyncFrame *frame);
void engRelayIdleHandoff(kal_uint16 pilotPN);
void engRelayTCFrameIndication (TCFrame *frame);
void engTimerExpired(kal_int16 timerId);
void engRelayMultiplexParameters (MuxParmsT* MuxParms);
void engRelayTestMode(TestModeMsgT mode, kal_uint16 qualifier, kal_uint16 value);
void engRelayTMInjectMsg (TMInjectMsg* tmInjectMsg);
/* Emergency Mode Processing */
void engRelayE911Mode(kal_bool E911Mode);
void engRelayMsCapDb( const MsCapDb* pMsCapDb );
void engRelayHspdActiveControlHold
(
const Ds_HspdActiveControlHoldType newHspdState
);
void engRelayRschRelInd( const kal_uint16 remainDuration );
/* Hans-082802 verify who is using this ?
void engRelayDataBufferStatus
(
const kal_uint8 srId,
const kal_uint16 dataSize
);
*/
void engRelayRevSchRequest
(
const kal_uint8 srId,
const SchRateIndex prefRate,
const kal_uint16 duration
);
void cpRunTheEngine(Callback *engRequest);
kal_bool cpEngIsOrigQueued(void);
void engRelayPMRMParams ( const CPPmrmParms* pPmrm );
void engRelayOuterLoopReportReqParams (OuterLoopRepData *outerLoopRepData);
void cpSetWakeData(PswCmdStatusMsgT *wakeStatusMsgPtr);
void engRelayCDMACandFreqSearchReport(CFSearchReport *srchReport);
void engRelayCDMACandFreqSearchTimes(CFSearchTimes *srchTimes);
void engRelayCandFreqStart (void);
void engRelayCandFreqStop (kal_uint8 numFrames);
void engRelayNghbrPilotAboveTAdd (HOTCPilot* pilot);
void engRelayRemainingPilotAboveTAdd (HOTCPilot* pilot);
void engRelaySetAccessHoParams(
const kal_uint8 noiseFloor,
const kal_uint8 thrMin,
const kal_uint8 minAct,
const kal_uint8 thrSlope );
void engRelaySetIdleHoParameters
(
const kal_uint8 ThrMinImmed,
const kal_uint8 MinActImmed,
const kal_uint8 ThrSlopeImmed,
const kal_uint8 ThrMinDelayed,
const kal_uint8 MinActDelayed,
const kal_uint8 ThrSlopeDelayed,
const kal_uint8 DelayCount,
const kal_uint8 MinNghbrThr
);
void engRelayServOptionControlResp ( kal_uint8 conRef, kal_uint16 serviceOption,
kal_uint8 length, kal_uint8* ctlRec);
kal_uint32* engRelayGetL2RTCStats (void);
void engRelayGetPrlInfo(NamNumber namNumber);
void engRelayGetNam(void);
void engRelayWriteNam(NamNumber namNumber);
kal_bool tmContinuousBCCH(void);
/*****************************************************************************
* Misc. function prototypes
****************************************************************************/
void setIMSI(PswIs95NamT* Nam);
/* AMPS Callback function protypes */
/*==========================================================*/
void engRelaySetTempAkey(kal_uint8 *akey);
void engRelayDiscardTempAkey(void);
void engRelayCommitAkey(void);
void engRelayNamChanged(kal_uint8 whatsChanged);
void engRelaySyncCssDone(kal_bool indication);
void engRelayGetRetrievableStatistics(GetRetrievableParameterMsgT *msgDataPtr);
void engRelaySetRetrievableStatistics(SetRetrievableParameterMsgT *MsgDataPtr);
void engRelayMmiChangedNam(kal_uint32 whatChangedInNam, NamNumber namNumber);
void engRelayForceAnalogMode(void);
void engRelayGetPSInfo(void);
void engRelaySRSetSilentRetryMsg(kal_bool enable, kal_uint8 num, kal_uint32 interval, kal_uint32 abort);
SilentRetryInfo* engRelayGetSRInfo(void);
void engRelaySRGetSilentRetryStatusMsg(PswGetSilentRetryStatusMsgT *MsgP);
void engRelaySRSetAccessIsOrig(kal_bool orig);
void engRelaySRIncSilentRetryAttempt(void);
void engRelayDataBufferStatus(RcDataBufferStatusMsgT *msgPtr);
void engRelayDbTxInd(kal_uint8 retry);
void engRelayInitialAcqPwr(PswInitialAcqReportMsgT *MsgP);
void engRelayAlternatePilots(PswL1dAlternatePilotsMsgT* msgPtr);
void engRelaySysSettingsChanged(void);
void engRelaySysManualAvoid(void);
void engRelaySetLostScanPingFreq( kal_uint8 Geo_Scan_Ping_Frequency,
kal_uint8 Non_Geo_Scan_Ping_Frequency );
kal_bool PswIsVoiceServiceAllowed( void );
void PswInitIsVoiceSupported( void );
void engRelaySetSystemSelect( kal_bool val );
kal_bool engRelayGetSystemSelect( void );
void engRelaySysManualAvoid(void);
#ifdef MTK_DEV_C2K_IRAT
void cpSetCsfbState(CsfbState state);
CsfbState cpGetCsfbState(void);
kal_bool cpIsCSFBNeeded(void);
void cpSetPsProtectReqFlag(kal_bool hasSent);
kal_bool cpGetPsProtectReqFlag(void);
void cpSetEsrProtectMsgFlag(kal_bool hasSent);
kal_bool cpGetEsrProtectMsgFlag(void);
void cpSetTxIsOngoing(kal_bool TxIsOngoing);
kal_bool cpGetTxIsOngoing(void);
void cpSetPsReleaseIsPended(kal_bool CssRsvasPsRelease);
kal_bool cpGetPsReleaseIsPended(void);
#endif
#ifdef MTK_CBP_REL_OPTIMIZE
void cpSetPendingOrigParms(kal_bool pending, OrigParms *originalParms);
PendingOrigParms* cpGetPendingOrigParms(void);
#endif
#endif /* _ENGINE_H_ */