| /***************************************************************************** |
| * 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) 2001 |
| * |
| *****************************************************************************/ |
| |
| /***************************************************************************** |
| * |
| * Filename: |
| * --------- |
| * l1a_dm_private.h |
| * |
| * Project: |
| * -------- |
| * Maui_Software |
| * |
| * Description: |
| * ------------ |
| * This file contains definitions used by L1A dual mode |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| *============================================================================ |
| * HISTORY |
| * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *------------------------------------------------------------------------------ |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| *------------------------------------------------------------------------------ |
| * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *============================================================================ |
| ****************************************************************************/ |
| |
| #if defined(__UMTS_RAT__) || defined(__LTE_RAT__) |
| |
| #ifndef _L1A_DM_PRIVATE_H |
| #define _L1A_DM_PRIVATE_H |
| |
| #include "kal_public_api.h" |
| #include "mph_types.h" |
| #include "mph_cs_def.h" |
| #include "l1_types.h" |
| #include "kal_public_api.h" |
| #include "kal_general_types.h" |
| #include "mll1_gsm.h" |
| #include "mph_dm_msg.h" |
| |
| /* define gl1_ll1_measure_req meas_purpose_bitmap and tick_bitmap begin */ |
| #define L1A_MEAS_PURPOSE_ONLY (0x01) //this bit is set when tick is need |
| #define L1A_MEAS_PURPOSE_ALL (0x02) |
| #define L1A_MEAS_TICK_REG (0x01) |
| #define L1A_MEAS_TICK_PRIO (0x02) |
| #define L1A_MEAS_OOS_BEGIIN (0x04) //used in gl1_ll1_measure_req to inform OOS is ongoing to shorten meas period |
| #define L1A_IS_REG_TICK_ON(bitmap) ( ((bitmap&L1A_MEAS_TICK_REG ) != 0)? KAL_TRUE : KAL_FALSE ) |
| #define L1A_IS_PRIO_TICK_ON(bitmap) ( ((bitmap&L1A_MEAS_TICK_PRIO) != 0)? KAL_TRUE : KAL_FALSE ) |
| |
| |
| /* define for 2G standby gap service type check begin */ |
| /* set if GSM has started standby GSM measurement (RSSI) */ |
| #define L1A_STANDBY_GSM_MEAS_START (0x0001) |
| #ifdef __GERAN_R8__ |
| /* set if GSM has started Priority standby GSM measurement (RSSI) */ |
| #define L1A_STANDBY_GSM_PRIO_MEAS_START (0x0002) |
| #endif /*__GERAN_R8__*/ |
| |
| #define L1A_STANDBY_GAP_ALL_BOUNDARY (0x00FF) |
| /* set if GSM has started standby GSM BSIC measurement */ |
| #define L1A_STANDBY_GSM_BSIC_READ_START (0x0100) |
| /* set if GSM has started power scan in standby */ |
| #define L1A_STANDBY_MANUAL_POWER_SCAN_START (0x0200) |
| /* set if GSM has started cell_bsic read in standby */ |
| #define L1A_STANDBY_CELL_BSIC_READ_START (0x0400) |
| /* set if GSM has started cell_sys_info read in standby */ |
| #define L1A_STANDBY_CELL_SYS_INFO_READ_START (0x0800) |
| |
| #define L1A_STANDBY_GAP_REPORT_CGI_BOUNDARY (0x0FFF) |
| /* set if GSM has started reportCGI pwrscan */ |
| #define L1A_STANDBY_REPORT_CGI_PWRSCAN_START (0x1000) |
| /* set if GSM has started reportCGI bsic pwrscan */ |
| #define L1A_STANDBY_REPORT_CGI_BSIC_READ_START (0x2000) |
| /* set if GSM has started reportCGI sys info pwrscan */ |
| #define L1A_STANDBY_REPORT_CGI_SYS_INFO_READ_START (0x4000) |
| |
| #define L1A_CHECK_GAP_TYPE_ON(A) (( (l1a_standby_gap_info.l1a_standby_gap_type & A) !=0 ) ? KAL_TRUE : KAL_FALSE) |
| #define L1A_CHECK_GAP_TYPE_OFF(A) (( (l1a_standby_gap_info.l1a_standby_gap_type & A) ==0 ) ? KAL_TRUE : KAL_FALSE) |
| #define L1A_SET_GAP_TYPE_ON(A) (l1a_standby_gap_info.l1a_standby_gap_type |= A) |
| #define L1A_SET_GAP_TYPE_OFF(A) (l1a_standby_gap_info.l1a_standby_gap_type &= (~A)) |
| |
| #define L1A_IS_STB_GAP_SERVICE_ON() ( (l1a_standby_gap_info.l1a_meas_purpose_bitmap !=0)? KAL_TRUE : KAL_FALSE ) |
| #define L1A_IS_STB_GAP_SERVICE_OFF() (!L1A_IS_STB_GAP_SERVICE_ON() ) |
| /* define for 2G standby gap service type check end */ |
| |
| |
| |
| #define DEFAULT_T_HIGH_PRIO_SEARCH (-1) |
| #ifndef GEN_FOR_PC |
| #define IMMEDIATELY (-1) |
| #endif |
| |
| typedef enum |
| { |
| L1A_EVENT_GAP_SERVICE_REQ_ACTIVE_GAP = 0, |
| L1A_EVENT_REPORT_GAP_PATTERN_ACTIVE_GAP, |
| L1A_EVENT_ACTIVE_REQ_ACTIVE_GAP, /* SM/FLIGHT -> DM */ |
| L1A_EVENT_STANDBY_REQ_ACTIVE_GAP, |
| L1A_EVENT_DEACTIVATE_REQ_ACTIVE_GAP, |
| L1A_EVENT_TEMP_STOP_MSG_ACTIVE_GAP, //from l1_main |
| L1A_EVENT_TEMP_RESUME_MSG_ACTIVE_GAP, //from l1_main |
| L1A_EVENT_REPORT_GAP_CANCEL_ACTIVE_GAP, |
| L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_CHANNEL_ASSIGN_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_UPLINK_ASSIGN_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_DOWNLINK_ASSIGN_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_PDCH_FAIL_RECONNECT_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_HANDOVER_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_CHANNEL_RECONNECT_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_PKT_UNASSIGN_TO_TBF_PEND_ACTIVE_GAP = L1A_EVENT_IMMED_ASSIGN_ACTIVE_GAP, |
| L1A_EVENT_CHANNEL_RELEASE_ACTIVE_GAP, |
| L1A_EVENT_UNASSIGNMENT_ALL_TBF_REL_ACTIVE_GAP, |
| L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_IDLE_CCCH_START_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_PACKET_IDLE_CCCH_START_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_PACKET_IDLE_PCCCH_START_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_RANDOM_ACCESS_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_CELL_SELECTION_INIT_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_BSIC_SYNC_REQ_ACTIVE_GAP = L1A_EVENT_SPECIFIC_SYNC_REQ_ACTIVE_GAP, |
| L1A_EVENT_HANDOVER_FROM_UMTS_ACTIVE_GAP, |
| L1A_EVENT_INTER_RAT_HANDOVER_ACTIVE_GAP, |
| L1A_EVENT_CHANNEL_RECONNECT_FROM_UMTS_ACTIVE_GAP, |
| L1A_EVENT_REPORT_DCH_STARTED_ACTIVE_GAP, |
| L1A_EVENT_REPORT_NEW_TBF_STARTED_ACTIVE_GAP = L1A_EVENT_REPORT_DCH_STARTED_ACTIVE_GAP, |
| L1A_EVENT_REPORT_DCH_STOPPED_ACTIVE_GAP, |
| #ifdef __BLIND_HANDOVER__ |
| L1A_EVENT_REPORT_FCCH_BLIND_CS_HANDOVER_ACTIVE_GAP = L1A_EVENT_REPORT_DCH_STOPPED_ACTIVE_GAP, |
| #endif /* end of __BLIND_HANDOVER__ */ |
| L1A_EVENT_REPORT_TBF_RECONFIG_ACTIVE_GAP, |
| #if defined (__BLIND_HANDOVER__) |
| L1A_EVENT_BLIND_HANDOVER_BSIC_REQ_ACTIVE_GAP, |
| #endif |
| L1A_EVENT_GAP_STOP_CNF_ACTIVE_GAP, |
| L1A_ACTIVE_GAP_EVENT_NUM |
| }l1a_active_gap_handler_event_enum; |
| |
| |
| /* standby GAP FSM event */ |
| typedef enum |
| { |
| L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP , /* 0 */ |
| L1A_EVENT_STANDBY_GSM_PRIO_MEAS_START_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_STANDBY_GSM_BSIC_READ_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_MANUSEL_PWRSCAN_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_CELL_BSIC_START_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_CELL_SYS_INFO_READ_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_PWRSCAN_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_BSIC_START_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_SYS_INFO_READ_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_STANDBY_GSM_MEAS_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_STANDBY_GSM_PRIO_MEAS_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_STANDBY_GSM_BSIC_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_STANDBY_CELL_BSIC_RES_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_MANUSEL_PWRSCAN_STOP_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_CELL_BSIC_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_CELL_SYS_INFO_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_PWRSCAN_STOP_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_BSIC_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_CGI_SYS_INFO_STOP_REQ_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_GSM_BSIC_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_REPORT_POWER_SCAN_DONE_STB_GAP = L1A_EVENT_STANDBY_GSM_MEAS_START_REQ_STB_GAP, |
| L1A_EVENT_GAP_NOTIFY_IND_STB_GAP, /* 1 */ |
| L1A_EVENT_GAP_STOP_REQ_STB_GAP, /* 2 */ |
| L1A_EVENT_REPORT_GAP_STOP_STB_GAP, /* 3 */ |
| L1A_EVENT_GAP_SUSPEND_REQ_STB_GAP, /* 4 */ |
| L1A_EVENT_REPORT_GAP_SUSPEND_STB_GAP, /* 5 */ |
| L1A_EVENT_GAP_RESUME_REQ_STB_GAP, /* 6 */ |
| L1A_EVENT_ACTIVE_REQ_STB_GAP, /* 7 */ |
| L1A_STB_GAP_EVENT_NUM |
| }l1a_standby_gap_handler_event_enum; |
| |
| |
| /* active autoGAP FSM event */ |
| typedef enum |
| { |
| L1A_EVENT_AUTO_GAP_START_REQ_ACTIVE_AG, |
| L1A_EVENT_AUTO_GAP_IND_ACTIVE_AG, |
| L1A_EVENT_REPORT_AUTO_GAP_START_ACTIVE_AG, |
| L1A_EVENT_AUTO_GAP_END_IND_ACTIVE_AG, |
| L1A_EVENT_AUTO_GAP_STOP_REQ_ACTIVE_AG, |
| L1A_EVENT_AUTO_GAP_STOP_CNF_ACTIVE_AG, |
| L1A_ACTIVE_AG_EVENT_NUM |
| }l1a_active_auto_gap_handler_event_enum; |
| |
| /* standby autoGAP FSM event */ |
| typedef enum |
| { |
| L1A_EVENT_AG_AVAILABLE_IND_STB_AG, |
| L1A_EVENT_AG_UNAVAILABLE_IND_STB_AG, |
| L1A_EVENT_REPORT_AG_START_STB_AG, |
| L1A_EVENT_REPORT_AG_END_STB_AG, |
| L1A_EVENT_AG_CNF_STB_AG, |
| L1A_EVENT_AG_STOP_IND_STB_AG, |
| L1A_EVENT_REPORT_AG_STOP_STB_AG, |
| L1A_EVENT_CGI_PWRSCAN_START_STB_AG, |
| L1A_EVENT_CGI_PWRSCAN_STOP_STB_AG, |
| L1A_EVENT_REPORT_PWRSCAN_CGI_STB_AG, |
| L1A_EVENT_CGI_BSIC_START_STB_AG, |
| L1A_EVENT_CGI_BSIC_STOP_STB_AG, |
| L1A_EVENT_REPORT_BSIC_CGI_STB_AG, |
| L1A_EVENT_CGI_BCCH_START_STB_AG, |
| L1A_EVENT_CGI_BCCH_STOP_STB_AG, |
| L1A_EVENT_SRVCC_BSIC_START_STB_AG, |
| L1A_EVENT_SRVCC_BSIC_STOP_STB_AG, |
| L1A_EVENT_REPORT_BSIC_SRVCC_STB_AG, |
| L1A_EVENT_REPORT_GSMBSIC_STB_AG, |
| L1A_EVENT_REPORT_RE_REQ_CGI_STB_AG, |
| L1A_STB_AUTO_GAP_EVENT_NUM |
| }l1a_standby_auto_gap_handler_event_enum; |
| |
| |
| /* active GAP FSM state*/ |
| typedef enum |
| { |
| L1A_ACTIVE_GAP_NULL = 0, /* 00 */ |
| L1A_ACTIVE_GAP_REQUIRED, /* 01 */ |
| L1A_ACTIVE_GAP_PROCESS, /* 02 */ |
| L1A_ACTIVE_GAP_SUSPENDED, /* 03 */ |
| L1A_ACTIVE_GAP_WAIT_LL1, /* 04 */ |
| L1A_ACTIVE_GAP_WAIT_RPT, /* 05 */ |
| L1A_ACTIVE_GAP_STATE_NUM |
| }l1a_active_gap_state_enum; |
| |
| |
| /* standby GAP FSM state*/ |
| typedef enum |
| { |
| L1A_STB_GAP_IDLE = 0, /* 00 */ |
| L1A_STB_GAP_REQUIRED, /* 01 */ |
| L1A_STB_GAP_PROCESS, /* 02 */ |
| L1A_STB_GAP_SELF_STOP, /* 03 */ |
| L1A_STB_GAP_IRT_STOP, /* 04 */ |
| L1A_STB_GAP_STATE_NUM |
| }l1a_standby_gap_state_enum; |
| |
| /* active autoGAP FSM state*/ |
| typedef enum |
| { |
| L1A_ACTIVE_AG_OFF = 0, /* 00 */ |
| L1A_ACTIVE_AG_ON, /* 01 */ |
| L1A_ACTIVE_AG_REQ, /* 02 */ |
| L1A_ACTIVE_AG_PROCESS, /* 03 */ |
| L1A_ACTIVE_AG_STOPPING, /* 04 */ |
| L1A_ACTIVE_AG_STATE_NUM |
| }l1a_active_auto_gap_state_enum; |
| |
| /* autoGAP required in standby state*/ |
| typedef enum |
| { |
| L1A_AG_REQ_IN_STB_IDLE = 0, /* 00 */ |
| L1A_AG_REQ_IN_STB_REQ, /* 01 */ |
| L1A_AG_REQ_IN_STB_GIVEN, /* 02 */ |
| L1A_AG_REQ_IN_STB_STATE_NUM |
| }l1a_auto_gap_required_in_standby_state_enum; |
| |
| |
| /* standby autoGAP FSM state*/ |
| typedef enum |
| { |
| L1A_STB_AG_IDLE = 0, /* 00 */ |
| L1A_STB_AG_STARTED, /* 01 */ |
| L1A_STB_AG_REQUIRING, /* 02 */ |
| L1A_STB_AG_PROCESSING, /* 03 */ |
| L1A_STB_AG_STOPPING, /* 04 */ |
| L1A_STB_AG_STATE_NUM |
| }l1a_standby_auto_gap_state_enum; |
| |
| |
| /*Shihyao 20090601, used to group gap-related variables into a structure*/ |
| typedef enum |
| { |
| L1A_STATE_NULL_FOR_GAP = 0, /* 00 */ |
| L1A_STATE_RESCHEDULE_GAP_FOR_GAP, /* 01 */ |
| L1A_STATE_WAIT_CCCH_START_FOR_GAP, /* 02 */ |
| L1A_STATE_IRT_HANDOVER_FOR_GAP, /* 03 */ |
| L1A_STATE_BLIND_HANDOVER_BSIC_FOR_GAP, /* 04 */ |
| L1A_CHANNEL_STATE_FOR_GAP_NUM |
| }l1a_channel_state_for_gap_enum; |
| |
| typedef enum |
| { |
| L1A_WAIT_GSM_GAP_STOP_CNF_NULL = 0, |
| L1A_WAIT_GSM_GAP_STOP_CNF_STOPPING, |
| L1A_WAIT_GSM_GAP_STOP_CNF_RPT_STANDBY, |
| L1A_WAIT_GSM_GAP_STOP_CNF_RPT_DEACTIVATE, |
| L1A_WAIT_GSM_GAP_STOP_CNF_NUM |
| }l1a_wait_gsm_gap_stop_cnf_enum; |
| |
| |
| /* record gap suspend state, used by standby GAP FSM*/ |
| typedef enum |
| { |
| L1A_GAP_NOT_SUSPENDED = 0, /* 00 */ |
| L1A_GAP_SUSPENDED, /* 01 */ |
| L1A_GAP_SUSPENDED_NO_GAP, /* 02 */ |
| L1A_GAP_SUSPEND_NUM |
| }l1a_gap_suspend_state_enum; |
| |
| |
| /*================ for ACTIVE GAP FSM usage ====================*/ |
| typedef struct |
| { |
| kal_bool l1a_gap_service_enable; //ON or OFF |
| kal_uint8 tid; //from mll1 and gl1 fill in gap_pattern |
| l1a_channel_state_for_gap_enum l1a_channel_state_for_gap; |
| }l1a_active_gap_database_struct; |
| |
| /*================ for STANDBY GAP FSM usage ====================*/ |
| typedef struct |
| { |
| /* bitmap of gap service type*/ |
| kal_uint32 l1a_standby_gap_type; |
| /* current standby gap service type bitmaps */ |
| kal_uint8 l1a_meas_purpose_bitmap; //bit0(meas), bit1(cell search) |
| kal_uint8 l1a_tick_bitmap; //bit0(rank), bit1(prio) |
| /* if(HPS on) # of higer BA. else if(meas on) # of BA. */ |
| kal_uint8 l1a_carrier_num; |
| kal_uint8 l1a_carrier_num_old; |
| #ifdef __GERAN_R8__ |
| kal_int16 l1a_current_t_high_prio_search; |
| kal_int16 l1a_old_t_high_prio_search; |
| #endif /*__GERAN_R8__*/ |
| kal_uint8 l1a_period_reset_bitmap; //bit0(rank), bit1(prio) |
| /*LL1 might send gap_suspend_req with gl1's gap service. To prevent waking 2G frequently, |
| L1A will not inform L1C until gap is given. */ |
| l1a_gap_suspend_state_enum l1a_is_gap_suspended; |
| /* fast standby plmn list enhancement */ |
| kal_bool l1a_standby_cell_bsic_res_req; |
| #if (SRVCC_USE_CGI_AUTO_GAPS) |
| kal_bool is_meas_req_sent_without_boost_gap_allocation; |
| #endif |
| }l1a_standby_gap_database_struct; |
| |
| /*================ Flags used in 2G active ======================*/ |
| typedef struct |
| { |
| /* syy: to check if sc_mode is changed */ |
| ll1_active_rat_mode_status_enum l1a_sc_mode_old; |
| /* syy: for standby and deactivate cnf after gap_stop_cnf */ |
| l1a_wait_gsm_gap_stop_cnf_enum l1a_wait_gsm_gap_stop_cnf_for_cnf; |
| }l1a_dm_active_database_struct; |
| |
| /*================ Flags used in 2G standby ======================*/ |
| typedef struct |
| { |
| /* william: to record the system mode to be set after gap stop cnf */ |
| mph_system_mode_enum l1a_system_mode_set; |
| /* william: for active cnf after report gap stop*/ |
| kal_bool l1a_wait_report_gap_stop_for_active_cnf; |
| }l1a_dm_standby_database_struct; |
| |
| /*================ for ACTIVE AUTO GAP FSM usage ====================*/ |
| typedef struct |
| { |
| kal_bool l1a_is_ag_started; //only for assert check |
| }l1a_active_auto_gap_database_struct; |
| |
| /*================ for STANDBY AUTO GAP FSM usage ====================*/ |
| typedef struct |
| { |
| kal_bool is_started; |
| kal_uint8 scan_id; |
| ARFCN arfcn; |
| } l1a_report_cgi_pwrscan_req_struct; |
| |
| typedef struct |
| { |
| kal_bool is_started; |
| kal_uint8 bsic_tid; |
| ARFCN arfcn; |
| kal_bool is_srvcc; //to distinguish cgi or srvcc |
| kal_bool need_trigger_at_end; //when srvcc_bsic is stopped and started in proc state, need to trigger at RptEnd |
| } l1a_report_cgi_bsic_start_req_struct; |
| |
| typedef struct |
| { |
| kal_bool is_started; |
| ARFCN arfcn; |
| BSIC bsic; |
| kal_uint16 bcch_mask; |
| FrameNumber frame_offset; |
| kal_int32 ebit_offset; |
| } l1a_report_cgi_sys_info_start_req_struct; |
| |
| #if (SRVCC_USE_CGI_AUTO_GAPS) |
| typedef struct |
| { |
| Power b2_threshold_in_qdbm; //B2 value from ERRC |
| kal_uint8 num_of_bsic_attempts; //bsic attempt count |
| kal_bool is_srvcc; //srvcc flag from MLL1 |
| kal_bool is_srvcc_backup; //backup srvcc flag |
| }l1a_srvcc_perf_improvement_data_struct; |
| #endif |
| |
| typedef struct |
| { |
| l1a_report_cgi_pwrscan_req_struct pwrscan_req; //for ReportCGI |
| l1a_report_cgi_bsic_start_req_struct bsic_req; //for ReportCGI |
| l1a_report_cgi_sys_info_start_req_struct bcch_req; //for ReportCGI |
| #if (SRVCC_USE_CGI_AUTO_GAPS) |
| l1a_srvcc_perf_improvement_data_struct srvcc_data;//for srvcc perf improvements |
| #endif |
| }l1a_standby_auto_gap_database_struct; |
| |
| /* from m11150.c */ |
| kal_bool l1a_standby_gap_check_if_service_on(void); |
| kal_bool l1a_standby_gap_external_check_if_type_on( kal_uint32 standby_gap_type ); |
| kal_bool l1a_standby_gap_external_check_if_type_off( kal_uint32 standby_gap_type ); |
| kal_bool l1a_standby_gap_external_set_type_on( kal_uint32 standby_gap_type ); |
| kal_bool l1a_standby_gap_external_set_type_off( kal_uint32 standby_gap_type ); |
| kal_bool l1a_standby_gap_external_check_cell_bsic_res_req_off(void); |
| kal_uint8 l1a_standby_gap_external_read_state(void); |
| kal_bool l1a_standby_gap_check_if_service_on(void); |
| void l1a_standby_gap_handler_init(void); |
| void l1a_standby_gap_handler(kal_uint8 event, void* ptr_ilm_rpt); |
| kal_uint8 l1a_gap_external_read_active_gap_state(void); |
| kal_bool l1a_external_read_active_gap_stopping(void); |
| kal_bool l1a_external_read_active_gap_service_enable(void); |
| void l1a_active_gap_handler_init(void); |
| void l1a_active_gap_handler(kal_uint8 event, void* ptr_ilm_rpt); |
| void l1a_update_standby_meas_purpose( mphm_standby_meas_purpose_enum purpose, void* ptr_ilm_rpt ); |
| #if (SRVCC_USE_CGI_AUTO_GAPS) |
| void l1a_send_meas_req_for_srvcc(void); |
| void l1a_set_meas_req_sent_without_boost_gap_allocation(kal_bool boost_gap_allocation); |
| kal_bool l1a_get_meas_req_sent_without_boost_gap_allocation(void); |
| #endif |
| |
| |
| |
| /* from m11151.c */ |
| void l1a_gsm_active_data_init(void); |
| void l1a_gsm_standby_data_init(void); |
| void l1a_external_set_wait_gsm_gap_stop_cnf_cause( l1a_wait_gsm_gap_stop_cnf_enum cause ); |
| l1a_wait_gsm_gap_stop_cnf_enum l1a_external_read_wait_gsm_gap_stop_cnf_cause( void ); |
| ll1_active_rat_mode_status_enum l1a_external_read_old_sc_mode( void ); |
| void l1a_external_set_wait_report_gap_stop_for_active_req( kal_bool wait_report_gap_stop); |
| kal_bool l1a_external_read_wait_report_gap_stop_for_active_req( void ); |
| void l1a_dm_active_req(void* ptr_ilm); |
| void l1a_set_gsm_sm_active_to_dm_active(void* ptr_ilm); |
| void l1a_dm_standby_req(void* ptr_ilm); |
| void l1a_standby_gsm_bsic_read_req(void* ptr_ilm); |
| void l1a_standby_gsm_bsic_stop_req(void* ptr_ilm); |
| void l1a_standby_gsm_meas_start_req(void* ptr_ilm); |
| void l1a_standby_gsm_meas_stop_req(void* ptr_ilm); |
| #ifdef __GERAN_R8__ |
| void l1a_standby_gsm_prio_meas_start_req(void* ptr_ilm); |
| void l1a_standby_gsm_prio_meas_stop_req(void* ptr_ilm); |
| #endif /*__GERAN_R8__*/ |
| void l1a_standby_cell_bsic_start_req(void* ptr_ilm); |
| void l1a_standby_cell_bsic_stop_req(void* ptr_ilm); |
| void l1a_standby_cell_sys_info_start_req(void* ptr_ilm); |
| void l1a_standby_cell_sys_info_stop_req(void* ptr_ilm); |
| |
| void l1a_temporarily_stop_gsm_gap_req( void* ptr_ilm ); |
| void l1a_resume_gsm_gap_schedule( void* ptr_ilm ); |
| kal_bool l1a_inform_gl1_mode_status( kal_bool timing_changed, ll1_active_rat_mode_status_enum new_mode ); |
| void l1a_receive_report_gappattern(void* ptr_rpt); |
| void l1a_receive_report_gsm_rssi(void* ptr_rpt); |
| void l1a_receive_report_gsm_bsic(void* ptr_rpt); |
| void l1a_receive_report_bsic_cgi(void* ptr_rpt); |
| #if !(SRVCC_USE_CGI_AUTO_GAPS) |
| kal_bool l1a_receive_report_bsic_srvcc(void* ptr_rpt); |
| #else |
| void l1a_receive_report_bsic_srvcc(void* ptr_rpt); |
| #endif /* SRVCC_USE_CGI_AUTO_GAPS */ |
| void l1a_receive_report_gap_stop( void ); |
| void l1a_receive_ll1_gl1_gap_notify_ind(void* ptr_ilm); |
| void l1a_receive_mphm_gap_stop_req( void ); |
| void l1a_receive_report_standby_done(void* ptr_rpt); |
| void l1a_receive_report_active_done(void* ptr_rpt); |
| void l1a_receive_gsm_gap_stop_cnf(); |
| void l1a_receive_mphm_sync_req( void ); |
| void l1a_receive_report_sync_time( void* ptr_rpt ); |
| void l1a_receive_report_pm_done( void* ptr_rpt ); |
| void l1a_receive_mphm_gap_suspend_req( void ); |
| void l1a_receive_report_gap_suspend( void ); |
| void l1a_receive_mphm_gap_resume_ind( void ); |
| void l1a_receive_ll1_gl1_mode_status_update_ind(void* ptr_ilm); |
| void l1a_send_gl1_ll1_gap_stop_cnf( void ); |
| void l1a_send_gl1_ll1_gap_stop_req( void ); |
| void l1a_send_mphm_standby_cnf( void ); |
| void l1a_send_inter_rat_handover_cnf( void ); |
| void l1a_send_gl1_ll1_measure_req( l1a_standby_gap_service_req_struct standby_gap_service_req ); |
| void l1a_send_gl1_ll1_irat_sync_cnf(kal_int32 frame, kal_int32 ebit, kal_uint32 ustime); |
| void l1a_send_gl1_ll1_gap_suspend_cnf(void); |
| void l1a_send_gl1_ll1_standby_measure_done_ind( kal_uint8 tid, kal_uint8 tick_bitmap ); |
| void l1a_send_gl1_ll1_rat_status_ind( gl1_ll1_rat_status_enum rat ); |
| void l1a_send_gl1_ll1_gap_pattern_ind(void* ptr_rpt); |
| void l1a_send_mphm_standby_gsm_bsic_ind( SChData* ptr_sch_data ); |
| void l1a_send_mphm_standby_gsm_report_cgi_bsic_ind( SChData* ptr_sch_data ); |
| void l1a_send_mphm_standby_gsm_report_srvcc_bsic_ind( SChData* ptr_sch_data ); |
| void l1a_send_mphm_standby_gsm_report_cgi_pwrscan_cnf( PowerScanData* ptr_scan_data, kal_uint8 scan_id, ARFCN arfcn ); |
| void l1a_enter_umts_fail_reconnect(void); |
| |
| |
| #ifdef __SGTDS_STANDBY_AFC_TRACKING__ |
| void l1a_receive_report_gap_tick( void* ptr_rpt ); |
| void l1a_stop_report_gap_tick( void ); |
| #endif /*__SGTDS_STANDBY_AFC_TRACKING__*/ |
| #ifdef __GL1_GEMINI__ |
| void l1a_update_alt_l1_gsm_gap_service_init(void); |
| void l1a_update_alt_l1_gsm_gap_service (kal_bool is_need); |
| void l1a_send_mphc_alt_l1_gsm_gap_service_update_req (kal_bool enable); |
| void l1a_receive_mphc_alt_l1_gsm_gap_resume_req(void); |
| #endif /* end of __GL1_GEMINI__ */ |
| |
| /* from m11152.c, for auto gap */ |
| void l1a_active_auto_gap_handler_init(void); |
| void l1a_active_auto_gap_handler(kal_uint8 event, void* ptr_ilm_rpt); |
| void l1a_standby_auto_gap_handler_init(void); |
| void l1a_standby_auto_gap_handler(kal_uint8 event, void* ptr_ilm_rpt); |
| void l1a_auto_gap_in_standby_init(void); |
| void l1a_auto_gap_ind_in_standby(void* ptr_ilm); |
| void l1a_report_auto_gap_start_in_standby( void* ptr_rpt ); |
| void l1a_auto_gap_end_ind_in_standby(void* ptr_ilm); |
| kal_uint8 l1a_get_srvcc_bsic_tid( void ); |
| |
| #if (SRVCC_USE_CGI_AUTO_GAPS) |
| kal_bool l1a_srvcc_perf_get_is_srvcc_flag( void ); |
| void l1a_srvcc_perf_set_is_srvcc_flag( kal_bool flag, kal_bool is_srvcc_backup_flag ); |
| void l1a_srvcc_perf_update_b2_thd( Power b2_threshold_in_qdbm); |
| kal_bool l1a_srvcc_perf_is_backup_and_current_srvcc_flag_diff( void ); |
| void l1a_srvcc_perf_update_bsic_attempt_count( kal_bool is_reset ); |
| void l1a_srvcc_perf_calculate_boost_value( SChData* ptr_sch_data, mphm_standby_gsm_report_srvcc_bsic_ind_struct *ptr_para ); |
| void l1a_srvcc_perf_reset_bsic_attempt_count(void); |
| #endif |
| |
| /* from m11127.c */ |
| void l1a_report_cgi_pwrscan_start( ARFCN arfcn, kal_uint8 scan_id, kal_bool use_auto_gap ); |
| void l1a_report_cgi_pwrscan_stop(kal_bool use_auto_gap); |
| void l1a_report_cgi_report_scan_done(Report* ptr_rpt); |
| |
| |
| /* from other files */ |
| extern mph_system_mode_enum l1a_get_system_mode(void); |
| |
| extern kal_int32 l1a_external_read_paing_period( void ); |
| |
| #ifdef __GL1_GEMINI__ |
| extern mph_system_mode_enum l1a_get_sim1_system_mode(void); |
| #endif /* end of __GL1_GEMINI__ */ |
| |
| #endif /* end of _L1A_DM_PRIVATE_H */ |
| |
| #endif /* __UMTS_RAT__ || __LTE_RAT__ */ |