rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2016 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | |
| 36 | #ifndef _CL1TSKLL1AAPI_H_ |
| 37 | #define _CL1TSKLL1AAPI_H_ |
| 38 | |
| 39 | #ifdef MTK_DEV_93M_PREIT |
| 40 | |
| 41 | /***************************************************************************** |
| 42 | |
| 43 | FILE NAME: cl1tskll1aapi.h |
| 44 | |
| 45 | DESCRIPTION: |
| 46 | |
| 47 | This file contains the message type and apis of LL1A for other modules. |
| 48 | |
| 49 | *****************************************************************************/ |
| 50 | /*---------------------------------------------------------------------------- |
| 51 | Include Files |
| 52 | ----------------------------------------------------------------------------*/ |
| 53 | #include "cl1tskll1adefs.h" |
| 54 | |
| 55 | |
| 56 | /*---------------------------------------------------------------------------- |
| 57 | * Definitions |
| 58 | *----------------------------------------------------------------------------*/ |
| 59 | #define GAP_SESSION_IN_PERIOD (6) /** The maximum number of gap session in one gap notify ind. */ |
| 60 | |
| 61 | #define GAP_MARGIN_FOR_STANDBY (10000) /** The Gap margin for Standby rat when EVDO in active.*/ |
| 62 | #define GAP_MARGIN_FOR_STANDBY_OVERLAP (20000) /** The header or end Gap margin for Standby rat when EVDO in active.*/ |
| 63 | |
| 64 | extern Ll1aScheInfoT gLl1aScheInfo; |
| 65 | |
| 66 | #define LL1A_GAP_SERVICE_STATUS_SET(Enable) (gLl1aScheInfo.GapServiceEnable = Enable) |
| 67 | #define LL1A_GAP_SERVICE_STATUS_GET() (gLl1aScheInfo.GapServiceEnable) |
| 68 | |
| 69 | #define LL1A_GAP_OFFERED_STATUS_SET(Status) (gLl1aScheInfo.GapOfferedStatus = Status) |
| 70 | #define LL1A_GAP_OFFERED_STATUS_GET() (gLl1aScheInfo.GapOfferedStatus) |
| 71 | |
| 72 | |
| 73 | /*---------------------------------------------------------------------------- |
| 74 | Message Formats structure |
| 75 | ----------------------------------------------------------------------------*/ |
| 76 | /**********************************************RMC Interface Related*********************************/ |
| 77 | |
| 78 | /** Rmc Rat Status Ind. */ |
| 79 | typedef struct |
| 80 | { |
| 81 | RmcRatStatusT RatStatus; /* Flight/Standby/Active. */ |
| 82 | } Ll1aRmcRatStatusIndMsgT; |
| 83 | |
| 84 | /** Rmc Mode Status Ind. */ |
| 85 | typedef struct |
| 86 | { |
| 87 | RmcModeStatusT ModeStatus; /* NULL/IDLE/CONNECTED. */ |
| 88 | kal_uint16 DrxCycleLength;/* When IDLE Mode, this value is valid and in slot unit. */ |
| 89 | } Ll1aRmcModeStatusIndMsgT; |
| 90 | |
| 91 | /** Rmc Inter-Freq Number. */ |
| 92 | typedef struct |
| 93 | { |
| 94 | kal_uint8 FreqNum; /** EVDO in active, the number of higher priority inter-freq.*/ |
| 95 | /** When HPS off, the freq_num is equal to zero. */ |
| 96 | } Ll1aRmcActiveMeasInfoIndMsgT; |
| 97 | |
| 98 | /** EvStandby Send the standby meas config to LL1A, including the meas purpose and meas type. */ |
| 99 | typedef struct |
| 100 | { |
| 101 | kal_uint8 MeasPurpose; /** Bit0 - Meas On/Off, Bit1 - Cell Search On/Off. */ |
| 102 | kal_uint8 TickBitMap; /** Bit0 - TICK_BITMAP_MPSR, Bit1 - TICK_BITMAP_HPS, Bit2 - TICK_BITMAP_LPS, Bit3 - TICK_BITMAP_RES. */ |
| 103 | kal_uint8 FreqNum; /** This need EvStandby to fill it with different Meas On/Off and Thps On/Off Combination. */ |
| 104 | kal_uint8 IsPeriodResetBitMap; /** Bit0 - RANK BIT Bit1 - HIGH PRIORITY BIT. */ |
| 105 | kal_uint8 Tid; /** The Tid for this standby meas request. */ |
| 106 | } Ll1aEvStandbyMeasReqMsgT; |
| 107 | |
| 108 | /** This is a gap session stricture, with the start time and duration in EVDO's system time format. */ |
| 109 | typedef struct |
| 110 | { |
| 111 | kal_uint32 GapSessionStartTime; /** The Start Time of Standby Gap. The start time is based on FRC time.*/ |
| 112 | /* modify it to kal_uint32 to keep same with 91 for EVL1 flow */ |
| 113 | kal_uint32 GapSessionLength; /** The Length of Standby Gap. The start time is based on FRC time.*/ |
| 114 | } GapSessionTypeT; |
| 115 | |
| 116 | |
| 117 | /** The EvStandby' Gap Notify Ind Structure. */ |
| 118 | typedef struct |
| 119 | { |
| 120 | kal_uint8 Tid; /** The Tid for this gap notify ind. */ |
| 121 | kal_uint8 GapSessionNum; /** 1 - For Idle Gap; 1 < number <=6 - For Connect Gap. */ |
| 122 | GapSessionTypeT GapSession[GAP_SESSION_IN_PERIOD]; /** LL1A will inform all the gap session time to Gap Manager. */ |
| 123 | kal_uint8 MeasTid; /** Indicate the measurement tid for standby meas module. */ |
| 124 | kal_uint8 HpsTid; /** Indicate the Hps tid for standby meas module. */ |
| 125 | kal_uint8 TickBitmap; /** Bit0 - Tmrasure, Bit1 - Thps. */ |
| 126 | kal_bool is_conn_gap; /* indicate whether is LTE connect normal gap */ |
| 127 | } EvStandbyLl1aGapNotifyIndMsgT; |
| 128 | |
| 129 | typedef struct |
| 130 | { |
| 131 | LOCAL_PARA_HDR |
| 132 | EvStandbyLl1aGapNotifyIndMsgT msg; |
| 133 | } evstandby_ll1a_gap_notify_ind_msg_struct; |
| 134 | |
| 135 | |
| 136 | /** The EvStandby' Measure done Ind Structure. */ |
| 137 | typedef struct |
| 138 | { |
| 139 | kal_uint8 Tid; /** Indicate the measure done tid to which gap pattern period sent before.*/ |
| 140 | kal_uint8 TickBitmap; /** Bit0 - TICK_BITMAP_MPSR, Bit1 - TICK_BITMAP_HPS, Bit2 - TICK_BITMAP_LPS, Bit3 - TICK_BITMAP_RES. */ |
| 141 | kal_uint8 cell_list_status_bitmap; /* cell_list_status_bitmap - bit 0 is set to 1, if no cell found in cell list */ |
| 142 | } Ll1aEvStandbyMeasDoneIndMsgT; |
| 143 | |
| 144 | typedef struct |
| 145 | { |
| 146 | LOCAL_PARA_HDR |
| 147 | Ll1aEvStandbyMeasDoneIndMsgT msg; |
| 148 | } Ll1aEvStandbyMeasDoneIndMsgT_HDR; |
| 149 | |
| 150 | /** The EvStandby Auto-Gap Cnf Structure. */ |
| 151 | typedef struct |
| 152 | { |
| 153 | kal_bool Success; /** Indicate the auto-gap requeset for EvStandby is success or fail. */ |
| 154 | kal_int32 ValidPeriod; /** The valid auto-gap period from LL1, in usc unit. */ |
| 155 | kal_uint32 AutoTime; /** Return the AutoTime to GM.*/ |
| 156 | } EvStandbyLl1aAutoGapCnfMsgT; |
| 157 | |
| 158 | typedef struct |
| 159 | { |
| 160 | LOCAL_PARA_HDR |
| 161 | EvStandbyLl1aAutoGapCnfMsgT msg; |
| 162 | } evstandby_ll1a_auto_gap_cnf_msg_struct; |
| 163 | |
| 164 | typedef struct |
| 165 | { |
| 166 | Ll1aActiveGapPatternTypeT ActiveGap; |
| 167 | kal_uint32 GapStartTime; |
| 168 | kal_uint32 GapLen; |
| 169 | }Ll1aGapPatternIndMsgT; |
| 170 | |
| 171 | typedef struct |
| 172 | { |
| 173 | LOCAL_PARA_HDR |
| 174 | Ll1aGapPatternIndMsgT msg; |
| 175 | }Ll1aGapPatternMsgT_HDR; |
| 176 | |
| 177 | typedef struct |
| 178 | { |
| 179 | kal_bool Enable; /** Indicate RMC GM needs specific gap length for standby ICS.*/ |
| 180 | kal_uint16 GapLen; /** The needed specific gap length, in ms unit.*/ |
| 181 | } EvStandbyLl1aSpecificGapRegMsgT; |
| 182 | |
| 183 | typedef struct |
| 184 | { |
| 185 | LOCAL_PARA_HDR |
| 186 | EvStandbyLl1aSpecificGapRegMsgT msg; |
| 187 | }EvStandbyLl1aSpecificGapRegMsgT_HDR; |
| 188 | |
| 189 | /***************************************************************************** |
| 190 | |
| 191 | FUNCTION NAME: Ll1aHscGapPatternOfferReq |
| 192 | |
| 193 | DESCRIPTION: This is used by EvSpage to call when gap offer enable flag is set |
| 194 | |
| 195 | PARAMETERS: IsDrxCycle -- Indicate whether the gap is in a new DRX cycle |
| 196 | StartTime -- The Idle Gap Start Time in 32Kcnt |
| 197 | GapLen -- The Idle Gap length in 32Kcnt |
| 198 | |
| 199 | RETURNED VALUES: |
| 200 | *****************************************************************************/ |
| 201 | extern void Ll1aHscGapPatternOfferReq(Ll1aActiveGapPatternTypeT GapType, kal_bool IsDrxCycle, kal_uint32 StartTime, kal_uint32 GapLen); |
| 202 | |
| 203 | /***************************************************************************** |
| 204 | |
| 205 | FUNCTION NAME: Ll1aHscProcMmoGapPatternOfferReq |
| 206 | |
| 207 | DESCRIPTION: This is used by LL1A to process the MMO gap offer to MLL1 |
| 208 | |
| 209 | PARAMETERS: MsgPtr -- The message pointer for MMO gap received from frame handler |
| 210 | |
| 211 | RETURNED VALUES: |
| 212 | *****************************************************************************/ |
| 213 | extern void Ll1aHscProcMmoGapPatternOfferReq(void *MsgPtr); |
| 214 | |
| 215 | |
| 216 | /***************************************************************************** |
| 217 | |
| 218 | FUNCTION NAME: Ll1aHscProcGapStopReq |
| 219 | |
| 220 | DESCRIPTION: This is used by EvSpage to call when EvSpage needs to perform early wakeup |
| 221 | and needs LL1A helps to stop standby rat's gap(if previously gap pattern is offered). |
| 222 | When this API is called, LL1A will send gap stop request to LL1 automatically |
| 223 | and wait for gap stop cnf from LL1. |
| 224 | PARAMETERS: void |
| 225 | RETURNED VALUES: |
| 226 | *****************************************************************************/ |
| 227 | extern kal_bool Ll1aHscProcGapStopReq(void); |
| 228 | |
| 229 | /***************************************************************************** |
| 230 | |
| 231 | FUNCTION NAME: HscProcLl1aMsg |
| 232 | |
| 233 | DESCRIPTION: This is the LL1A message process function entry in HSC task. |
| 234 | PARAMETERS: *MsgDataP - Message Data Pointer |
| 235 | MsgId - The defined message id |
| 236 | MsgSize - The message size |
| 237 | RETURNED VALUES: TRUE - Processed |
| 238 | *****************************************************************************/ |
| 239 | extern kal_bool HscProcLl1aMsg(void *MsgDataP, kal_uint32 MsgId, kal_uint32 MsgSize); |
| 240 | |
| 241 | |
| 242 | /***************************************************************************** |
| 243 | |
| 244 | FUNCTION NAME: Ll1aModeStatusGet |
| 245 | |
| 246 | DESCRIPTION: The API provide by LL1A to get the RMC Mode Status |
| 247 | PARAMETERS: void |
| 248 | |
| 249 | RETURNED VALUES: RmcModeStatusT |
| 250 | |
| 251 | *****************************************************************************/ |
| 252 | extern RmcModeStatusT Ll1aModeStatusGet(void); |
| 253 | |
| 254 | /***************************************************************************** |
| 255 | |
| 256 | FUNCTION NAME: Ll1aModeStatusSet |
| 257 | |
| 258 | DESCRIPTION: The API provide by LL1A to set the RMC Mode Status |
| 259 | PARAMETERS: RmcModeStatus |
| 260 | |
| 261 | RETURNED VALUES: void |
| 262 | |
| 263 | *****************************************************************************/ |
| 264 | extern void Ll1aModeStatusSet(RmcModeStatusT RmcModeStatus); |
| 265 | |
| 266 | /***************************************************************************** |
| 267 | |
| 268 | FUNCTION NAME: Ll1aDrxCycleLenGet |
| 269 | |
| 270 | DESCRIPTION: The API provide by LL1A to get the RMC DRX cycle length |
| 271 | PARAMETERS: void |
| 272 | |
| 273 | RETURNED VALUES: uint16 |
| 274 | |
| 275 | *****************************************************************************/ |
| 276 | extern kal_uint16 Ll1aDrxCycleLenGet(void); |
| 277 | |
| 278 | /***************************************************************************** |
| 279 | |
| 280 | FUNCTION NAME: Ll1aDrxCycleLenSet |
| 281 | |
| 282 | DESCRIPTION: The API provide by LL1A to set the RMC DRX cycle length |
| 283 | PARAMETERS: uint16 |
| 284 | |
| 285 | RETURNED VALUES: void |
| 286 | |
| 287 | *****************************************************************************/ |
| 288 | extern void Ll1aDrxCycleLenSet(kal_uint16 DrxCycleLen); |
| 289 | |
| 290 | /***************************************************************************** |
| 291 | |
| 292 | FUNCTION NAME: Ll1aRatStateGet |
| 293 | |
| 294 | DESCRIPTION: The API provide by LL1A to get the sLl1aScheInfo.RatState |
| 295 | PARAMETERS: void |
| 296 | |
| 297 | RETURNED VALUES: bool |
| 298 | |
| 299 | *****************************************************************************/ |
| 300 | extern Ll1aStateTypeT Ll1aRatStateGet(void); |
| 301 | |
| 302 | /***************************************************************************** |
| 303 | |
| 304 | FUNCTION NAME: Ll1aRatStateSet |
| 305 | |
| 306 | DESCRIPTION: The API provide by LL1A to set the sLl1aScheInfo.RsvasSuspend |
| 307 | PARAMETERS: bool |
| 308 | |
| 309 | RETURNED VALUES: void |
| 310 | |
| 311 | *****************************************************************************/ |
| 312 | extern void Ll1aRatStateSet(Ll1aStateTypeT RatState); |
| 313 | |
| 314 | /***************************************************************************** |
| 315 | |
| 316 | FUNCTION NAME: Ll1aInit |
| 317 | |
| 318 | DESCRIPTION: The LL1A Initialise function |
| 319 | |
| 320 | PARAMETERS: |
| 321 | |
| 322 | RETURNED VALUES: |
| 323 | *****************************************************************************/ |
| 324 | extern void Ll1aInit(void); |
| 325 | /***************************************************************************** |
| 326 | |
| 327 | FUNCTION NAME: Ll1aInitForVzwMmo |
| 328 | |
| 329 | DESCRIPTION: The LL1A Initialise function |
| 330 | |
| 331 | PARAMETERS: |
| 332 | |
| 333 | RETURNED VALUES: |
| 334 | *****************************************************************************/ |
| 335 | extern void Ll1aInitForVzwMmo(void); |
| 336 | |
| 337 | #ifdef C2K_LL1_STUB_TARGET_SUPPORT |
| 338 | /***************************************************************************** |
| 339 | |
| 340 | FUNCTION NAME: Ll1aEvStandbySetLTEInfo |
| 341 | |
| 342 | DESCRIPTION: EvStandby use this API to set the LTE's info |
| 343 | Pattern. |
| 344 | PARAMETERS: |
| 345 | RETURNED VALUES: |
| 346 | *****************************************************************************/ |
| 347 | extern void Ll1aEvStandbySetLTEInfo(void *MsgDataP); |
| 348 | |
| 349 | /***************************************************************************** |
| 350 | |
| 351 | FUNCTION NAME: Ll1aEvStandbySetGapLengthInfo |
| 352 | |
| 353 | DESCRIPTION: EvStandby use this API to set the LTE's gap length info from script |
| 354 | Pattern. |
| 355 | PARAMETERS: |
| 356 | RETURNED VALUES: |
| 357 | *****************************************************************************/ |
| 358 | extern void Ll1aEvStandbySetGapLengthInfo(void *MsgDataP); |
| 359 | |
| 360 | #endif |
| 361 | |
| 362 | extern L1dModeStatusT Ll1aL1dModeStatusGet(void); |
| 363 | extern void Ll1aL1dModeStatusSet(L1dModeStatusT L1dModeStatus); |
| 364 | |
| 365 | |
| 366 | extern RmcRatStatusT Ll1aRmcRatStatusGet(void); |
| 367 | extern void Ll1aRmcRatStatusSet(RmcRatStatusT RmcRatStatus); |
| 368 | |
| 369 | /***************************************************************************** |
| 370 | |
| 371 | FUNCTION NAME: Ll1aDoStandbyMeasTickBitmapGet |
| 372 | |
| 373 | DESCRIPTION: The API provide by LL1A to get the sLl1aMeasTickBitmap |
| 374 | PARAMETERS: void |
| 375 | |
| 376 | RETURNED VALUES: bool |
| 377 | |
| 378 | *****************************************************************************/ |
| 379 | extern kal_uint8 Ll1aDoStandbyMeasTickBitmapGet(void); |
| 380 | |
| 381 | /***************************************************************************** |
| 382 | |
| 383 | FUNCTION NAME: Ll1aDoStandbyMeasTickBitmapSet |
| 384 | |
| 385 | DESCRIPTION: The API provide by LL1A to set the sLl1aMeasTickBitmap |
| 386 | PARAMETERS: bool |
| 387 | |
| 388 | RETURNED VALUES: void |
| 389 | |
| 390 | *****************************************************************************/ |
| 391 | extern void Ll1aDoStandbyMeasTickBitmapSet(kal_uint8 MeasTickBitmap); |
| 392 | |
| 393 | |
| 394 | /***************************************************************************** |
| 395 | |
| 396 | FUNCTION NAME: Ll1aDoStandbyMeasPurposeBitmapGet |
| 397 | |
| 398 | DESCRIPTION: The API provide by LL1A to get the sLl1aMeasPurposeBitmap |
| 399 | PARAMETERS: void |
| 400 | |
| 401 | RETURNED VALUES: bool |
| 402 | |
| 403 | *****************************************************************************/ |
| 404 | extern kal_uint8 Ll1aDoStandbyMeasPurposeBitmapGet(void); |
| 405 | |
| 406 | /***************************************************************************** |
| 407 | |
| 408 | FUNCTION NAME: Ll1aDoStandbyMeasPurposeBitmapSet |
| 409 | |
| 410 | DESCRIPTION: The API provide by LL1A to set the sLl1aMeasPurposeBitmap |
| 411 | PARAMETERS: bool |
| 412 | |
| 413 | RETURNED VALUES: void |
| 414 | |
| 415 | *****************************************************************************/ |
| 416 | extern void Ll1aDoStandbyMeasPurposeBitmapSet(kal_uint8 MeasPurposeBitmap); |
| 417 | |
| 418 | |
| 419 | #endif /** End of MTK_DEV_C2K_IRAT. */ |
| 420 | #endif |