blob: 56f5763d0b8dd670d4c73179e348f301d4e7ec75 [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).
*
*****************************************************************************/
#ifndef _CL1TSKLL1AAPI_H_
#define _CL1TSKLL1AAPI_H_
#ifdef MTK_DEV_93M_PREIT
/*****************************************************************************
FILE NAME: cl1tskll1aapi.h
DESCRIPTION:
This file contains the message type and apis of LL1A for other modules.
*****************************************************************************/
/*----------------------------------------------------------------------------
Include Files
----------------------------------------------------------------------------*/
#include "cl1tskll1adefs.h"
/*----------------------------------------------------------------------------
* Definitions
*----------------------------------------------------------------------------*/
#define GAP_SESSION_IN_PERIOD (6) /** The maximum number of gap session in one gap notify ind. */
#define GAP_MARGIN_FOR_STANDBY (10000) /** The Gap margin for Standby rat when EVDO in active.*/
#define GAP_MARGIN_FOR_STANDBY_OVERLAP (20000) /** The header or end Gap margin for Standby rat when EVDO in active.*/
extern Ll1aScheInfoT gLl1aScheInfo;
#define LL1A_GAP_SERVICE_STATUS_SET(Enable) (gLl1aScheInfo.GapServiceEnable = Enable)
#define LL1A_GAP_SERVICE_STATUS_GET() (gLl1aScheInfo.GapServiceEnable)
#define LL1A_GAP_OFFERED_STATUS_SET(Status) (gLl1aScheInfo.GapOfferedStatus = Status)
#define LL1A_GAP_OFFERED_STATUS_GET() (gLl1aScheInfo.GapOfferedStatus)
/*----------------------------------------------------------------------------
Message Formats structure
----------------------------------------------------------------------------*/
/**********************************************RMC Interface Related*********************************/
/** Rmc Rat Status Ind. */
typedef struct
{
RmcRatStatusT RatStatus; /* Flight/Standby/Active. */
} Ll1aRmcRatStatusIndMsgT;
/** Rmc Mode Status Ind. */
typedef struct
{
RmcModeStatusT ModeStatus; /* NULL/IDLE/CONNECTED. */
kal_uint16 DrxCycleLength;/* When IDLE Mode, this value is valid and in slot unit. */
} Ll1aRmcModeStatusIndMsgT;
/** Rmc Inter-Freq Number. */
typedef struct
{
kal_uint8 FreqNum; /** EVDO in active, the number of higher priority inter-freq.*/
/** When HPS off, the freq_num is equal to zero. */
} Ll1aRmcActiveMeasInfoIndMsgT;
/** EvStandby Send the standby meas config to LL1A, including the meas purpose and meas type. */
typedef struct
{
kal_uint8 MeasPurpose; /** Bit0 - Meas On/Off, Bit1 - Cell Search On/Off. */
kal_uint8 TickBitMap; /** Bit0 - TICK_BITMAP_MPSR, Bit1 - TICK_BITMAP_HPS, Bit2 - TICK_BITMAP_LPS, Bit3 - TICK_BITMAP_RES. */
kal_uint8 FreqNum; /** This need EvStandby to fill it with different Meas On/Off and Thps On/Off Combination. */
kal_uint8 IsPeriodResetBitMap; /** Bit0 - RANK BIT Bit1 - HIGH PRIORITY BIT. */
kal_uint8 Tid; /** The Tid for this standby meas request. */
} Ll1aEvStandbyMeasReqMsgT;
/** This is a gap session stricture, with the start time and duration in EVDO's system time format. */
typedef struct
{
kal_uint32 GapSessionStartTime; /** The Start Time of Standby Gap. The start time is based on FRC time.*/
/* modify it to kal_uint32 to keep same with 91 for EVL1 flow */
kal_uint32 GapSessionLength; /** The Length of Standby Gap. The start time is based on FRC time.*/
} GapSessionTypeT;
/** The EvStandby' Gap Notify Ind Structure. */
typedef struct
{
kal_uint8 Tid; /** The Tid for this gap notify ind. */
kal_uint8 GapSessionNum; /** 1 - For Idle Gap; 1 < number <=6 - For Connect Gap. */
GapSessionTypeT GapSession[GAP_SESSION_IN_PERIOD]; /** LL1A will inform all the gap session time to Gap Manager. */
kal_uint8 MeasTid; /** Indicate the measurement tid for standby meas module. */
kal_uint8 HpsTid; /** Indicate the Hps tid for standby meas module. */
kal_uint8 TickBitmap; /** Bit0 - Tmrasure, Bit1 - Thps. */
kal_bool is_conn_gap; /* indicate whether is LTE connect normal gap */
} EvStandbyLl1aGapNotifyIndMsgT;
typedef struct
{
LOCAL_PARA_HDR
EvStandbyLl1aGapNotifyIndMsgT msg;
} evstandby_ll1a_gap_notify_ind_msg_struct;
/** The EvStandby' Measure done Ind Structure. */
typedef struct
{
kal_uint8 Tid; /** Indicate the measure done tid to which gap pattern period sent before.*/
kal_uint8 TickBitmap; /** Bit0 - TICK_BITMAP_MPSR, Bit1 - TICK_BITMAP_HPS, Bit2 - TICK_BITMAP_LPS, Bit3 - TICK_BITMAP_RES. */
kal_uint8 cell_list_status_bitmap; /* cell_list_status_bitmap - bit 0 is set to 1, if no cell found in cell list */
} Ll1aEvStandbyMeasDoneIndMsgT;
typedef struct
{
LOCAL_PARA_HDR
Ll1aEvStandbyMeasDoneIndMsgT msg;
} Ll1aEvStandbyMeasDoneIndMsgT_HDR;
/** The EvStandby Auto-Gap Cnf Structure. */
typedef struct
{
kal_bool Success; /** Indicate the auto-gap requeset for EvStandby is success or fail. */
kal_int32 ValidPeriod; /** The valid auto-gap period from LL1, in usc unit. */
kal_uint32 AutoTime; /** Return the AutoTime to GM.*/
} EvStandbyLl1aAutoGapCnfMsgT;
typedef struct
{
LOCAL_PARA_HDR
EvStandbyLl1aAutoGapCnfMsgT msg;
} evstandby_ll1a_auto_gap_cnf_msg_struct;
typedef struct
{
Ll1aActiveGapPatternTypeT ActiveGap;
kal_uint32 GapStartTime;
kal_uint32 GapLen;
}Ll1aGapPatternIndMsgT;
typedef struct
{
LOCAL_PARA_HDR
Ll1aGapPatternIndMsgT msg;
}Ll1aGapPatternMsgT_HDR;
typedef struct
{
kal_bool Enable; /** Indicate RMC GM needs specific gap length for standby ICS.*/
kal_uint16 GapLen; /** The needed specific gap length, in ms unit.*/
} EvStandbyLl1aSpecificGapRegMsgT;
typedef struct
{
LOCAL_PARA_HDR
EvStandbyLl1aSpecificGapRegMsgT msg;
}EvStandbyLl1aSpecificGapRegMsgT_HDR;
/*****************************************************************************
FUNCTION NAME: Ll1aHscGapPatternOfferReq
DESCRIPTION: This is used by EvSpage to call when gap offer enable flag is set
PARAMETERS: IsDrxCycle -- Indicate whether the gap is in a new DRX cycle
StartTime -- The Idle Gap Start Time in 32Kcnt
GapLen -- The Idle Gap length in 32Kcnt
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aHscGapPatternOfferReq(Ll1aActiveGapPatternTypeT GapType, kal_bool IsDrxCycle, kal_uint32 StartTime, kal_uint32 GapLen);
/*****************************************************************************
FUNCTION NAME: Ll1aHscProcMmoGapPatternOfferReq
DESCRIPTION: This is used by LL1A to process the MMO gap offer to MLL1
PARAMETERS: MsgPtr -- The message pointer for MMO gap received from frame handler
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aHscProcMmoGapPatternOfferReq(void *MsgPtr);
/*****************************************************************************
FUNCTION NAME: Ll1aHscProcGapStopReq
DESCRIPTION: This is used by EvSpage to call when EvSpage needs to perform early wakeup
and needs LL1A helps to stop standby rat's gap(if previously gap pattern is offered).
When this API is called, LL1A will send gap stop request to LL1 automatically
and wait for gap stop cnf from LL1.
PARAMETERS: void
RETURNED VALUES:
*****************************************************************************/
extern kal_bool Ll1aHscProcGapStopReq(void);
/*****************************************************************************
FUNCTION NAME: HscProcLl1aMsg
DESCRIPTION: This is the LL1A message process function entry in HSC task.
PARAMETERS: *MsgDataP - Message Data Pointer
MsgId - The defined message id
MsgSize - The message size
RETURNED VALUES: TRUE - Processed
*****************************************************************************/
extern kal_bool HscProcLl1aMsg(void *MsgDataP, kal_uint32 MsgId, kal_uint32 MsgSize);
/*****************************************************************************
FUNCTION NAME: Ll1aModeStatusGet
DESCRIPTION: The API provide by LL1A to get the RMC Mode Status
PARAMETERS: void
RETURNED VALUES: RmcModeStatusT
*****************************************************************************/
extern RmcModeStatusT Ll1aModeStatusGet(void);
/*****************************************************************************
FUNCTION NAME: Ll1aModeStatusSet
DESCRIPTION: The API provide by LL1A to set the RMC Mode Status
PARAMETERS: RmcModeStatus
RETURNED VALUES: void
*****************************************************************************/
extern void Ll1aModeStatusSet(RmcModeStatusT RmcModeStatus);
/*****************************************************************************
FUNCTION NAME: Ll1aDrxCycleLenGet
DESCRIPTION: The API provide by LL1A to get the RMC DRX cycle length
PARAMETERS: void
RETURNED VALUES: uint16
*****************************************************************************/
extern kal_uint16 Ll1aDrxCycleLenGet(void);
/*****************************************************************************
FUNCTION NAME: Ll1aDrxCycleLenSet
DESCRIPTION: The API provide by LL1A to set the RMC DRX cycle length
PARAMETERS: uint16
RETURNED VALUES: void
*****************************************************************************/
extern void Ll1aDrxCycleLenSet(kal_uint16 DrxCycleLen);
/*****************************************************************************
FUNCTION NAME: Ll1aRatStateGet
DESCRIPTION: The API provide by LL1A to get the sLl1aScheInfo.RatState
PARAMETERS: void
RETURNED VALUES: bool
*****************************************************************************/
extern Ll1aStateTypeT Ll1aRatStateGet(void);
/*****************************************************************************
FUNCTION NAME: Ll1aRatStateSet
DESCRIPTION: The API provide by LL1A to set the sLl1aScheInfo.RsvasSuspend
PARAMETERS: bool
RETURNED VALUES: void
*****************************************************************************/
extern void Ll1aRatStateSet(Ll1aStateTypeT RatState);
/*****************************************************************************
FUNCTION NAME: Ll1aInit
DESCRIPTION: The LL1A Initialise function
PARAMETERS:
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aInit(void);
/*****************************************************************************
FUNCTION NAME: Ll1aInitForVzwMmo
DESCRIPTION: The LL1A Initialise function
PARAMETERS:
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aInitForVzwMmo(void);
#ifdef C2K_LL1_STUB_TARGET_SUPPORT
/*****************************************************************************
FUNCTION NAME: Ll1aEvStandbySetLTEInfo
DESCRIPTION: EvStandby use this API to set the LTE's info
Pattern.
PARAMETERS:
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aEvStandbySetLTEInfo(void *MsgDataP);
/*****************************************************************************
FUNCTION NAME: Ll1aEvStandbySetGapLengthInfo
DESCRIPTION: EvStandby use this API to set the LTE's gap length info from script
Pattern.
PARAMETERS:
RETURNED VALUES:
*****************************************************************************/
extern void Ll1aEvStandbySetGapLengthInfo(void *MsgDataP);
#endif
extern L1dModeStatusT Ll1aL1dModeStatusGet(void);
extern void Ll1aL1dModeStatusSet(L1dModeStatusT L1dModeStatus);
extern RmcRatStatusT Ll1aRmcRatStatusGet(void);
extern void Ll1aRmcRatStatusSet(RmcRatStatusT RmcRatStatus);
/*****************************************************************************
FUNCTION NAME: Ll1aDoStandbyMeasTickBitmapGet
DESCRIPTION: The API provide by LL1A to get the sLl1aMeasTickBitmap
PARAMETERS: void
RETURNED VALUES: bool
*****************************************************************************/
extern kal_uint8 Ll1aDoStandbyMeasTickBitmapGet(void);
/*****************************************************************************
FUNCTION NAME: Ll1aDoStandbyMeasTickBitmapSet
DESCRIPTION: The API provide by LL1A to set the sLl1aMeasTickBitmap
PARAMETERS: bool
RETURNED VALUES: void
*****************************************************************************/
extern void Ll1aDoStandbyMeasTickBitmapSet(kal_uint8 MeasTickBitmap);
/*****************************************************************************
FUNCTION NAME: Ll1aDoStandbyMeasPurposeBitmapGet
DESCRIPTION: The API provide by LL1A to get the sLl1aMeasPurposeBitmap
PARAMETERS: void
RETURNED VALUES: bool
*****************************************************************************/
extern kal_uint8 Ll1aDoStandbyMeasPurposeBitmapGet(void);
/*****************************************************************************
FUNCTION NAME: Ll1aDoStandbyMeasPurposeBitmapSet
DESCRIPTION: The API provide by LL1A to set the sLl1aMeasPurposeBitmap
PARAMETERS: bool
RETURNED VALUES: void
*****************************************************************************/
extern void Ll1aDoStandbyMeasPurposeBitmapSet(kal_uint8 MeasPurposeBitmap);
#endif /** End of MTK_DEV_C2K_IRAT. */
#endif