blob: d864254957bf3a982c6a2a8c9b56a6c281dedbf7 [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) 2005
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/*******************************************************************************
37 * Filename:
38 * ---------
39 * rr_common_def.h
40 *
41 * Project:
42 * --------
43 * MAUI
44 *
45 * Description:
46 * ------------
47 *
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 *------------------------------------------------------------------------------
54 * $Log$
55 *
56 * 05 31 2018 anurag.pancholi
57 * [MOLY00325228] [UMOLYE] Remove NVRAM group header file
58 * .
59 *
60 * 04 07 2017 anurag.pancholi
61 * [MOLY00239842] [SE2/SE3 internal][UMOLYA] SMP modifications : GAS, GL1
62 * .SMP Check-in To UMOLYA.
63 *
64 * 02 19 2016 yu-po.wang
65 * [MOLY00165413] [UMOLY] change the naming for TCM usage
66 * .
67 *
68 * 09 15 2015 chi-chung.lin
69 * [MOLY00141360] [GAS] LR11 build warning fix
70 * .
71 *
72 * 05 27 2015 titi.wu
73 * [MOLY00097502] SRVCC HO evaluation phase fail, trigger send SIP re-invite
74 * .
75 *
76 * 03 20 2015 yu-po.wang
77 * [MOLY00087619] [UMOLY][Universal Bin] GAS check in
78 * Let the shared data with DSP be 4 byte aligned.
79 *
80 * 01 26 2015 tsung-wei.tu
81 * [MOLY00087619] [UMOLY][Universal Bin] GAS check in
82 * .
83 *
84 * 01 12 2015 ming.lee
85 * [MOLY00087470] [Universal Bin] FDD GAS developement
86 * .
87 *
88 * 01 12 2015 ming.lee
89 * [MOLY00087470] [Universal Bin] FDD GAS developement
90 * .
91 *
92 * 01 12 2015 ming.lee
93 * [MOLY00087470] [Universal Bin] FDD GAS developement
94 * Fix link error.
95 *
96 * 01 05 2015 ming.lee
97 * [MOLY00087470] [Universal Bin] FDD GAS developement
98 * xxx_enums.h not included (code not synced between peng-an CBr and UMOLY)
99 *
100 * 11 13 2014 ming.lee
101 * [MOLY00080211] [MT6291_DEV][MT6291_UESIM_DEV] Check in low power to MT6291_DEV, MT6291_UESIM_DEV
102 * GISE Paging.
103 *
104 * 11 05 2014 ming.lee
105 * [MOLY00081154] [ATT_TMO_DEV] AT&T requirement merge back
106 * CSG fingerprint GAS part.
107 *
108 * 04 08 2014 yu-po.wang
109 * [MOLY00061711] [K2 MD2] Call for Checkin - [MPAL] reducing TCM usage for K2 MD2
110 *
111 * 03 17 2014 tangte.lo
112 * [MOLY00058655] Add PSI_13 message trace decode support in ELT
113 *
114 * 10 03 2013 jeremiah.lin
115 * [MOLY00040091] [MAC] MAC/ACS Peer Msg Decode
116 *
117 * 09 16 2013 henry.lai
118 * [MOLY00037661] [MT6290] GAS development for AFR, L1 measurement control, backup IR measurement mechanism, and meaurement report
119 * .
120 *
121 * 08 30 2013 katie.tseng
122 * [MOLY00035887] [3G Gemini2.0+][GAS] Limit PS access channel protect duration in Gemini 2.0 projects
123 * .
124 *
125 * 08 26 2013 james.chan
126 * [MOLY00031373] [MOLY][SM][MM][RLC][RR] UNITDATA_CNF mechanism modification
127 * .
128 *
129 * 04 29 2013 vend_rex.tung
130 * [MOLY00020542] [SystemService][MOLY] To remove useless input sections by the request
131 * [gas] Remove input section for input section central management
132 *
133 * 03 22 2013 vend_rex.tung
134 * [MOLY00012031] [MODIS] WR8 warning fix on MOLY branch
135 *
136 * 03 15 2013 henry.lai
137 * [MOLY00009222] [GAS][Multi-Mode Development] Merge GAS multi-mode development to MOLY
138 * .
139 *
140 * 01 23 2013 henry.lai
141 * [MOLY00009222] [GAS][Multi-Mode Development] Merge GAS multi-mode development to MOLY
142 * .
143 *
144 * 01 11 2013 henry.lai
145 * [Henry][Multi-Mode Development] GAS Development and R8 CR Sync
146 *
147 * 12 13 2012 katie.tseng
148 * [MOLY00007446] [MOLY] MOLY LOCAL_PARA_HDR/PEER_BUFF_HDR replacement
149 * .
150 *
151 * 08 14 2012 peter.chien
152 * [MOLY00002118] [PS1][GAS] Internal inject message test for MEAS IT
153 * .
154 *
155 * 08 14 2012 peter.chien
156 * [MOLY00002118] [PS1][GAS] Internal inject message test for MEAS IT
157 * .
158 *
159 * 05 22 2012 adeline.chang
160 * removed!
161 * .
162 *
163 * 05 17 2012 peter.chien
164 * .
165 *
166 * 04 17 2012 yiting.cheng
167 * removed!
168 * .
169 *
170 * 04 13 2012 henry.lai
171 * removed!
172 * .
173 *
174 * 04 13 2012 yiting.cheng
175 * removed!
176 * .
177 *
178 * 04 13 2012 yiting.cheng
179 * removed!
180 * .
181 *
182 * 04 12 2012 yiting.cheng
183 * removed!
184 * .
185 *
186 * 04 12 2012 henry.lai
187 * removed!
188 * .
189 *
190 * 03 07 2012 adeline.chang
191 * removed!
192 * .
193 *
194 * 01 11 2012 henry.lai
195 * removed!
196 * .
197 *
198 * 12 20 2011 henry.lai
199 * removed!
200 * .
201 *
202 * 09 21 2011 jeremiah.lin
203 * removed!
204 * .
205 *
206 * 12 14 2010 nancy.chang
207 * removed!
208 * .
209 *
210 * 10 27 2010 henry.lai
211 * removed!
212 * .
213 *
214 * 10 16 2010 nancy.chang
215 * removed!
216 * .
217 *
218 * 09 21 2010 evelyn.wang
219 * removed!
220 * .
221 *
222 * removed!
223 * removed!
224 *
225 *
226 * removed!
227 * removed!
228 *
229 *
230 * removed!
231 * removed!
232 *
233 *
234 * removed!
235 * removed!
236 *
237 *
238 * removed!
239 * removed!
240 *
241 *
242 * removed!
243 * removed!
244 *
245 *
246 * removed!
247 * removed!
248 *
249 *
250 * removed!
251 * removed!
252 *
253 *
254 * removed!
255 * removed!
256 *
257 *
258 * removed!
259 * removed!
260 *
261 *
262 * removed!
263 * removed!
264 *
265 *
266 * removed!
267 * removed!
268 *
269 *
270 * removed!
271 * removed!
272 *
273 *
274 * removed!
275 * removed!
276 *
277 *
278 * removed!
279 * removed!
280 *
281 *
282 * removed!
283 * removed!
284 *
285 *
286 * removed!
287 * removed!
288 *
289 *
290 * removed!
291 * removed!
292 * add to source control recursely
293 *
294 * removed!
295 * removed!
296 * Change rr to rr2.
297 *
298 * removed!
299 * removed!
300 *
301 *
302 * removed!
303 * removed!
304 *
305 *
306 * removed!
307 * removed!
308 * add IR HO related enums into tbf_rel_type_enum
309 *
310 * removed!
311 * removed!
312 *
313 *
314 * removed!
315 * removed!
316 *
317 *
318 * removed!
319 * removed!
320 *
321 *
322 * removed!
323 * removed!
324 *
325 *
326 * removed!
327 * removed!
328 *
329 *
330 * removed!
331 * removed!
332 *
333 *
334 * removed!
335 * removed!
336 * created by clearfsimport
337 *
338 * removed!
339 * removed!
340 *
341 *
342 * removed!
343 * removed!
344 *
345 *
346 * removed!
347 * removed!
348 *
349 *
350 * removed!
351 * removed!
352 *
353 *
354 * removed!
355 * removed!
356 *
357 *
358 * removed!
359 * removed!
360 * this is a temporary solution to remove the compile option MTK_KAL_MNT from MoDIS
361 *
362 ******************************************************************************/
363
364/********************************************************************************
365* Copyright Statement:
366* --------------------
367*
368* This product has been developed using a protocol stack
369* developed by Sasken Communication Technologies Limited.
370*
371********************************************************************************/
372
373#ifndef _RR_COMMON_DEF_H
374#define _RR_COMMON_DEF_H
375
376/* Nancy 20101005: Suggest Add for RHR */
377#include "kal_public_api.h"
378#include "kal_general_types.h"
379/* for MODEM_WARNING_MESSAGE macro */
380#include "event_info_utility.h"
381#include "nvram_editor_data_item.h"
382#include "rr_nvram_editor.h"
383#include "bitstream.h"
384#include "rr_common_enums.h"
385
386/******************************************************************************
387 * Constants
388 ******************************************************************************/
389#ifdef __MTK_INTERNAL__
390#ifndef __GAS_INTERNAL_IT__
391#define __GAS_INTERNAL_IT__
392#endif /* __GAS_INTERNAL_IT__ */
393#ifndef __GAS_INTERNAL_IR_IT__
394#define __GAS_INTERNAL_IR_IT__
395#endif /* __GAS_INTERNAL_IR_IT__ */
396#endif /* __MTK_INTERNAL__ */
397
398#define RLC_MAC_CTRL_BLK_SIZE 23
399
400/* Evelyn 20090415: Merge R6 */
401#define MULTIPLE_TBF_NUM 1
402
403/* Vincent: defined for RR-MPAL */
404
405#ifdef __PS_SERVICE__
406#define PKT_CELL_CHANGE_FAILURE_MSG 0x00
407
408/* RRBP response message types */
409#define PKT_CTRL_ACK_MSG 0x01 /* RRBP response to control messages */
410#define PKT_DL_CTRL_ACK_MSG 0x03 /* RRBP response to data block with FBI in RLC UNACK mode */
411#define PKT_DL_ACK_NACK_MSG 0x02 /* RRBP response to data block in RLC ACK mode */
412
413/*
414 * To indicate an RRBP responding to PUAN with FAI allowing for
415 * TBF-EST procedure should be sent later. The actual RRBP sent
416 * depends on whether RLC requests for TBF-EST and Control Ack Type
417 */
418#define PKT_CTRL_ACK_TBF_EST_MSG 0x04
419/* Claire 041216 change : Implement R99 PFI */
420#define RLC_MAC_INVALID_PFI 0xff
421
422#define PKT_UL_DUMMY_CTRL_BURST_MSG 0x03
423#define PKT_MEASUREMENT_REPORT_MSG 0x04
424#define PKT_RESOURCE_REQ_MSG 0x05
425#define PKT_MOBILE_TBF_STATUS_MSG 0x06
426#define PKT_PSI_STATUS_MSG 0x07
427#ifdef __EGPRS_MODE__
428#define EGPRS_PKT_DL_ACK_NACK_MSG 0x08
429#endif
430#define PKT_PAUSE_MSG 0x09
431#define ADDITIONAL_MS_RADIO_ACCESS_MSG 0x0b
432#define PKT_ENHANCED_MEASUREMENT_MSG 0x0a /* no error in standard */
433
434/* Byron: Add for PKT SI Status */
435#ifdef __GERAN_R4__
436#define PKT_SI_STATUS_MSG 0x0d /* no error in standard */
437#define PKT_CELL_CHANGE_NOTIFICATION_MSG 0x0c
438#endif
439
440/*
441 * Downlink Peer-to-Peer Messages.(Network --> Mobile Station)The
442 * * distribution messages start with 1 in their MSB and non-distribution
443 * * messages start with 0 in their MSB(v6.4.0 sec 11.1.1)
444 */
445#define PKT_ACCESS_REJECT_MSG 0x21
446#define PKT_CELL_CHANGE_ORDER_MSG 0x01
447#define PKT_DL_ASSIGNMENT_MSG 0x02
448#define PKT_MEASUREMENT_ORDER_MSG 0x03
449#define PKT_PAGING_REQ_MSG 0x22
450#define PKT_PDCH_RELEASE_MSG 0x23
451#define PKT_POLLING_REQ_MSG 0x04
452#define PKT_PWR_CTRL_TIMING_ADVANCE_MSG 0x05
453#define PKT_PRACH_PARAMS_MSG 0x24
454#define PKT_QUEUING_NOTIFICATION_MSG 0x06
455#define PKT_TIMESLOT_RECONFIG_MSG 0x07
456#define PKT_TBF_RELEASE_MSG 0x08
457#define PKT_TBF_RELEASE_UL_MSG 0xE8 /* To distinguish RRBP responding to PKT TBF RELEASE releasing UL TBF; see comment of rr_rrbp_resps_add() on date 030902 */
458#define PKT_TBF_RELEASE_DL_MSG 0xF8 /* To distinguish RRBP responding to PKT TBF RELEASE releasing DL TBF; see comment of rr_rrbp_resps_add() on date 030902 */
459#define PKT_UL_ACK_NACK_MSG 0x09
460#define PKT_UL_ASSIGNMENT_MSG 0x0a
461#define PKT_DL_DUMMY_CTRL_MSG 0x25
462#define PKT_INVALID_MSG 0xFF /* Exce 20040306: add invalid msg type for rr_check_nsend_rrbpresponse() */
463
464/* Lanslo 20070706: NACC */
465#ifdef __GERAN_R4__
466#define PKT_CELL_CHANGE_CONTINUE_MSG 0x0b
467#define PKT_NEIGH_CELL_DATA_MSG 0x0c
468#define PKT_SERV_CELL_DATA_MSG 0x0d
469#endif /* __GERAN_R4__ */
470
471/* Evelyn 20090415: Merge R6 */
472/* Evelyn MTBF */
473
474#define PS_HANDOVER_COMMAND_MSG 0x15
475
476#ifdef __GERAN_R6__
477#define PKT_SERV_CELL_SI_MSG 0x20
478#endif /* __GERAN_R6__ */
479
480#ifdef __ETWS_SUPPORT__
481#define PKT_APP_INFO_MSG 0x2d
482#endif
483
484/* PACKET SYSTEM INFORMATION Messages */
485#define PSI1_MSG 0x31
486#define PSI2_MSG 0x32
487#define PSI3_MSG 0x33
488#define PSI3_BIS_MSG 0x34
489#define PSI4_MSG 0x35
490#define PSI5_MSG 0x36
491#define PSI13_MSG 0x37
492
493#ifdef __GERAN_R4__
494#define PSI3_TER_MSG 0x3c
495#define PSI3_QUATER_MSG 0x3d
496#define PSI6_MSG 0x30
497#define PSI7_MSG 0x38
498#define PSI8_MSG 0x39
499#define PSI14_MSG 0x3a
500#define PSI15_MSG 0x3e
501#endif /* __GERAN_R4__ */
502
503#ifdef __GERAN_R5__
504#define PSI16_MSG 0x28
505#endif /* __GERAN_R5__ */
506
507#define ALL_PSI_MSGS 0x39
508
509#define MAX_TIMESLOTS 8
510/* Evelyn 20090905: Modify for High multislot class */
511#if defined (__MULTISLOT_CLASS_45__)
512#define MAX_TX_TIMESLOTS 6
513#define MAX_RX_TIMESLOTS 6
514#elif defined (__MULTISLOT_CLASS_34__)
515#define MAX_TX_TIMESLOTS 5
516#define MAX_RX_TIMESLOTS 5
517#else
518#define MAX_TX_TIMESLOTS 4
519#define MAX_RX_TIMESLOTS 4
520#endif
521
522#define RR_INVALID_FN_NUMBER 0xFFFFFFFF
523
524#define RR_INVALID_TN 0xFF /* Exce 20040310: add invalid timeslot number */
525#define RR_RTI_INVALID 0xFF /* Exce 20040310: add invalid RTI value */
526
527#define MPAL_RLC_CONTINUE_FLUSH_NEXT 0x1
528#define MPAL_RLC_CONTINUE_FLUSH_CURRENT 0x2
529#define MPAL_RLC_RESEG_CONTINUE_FLUSH_NEXT 0x3
530#define MPAL_RLC_RESEGMENT_CURRENT 0x4
531#endif /* __PS_SERVICE__ */
532
533/* Information Element Identifiers (IEI) for RR mesgs */
534/*****************************************************************************/
535#define MOBILE_IDENTITY_IEI 0x17
536#define STARTING_TIME_IEI 0x7c
537#define CELL_CHAN_DESC_IEI 0x62
538
539#define MULTISLOT_CONFIG_IEI 0x10
540#define CHAN_MODE_SET_1_IEI 0x63
541#define CHAN_MODE_SET_2_IEI 0x11
542#define CHAN_MODE_SET_3_IEI 0x13
543#define CHAN_MODE_SET_4_IEI 0x14
544#define CHAN_MODE_SET_5_IEI 0x15
545#define CHAN_MODE_SET_6_IEI 0x16
546#define CHAN_MODE_SET_7_IEI 0x17
547#define CHAN_MODE_SET_8_IEI 0x18
548
549#define SECOND_CHAN_MODE_IEI 0x66
550
551#define SECOND_CHAN_DESC_AFTER_TIME_IEI 0x64
552#define FREQ_LIST_AFTER_TIME_IEI 0x05
553#define MOB_ALLOC_AFTER_TIME_IEI 0x72
554#define MOB_ALLOC_IEI 0x72
555
556#define FREQ_LIST_BEFORE_TIME_IEI 0x19
557#define CHAN_DESC_BEFORE_TIME_IEI 0x1c
558#define FREQ_CHAN_SEQ_BEFORE_TIME_IEI 0x1e
559#define FREQ_CHAN_SEQ_AFTER_TIME_IEI 0x69
560#define MOB_ALLOC_BEFORE_TIME_IEI 0x21
561#define SECOND_CHAN_DESC_BEFORE_TIME_IEI 0x1d
562
563#define CIPHER_MODE_SETTING_IEI 0x90
564
565#define RR_PKT_UL_ASGN_IEI 0x22
566#define RR_PKT_DL_ASGN_IEI 0x23
567#define SYNC_IND_IEI 0x0d
568#define FREQ_SHORT_LIST_AFTER_TIME_IEI 0x02
569#define REAL_TIME_DIFFERENCE_IEI 0x7b
570#define TIMING_ADVANCE_IEI 0x7d
571#define FREQUENCY_SHORT_LIST_BEFORE_TIME_IEI 0x12
572#define MS_TIME_DIFF_IE 0x77
573#define VGCS_TARGET_MODE_IND_IEI 0x01
574#define MULTI_RATE_CONFIG_IEI 0x03
575
576#define RR_BA_RANGE_IEI 0x73
577#define RR_GROUP_CHANNEL_DESC_IEI 0x74
578#define RR_GROUP_CIPHER_KEY_NUM_IEI 0x80
579#define RR_GPRS_RESUME_IEI 0xc0
580#define RR_BA_LIST_PREF_IEI 0x75
581#define RR_UTRAN_FREQ_LIST_IEI 0x76
582#define RR_CELL_SELECTION_IND_IEI 0x77
583#define RR_ENH_DTM_CS_REL_IND_IEI 0xa0
584#define RR_VGCS_CIPHER_PARA_IEI 0x04
585#define RR_GROUP_CHANNEL_DESC_2_IEI 0x78
586#define RR_TALKER_IDENTITY_IEI 0x79
587#define RR_TALKER_PRIO_STATUS_IEI 0x7A
588#define RR_VGCS_AMR_CONFIG_IEI 0x7B
589#define RR_INDIVIDUAL_PRIORITIES_IEI 0x7c
590
591#define RR_CLASSMARK_ENQ_MASK_IEI 0x10
592/*****************************************************************************/
593
594#define RR_FAILURE 0x00
595#define RR_SUCCESS 0x01
596#define RR_VALID 0x01
597#define RR_INVALID_SYS_INFO_ID 0xff
598
599/* 3GPP TS 04.18 v 8.7.0 sec 10.5.2.38
600 * Calculation of start frame number.
601 */
602#define S_RR_FN_INTERVAL_42432 42432
603#define S_RR_FRAME_NUM_32024 32024
604#define S_RR_MOST_POSTIVE_DELAY 31623
605
606/* Claire 041208 change : Solve rr_mpal_data_req_struct header missing problem */
607#ifdef __EGPRS_MODE__
608#define EGPRS_RLC_MAC_HEADER_LEN 6
609#define EGPRS_SIZEOF_MCS1 22
610#endif /* __EGPRS_MODE__ */
611
612/* The following macros are defined in bits */
613#define MAC_HEADER_LEN 8
614#define RLC_MAC_MSG_TYPE_LEN 6
615#define TLLI_LEN 32
616
617/* Claire 050118 change : Add signaling macro for both RLC and MAC use */
618#define RR_IS_SIGNAL_PDU(cause) (cause == RR_CAUSE_GMM_SIGNALING || cause == RR_CAUSE_CELL_UPDATE || \
619 cause == RR_CAUSE_SM_SIGNALING || cause == RR_CAUSE_SND_SIGNALING \
620 || cause == RR_CAUSE_LLC_SIGNALING || cause == RR_CAUSE_PAGE_RESP || cause == RR_CAUSE_CELL_UPDATE_WITH_USER_DATA)
621
622#ifdef __ARMCC_VERSION
623#define __ZI__ __attribute__ ((zero_init))
624#else
625#define __ZI__
626#endif
627
628#ifdef __MTK_TARGET__
629#include "sys/cdefs.h" /* GCC has different definition for __section in cdefs.h */
630#undef __section /* undefined it to avoid re-define */
631#define __section(S) __attribute__ ((__section__(#S)))
632#define __SECONDARY_ROCODE__
633#define __SECONDARY_RODATA__ __section(SECONDARY_RODATA)
634#if defined(MT6752)
635#if defined(__MD2__)
636#define __INTERNCODE__
637#else
638#define __INTERNCODE__ __attribute__ ((section ("ISPRAM_ROCODE_CORE2")))
639#endif
640#else
641#define __INTERNCODE__
642#endif
643#define __EXTRAM_TXDATA__ __attribute__ ((section ("EXTRAM_TXDATA"), aligned(4))) __ZI__
644#define __EXTRAM_TXDATA_0__ __section(EXTRAM_TXDATA_0) __ZI__
645#else
646#define __SECONDARY_ROCODE__
647#define __SECONDARY_RODATA__
648#define __INTERNCODE__
649#define __EXTRAM_TXDATA__
650#define __EXTRAM_TXDATA_0__
651#endif
652
653
654#if defined(__MTK_TARGET__)
655#if defined (__ARMCC_VERSION)
656#define INLINE __inline
657#elif defined (__GNUC__)
658#define INLINE inline
659#endif /* ARMCC , GNUC */
660#else /* __MTK_TARGET__ */
661#define INLINE __inline
662#endif /* __MTK_TARGET__ */
663
664
665
666/******************************************************************************
667 * Enums Without Tags
668 ******************************************************************************/
669
670#ifdef __PS_SERVICE__
671#ifdef EGPRS
672#include "egprs_headers_struct.h"
673#endif
674#endif /* __PS_SERVICE__ */
675
676typedef kal_int32 TDMA_FRAME_NUMBER_TYPE;
677
678/******************************************************************************
679 * Structure Definition
680 ******************************************************************************/
681typedef struct
682{
683 kal_uint8 time_slot;
684 kal_uint32 tdma_frame_number;
685} ts_frame_no_struct;
686
687typedef struct
688{
689 kal_uint8 valid;
690 kal_uint8 t1;
691 kal_uint8 t2;
692 kal_uint8 t3;
693} STARTING_TIME_STRUCT_1;
694
695typedef struct
696{
697 kal_uint8 maio;
698 kal_uint8 ma_num_index;
699 kal_uint8 change_mark;
700 kal_uint8 hsn;
701} hopping_chan_desc;
702
703typedef struct
704{
705 kal_uint8 is_valid;
706 kal_uint8 pkt_or_ded;
707 kal_uint8 chan_type;
708 kal_uint8 tn;
709 kal_uint8 tsc;
710 rmc_tsc_set_type tsc_set;
711 ispresent hopp_or_non_hopp_tag;
712 union
713 {
714 kal_uint16 arfcn;
715 hopping_chan_desc hop_params;
716 } hopp_or_non_hopp_value;
717} channel_desc_struct;
718
719typedef struct
720{
721 kal_uint8 valid;
722 kal_uint8 value;
723} timing_advance_struct;
724
725typedef struct
726{
727 kal_uint16 arfcn;
728 kal_uint8 bsic;
729 kal_int32 frame_offset;
730 kal_int32 ebit_offset;
731} target_cell_timing_struct;
732
733#ifdef __PS_SERVICE__
734typedef struct res_req_struct
735{
736 /* Evelyn 20090415: Merge R6 */
737 kal_uint8 ptc; /* peak_throughput_class */
738 kal_uint8 rp; /* radio_priority */
739 kal_uint8 rlc_mode; /* rlc_mode_enum */
740 kal_uint8 llc_pdu_type; /* llc_pdu_type */
741 kal_uint8 res_req_cause; /* res_req_cause */
742 kal_uint16 rlc_octets;
743 kal_uint8 pfi; /* Claire 041216 change : Implement R99 PFI */
744 kal_uint8 modeflag; /* Simon for SRB */
745} res_req_struct;
746
747/* Evelyn 20090415: Merge R6 */
748/* Evelyn MTBF */
749
750
751typedef struct multiple_res_req_struct
752{
753 LOCAL_PARA_HDR
754 /* Katie 20130531: ps channel protect issue */
755 /* mac_rmpc_pkt_access_req_struct and multiple_res_req_struct are the same struct */
756 kal_uint8 is_protect_ps_channel; /* this variable only used in mac_rmpc_pkt_access_req_struct */
757 kal_uint8 no_res_req;
758 res_req_struct multi_res_req[MULTIPLE_TBF_NUM];
759} multiple_res_req_struct;
760
761#endif /* __PS_SERVICE__ */
762
763typedef union
764{
765 nvram_ef_gas_csg_fingerprint_struct gas_csg_fg_info;
766} rrm_struct_to_verify_union;
767
768typedef struct
769{
770 LOCAL_PARA_HDR
771 rrm_struct_to_verify_union struct_to_verify;
772} rrm_verify_gv_for_ut_struct;
773
774
775/******************************************************************************
776 * Function Prototype definition
777 ******************************************************************************/
778extern kal_uint8 rr_get_spare_bit(bit_stream *bit_stream_ptr);
779extern kal_bool rr_validate_rest_bit_number(kal_uint32 rest_len, kal_uint32 len_to_be_decoded);
780#ifdef __ETWS_SUPPORT__
781extern void rr_decode_group_call_info(bit_stream *bs_ptr, kal_uint16 *length, kal_bool *result);
782extern void rr_decode_cell_global_count(bit_stream *bs_ptr, kal_uint16 *length, kal_bool *result);
783extern void rr_decode_mbms_freq_para_ie(bit_stream *bs_ptr, kal_uint16* length, kal_bool *result);
784extern void rr_decode_mbms_session_list_ie(bit_stream *bs_ptr, kal_uint16* length, kal_bool *result);
785extern void rr_decode_mbms_channel_para_ie(bit_stream *bs_ptr, kal_uint16* length, kal_bool *result);
786extern void rr_decode_mbms_para(bit_stream *bs_ptr, kal_uint16* length, kal_bool *result);
787#ifdef __PS_SERVICE__
788extern void rr_decode_page_info_struct(bit_stream *bs_ptr, kal_uint16 *length);
789extern void rr_decode_repeated_iu_page_info(bit_stream *bs_ptr, kal_uint16 *length);
790#endif /* __PS_SERVICE__ */
791#endif /* __ETWS_SUPPORT__ */
792
793#endif /* _RR_COMMON_DEF_H */
794