blob: 341347d92f7f01d618f26d23d8047f9596c54b7c [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:
* ---------
* el2_sap_common.h
*
* Project:
* --------
* MOLY
*
* Description:
* ------------
* Common header file for all EL2 SAPs.
* This file defines the common structures used by all EL2 SAPs.
*
* Author:
* -------
* -------
*
* ==========================================================================
* $Log$
*
* 08 17 2017 steve.kao
* [MOLY00271504] [6293][SRLTE Enhancement][EL2][EPDCP] Sync from LR11.MP5
* [UMOLYA][TRUNK][EPDCP] SRLTE enhancement.
*
* 02 06 2017 peter.yu
* [MOLY00207733] [MT6293][EL2] ERLCDL development
* [M-SIM] Sync R-SIM related interfaces, remove redundant message IDs related to ERLC.
*
* 09 26 2016 slifer.hsueh
* [MOLY00205085] [MT6293][EL2] ERLC source codes integration from DEV to TRUNK
* ERLC source codes integration from DEV to TRUNK
*
* 04 08 2015 katie.tseng
* [MOLY00104186] [UMOLY] UMOLY code maintenance.
* 1. March 2015 MOLY CR sync on ERLC-DL: (1) VoLTE early RLF (2) log reduction
* 2. RLC gtest UT fix: set/reset gERLC_Trap_Msg_EN at setup() and teardown()
*
* 11 11 2014 yiting.cheng
* [MOLY00084042] [UMOLY] merge UMOLY_DEV to UMOLY trunk
* .
*
* 10 27 2014 sh.yang
* [MOLY00082211] [MT6291_DEV] EMBMS check-in
* embms check-in
*
* 09 19 2014 chi-chung.lin
* [MOLY00073836] [MT6291][ERRC][CHM] LTE-A CHM development code check-in
* [CHM] MBMS interface check in
*
* 07 29 2014 sh.yang
* [MOLY00073922] [MT6291_DEV] EMBMS general check-in
* .
*
* 07 28 2014 yiting.cheng
* [MOLY00073830] [MT6291_DEV] check-in MT6291 modification
* Check-in EMAC-ERRC interface
****************************************************************************/
/// @date 08/10/11
#ifndef _MTK_LTE_EL2_COMMON_SAP_H_
#define _MTK_LTE_EL2_COMMON_SAP_H_
#include "kal_public_api.h"
/*--------------------------------------------------------------------------
* RBID (used RLCUL SAP, RLCDL SAP, and PDCP SAP)
*--------------------------------------------------------------------------*/
/// RBID (radio bearer identity)
typedef enum
{
RBID_SRB0 = 0x00,
RBID_SRB1 = 0x01,
RBID_SRB2 = 0x02,
RBID_DRB1 = 0x10,
RBID_DRB2 = 0x11,
RBID_DRB3 = 0x12,
RBID_DRB4 = 0x13,
RBID_DRB5 = 0x14,
RBID_DRB6 = 0x15,
RBID_DRB7 = 0x16,
RBID_DRB8 = 0x17,
RBID_DRB9 = 0x18,
RBID_DRB10 = 0x19,
RBID_DRB11 = 0x1A,
RBID_DRB12 = 0x1B,
RBID_DRB13 = 0x1C,
RBID_DRB14 = 0x1D,
RBID_DRB15 = 0x1E,
RBID_DRB16 = 0x1F,
RBID_DRB17 = 0x20,
RBID_DRB18 = 0x21,
RBID_DRB19 = 0x22,
RBID_DRB20 = 0x23,
RBID_DRB21 = 0x24,
RBID_DRB22 = 0x25,
RBID_DRB23 = 0x26,
RBID_DRB24 = 0x27,
RBID_DRB25 = 0x28,
RBID_DRB26 = 0x29,
RBID_DRB27 = 0x2A,
RBID_DRB28 = 0x2B,
RBID_DRB29 = 0x2C,
RBID_DRB30 = 0x2D,
RBID_DRB31 = 0x2E,
RBID_DRB32 = 0x2F
} errc_el2_rbid_enum;
/*--------------------------------------------------------------------------
* RRC configuration result (used by all SAPs)
*--------------------------------------------------------------------------*/
/// result of RRC configuration
typedef enum
{
ERRC_EL2_CFG_SUCCESS = 0x00,
ERRC_EL2_CFG_PARAM_ERR = 0x10,
ERRC_EL2_CFG_STATUS_ERR = 0x20
} errc_el2_cfg_result_enum;
/*--------------------------------------------------------------------------
* RRC configuration to enter/leave virtual connected state
*--------------------------------------------------------------------------*/
/// command to pdcp and rlc
typedef enum
{
ERRC_EL2_VIRTUAL_CONNECTED_ENTER_PREPARE = 0, // RLC-UL
ERRC_EL2_VIRTUAL_CONNECTED_ENTER = 1, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_ENTER_END = 2, // PDCP
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE_PREPARE = 3, // PDCP
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE = 4, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE_FAIL = 5, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_ENTER_PREPARE_FOR_SRLTE = 6, // RLC-UL
ERRC_EL2_VIRTUAL_CONNECTED_ENTER_FOR_SRLTE = 7, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_ENTER_END_FOR_SRLTE = 8, // PDCP
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE_PREPARE_FOR_SRLTE = 9, // PDCP
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE_FOR_SRLTE = 10, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_LEAVE_FAIL_FOR_SRLTE = 11, // PDCP, RLC-UL, RLC-DL
ERRC_EL2_VIRTUAL_CONNECTED_INVALID_CAUSE = 12,
} errc_el2_switch_virtual_connected_enum;
/*--------------------------------------------------------------------------
* EL1-EL2 result
*--------------------------------------------------------------------------*/
/// result of EL1<->EL2 configuration
typedef enum
{
EL2_EL1_SUCCESS = 0x00,
EL2_EL1_PARAM_ERR = 0x10,
EL2_EL1_STATUS_ERR = 0x20
} el2_el1_result_enum;
/*--------------------------------------------------------------------------
* logical channel configuration (used by EMAC SAP and ERLCUL SAP)
*--------------------------------------------------------------------------*/
/// prioritised bit rate (PBR)
typedef enum
{
PBR_KBPS_0 = 0x00,
PBR_KBPS_8 = 0x01,
PBR_KBPS_16 = 0x02,
PBR_KBPS_32 = 0x03,
PBR_KBPS_64 = 0x04,
PBR_KBPS_128 = 0x05,
PBR_KBPS_256 = 0x06,
PBR_KBPS_512 = 0x07,
PBR_KBPS_1024= 0x08,
PBR_KBPS_2048= 0x09,
PBR_KBPS_INF = 0x0a
} errc_el2_pbr_enum;
/// bucket size duration (BSD)
typedef enum
{
BSD_MS50 = 0x00,
BSD_MS100 = 0x01,
BSD_MS150 = 0x02,
BSD_MS300 = 0x03,
BSD_MS500 = 0x04,
BSD_MS1000 = 0x05,
BSD_INVALID = 0x06
} errc_el2_bsd_enum;
#define INVALID_LCG (0x04)
/// logical channel configuration
typedef struct
{
kal_uint8 pri; ///< priority
errc_el2_pbr_enum pbr; ///< prioritised bit rate (PBR)
errc_el2_bsd_enum bsd; ///< bucket size duration (BSD)
kal_uint8 lcg; ///< logical channel group (LCG)
} errc_el2_lch_cfg;
/*--------------------------------------------------------------------------
* RB configuration (used by ERLCUL SAP and ERLCDL SAP)
*--------------------------------------------------------------------------*/
/// maximum number of RBs in ERLC configured by ERRC
#define MAX_NUM_RLC_CONFIG_RB (10)
/// maximum number of MRBs in ERLC configured by ERRC
#define MAX_NUM_RLC_CONFIG_MRB (29)
/// RB configuration mode in ERLCUL and ERLCDL
typedef enum
{
ERLC_MODE_REL = 0x00,
ERLC_MODE_EST = 0x10,
ERLC_MODE_REEST = 0x20,
ERLC_MODE_RECFG = 0x30,
ERLC_MODE_REEST_NO_CFG = 0x40,
ERLC_MODE_EST_AND_SUSPEND = 0x50,
ERLC_MODE_SUSPEND = 0x60,
ERLC_MODE_RESUME = 0x70
} errc_erlc_rb_mode_enum;
/// RLC mode
typedef enum
{
ERLC_AM = 0,
ERLC_UM = 1
} errc_erlc_rb_type_enum;
/// RLC SN field length
typedef enum
{
SN_SIZE_5 = 0,
SN_SIZE_10 = 1
} errc_erlc_sn_field_len_enum;
/*--------------------------------------------------------------------------
* EMBMS configuration
*--------------------------------------------------------------------------*/
#define MAX_EMBMS_MTCH_SUPPORT 8
#define MAX_EMBMS_MRB_SUPPORT MAX_EMBMS_MTCH_SUPPORT
#define MAX_EMBMS_MCCH_SUPPORT 8
#define MAX_AREA_NUM_PER_CELL 8
#define MAX_MTCH_NUM_PER_PMCH_29 29
#define MAX_SF_IN_ONE_RF 6
#define MAX_MBSFN_ALLOCATIONS 8
#define MAX_PMCH_PER_MBSFN 15
#define MAX_NUM_MTCH_PER_PMCH 29
/*--------------------------------------------------------------------------
* radio link failure (RLF) (used by ERLCUL SAP and ERLCDL SAP)
*--------------------------------------------------------------------------*/
/// cause of ERRC-ERLC RLF indication
typedef enum
{
ERLC_UL_MAX_RETX = 0x00, ///< max retransmission for a specific SN (TS36.322)
ERLC_DL_MAX_RETX = 0x01 ///< max duplication for a specific SN (MTK proprietary)
} errc_erlc_rlf_enum;
/// additional information about RLF indication
typedef enum
{
ERLC_RLF_ADD_INVALID = 0x00, ///< No additional information
ERLC_RLF_ADD_UL_EAR_REEST = 0x01, ///< UL early re-establishment
ERLC_RLF_ADD_DL_EAR_REEST = 0x02 ///< DL early re-establishment
} errc_erlc_rlf_ind_add_enum;
/// message structure of ERRC_ERLC_RLF_IND
typedef struct
{
LOCAL_PARA_HDR
errc_el2_rbid_enum rbid; // RB ID
kal_uint8 rb_idx; // RB index
kal_bool is_old_rb; // is old RB RLF or not
errc_erlc_rlf_enum cause; // reason of RLF
kal_uint8 add_info; // additional information (MTK proprietary)
kal_uint8 rsvd8; // reserved 1 byte
kal_uint16 rsvd16; // reserved 2 bytes
} errc_erlc_rlf_ind_struct;
#endif