blob: 01a0cfd3f62be575c58a6907be971be01a8781c2 [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 * mac2rlc_struct.h
40 *
41 * Project:
42 * --------
43 * MAUI
44 *
45 * Description:
46 * ------------
47 *
48 * Author:
49 * -------
50 * -------
51 *
52 *=============================================================================
53 * HISTORY
54 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
55 *------------------------------------------------------------------------------
56 * removed!
57 *
58 * removed!
59 * removed!
60 * removed!
61 *
62 * removed!
63 * removed!
64 *
65 * removed!
66 * removed!
67 * removed!
68 *
69 * removed!
70 * removed!
71 * removed!
72 *
73 * removed!
74 * removed!
75 * removed!
76 *
77 * removed!
78 * removed!
79 * removed!
80 *
81 * removed!
82 * removed!
83 * removed!
84 *
85 * removed!
86 * removed!
87 * removed!
88 *
89 * removed!
90 * removed!
91 * removed!
92 *
93 * removed!
94 * removed!
95 * removed!
96 *
97 * removed!
98 * removed!
99 * removed!
100 *
101 * removed!
102 * removed!
103 * removed!
104 *
105 * removed!
106 * removed!
107 * removed!
108 *
109 * removed!
110 * removed!
111 * removed!
112 *
113 * removed!
114 * removed!
115 * removed!
116 *
117 * removed!
118 * removed!
119 * removed!
120 *
121 *------------------------------------------------------------------------------
122 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
123 *=============================================================================
124 ******************************************************************************/
125
126/********************************************************************************
127* Copyright Statement:
128* --------------------
129*
130* This product has been developed using a protocol stack
131* developed by Sasken Communication Technologies Limited.
132*
133********************************************************************************/
134
135#ifndef _MAC2RLC_STRUCT_H
136#define _MAC2RLC_STRUCT_H
137
138/*Evelyn: Remove redundant header and file */
139#include "rlcmac_struct.h"
140#include "kal_general_types.h"
141#include "rr_common_def.h"
142#include "gprs_rlcmac_common_struct.h"
143#include "rlc_mac_enums.h"
144
145typedef struct tbf_rel_struct mac_rlc_tbf_rel_ind_struct;
146
147typedef struct {
148 kal_uint8 cs;
149 kal_uint8 *data_ptr;
150 #ifdef __EGPRS_MODE__
151 kal_uint8 *data2_ptr;
152 kal_uint8 header[6];
153 #endif
154/* Evelyn 20090415: Merge R6 */
155
156 #ifdef __GERAN_FANR__
157 kal_bool is_data_valid;
158 kal_bool is_pan_valid;
159 kal_uint8 pan[4];
160 #endif
161} dl_block_struct;
162
163/* Evelyn 20090415: Merge R6 */
164typedef struct {
165 kal_uint8 mac_mode;
166 kal_uint8 cs;
167 kal_uint8 timeslots_allocation;
168#if 0
169/* under construction !*/
170#endif
171 /* Claire 041117 change : Revise GPRS header partition between RLC and MAC */
172 kal_uint8 tfi; /*Simon use tfi to fill header*/
173
174 #ifdef __EGPRS_MODE__
175 kal_uint16 egprs_window_size;
176 kal_uint8 resegment; /* resegment bit */
177 #endif
178 kal_uint8 rlc_mode;
179 /* Evelyn: To slove [MAUI_01619453] Kenya FT T3168 restart issue */
180 /* Evelyn: To slove the non-sync problem that MAC clean res_req when receiving assignment
181 * But RLC think res_req already sent after RLC_MAC_RES_REQ in UL state.
182 * So tell RLC res_req is sent or not. */
183 kal_bool res_req_is_sent;
184
185/* Evelyn: R7 Latency Reducation Development */
186#ifdef __GERAN_RTTI__
187 tti_config_enum tti_mode;
188#endif
189} ul_con_ind_struct;
190
191typedef struct mac_rlc_ul_con_ind_struct{
192 LOCAL_PARA_HDR
193 kal_uint8 tlli_channel_coding;
194
195 #ifndef __REMOVE_FA__
196 kal_uint8 final_allocation;
197 #endif
198 #ifndef __REL5__
199 kal_uint16 blks_granted;
200 #endif
201
202 kal_uint8 ph_cont;
203
204 #ifdef __EGPRS_MODE__
205 kal_uint8 tbf_type;
206 #endif
207
208 kal_uint8 no_ul_con_ind;
209 ul_con_ind_struct multi_ul_con_ind[MULTIPLE_TBF_NUM];
210 #ifdef __GERAN_FANR__
211 kal_bool is_fanr_active;
212 kal_uint8 tan_type;
213 kal_uint32 tsh;
214 kal_uint8 Reported_timeslot;
215 #endif
216} mac_rlc_ul_con_ind_struct;
217
218typedef struct {
219 LOCAL_PARA_HDR
220 kal_uint8 type;
221} mac_rlc_failure_ind_struct;
222
223typedef struct {
224 LOCAL_PARA_HDR
225 kal_uint8 no_blks;
226 kal_uint8 blks_sent;
227 kal_uint16 frame_number;
228/* Evelyn 20090415: Merge R6 */
229 kal_uint8 pfi;
230} mac_rlc_data_req_struct;
231
232typedef struct {
233 LOCAL_PARA_HDR
234
235 kal_uint8 cs;
236 kal_uint8 final_allocation;
237 kal_uint8 data_blks_granted;
238 kal_uint16 frame_number;
239#ifdef __EGPRS_MODE__
240 kal_uint8 resegment; /* re-segment bit */
241 kal_uint8 pre_emptive_retrans; /* pre-emptive */
242 TBF_TYPE tbf_type_tag;
243 union
244 {
245 ack_nack_desc_struct gprs_ie;
246 egprsack_nack_description_struct egprs_ie; /* */
247 }ack_nack_struct;
248#else
249 union
250 {
251 ack_nack_desc_struct gprs_ie;
252 }ack_nack_struct;
253#endif
254
255#ifdef __TBF_EST__
256 kal_uint8 tbf_est;
257#endif
258
259 /* Lanslo 20050825: for CRTU-G 52.1.2.1.8.1.8
260 * PUAN without contention TLLI should be accepted
261 * to process request of re-tx of PRR (and ARAC)
262 * and ack/nack description during contention */
263 kal_bool is_contention_success;
264 /* eo Lanslo 20050825 */
265/* Evelyn 20090415: Merge R6 */
266} mac_rlc_ack_ind_struct;
267
268typedef struct {
269 LOCAL_PARA_HDR
270 kal_uint8 rlc_mode;
271#ifdef __EGPRS_MODE__
272 kal_uint16 window_size;
273 kal_uint8 tbf_type;
274#endif
275} mac_rlc_switch_to_dl_struct;
276
277typedef struct {
278 LOCAL_PARA_HDR
279 kal_uint8 ask_res_req;
280 kal_uint8 cause;
281} mac_rlc_ready_ind_struct;
282
283typedef struct {
284 LOCAL_PARA_HDR
285 kal_uint16 blks_granted;
286/* Evelyn 20090415: Merge R6 */
287 kal_uint8 no_of_ul_ts_alloc;
288} mac_rlc_pdch_rel_ind_struct;
289
290typedef struct {
291 LOCAL_PARA_HDR
292 kal_uint8 mac_mode;
293 kal_uint8 cs;
294 kal_uint8 tlli_channel_coding;
295 kal_uint8 final_allocation;
296 kal_uint8 ph_cont;
297 kal_uint8 timeslots_allocation;
298 kal_uint16 blks_granted;
299 #ifdef __EGPRS_MODE__
300 kal_uint8 resegment; /* resegment bit */
301 kal_uint8 window_size; /* window size */
302 kal_uint8 tbf_type; /* tbf type */
303 #endif
304
305} mac_rlc_switch_to_ul_struct;
306
307/* Evelyn 20090415: Merge R6 */
308typedef struct {
309 kal_uint8 rlc_mode;
310 #ifdef __EGPRS_MODE__
311 kal_uint16 window_size; /* downlink window size */
312 #endif
313/* Evelyn: R7 Latency Reducation Development */
314#ifdef __GERAN_RTTI__
315 tti_config_enum tti_mode;
316#endif
317
318#ifdef __GERAN_FANR__
319 kal_bool is_fanr_activated;
320 kal_bool is_event_based_fanr;
321#endif
322} dl_con_ind_struct;
323/* Evelyn 20090415: Merge R6 */
324typedef struct {
325 LOCAL_PARA_HDR
326
327 #ifdef __EGPRS_MODE__
328 kal_uint8 tbf_type;
329 #endif
330
331 kal_uint8 no_dl_con_ind;
332 dl_con_ind_struct multi_dl_con_ind[MULTIPLE_TBF_NUM];
333} mac_rlc_dl_con_ind_struct;
334
335typedef struct {
336 LOCAL_PARA_HDR
337 kal_uint8 no_dl_blocks;
338 /* Evelyn 20090905: Modify for High multislot class */
339 dl_block_struct dl_blocks[MAX_TX_TIMESLOTS];
340 #ifndef __MTK_TARGET__
341 kal_bool enable_dl_loop;
342 kal_uint16 bsn1;
343 kal_uint16 bsn2;
344 #endif
345 /* Claire 041216 change : Tell RLC DSP V(Q) from transfer_data_ind */
346 #ifdef __EGPRS_MODE__
347 kal_uint16 dsp_vq;
348 #endif
349} mac_rlc_dl_data_ind_struct;
350
351/* Lanslo 20070720: should replace MTK_KAL_MNT with __MTK_TARGET__ for MODIS */
352#ifndef __MTK_TARGET__
353typedef struct {
354 LOCAL_PARA_HDR
355 kal_uint8 *packed_PDAN_msg;
356 kal_uint8 *egprs_ack_nack_ie_ptr;
357 kal_uint8 avail_len;
358 kal_uint8 s_or_p;
359 kal_bool reconstruct;
360/* Evelyn 20090415: Merge R6 */
361} mac_rlc_ack_req_struct;
362#endif
363/* Exce 030806: After this primitive is received should RES_REQ be sent from RLC */
364typedef struct {
365 LOCAL_PARA_HDR
366 kal_bool is_dl_exist; /**
367 * Exce 20040528:
368 * Notify RLC that whether downlink TBF (either it
369 * is onging or pending) exists when confirming
370 * uplink TBF is released. Thus to resolve the problem
371 * that RLC does not send RES_REQ when REL_CNF
372 * is received during the time that ongoing downlink
373 * TBF is released and another one is pending to
374 * start.
375 */
376/* Evelyn 20090415: Merge R6 */
377} mac_rlc_rel_cnf_struct;
378
379/* Evelyn 20090415: Merge R6 */
380
381
382// Matt merge for R6
383typedef struct {
384 #ifdef __EGPRS_MODE__
385 kal_uint8 tbf_type;
386 kal_uint8 resegment; /* resegment bit */
387 kal_uint16 egprs_window_size;
388 #endif
389 kal_uint8 mac_mode;
390 kal_uint8 cs;
391 kal_uint8 tlli_channel_coding;
392 kal_uint8 final_allocation;
393 kal_uint8 ph_cont;
394 kal_uint8 timeslots_allocation;
395 kal_uint16 blks_granted;
396#if 0
397/* under construction !*/
398#endif
399 /* Claire 041117 change : Revise GPRS header partition between RLC and MAC */
400 kal_uint8 tfi; /*Simon use tfi to fill header*/
401 rlc_mode_enum rlc_mode;
402 kal_bool res_req_is_sent;
403}rlc_ul_con_ind_struct;
404
405typedef struct {
406 kal_uint8 rlc_mode;
407 #ifdef __EGPRS_MODE__
408 kal_uint16 window_size; /* downlink window size */
409 kal_uint8 tbf_type;
410#endif
411 kal_uint8 pfi;
412}rlc_dl_con_ind_struct;
413
414typedef struct{
415 kal_uint8 no_of_ul_ts_alloc;
416 kal_uint16 blks_granted; // for fix allocation
417 kal_uint8 pfi;
418}pdch_rel_ind_struct;
419
420#ifdef __MAC_SHOW_TRANS_DATA__
421
422typedef struct{
423 kal_uint8 is_data_valid;
424 kal_uint8 data[78];
425#ifdef __EGPRS_MODE__
426 kal_uint8 data2[78];
427 kal_uint8 is_data2_valid;
428#endif
429} mac_trans_data_content_struct;
430
431typedef struct{
432 LOCAL_PARA_HDR
433 kal_uint8 no_of_data;
434 mac_trans_data_content_struct data[MAX_RX_TIMESLOTS];
435} mac_mac_trans_data_ind_struct;
436#endif
437
438typedef struct mac_rlc_ps_conf_timer_update_req_struct {
439 LOCAL_PARA_HDR
440 ps_conf_timer_action_enum timer_action;
441
442} mac_rlc_ps_conf_timer_update_req_struct;
443
444#ifndef __MTK_TARGET__
445typedef struct{
446 LOCAL_PARA_HDR
447 kal_uint8 timer_index;
448 kal_uint8 timer_action;
449 kal_uint32 timeout_value;
450 kal_uint8 sim_index;
451 kal_uint8 tbf_index;
452} mac_timer_event_ind_struct;
453
454typedef struct{
455 LOCAL_PARA_HDR
456 kal_uint8 pca_give_in_count;
457 kal_uint8 pdan_give_in_count;
458 kal_uint8 pca_give_in_max;
459 kal_uint8 pdan_give_in_max;
460 kal_uint8 pca_give_in_max_learned;
461 kal_uint8 pdan_give_in_max_learned;
462 kal_uint32 next_outgoing_real_polling_frame;
463 kal_uint32 last_reported_polling_frame;
464
465 kal_uint8 is_ps_starvation_protect_activated;
466 kal_uint8 ps_starvation_protect_ul_blk_count;
467 kal_uint8 ul_blk_successive_conflict_count;
468 kal_uint32 ps_starvation_protect_frame;
469
470} mac_next_outgoing_rrbp_ind_struct;
471
472#ifdef __PS_L1_DC_ARCH__
473typedef struct{
474 LOCAL_PARA_HDR
475 kal_uint32 mac_next_rrbp_fn;
476 kal_uint32 mac_protected_rrbp_fn;
477 kal_uint32 mac_share_memory_rrbp_fn;
478 kal_uint32 mac_share_memory_protected_rrbp_fn;
479} mac_mac_rrbp_fn_ind_struct;
480#endif
481
482#endif
483
484#endif
485
486
487