blob: 7e7296bf552be716218087636888ce749788eb6c [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
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 _CL1FHRTBAIF_H_
37#define _CL1FHRTBAIF_H_
38
39#ifdef MTK_DEV_93M_PREIT
40
41/*****************************************************************************
42
43 FILE NAME: cl1fhrtbaif.h
44
45 DESCRIPTION:
46
47 This file contains the message type and apis of RTBA for other modules.
48
49*****************************************************************************/
50
51
52/*----------------------------------------------------------------------------
53 Include Files
54----------------------------------------------------------------------------*/
55#include "cl1fhrtbadefs.h"
56#define RTBA_PRI_CHANNEL_STATUS_GET(Mode) (RtbaChannelStatusGet(Mode,KAL_TRUE))
57
58#ifdef MTK_DEV_93M_RTBA_RBS_SCENARIO_CONTROL_ENABLE
59#define RBS_SCEN_CTRL_SPECIFIC_TIMING_SET(Enable) (gRtbaRbsScenCtrlScheInfo.SpecificEvtTimingSet = Enable)
60#define RBS_SCEN_CTRL_SPECIFIC_TIMING_GET() (gRtbaRbsScenCtrlScheInfo.SpecificEvtTimingSet)
61#endif
62
63/** The RF reserve end indication from RTBA. */
64typedef struct
65{
66 RtbaCl1ChannelTypeT Cl1Channel; /**The Rf Reserve End Ind received RTBA channel. */
67} Cl1RtbaRfReserveEndIndMsgT;
68#ifdef MTK_DEV_93M_RTBA_RBS_SCENARIO_CONTROL_ENABLE
69typedef struct
70{
71 kal_bool RbsScenCheckPass; /**The Rf Reserve End Ind received RTBA channel. */
72} RtbaRbsScenCtrlRptIndMsgT;
73#endif
74
75/*----------------------------------------------------------------------------
76* RTBA global APIs
77*----------------------------------------------------------------------------*/
78/*****************************************************************************
79
80 FUNCTION NAME: RtbaInit
81
82 DESCRIPTION: The RTBA initialization function
83
84 PARAMETERS:
85
86 RETURNED VALUES:
87*****************************************************************************/
88extern void RtbaInit(void);
89
90/*****************************************************************************
91
92 FUNCTION NAME: RtbaCl1SwitchActiveRatReq
93
94 DESCRIPTION: CL1 inform RTBA the rat status
95
96 PARAMETERS: SysAirInterface - 1xRTT or EVDO Activate - Indicate the mode is active or not
97
98 RETURNED VALUES:
99*****************************************************************************/
100extern void RtbaCl1SwitchActiveRatReq(SysAirInterfaceT mode, kal_bool Activate);
101
102/*****************************************************************************
103
104 FUNCTION NAME: RtbaCl1RegReq
105
106 DESCRIPTION: CL1 register channel on RTBA
107
108 PARAMETERS: mode - Indicate 1xRTT or EVDO
109 Cl1Channel - CL1 registered channel in RTBA
110 StartTimeValid - Indicate the start time is valid, if not, RTBA will try
111 to reserve the resource as soon as possible
112 StartTime - The start time of this channel in FRC
113 ReserveLen - The needed reserve length of this channel,in us unit
114 GapEndFRC - The gap end FRC time used by GM
115 *RtbaCallBackFunc - The channel specified call back funtion
116 HwState - Indicate RF On/Off
117
118
119 RETURNED VALUES:
120*****************************************************************************/
121extern void RtbaCl1RegReq(SysAirInterfaceT Mode, RtbaCl1ChannelTypeT Cl1Channel,
122 kal_bool StartTimeValid, kal_uint32 StartTime, kal_uint32 ReserveLen, kal_uint32 GapEndFRC,
123 RtbaCbFunc RtbaCallBackFunc);
124
125/*****************************************************************************
126
127 FUNCTION NAME: RtbaCl1RegWithPostProcessMarginReq
128
129 DESCRIPTION: CL1 register channel on RTBA
130
131 PARAMETERS: Mode - Indicate 1xRTT or EVDO
132 Cl1Channel - CL1 registered channel in RTBA
133 StartTimeValid - Indicate the start time is valid, if not, RTBA will try
134 to reserve the resource as soon as possible
135 StartTime - The start time of this channel in FRC
136 ReserveLen - The needed reserve length of this channel,in us unit
137 GapEndFRC - The gap end FRC time used by GM
138 PostProcessMargin - The post process margin for this channel
139 *RtbaCallBackFunc - The channel specified call back funtion
140
141
142 RETURNED VALUES:
143*****************************************************************************/
144extern void RtbaCl1RegWithPostProcessMarginReq(SysAirInterfaceT Mode, RtbaCl1ChannelTypeT Cl1Channel,
145 kal_bool StartTimeValid, kal_uint32 StartTime, kal_uint32 ReserveLen, kal_uint32 GapEndFRC, kal_uint32 PostProcessMargin,
146 RtbaCbFunc RtbaCallBackFunc);
147
148/*****************************************************************************
149
150 FUNCTION NAME: RtbaCl1ProtectionCfgReq
151
152 DESCRIPTION: CL1 Protect the channel on RTBA
153
154 PARAMETERS: Mode - Indicate 1xRTT or EVDO
155 ProtectReason - The channel protection reason
156
157 RETURNED VALUES:
158*****************************************************************************/
159extern void RtbaCl1ProtectionCfgReq(SysAirInterfaceT Mode, RtbaProtecReasonT ProtectReason);
160
161/*****************************************************************************
162
163 FUNCTION NAME: RtbaCl1CancelReq
164
165 DESCRIPTION: CL1 cancel the channel on RTBA
166
167 PARAMETERS: mode - Indicate 1xRTT or EVDO
168 CancelAll - True - Cancel all registered all reserve channel, False - Not cancel all
169 Cl1Channel - CL1 cancel channel in RTBA
170
171 RETURNED VALUES:
172*****************************************************************************/
173extern void RtbaCl1CancelReq(SysAirInterfaceT Mode, kal_bool CancelAll, RtbaCl1ChannelTypeT Cl1Channel);
174
175/*****************************************************************************
176
177 FUNCTION NAME: RtbaCl1CancelQueryReq
178
179 DESCRIPTION: CL1 cancel the query on RTBA
180
181 PARAMETERS: mode - Indicate 1xRTT or EVDO
182
183 RETURNED VALUES:
184*****************************************************************************/
185extern void RtbaCl1CancelQueryReq(SysAirInterfaceT Mode);
186
187/*****************************************************************************
188
189 FUNCTION NAME: RtbaCl1ChannelChangeReq
190
191 DESCRIPTION: CL1 change the channel to new channel on RTBA
192
193 PARAMETERS: mode - Indicate 1xRTT or EVDO
194 Cl1Channel - CL1 changed channel in RTBA
195
196 RETURNED VALUES:
197*****************************************************************************/
198extern void RtbaCl1ChannelChangeReq(SysAirInterfaceT Mode, RtbaCl1ChannelTypeT Cl1Channel);
199
200/*****************************************************************************
201
202 FUNCTION NAME: RtbaCl1KickQueryReq
203
204 DESCRIPTION: CL1 use this API to kick RTBA to query with RTB
205
206 PARAMETERS: Mode - Indicate the 1xRTT or EVDO mode
207
208 RETURNED VALUES:
209*****************************************************************************/
210extern void RtbaCl1KickQueryReq(SysAirInterfaceT Mode);
211
212/*****************************************************************************
213
214 FUNCTION NAME: RtbaHscKickQueryReq
215
216 DESCRIPTION: HSC use this API to kick RTBA to query with RTB
217
218 PARAMETERS: Mode - Indicate the 1xRTT or EVDO mode
219 *ChannelType - HSC use this API to query the registered RTB channel, the queryied channel type is returned
220 *RxOnTime - The RF on time in C2K system time unit, valid only when the return value is true
221 *RxOffTime - The RF off time in C2K system time unit, valid only when the return value is true and the channel type is QPCH1/2 and CCI
222
223 RETURNED VALUES: The Query Result is success or not
224*****************************************************************************/
225extern kal_bool RtbaHscKickQueryReq(SysAirInterfaceT Mode, RtbaCl1ChannelTypeT *ChannelType, SysSFrameTimeT *RxOnTime, SysSFrameTimeT *RxOffTime);
226
227
228/*****************************************************************************
229
230 FUNCTION NAME: RtbaQueryEvdoDFSEndTime
231
232 DESCRIPTION: L1D use this API to get the EVDO's DFS End time and to calc the delay frame number
233
234 PARAMETERS:
235 RETURNED VALUES: The delayed frame number(20ms Frame size 0- no delay, 1- delay 20ms)
236*****************************************************************************/
237extern kal_uint8 RtbaQueryEvdoDFSEndTime(void);
238
239/*****************************************************************************
240
241 FUNCTION NAME: RtbaProcessSimIndexInfoMsg
242
243 DESCRIPTION: RTBA use this API to process the sim index information from VAL
244
245 PARAMETERS:
246 RETURNED VALUES:
247*****************************************************************************/
248extern void RtbaProcessSimIndexInfoMsg(void *MsgDataP);
249
250/*****************************************************************************
251
252 FUNCTION NAME: RtbaProcessMMOGapDisableMsg
253
254 DESCRIPTION: RTBA use this API to provide to HSC for help to disable MMO GAP
255
256 PARAMETERS:
257 RETURNED VALUES:
258*****************************************************************************/
259extern void RtbaProcessMMOGapDisableMsg(void *MsgDataP);
260
261
262#ifdef MTK_PLT_ON_PC_IT
263/*****************************************************************************
264
265 FUNCTION NAME: CBSSimIndexInfoMsg
266
267 DESCRIPTION: CBS use this API to process the sim index information from VAL
268
269 PARAMETERS:
270 RETURNED VALUES:
271*****************************************************************************/
272extern void CBSSimIndexInfoMsg(kal_bool C2KInSIM2);
273#endif
274
275/*****************************************************************************
276
277 FUNCTION NAME: RtbaChannelPrioBoostReq
278
279 DESCRIPTION: RTBA provide this API for CL1 to raise the channel priority tempory for once time
280
281 PARAMETERS: Mode - Indicate the 1xRTT or EVDO mode
282 Cl1Channel - CL1 channel in RTBA to boost the priority
283 RETURNED VALUES:
284*****************************************************************************/
285extern void RtbaChannelPrioBoostReq(SysAirInterfaceT Mode, RtbaCl1ChannelTypeT Cl1Channel);
286
287/*****************************************************************************
288
289 FUNCTION NAME: RtbaGateModeReq
290
291 DESCRIPTION: RTBA Provide this API to CL1 to enable/disable the gate mode
292
293 PARAMETERS: Mode - Indicate the 1xRTT or EVDO mode
294 Reason - Indicate the gate mode enable/disble reason
295 GapLen - If the gate mode enable for MMO gap offer, the provided GAP length
296
297 RETURNED VALUES:
298*****************************************************************************/
299extern void RtbaGateModeReq(SysAirInterfaceT Mode, RtbaGateModeReasonT Reason, kal_uint32 GapLen);
300
301/*****************************************************************************
302
303 FUNCTION NAME: RtbaReadSimIndex
304
305 DESCRIPTION: RTBA use this API to provide sim index.
306
307 PARAMETERS:
308 RETURNED VALUES: current sim index
309*****************************************************************************/
310extern kal_uint32 RtbaReadSimIndex(void);
311
312/*****************************************************************************
313
314 FUNCTION NAME: RtbaEventHandler
315
316 DESCRIPTION: RTBA Event Handler main function
317
318 PARAMETERS: Mode - Indicate 1xRTT or EVDO
319 RETURNED VALUES:
320*****************************************************************************/
321extern void RtbaEventHandler(SysAirInterfaceT Mode);
322
323/*****************************************************************************
324
325 FUNCTION NAME: RtbaQueryScheduler
326
327 DESCRIPTION: RTBA Query Scheduler main function
328
329 PARAMETERS: Mode - Indicate 1xRTT or EVDO
330 RETURNED VALUES:
331*****************************************************************************/
332extern void RtbaQueryScheduler(SysAirInterfaceT Mode);
333
334/*****************************************************************************
335
336 FUNCTION NAME: RtbaQueryActiveBlockInfo
337
338 DESCRIPTION: RTBA Provide this API for other module to query the active block running in RTBA
339
340 PARAMETERS: Mode - Indicate to RTBA for query which mode's active channel
341 *BlockStartTime - If the channel is active, return the block start time in RTBA in system time format
342 - Only valid when the API returns KAL_TRUE
343
344 RETURNED VALUES: True - For Current Mode, the channel is active and user can get the block start time in *BlockStartTime
345 False - Currently no channel is active for this mode
346*****************************************************************************/
347extern kal_bool RtbaQueryActiveBlockInfo(SysAirInterfaceT Mode, kal_uint32 *BlockStartTime);
348
349/*****************************************************************************
350
351 FUNCTION NAME: RtbaProcGateModeReqEvent
352
353 DESCRIPTION: RTBA Provide this API for HSC/L1D to call for gate mode request event handle
354
355 PARAMETERS: EvtPtr - The pointer to the gate mode request
356
357 RETURNED VALUES:
358*****************************************************************************/
359extern void RtbaProcGateModeReqEvent(RtbaGateModeEventTypeT *EvtPtr);
360
361/*****************************************************************************
362
363 FUNCTION NAME: RtbaCl1AdjustChannelPositionReq
364
365 DESCRIPTION: RTBA Provide this API for L1D to adjust the channel block schedule start time
366
367 PARAMETERS: Mode - Indicate 1xRTT or EVDO
368 StartTime - The new start time indicated by L1
369 ReserveLength - The channel reserve length indicated by L1
370
371 RETURNED VALUES:
372*****************************************************************************/
373extern void RtbaCl1AdjustChannelPositionReq(SysAirInterfaceT Mode, kal_uint32 StartTime, kal_uint32 ReserveLen);
374
375/*****************************************************************************
376
377 FUNCTION NAME: RtbaCl1GetRFOnMarginInfo
378
379 DESCRIPTION:
380
381 PARAMETERS:
382
383 RETURNED VALUES: The RF on margin
384*****************************************************************************/
385extern kal_uint32 RtbaCl1GetRFOnMarginInfo(void);
386/*****************************************************************************
387
388 FUNCTION NAME: RtbaCl1GetRFOffMarginInfo
389
390 DESCRIPTION:
391 PARAMETERS:
392
393 RETURNED VALUES: The RF off margin
394*****************************************************************************/
395extern kal_uint32 RtbaCl1GetRFOffMarginInfo(void);
396
397/*****************************************************************************
398
399 FUNCTION NAME: RtbaCl1PreClearReservationReq
400
401 DESCRIPTION: RTBA provide this API for CL1 to pre-clear reservation before the real cancel request is called
402 PARAMETERS:
403
404 RETURNED VALUES:
405*****************************************************************************/
406extern void RtbaCl1PreClearReservationReq(SysAirInterfaceT Mode);
407
408/*****************************************************************************
409 FUNCTION NAME: RtbaCl1PreCancelReq
410
411 DESCRIPTION: RTBA provide this API for CL1 to pre-cancel the RF stop event before the real cancel request is called
412 PARAMETERS: Mode - Indicate 1xRTT or EVDO
413
414 RETURNED VALUES:
415*****************************************************************************/
416extern void RtbaCl1PreCancelReq(SysAirInterfaceT Mode);
417
418/*******************************************************************************
419
420 PARAMETERS: Mode - Indicate 1xRTT or EVDO
421 lastPagingTime - indicate lastPagingTime, unit 20ms
422 Slot_cycle - indicate slot_cycle of DRX
423
424 RETURNED VALUES:
425*****************************************************************************/
426extern void RtbaSltPchPositonReq(SysAirInterfaceT Mode, kal_uint32 LastPagingTime, kal_uint32 Slot_Cycle);
427#ifdef SYS_OPTION_TX_TAS_ENABLE
428/*****************************************************************************
429 FUNCTION NAME: RtbaTasBackOffQuery
430
431 DESCRIPTION: RTBA provide this API for TAS to query whether can execute
432 RF tuner or not
433 PARAMETERS: Mode - Indicate 1xRTT or EVDO
434 MinReserveLength -Indicate the the Min Length of TAS RF
435 Tuner
436
437 RETURNED VALUES:
438*****************************************************************************/
439extern void RtbaTasBackOffQuery(SysAirInterfaceT Mode, kal_uint32 MinReserveLength, RtbaTasQueryResultT* QueryResult);
440#endif
441
442/*****************************************************************************
443
444 FUNCTION NAME: RbsDenyPatternInfoRecord
445
446 DESCRIPTION: this API is used for recoding script infomation
447
448 PARAMETERS: pDenyPattern - point to script infomation
449
450 RETURNED VALUES:
451
452*****************************************************************************/
453#ifdef MTK_DEV_93M_RTBA_RBS_ENABLE
454extern void RbsDenyPatternInfoRecord(kal_uint8* pDenyPattern);
455#endif
456/*****************************************************************************
457
458 FUNCTION NAME: HscPreemptTrigInfoRecord
459
460 DESCRIPTION: this API is used for recoding script infomation
461
462 PARAMETERS: pHscPreemptTrig - point to script infomation
463
464 RETURNED VALUES:
465
466*****************************************************************************/
467#ifdef MTK_DEV_93M_RTBA_HPS_TRIG_ENABLE
468extern void HscPreemptTrigInfoRecord(kal_uint8* pHscPreemptTrig);
469#endif
470
471#ifdef MTK_DEV_93M_RTBA_RBS_SCENARIO_CONTROL_ENABLE
472extern void RtbaCl1RbsScenarioControlReq(RbsScenarioControlParaT *pRbsScenCtrlPara);
473#endif
474#endif
475#endif