blob: fe07b38b6e13d1920793949cc53a6382bdf0e303 [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 *
38 * Filename:
39 * ---------
40 * L3_INC_STRUCT.H
41 *
42 * Project:
43 * --------
44 * MAUI
45 *
46 * Description:
47 * ------------
48 * This file describes the common enums of L3.
49 *
50 * Author:
51 * -------
52 * -------
53 *
54 *============================================================================
55 * HISTORY
56 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
57 *------------------------------------------------------------------------------
58 * removed!
59 *
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 * removed!
67 *
68 * removed!
69 * removed!
70 * removed!
71 *
72 * removed!
73 * removed!
74 * removed!
75 *
76 * removed!
77 * removed!
78 * removed!
79 * removed!
80 *
81 * removed!
82 * removed!
83 * removed!
84 * removed!
85 *
86 * removed!
87 * removed!
88 * removed!
89 *
90 * removed!
91 * removed!
92 * removed!
93 * removed!
94 *
95 * removed!
96 * removed!
97 * removed!
98 * removed!
99 *
100 * removed!
101 * removed!
102 * removed!
103 *
104 * removed!
105 * removed!
106 * removed!
107 *
108 * removed!
109 * removed!
110 * removed!
111 * removed!
112 *
113 * removed!
114 * removed!
115 * removed!
116 * removed!
117 *
118 * removed!
119 * removed!
120 * removed!
121 *
122 * removed!
123 * removed!
124 * removed!
125 *
126 * removed!
127 * removed!
128 * removed!
129 *
130 * removed!
131 * removed!
132 * removed!
133 *
134 * removed!
135 * removed!
136 * removed!
137 *
138 * removed!
139 * removed!
140 * removed!
141 * removed!
142 * removed!
143 * removed!
144 *
145 * removed!
146 * removed!
147 * removed!
148 * removed!
149 *
150 * removed!
151 * removed!
152 * removed!
153 *
154 * removed!
155 * removed!
156 * removed!
157 *
158 * removed!
159 * removed!
160 * removed!
161 *
162 * removed!
163 * removed!
164 * removed!
165 * removed!
166 *
167 * removed!
168 * removed!
169 * removed!
170 *
171 * removed!
172 * removed!
173 * removed!
174 *
175 * removed!
176 * removed!
177 * removed!
178 *
179 * removed!
180 * removed!
181 * removed!
182 *
183 * removed!
184 * removed!
185 * removed!
186 *
187 * removed!
188 * removed!
189 * removed!
190 *
191 * removed!
192 * removed!
193 * removed!
194 * removed!
195 * removed!
196 *
197 * removed!
198 * removed!
199 * removed!
200 *
201 * removed!
202 * removed!
203 * removed!
204 *
205 * removed!
206 * removed!
207 * removed!
208 * removed!
209 *
210 * removed!
211 * removed!
212 * removed!
213 *
214 * removed!
215 * removed!
216 * removed!
217 *
218 * removed!
219 * removed!
220 * removed!
221 * removed!
222 *
223 * removed!
224 * removed!
225 *
226 * removed!
227 * removed!
228 * removed!
229 * removed!
230 *
231 * removed!
232 * removed!
233 * removed!
234 *
235 * removed!
236 * removed!
237 * removed!
238 * removed!
239 *
240 * removed!
241 * removed!
242 * removed!
243 * removed!
244 *
245 * removed!
246 * removed!
247 * removed!
248 *
249 * removed!
250 * removed!
251 * removed!
252 * removed!
253 *
254 * removed!
255 * removed!
256 * removed!
257 *
258 * removed!
259 * removed!
260 * removed!
261 *
262 * removed!
263 * removed!
264 * removed!
265 *
266 * removed!
267 * removed!
268 * removed!
269 *
270 * removed!
271 * removed!
272 * removed!
273 *
274 * removed!
275 * removed!
276 *
277 * removed!
278 * removed!
279 * removed!
280 *
281 * removed!
282 * removed!
283 *
284 * removed!
285 * removed!
286 * removed!
287 *
288 * removed!
289 * removed!
290 * removed!
291 *
292 * removed!
293 * removed!
294 * removed!
295 *
296 * removed!
297 * removed!
298 * removed!
299 *
300 * removed!
301 * removed!
302 * removed!
303 *
304 * removed!
305 * removed!
306 * removed!
307 *
308 * removed!
309 * removed!
310 * removed!
311 * removed!
312 * removed!
313 * removed!
314 * removed!
315 * removed!
316 *
317 * removed!
318 * removed!
319 * removed!
320 * removed!
321 *
322 * removed!
323 * removed!
324 * removed!
325 *
326 * removed!
327 * removed!
328 * removed!
329 *
330 * removed!
331 * removed!
332 *
333 * removed!
334 * removed!
335 * removed!
336 *
337 * removed!
338 * removed!
339 * removed!
340 *
341 * removed!
342 * removed!
343 * removed!
344 *
345 * removed!
346 * removed!
347 *
348 * removed!
349 * removed!
350 * removed!
351 *
352 * removed!
353 * removed!
354 * removed!
355 *
356 * removed!
357 * removed!
358 * removed!
359 *
360 * removed!
361 * removed!
362 * removed!
363 *
364 * removed!
365 * removed!
366 * removed!
367 *
368 * removed!
369 * removed!
370 * removed!
371 *
372 * removed!
373 * removed!
374 * removed!
375 *
376 * removed!
377 * removed!
378 * removed!
379 *
380 * removed!
381 * removed!
382 * removed!
383 *
384 * removed!
385 * removed!
386 * removed!
387 *
388 * removed!
389 * removed!
390 * removed!
391 *
392 * removed!
393 * removed!
394 * removed!
395 * removed!
396 * removed!
397 * removed!
398 * removed!
399 *
400 * removed!
401 * removed!
402 * removed!
403 *
404 * removed!
405 * removed!
406 * removed!
407 *
408 * removed!
409 * removed!
410 * removed!
411 *
412 * removed!
413 * removed!
414 * removed!
415 *
416 * removed!
417 * removed!
418 * removed!
419 *
420 * removed!
421 * removed!
422 * removed!
423 *
424 * removed!
425 * removed!
426 * removed!
427 *
428 * removed!
429 * removed!
430 * removed!
431 *
432 * removed!
433 * removed!
434 * removed!
435 *
436 * removed!
437 * removed!
438 * removed!
439 *
440 * removed!
441 * removed!
442 * removed!
443 *
444 * removed!
445 * removed!
446 * removed!
447 *
448 *------------------------------------------------------------------------------
449 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
450 *============================================================================
451 ****************************************************************************/
452
453/********************************************************************************
454* Copyright Statement:
455* --------------------
456*
457* This product has been developed using a protocol stack
458* developed by Sasken Communication Technologies Limited.
459*
460********************************************************************************/
461
462#ifndef _L3_INC_LOCAL_H
463#define _L3_INC_LOCAL_H
464
465#include "kal_general_types.h"
466//#include "kal_non_specific_general_types.h"
467#include "l3_inc_enums.h"
468#include "mcd_l3_inc_struct.h"
469#include "ps_public_struct.h"
470#include "ps_public_enum_public.h"
471#include "ps_public_enum.h"
472#include "irat_common_enums.h"
473#include "global_type.h"
474#include "l3_inc_enums_public.h"
475#include "gmss_public.h"
476
477/*****************************************************************************
478 * Constant Definitions
479 *****************************************************************************/
480/* RAT capability configuration */
481#if defined (__GSM_RAT__)
482#define IS_GSM_RAT_SUPPORTED 1
483#else
484#define IS_GSM_RAT_SUPPORTED 0
485#endif
486
487#if defined (__UMTS_RAT__)
488#define IS_UMTS_RAT_SUPPORTED 1
489#else
490#define IS_UMTS_RAT_SUPPORTED 0
491#endif
492
493#if defined (__LTE_RAT__)
494#define IS_LTE_RAT_SUPPORTED 1
495#else
496#define IS_LTE_RAT_SUPPORTED 0
497#endif
498
499#if defined (__NR_RAT__)
500#define IS_NR_RAT_SUPPORTED 1
501#else
502#define IS_NR_RAT_SUPPORTED 0
503#endif
504
505#define MAX_SUPPORTED_RAT (IS_GSM_RAT_SUPPORTED+IS_UMTS_RAT_SUPPORTED+IS_LTE_RAT_SUPPORTED+IS_NR_RAT_SUPPORTED)
506
507#if MAX_SUPPORTED_RAT == 0
508#error "Shall at least define 1 valid RAT!"
509#endif /* RAT capability configuration */
510
511#define RAC_MAX_NUM_LISTED_PLMNS 16*MAX_SUPPORTED_RAT
512
513#define SYS_MAX_MRU_LIST_NUM 12
514
515#define MAX_FORBIDDEN_NETWORK_NUM 32
516
517#define MAX_REDIRECT_FREQ_NUM 6
518
519#define GMSS_LTE_UNAVAIL_DB_SIZE 128
520
521#define MAX_PLMN_BAND_NUM 48
522
523#define NRRC_KAMF_LENGTH (32)
524
525/*****************************************************************************
526 * Type Definitions
527 *****************************************************************************/
528
529#define PACKET_FILTER_CONTENT_LEN 53 /* Poying: 29+(32-8) */
530
531// LOCAL_PARA_HDR + kal_uint8 nsapi (SM code assume nsapi is the first parameter of some primitive)
532#define NSAPI_STRUCT_HDR \
533 LOCAL_PARA_HDR \
534 kal_uint8 nsapi;
535
536#define MAX_LEN_OF_ALL_ALLOWED_NSSAI 144
537
538typedef struct {
539 kal_uint8 pfi;
540 kal_uint8 epi;
541 kal_uint8 contents_len; /* in bytes*/
542 kal_uint8 contents[PACKET_FILTER_CONTENT_LEN];
543} packet_filter_struct;
544
545typedef struct {
546 kal_uint8 tft_op_code;
547 kal_uint8 spare;
548 kal_uint8 num_packet_filters;
549 packet_filter_struct packet_list[8];
550} tft_struct;
551
552typedef struct {
553 kal_uint16 req_n201u; //erica 20070112
554} pdp_auxinfo_struct;
555
556
557typedef struct {
558 kal_uint8 length; /* LENGTH*/
559 kal_uint8 digit0; /* DIGIT 0*/
560 kal_uint8 odd_or_even; /* ODD OR EVEN*/
561 kal_uint8 identity_type; /* IDENTITY TYPE*/
562 kal_uint8 digit_byte[7];
563} imsi_struct;
564
565typedef struct {
566 kal_uint16 bcch_list[8];
567} bcchs_struct;
568
569
570typedef struct {
571 kal_uint8 length;
572 kal_uint8 digit0;
573 kal_uint8 odd_or_even;
574 kal_uint8 identity_type;
575 kal_uint8 digit_byte[7];
576} imei_struct;
577
578typedef struct {
579 plmn_id_struct plmn_id;
580 kal_uint8 la_code[2];
581 kal_uint8 ra_code; /* RA CODE*/
582 kal_uint8 ta_code[3];
583 kal_uint32 cell_id; /* CELL ID*/
584 kal_uint16 bandwidth;
585 kal_bool is_csg_cell;
586 csg_info_struct csg_info;
587#ifdef __VOLTE_SUPPORT__
588 kal_bool ims_emergency_support;
589#endif
590#ifdef __NG_ECALL_SUPPORT__
591 kal_bool ecall_over_ims_support;
592#endif
593} cell_info_struct;
594
595typedef struct {
596 kal_bool is_cell_valid;
597 kal_uint32 cell_id;
598 kal_bool is_la_valid;
599 kal_uint8 la_code[2];
600 plmn_id_struct plmn_id;
601} emc_forbidden_nw_list_struct;
602
603typedef struct
604{
605 kal_uint32 cell_id;
606 kal_uint8 la_code[2];
607 kal_uint8 ra_code;
608
609 /* Defined by IOT spec (reserved) */
610 kal_uint8 active_time;
611 kal_uint8 periodic_rau;
612} gsm_cell_struct;
613
614typedef struct
615{
616 kal_uint32 cell_id;
617 kal_uint8 la_code[2];
618 kal_uint8 ra_code;
619
620 /* Defined by IOT spec (reserved) */
621 kal_uint8 active_time;
622 kal_uint8 periodic_rau;
623} umts_cell_struct;
624
625typedef struct
626{
627 kal_uint32 cell_id;
628 kal_uint8 ta_code[2];
629
630 /* Defined by IOT spec (reserved) */
631 kal_uint8 active_time;
632 kal_uint8 periodic_tau;
633
634 kal_uint16 bandwidth;
635 kal_bool ims_emergency_support;
636
637 /* ENDC usage for 5G within 4G */
638 endc_sib_status_enum endc_sib_status;/* "endc_sib_status" will be set to "ENDC_SIB_STATUS_SUPPORT" if the corresponding
639 * bit of selected PLMN in PLMN-InfoList-r15 from SIB2 is TRUE.
640 */
641 kal_bool endc_available; /* "endc_available" wil be set to TRUE if any bit in PLMN-InfoList-r15 from SIB2 is TRUE */
642#ifdef __NG_ECALL_SUPPORT__
643 kal_bool ecall_over_ims_support;
644#endif /* __NG_ECALL_SUPPORT__ */
645} lte_cell_struct;
646
647typedef struct
648{
649 /* 5G extends the Cell ID to 36-bit */
650 kal_uint64 cell_id;
651 kal_uint8 ta_code[3];
652
653 kal_bool ims_emergency_support;
654} nr_cell_struct;
655
656typedef union {
657 gsm_cell_struct gsm_cell;
658 umts_cell_struct umts_cell;
659 lte_cell_struct lte_cell;
660 nr_cell_struct nr_cell;
661} cell_info_union;
662
663typedef struct {
664 rat_enum rat;
665 cell_info_union cell_info;
666
667 kal_bool is_csg_cell;
668 csg_info_struct csg_info;
669
670 rat_duplex_type_enum duplex_type;
671
672 plmn_id_struct plmn_id;
673 kal_bool is_on_hplmn;
674 kal_bool is_home_country; //AT&T requirement CDR-WiFi-1560: WiFi need to know domestic roaming and international roaming
675} cell_info_and_rat_struct;
676
677typedef struct
678{
679 integ_protect_status_enum is_integ_protected;
680 kal_uint8 invalid_cs_sim_counter;
681 kal_uint8 invalid_ps_sim_counter;
682 kal_bool is_dos_enhance_enable;
683}dos_enhance_info_struct;
684
685typedef enum
686{
687 MS_NULL_STATE = 0,
688 MS_READY_STATE,
689 MS_STANDBY_STATE,
690 MS_FORCED_TO_STANDBY_STATE
691}gmm_ms_state_enum;
692
693typedef enum {
694 CELL_CONNECTION_NONE = 0, // Cell is not a serving cell.
695 CELL_CONNECTION_PRIMARY_SERVING, // UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
696 CELL_CONNECTION_SECONDARY_SERVING, // UE has connection to cell for data (3GPP 36.331, 25.331).
697} cell_connection_status_enum;
698
699/*5G Part*/
700typedef struct
701{
702 /* Cell Identity NR */
703 kal_uint16 pci; // PCID
704
705 /**
706 * NR Cell Identity in range [0, 68719476735] (36 bits) described in 3GPP TS 38.331, which
707 * unambiguously identifies a cell within a PLMN. This value must be valid for registered or
708 * camped cells; LONG_MAX (2^63-1) means invalid/unreported.
709 */
710 kal_uint8 cell_id[5]; //CI
711 kal_bool reg_status; // 0 for non-serving cell; 1 for serving cell
712 cell_connection_status_enum cell_connection_status;
713 NRARFCN ssb_arfcn;
714
715 /* Signal Strength NR */
716 kal_int16 ss_rsrp_in_qdbm; // RSRP, 0x8000 for invalid
717 kal_int16 ss_rsrq_in_qdb; // RSRQ, 0x8000 for invalid
718 kal_int16 ss_sinr_in_qdb; // SINR, 0x8000 for invalid
719
720 kal_int16 csi_rsrp_in_qdbm; // not support, 0x8000
721 kal_int16 csi_rsrq_in_qdb; // not support, 0x8000
722 kal_int16 csi_sinr_in_qdb; // not support, 0x8000
723} cell_info_5g_output_struct;
724
725/*4G Part*/
726typedef struct
727{
728 /* Cell Identity LTE */
729 kal_uint16 pci; // PCID
730 kal_uint32 cell_id; // CI
731 kal_bool reg_status; // 0 for non-serving cell; 1 for seving cell
732 cell_connection_status_enum cell_connection_status;
733 EARFCN dl_arfcn;
734 EARFCN ul_arfcn;
735 /* Signal Strength LTE */
736 kal_int16 rssi; // RSSI
737 kal_int16 rsrp; // RSRP
738 kal_int16 rsrq; // RSRQ
739 kal_int16 snr; // SNR
740} cell_info_4g_output_struct;
741
742/*3G Part*/
743typedef struct
744{
745 /* Cell Identity UMTS*/
746 kal_uint16 psc; // PSC
747 kal_uint32 cell_id; // CI
748 kal_bool reg_status; // Registration Status (Serving Cell/Non Serving cell)
749 cell_connection_status_enum cell_connection_status;
750 umts_duplex_mode_type umts_duplex_mode; // Duplex mode(UMTS_WCDMA_DUPLEX_MODE)
751 EARFCN dl_arfcn;
752 EARFCN ul_arfcn;
753 /* Signal Strength UMTS*/
754 kal_int16 rscp; // rscp
755 kal_int16 ecno; // EcNO
756 kal_int32 rssi; // RSSI
757
758} cell_info_3g_output_struct;
759
760/* 2G Part*/
761typedef struct
762{
763 /* Cell Identity 2G*/
764 kal_uint16 cell_id; // CI
765 kal_uint16 gsm_bsic;
766 kal_uint16 gsm_arfcn;
767 cell_connection_status_enum cell_connection_status;
768 /* Signal Strength 2G */
769 kal_int16 rssi; //RSSI
770 kal_bool reg_status; // 0: non-Serving cell; 1: Serving cell
771
772} cell_info_2g_output_struct;
773
774typedef union
775{
776 cell_info_2g_output_struct plmn_list_2g_output;
777 cell_info_3g_output_struct plmn_list_3g_output;
778 cell_info_4g_output_struct plmn_list_4g_output;
779 cell_info_5g_output_struct plmn_list_5g_output;
780} cell_info_output_union_type;
781
782/* UAS/GAS <-> RATCM begin */
783typedef struct {
784 plmn_id_struct plmn_id;
785 kal_uint8 la_or_ta_code[3];
786 kal_int16 power_level;
787 kal_bool may_suitable_cell_exist;
788 //TRUE(1) for suitable cell may exist;
789 //FALSE(0) for no suitable cell exist.
790 kal_bool may_suitable_cell_exist_higher_pri;
791 lte_duplex_type_enum lte_type;
792#ifdef __VOLTE_SUPPORT__
793 kal_bool ims_emergency_support;
794#endif
795#ifdef __NG_ECALL_SUPPORT__
796 kal_bool ecall_over_ims_support;
797#endif /* __NG_ECALL_SUPPORT__ */
798 kal_bool not_suitable_for_select;
799 // AS will report this flag according to SBP_DISPLAY_NOT_SELECTABLE_PLMN and cell status
800 kal_uint32 time_scan_start;
801 kal_uint32 time_scan_end;
802 kal_uint16 band_ind;
803 endc_sib_status_enum endc_sib_status; /* upperLayerIndication-r15 in SIB2 */
804 cell_info_output_union_type plmn_list_output;
805} available_plmn_struct;
806
807typedef struct {
808 kal_uint8 plmn_count;
809 plmn_id_rat_struct plmn_id_rat[RAC_MAX_NUM_LISTED_PLMNS];
810 kal_uint8 la_code[RAC_MAX_NUM_LISTED_PLMNS][3];
811 nwsel_plmn_list_status_enum status[RAC_MAX_NUM_LISTED_PLMNS];
812 endc_sib_status_enum endc_sib_status[RAC_MAX_NUM_LISTED_PLMNS]; /* upperLayerIndication-r15 in SIB2 */
813 kal_bool may_suitable_cell_exist[RAC_MAX_NUM_LISTED_PLMNS];
814 available_plmn_struct available_list[RAC_MAX_NUM_LISTED_PLMNS];
815} rac_plmn_list_struct;
816
817typedef struct {
818 kal_uint8 plmn_count;
819 kal_uint8 high_quality_plmn_count;
820 available_plmn_struct available_plmn[MAX_NUM_PLMN_PER_RAT];
821} as_plmn_list_struct;
822
823typedef struct {
824 plmn_id_rat_struct plmn_id_rat;
825 kal_uint8 csg_count;
826 csg_info_struct *csg_info_list;
827} available_plmn_csg_struct;
828
829typedef struct {
830 kal_uint8 plmn_count;
831 available_plmn_csg_struct available_plmn_csg[MAX_NUM_PLMN_PER_RAT];
832} as_csg_list_struct;
833
834typedef struct
835{
836 kal_uint8 plmn_count;
837 available_plmn_csg_struct available_plmn_csg[MAX_NUM_PLMN_PER_RAT];
838 kal_uint8 sorted_csg_count;
839 available_plmn_csg_struct sorted_plmn_csg[MAX_CSG_NUM];
840} rac_csg_list_struct;
841
842typedef struct{
843 kal_uint8 ref_count;
844 kal_uint16 msg_len;
845 kal_bool is_cs_cipher_key_info_present; /* if GSM CS cipher key present */
846 kal_uint8 cs_cipher_key_info[KC_LEN]; /* GSM CS domain cipher key (Kc) */
847 kal_bool is_cs_cipher_key128_info_present; /* if GSM CS cipher key128 present */
848 kal_uint8 cs_cipher_key128_info[KC128_LEN]; /* GSM CS domain cipher key128 (Kc128) */
849 kal_uint8 cksn; /* cipher key sequence number */
850}ratcm_gas_security_mode_req_struct;
851
852typedef struct{
853 domain_id_enum domain_id; //The domain of security context
854 kal_uint8 umts_ciphering_key[CK_LEN]; //UMTS ciphering key
855 kal_uint8 umts_integrity_key[IK_LEN]; //UMTS integrity key
856}uas_security_context_struct;
857
858/* UAS/GAS <-> RATCM end */
859
860typedef struct {
861 domain_id_enum pag_resp_rest_ind;
862 domain_id_enum loc_reg_rest_ind;
863 kal_uint16 loc_reg_ppacr;
864} ppacr_info_struct ;
865
866/* L4C <-> ENAS/EAS begin */
867
868/* Cell restriction related definitions */
869#define REST_CELL_ARRAY_SIZE 8
870#define REST_FREQ_ARRAY_SIZE 8
871
872typedef enum {
873 REST_MODE_NULL,
874 REST_MODE_RESTRICTED_LIST,
875 REST_MODE_PERMITTED_LIST
876} rest_mode_enum;
877
878typedef struct {
879 EARFCN earfcn; /* EARFCN */
880 kal_uint16 lower_cell_id; /* Lower Physical Cell Identity */
881 kal_uint16 higher_cell_id; /* Higher Physical Cell Identity */
882} rest_cell_range_struct;
883
884typedef struct{
885 kal_uint16 lower_earfcn; /* Lower EARFCN */
886 kal_uint16 higher_earfcn; /* Higher EARFCN */
887} rest_freq_range_struct;
888
889typedef struct{
890 rest_mode_enum mode; /* Restricted list mode */
891 kal_uint8 rest_cell_range_num; /* Number of restricted cell list */
892 kal_uint8 rest_freq_range_num; /* Number of restricted frequency list */
893 rest_cell_range_struct rest_cell_range_list[REST_CELL_ARRAY_SIZE]; /* Restricted cell list */
894 rest_freq_range_struct rest_freq_range_list[REST_FREQ_ARRAY_SIZE]; /* Restricted frequency list */
895 kal_bool is_umts_rest; /* If all umts cells are restricted */
896 kal_bool is_gsm_rest; /* If all gsm cells are restricted */
897 kal_bool is_c2k_rest; /* If all c2k cells are restricted */
898} rest_command_struct;
899
900/* Monitor mode struct */
901typedef struct{
902 kal_bool is_monitor_mode_set; /* Is monitor mode is switched on or off */
903} monitor_mode_command_struct;
904
905/* L4C <-> ENAS/EAS end */
906
907/* ETCM <-> ENAS/EAS begin */
908#define MIN_APN_LEN 1
909
910typedef struct
911{
912 kal_uint8 length;
913 kal_uint8 data[MAX_APN_LEN];
914
915} apn_struct;
916
917/* ETCM <-> ENAS/EAS end */
918
919/* NWSEL <-> ENAS/EAS begin */
920typedef struct
921{
922kal_uint8 addr_length;
923kal_uint8 addr_bcd[MAX_NW_ECC_NUM_LENGTH];
924} l3_addr_bcd_struct;
925
926typedef struct {
927 kal_uint8 category;
928 l3_addr_bcd_struct tel_number;
929} ecc_number_struct;
930
931/* RATCM -> MM -> NWSEL */
932typedef struct {
933 LOCAL_PARA_HDR
934 rat_enum rat;
935 kal_uint32 cell_id;
936 kal_bool is_la_valid;
937 kal_uint8 la_code[2];
938 kal_bool is_ra_valid;
939 kal_uint8 ra_code;
940 kal_uint8 multi_plmn_count;
941 plmn_id_struct multi_plmn_id[MAX_NUM_MULTI_PLMN];
942} mm_cell_global_identity_info_ind_struct;
943
944/* RATCM -> MM -> NWSEL */
945typedef struct
946{
947 kal_uint16 band;
948 plmn_id_struct plmn_id; /* chann */
949} cell_band_info_struct;
950
951typedef struct {
952 LOCAL_PARA_HDR
953 kal_uint16 gibi_tag;
954 rat_enum rat;
955 kal_bool is_data_pending;
956 kal_bool is_sys_info_present;
957#if defined(__UMTS_FDD_MODE__) || defined(__TD_NETWORK_SHARING__) || defined (UNIT_TEST)
958 kal_uint8 multi_plmn_count;
959 plmn_id_struct multi_plmn_id[MAX_NUM_MULTI_PLMN];
960 as_cell_type_enum multi_plmn_cell_type[MAX_NUM_MULTI_PLMN];
961#endif
962 plmn_id_struct plmn_id;
963 kal_uint8 la_code[2];
964 kal_uint8 ra_code;
965 kal_uint32 cell_id; //mtk02475: extended cell id in UMTS
966 kal_bool cell_support_cs;
967 kal_bool cell_support_ps; /* if FALSE, nmo and ra_code should not refer. */
968 kal_bool is_acc_class_present;
969 kal_uint16 acc_class;
970 kal_uint8 extra_info_bitmask; /* mtk02475: for DSAC/data_speed_support update in connected mode*/
971#if defined (__R6_DSAC__) || defined (UNIT_TEST)
972 kal_uint8 dsac_plmn_bitmask;
973 kal_uint16 cs_dsac[MAX_NUM_MULTI_PLMN];
974 kal_uint16 ps_dsac[MAX_NUM_MULTI_PLMN];
975#endif
976 kal_uint8 t3212_timer_val;
977 network_mode_enum nmo;
978 as_cell_type_enum cell_type;
979 att_flag_enum att_flag;
980 kal_bool mscr;
981 rr_mm_sgsnr_flag_enum sgsnr;
982#if defined (__PS_SERVICE__) || defined (UNIT_TEST)
983 data_speed_support_enum cell_data_speed_support; /* MAUI_02361221: for egprs and hspa */
984#endif
985
986#if defined (__PPACR_SUPPORT__) || defined (UNIT_TEST)
987 kal_uint8 ppacr_plmn_bitmask;
988 ppacr_info_struct ppacr_info_plmn_list[MAX_NUM_MULTI_PLMN];
989#endif
990
991 csg_access_mode_enum csg_access_mode;
992 csg_info_struct csg_info;
993
994#ifdef __LTE_RAT__
995 kal_bool is_gprs_info_in_si13_deferred;
996#endif
997 kal_uint8 band;
998} mm_sys_info_ind_struct;
999
1000typedef struct
1001{
1002 capability_switch_enum s1_cap;
1003 capability_switch_enum n1_cap;
1004
1005 /* gsm/umts not yet implement, put here for extension. Always set to ENABLE */
1006 capability_switch_enum gsm_cap;
1007 capability_switch_enum umts_cap;
1008
1009 vg_option_enum vg_option;
1010} ue_capability_struct;
1011
1012typedef struct
1013{
1014 ue_capability_struct ue_cap;
1015 kal_bool is_mrs_endc_supported; // query result of "mrs_nras_is_endc_support()"
1016 kal_bool is_nw_endc_disabled; // is EN-DC disabled for specific SIM/network
1017} nas_sv_ue_capability_struct;
1018
1019typedef struct
1020{
1021 kal_bool wait_emc_pdn_status;
1022 plmn_id_struct rplmn;
1023 kal_uint8 eq_plmn_byte_count;
1024 kal_uint8 eq_plmn_id[MAX_NUM_EQ_PLMN*3];
1025} update_eplmn_struct;
1026
1027/* NWSEL <-> ENAS/EAS end */
1028
1029typedef struct
1030{
1031 vg_ims_3gpp_ind_enum vg_ims_3gpp_ind;
1032 vg_ims_n3gpp_ind_enum vg_ims_n3gpp_ind;
1033 vg_emergency_service_ind_enum vg_emergency_service_ind;
1034 vg_emergency_fallback_ind_enum vg_emergency_fallback_ind;
1035 iwk_n26_enum iwk_n26_ind;
1036 mps_ind_enum mps_ind;
1037 vg_emergency_service_n3gpp_ind_enum vg_emergency_service_n3gpp_ind;
1038 mcs_ind_enum mcs_ind;
1039} vgmm_nw_feature_support_struct;
1040
1041typedef struct {
1042 kal_uint8 ie_content[MAX_LEN_OF_OPT_IE_MULTI];
1043} vgmm_payload_opt_ie_struct;
1044
1045typedef struct
1046{
1047 ims_ind_enum ims_ind;
1048 emergency_service_ind_enum emergency_service_ind;
1049 location_service_epc_ind_enum location_service_epc_ind;
1050 location_service_cs_ind_enum location_service_cs_ind;
1051 ext_service_request_for_ps_enum ext_service_request_for_ps_ind;
1052 ext_pco_enum ext_pco_ind;
1053 restrict_dcnr_enum restrict_dcnr_ind;
1054 iwk_n26_enum iwk_n26_ind;
1055} emm_nw_feature_support_struct;
1056
1057typedef struct
1058{
1059 ug_ims_ind_enum ims_voice_over_ps_ind;
1060 ug_emergency_service_ind_enum emergency_service_ind;
1061} gmm_nw_feature_support_struct;
1062
1063
1064/* NWSEL <-> ENAS/EAS end */
1065
1066#ifdef __LTE_RAT__
1067typedef struct {
1068 LOCAL_PARA_HDR
1069 errc_sim_protect_purpose_enum purpose;
1070 kal_bool need_protect;
1071} errc_sim_protect_req_struct;
1072#endif //__LTE_RAT__
1073
1074typedef struct
1075{
1076 gmss_rat_enum rat;
1077 plmn_id_struct loc;
1078 prio_class_enum prio_class;
1079
1080} gmss_mru_info_struct;
1081
1082typedef struct {
1083 kal_uint32 num_mcc;
1084 plmn_id_struct mcc[MAX_NUM_OF_MCC];
1085} found_mcc_info_struct;
1086typedef struct
1087{
1088 kal_uint32 entry_index;
1089 irat_system_type_enum rat;
1090 kal_uint8 band;
1091 plmn_id_struct plmn_id;
1092 kal_uint16 channel; // There is no PLMN ID in C2K, only channel number
1093} vzwmru_entry_struct;
1094
1095typedef struct
1096{
1097 domain_id_enum updated_domain; /* The domain to be updated */
1098
1099 reg_state_enum cs_state;
1100 reg_state_enum ps_state;
1101
1102 cell_info_and_rat_struct cell_type;
1103 data_speed_support_enum cell_data_speed_support;
1104
1105 kal_uint8 cause_type; /* 0: defined by spec 1: internal cause, defined by manufacture */
1106 mm_cause_enum reject_cause;
1107
1108 /* Combined attach, CS/PS may register with different PLMN in NAS view
1109 Amid TMO network, if CS is in PLMN-A, PS in PLMN-B, and LTE does not support CS, that means
1110 UE cannot perform CSFB but VoLTE */
1111 lai_struct cs_lai;
1112
1113 kal_bool is_skip; /* Network display optimization (reserved) */
1114
1115 kal_bool dcnr_restricted;
1116 kal_uint8 vgmm_allowed_nssai_length; /* Number of bytes in allowed NSSAI */
1117 kal_uint8 vgmm_allowed_nssai[MAX_LEN_OF_ALL_ALLOWED_NSSAI]; /* Allowed NSSAI */
1118} reg_state_ind_struct;
1119
1120typedef struct
1121{
1122 plmn_id_struct plmn_id;
1123 kal_uint16 band;
1124} plmn_band_struct;
1125
1126#define INVALID_CAMPING_INFO_ID 0xffff
1127#define INVALID_CAMPING_INFO_MASK 0x0f
1128
1129typedef struct
1130{
1131 ue_capability_struct capability; // new capability
1132 rat_enum rat_mode;
1133} ue_capability_update_params_struct;
1134
1135/*
1136 * Structure represents the KAMF key.
1137 */
1138typedef struct {
1139 /* KAMF for deriving new KgNB and NH when required by NRRC.
1140 * MSB of key[0] is the first bit of key. */
1141 kal_uint8 key[NRRC_KAMF_LENGTH];
1142} nrrc_kamf_struct;
1143
1144
1145
1146#define D_MAX_MMEGID_SIZE 2
1147#define D_MTMSI_LEN 4
1148
1149typedef struct
1150{
1151 kal_uint8 value;
1152 kal_uint8 tsc;
1153} nas_ksi_struct;
1154
1155
1156typedef struct {
1157 kal_uint8 length_of_guti;
1158 kal_uint8 type_of_identity;
1159 plmn_id_struct plmn_id;
1160 kal_uint8 mme_gid[D_MAX_MMEGID_SIZE];
1161 kal_uint8 mme_code;
1162 kal_uint8 mtmsi[D_MTMSI_LEN];
1163} guti_struct;
1164
1165
1166#define VGNAS_TAC_LEN 3 /* 5G Tracking Area Code size */
1167#define VGNAS_MAX_TAI_LIST 16 /* Max number of entries in TA list */
1168#define MAX_LADN_INFO 8
1169#define MAX_CRLADN_LEN 808
1170#define MAX_LADN_INFO_LEN 1712
1171
1172/**
1173 * TA structure to store tracking area identity
1174 */
1175typedef struct vgnas_tai_struct {
1176 plmn_id_struct plmn_id;
1177 kal_uint8 ta_code[VGNAS_TAC_LEN];
1178} vgnas_tai_struct;
1179
1180
1181/**
1182* Structure to store different TA lists: registered TAs,
1183* allowed TA list and non-allowed TA list.
1184*/
1185typedef struct vgnas_ta_list_struct {
1186 kal_uint8 number_of_ta;
1187 vgnas_tai_struct ta_list[VGNAS_MAX_TAI_LIST];
1188
1189} vgnas_ta_list_struct;
1190
1191/**
1192* Structure to store LADN information
1193*/
1194typedef struct {
1195 apn_struct dnn;
1196 vgnas_ta_list_struct ta_list;
1197} ladn_info_struct;
1198
1199/**
1200* Structure for LADN information primitive forwarding
1201*/
1202typedef struct {
1203 LOCAL_PARA_HDR
1204 kal_uint8 num_of_ladn_info;
1205 ladn_info_struct ladn_info[MAX_LADN_INFO];
1206
1207 kal_bool is_ladn_raw_data_valid;
1208 kal_uint16 ladn_raw_data_len;
1209 kal_uint8 ladn_raw_data[MAX_LADN_INFO_LEN];
1210
1211} ladn_info_update_ind_struct;
1212
1213/*
1214 * Structure for L4 Context
1215 */
1216typedef struct
1217{
1218 kal_uint8 num_of_ladn_info;
1219 ladn_info_struct ladn_info[MAX_LADN_INFO];
1220
1221 kal_bool is_ladn_raw_data_valid;
1222 kal_uint16 ladn_raw_data_len;
1223 kal_uint8 ladn_raw_data[MAX_LADN_INFO_LEN];
1224} l4ctcm_ladn_info_list_struct;
1225
1226#endif