| /***************************************************************************** |
| * 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) 2003-2010 VIA Telecom, Inc. All rights reserved. |
| * |
| *************************************************************/ |
| /******************************************************************************* |
| * |
| * FILE NAME : HlpCam.H |
| * |
| * DATE CREATED : 06/22/06 |
| * |
| * DESCRIPTION : Header file for HlpCam.c |
| * |
| ******************************************************************************* |
| ******************************************************************************/ |
| |
| #ifndef _HLPCAM_H_ |
| #define _HLPCAM_H_ |
| |
| /******************************************************************************* |
| Include Header Files |
| (No absolute paths - paths handled by make file) |
| *******************************************************************************/ |
| #include "hlpapi.h" |
| #include "cpbuf.h" |
| #include "valapi.h" |
| |
| /******************************************************************************* |
| Macros |
| *******************************************************************************/ |
| |
| #define PPP_STATUS_FLAG_INTERFACE 1 |
| #define PPP_STATUS_FLAG_STATUS 2 |
| #define PPP_STATUS_FLAG_LOCALADDR 4 |
| #define PPP_STATUS_FLAG_REMOTEADDR 8 |
| #define PPP_STATUS_FLAG_PRIDNS 16 |
| #define PPP_STATUS_FLAG_SECDNS 32 |
| #define CAM_FORCE_STATE_EV 0xFF |
| |
| #define HLP_DO_SUBNET_ID_MAX_LEN 16 |
| #define HLP_1X_SID_PID_MAX_LEN 16 |
| #define MAX_NUM_SYS_TMR_ENTRY 7 |
| |
| /******************************************************************************* |
| User-Defined Types (Typedefs) |
| *******************************************************************************/ |
| typedef enum |
| { |
| CAM_IDLE_ST, |
| CAM_IDLE_WFR_SYSTEM_RSP_ST, |
| CAM_IDLE_WFR_CP_CONNECT_ST, |
| CAM_IDLE_WFR_CP_CONNECT_RETRY_ST, |
| CAM_WFR_UM_CONNECT_ST, |
| CAM_WFR_RM_CONNECT_ST, |
| CAM_CONNECTED_ST, |
| CAM_WFR_UM_RELEASE_ST, |
| CAM_WFR_RM_RELEASE_ST, |
| CAM_WFR_CP_DORMANT_ST, |
| CAM_DORMANT_ST, |
| CAM_DORMANT_WFR_SYSTEM_RSP_ST, |
| CAM_DORMANT_WFR_CP_CONNECT_ST, |
| CAM_DORMANT_WFR_CP_CONNECT_RETRY_ST, |
| CAM_WFR_CP_RELEASE_ST, |
| CAM_WFR_XOFF_RESPONSE_ST, |
| CAM_NUM_STATES |
| } CamStatesT; |
| |
| typedef enum |
| { |
| CAM_PPP_CONNECT_REQ_EV, |
| CAM_ANSWER_REQ_EV, |
| CAM_DORMANT_REQ_EV, |
| CAM_PPP_RELEASE_REQ_EV, |
| CAM_DORMANT_RECONNECT_REQ_EV, |
| CAM_CONNECTION_OPENED_IND_EV, |
| CAM_CONNECTION_FAILED_IND_EV, |
| CAM_CONNECTION_RELEASED_IND_EV, |
| CAM_SYSTEM_QUERY_RSP_EV, |
| CAM_OOSA_IND_EV, |
| CAM_UM_PPP_STATUS_RSP_EV, |
| CAM_RM_PPP_STATUS_RSP_EV, |
| CAM_RLP_INACT_IND_EV, |
| CAM_RLP_OPEN_FAILED_EV, |
| CAM_XOFF_RESPONSE_RCVD_EV, |
| CAM_NUM_EVENTS |
| } CamEventsT; |
| |
| typedef struct |
| { |
| kal_bool InUse; |
| kal_uint8 PdnId;/*PPP error: 0xff, PDN error: pdn id*/ |
| DataConnErrCodeT ErrorCode; |
| } PsConnErrorCodeT; |
| |
| typedef struct |
| { |
| kal_uint8 Cid; |
| NetworkPrefT NetworkPref; |
| NspeAppT AppType; |
| DialingInfoT* CallInfo; |
| kal_uint16 InactivityTmr; /* units of msec for 1X RLP only */ |
| kal_bool ReleaseTchWhenFallback; |
| HlpPppRouteTypeE RouteType; |
| } PppConnParamsT; |
| |
| typedef struct |
| { |
| kal_bool DormantFrom1x; |
| kal_bool gotoDormant; |
| } PppDormParamsT; |
| |
| typedef struct |
| { |
| kal_bool connFromDo; |
| } TchConnParamsT; |
| |
| /*TracePscState/TraceCpcState set for Trace, copy from SCC*/ |
| typedef enum |
| { |
| PSC_NULL, |
| PSC_INIT, |
| PSC_CONNECTED, |
| PSC_NO_DMC_CONNECTED, |
| PSC_DORMANT, |
| PSC_RECONNECT, |
| PSC_NUM |
| } TracePscState; |
| |
| typedef enum |
| { |
| CPC_IDLE, |
| CPC_CONNECTING, |
| CPC_CONNECTED, |
| CPC_DISCONNECT, |
| CPC_ANALOG_CONN, |
| CPC_NUM |
| } TraceCpcState; |
| |
| typedef enum |
| { |
| NO_PENDING_RECONN_REQ, |
| PENDING_REQ_1X_BUSY, |
| PENDING_REQ_1X_IDLE |
| } PendingRcnT; |
| |
| /******************************************************************************* |
| Global Variable Declarations |
| *******************************************************************************/ |
| |
| /******************************************************************************* |
| Global Function Prototypes |
| *******************************************************************************/ |
| |
| void camProcessEvent(CamEventsT event, void* parms, kal_uint8 parmSize); |
| void camProcessEventNoParms(CamEventsT event); |
| void HlpCamInit(void); |
| CamStatesT camGetCurrentState(void); |
| void camSetCurrentState(CamStatesT); |
| kal_bool HlpCamReadyForReconnect(void); |
| void HlpCallInstanceIncrease(NspeAppT callType); |
| void HlpCallInstanceDecrease(NspeAppT callType); |
| kal_bool HlpCallInstanceRequested(NspeAppT callType); |
| void HlpCamSetDoTo1XFallbackMode(kal_bool DoTo1X_Enabled); |
| void HlpSendDormantCnfToPsw(void); |
| void PppResetAtUmRm(void); |
| kal_uint16 GetIpv4MTU(void); |
| void HlpSendPppConnStatusToValATC(HlpConnStatusT status, kal_uint32 localAddr, kal_uint32 remoteAddr, kal_uint32 priDNS, kal_uint32 secDNS); |
| void HlpSendPSDMPppDisconnectStatus(CamStatesT oldCamState, DataDiscCauseT DataDisconnCause); |
| void HlpSendPSDMPppConnectStatus(CamStatesT oldCamState); |
| void HlpSendPppConnCnfMsg(HlpConnStatusT status, kal_uint32 localAddr, kal_uint32 remoteAddr, kal_uint32 priDNS, kal_uint32 secDNS); |
| void HlpSendPppDisconnCnfMsg(void); |
| void HlpSendPppDisconnIndMsg(DataDiscCauseT DiscType); |
| void HlpSendPppModifyIndMsg(kal_uint32 localAddr, kal_uint32 remoteAddr, kal_uint32 priDNS, kal_uint32 secDNS); |
| kal_bool HlpNeedIgnoreEvdoPaging(void); |
| kal_bool HlpNeedIgnoreEvdoPaging(void); |
| void HlpCamEnableEhrpdIfFallback(void); |
| void HlpRsvasAbortReq(void *MsgDataPtr); |
| void HlpCamEnableEhrpdIfFallback(void); |
| void ConnectionReq(NetworkT networkType); |
| #ifdef MTK_DEV_C2K_IRAT |
| void HlpSendPppSetupStatusToClc(kal_bool PppSetupStatus); |
| #endif |
| kal_bool HlpGetFlightModeStatus(void); |
| void HlpSetFlightModeStatus(kal_bool); |
| kal_uint8 HlpCheckCAMState(void); |
| |
| #endif /* _HLPCAM_H_ */ |
| |