blob: 3bd2540fae0beee6c397f760de65ad07ad8b7e0e [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) 2012
*
* 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).
*
*****************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* upcm_enum.h
*
* Project:
* --------
* MOLY
*
* Description:
* ------------
*
*
* Author:
* -------
* -------
*
*
* ==========================================================================
* $Log$
*
* 03 10 2020 tc.chang
* [MOLY00503980] [J7A][CN]?¸m???±µ¥¢?.
*
* 12 05 2019 tc.chang
* [MOLY00463764] Correct timer unit and pdn sim id in rqos set timer.
*
* 12 05 2019 tc.chang
* [MOLY00463783] [MT6885][Petrus][MP1][IODT][CTC][FT][SA][5G FT][China][Shenzhen][Huawei][Operator FT]IMS call fail @SA network.
*
* 09 24 2019 amit.singh
* [MOLY00442150] [DISPATCHER] EPDG related bearer and PDN ID range definition
*
* Epdg relatd enum declaration.
*
* 07 04 2019 tc.chang
* [MOLY00418272] [Gen97] Sync Gen95 UMOLYE patch.
*
* 02 15 2019 tc.chang
* [MOLY00373282] [ENPDCP] MCPS enhancement and SA phone call volunteer patch.
*
* 10 09 2018 tc.chang
* [MOLY00356444] [VMOLY] Bug fix and add UT cases.
*
* 10 08 2018 tc.chang
* [MOLY00356444] [VMOLY] Bug fix and add UT cases.
*
* 09 18 2018 tc.chang
* [MOLY00345990] [VMOLY] Code sync.
*
* 09 14 2018 tc.chang
* [MOLY00345990] [VMOLY] Code sync
* Rollback first. Fix build error locally
*
* 03 23 2017 chin-wei.hsu
* [MOLY00237294] [MT6293][UPCM] Forced SW path
* [trunk] Forced SW path for EBI/PDN.
*
* 12 28 2016 cammie.yang
* [MOLY00221324] [6293][EL2][UPCM] C2K feature integrations
* [TRUNK][UPCM] modifications for C2K feature integrations
*
* 12 27 2016 cammie.yang
* [MOLY00221324] [6293][EL2][UPCM] C2K feature integrations
* [UMOLYA][UPCM] Interface change for C2K integration
*
* 09 26 2016 cammie.yang
* [MOLY00195563] [6293][EL2][UPCM][RATDM][EPDCP] Initial feature integrations
* [TRUNK] UPCM/RATDM/EPDCP feature integrations from PS.DEV
*
* 07 17 2013 moja.hsu
* [MOLY00030111] Add UPCM Tx/Rx statistics query API
* .
*
****************************************************************************/
/*
* =====================================================================================
*
* Filename: upcm_enum.h
*
* Description: UPCM (User plane connection manager exported header file)
* ENUM values for trace.
*
* Created: 2012/3/19 �W�� 11:20:22
*
* Author: mtk01641 (moja)
* =====================================================================================
*/
#ifndef UPCM_ENUM_INC
#define UPCM_ENUM_INC
#include "ps_public_enum_public.h"
/* PDN ID
* Invalid: 0
* Reserved: 1 ~ 3
* MBMS: 4
* LTE: 5 ~ 15
* C2K: 16 ~ 23
* 5G: 24 ~ 38 (maps to PDN session ID 1 ~ 15)
* EPDG: 39 ~ 53 (maps to PDN session for bearer ID 1 ~ 15)
*/
#define MAX_234G_EPSB_NUM 24 // FOR C2K
#define QFI_NUM_PER_PSI 64
#define MIN_5G_BEARER_ID MAX_234G_EPSB_NUM
#define MIN_5G_PDN_ID MAX_234G_EPSB_NUM
#define NUM_5G_PDU_SESSION 15
#define MAX_5G_PDN_ID (MIN_5G_PDN_ID + NUM_5G_PDU_SESSION - 1)
#define MIN_PDN_ID (L4_PS_MIN_EBI)
//for EPDG
#define MIN_EPDG_BEARER_ID 1
#define MAX_EPDG_BEARER_ID 15
#define MIN_EPDG_PDN_ID 39
#define MAX_EPDG_PDN_ID 53
#define MAX_EPDG_CID 200
#ifdef __FIVEG_NAS__
#define MAX_EPSB_NUM 984
#define MAX_PDN_ID MAX_5G_PDN_ID
#else
#define MAX_EPSB_NUM MAX_234G_EPSB_NUM
#define MAX_PDN_ID (MAX_EPSB_NUM - 1)
#endif
/*
* LTE: 5 ~ 15 maps to SIT index 0 ~ 10
* C2K: 16 ~ 23 maps to SIT index 0 ~ 7
*/
#define MAX_234G_SIT_NUM 11
#define UPCM_FIVEG_PDN_ID_TO_PSI(_id) \
(((_id) >= MIN_5G_PDN_ID && (_id) <= MAX_5G_PDN_ID) ? ((_id) - MIN_5G_PDN_ID + 1) : (0))
#define UPCM_FIVEG_PSI_TO_PDN_ID(_id) ((_id) + MIN_5G_PDN_ID - 1)
// Gen97
#define UPCM_PDN_SIM_ID(_pdn, _sim) ((((_sim) & 0x3) << 6) | ((_pdn) & 0x3F))
typedef enum
{
IP_TYPE_MISC,
IP_TYPE_V4,
IP_TYPE_V6,
}ip_type_e;
/*
* bit 0:Indicate if test mode is activate.
* bit 1:Indicate if test loop is closed.
* bit 2: BUFFER_IP_PDU
* bit 3: Drop UL/DL SDUs
*/
typedef enum
{
TEST_FLAG_MODE = 0x01,
TEST_FLAG_LOOP_A = 0x02,
TEST_FLAG_LOOP_B = 0x04,
TEST_FLAG_BUFFER = 0x08,
TEST_FLAG_DROP = 0x10,
}upcm_test_flag_e;
typedef enum
{
TEST_RESULT_OK = 0,
TEST_RESULT_NG = 1,
TEST_RESULT_WAIT_OPEN_LOOP = 2,
}upcm_test_result_e;
/*
* Used for trace
*/
typedef enum
{ // TODO: update for new flags
UPCM_NORMAL = 0,
UPCM_TEST = TEST_FLAG_MODE,
UPCM_LOOP = TEST_FLAG_LOOP_B,
UPCM_BUF = TEST_FLAG_BUFFER,
UPCM_DROP = TEST_FLAG_DROP,
UPCM_TEST_LOOP = UPCM_TEST | UPCM_LOOP,
UPCM_TEST_BUF = UPCM_TEST | UPCM_BUF,
UPCM_TEST_DROP = UPCM_TEST | UPCM_DROP,
UPCM_LOOP_BUF = UPCM_LOOP | UPCM_BUF,
UPCM_LOOP_DROP = UPCM_LOOP | UPCM_DROP,
UPCM_BUF_DROP = UPCM_BUF | UPCM_DROP,
UPCM_TEST_LOOP_BUF = UPCM_TEST | UPCM_LOOP | UPCM_BUF,
UPCM_TEST_LOOP_DROP = UPCM_TEST | UPCM_LOOP | UPCM_DROP,
UPCM_TEST_BUF_DROP = UPCM_TEST | UPCM_BUF | UPCM_DROP,
UPCM_LOOP_BUF_DROP = UPCM_LOOP | UPCM_BUF | UPCM_DROP,
UPCM_TEST_LOOP_BUF_DROP = UPCM_TEST | UPCM_LOOP | UPCM_BUF | UPCM_DROP,
}upcm_test_e;
typedef enum
{
TACT_DELAYTIMER_RUNNING,
TACT_DELAYTIMER_TIMEOUT,
TACT_BUFFER,
TACT_LOOPBACK,
TACT_DISCARD,
TACT_DELIVER_TO_UPPER,
}upcm_test_act_e;
typedef enum
{
UBACT_ACTIVE,
UBACT_DEACTIVE,
}upcm_bearer_act_e;
typedef enum
{
UPCM_SUSPEND,
UPCM_RESUME,
}upcm_sus_res_e;
typedef enum
{
UPT_Open,
UPT_Close,
}upcm_act_test_mode_e;
typedef enum
{
UPT_AlreadyAct,
UPT_NotAct,
UPT_AlreadyClose,
UPT_AlreadyOpen,
UPT_HasPDN,
UPT_HasMoreThan1PDN,
}upcm_test_mode_fail_code_e;
typedef enum
{
UPCM_PDN_ACT,
UPCM_PDN_DEACT,
}upcm_pdn_info_e;
typedef enum
{
UPCM_PDN_ID_234G_C2K,
UPCM_PDN_ID_5G,
UPCM_PDN_ID_MAX_NUM,
} upcm_query_pdn_id_e;
/********************************************
* FUNCTION DECLARATIONS *
********************************************/
/* Export for the users not in protocol */
kal_uint8 upcm_query_pdn_id(upcm_query_pdn_id_e type, kal_uint8 bearer_id);
#endif /* ----- #ifndef UPCM_ENUM_INC ----- */