blob: e3168440cd7b87c01f5fd681754aeda1ad86b7d4 [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 */
yu.donge372c322023-08-30 20:25:04 -0700642 kal_bool endc_band_ue_supported; /* TRUE: UE support at least 1 ENDC combo with attached LTE cell band */
rjw6c1fd8f2022-11-30 14:33:01 +0800643#ifdef __NG_ECALL_SUPPORT__
644 kal_bool ecall_over_ims_support;
645#endif /* __NG_ECALL_SUPPORT__ */
646} lte_cell_struct;
647
648typedef struct
649{
650 /* 5G extends the Cell ID to 36-bit */
651 kal_uint64 cell_id;
652 kal_uint8 ta_code[3];
653
654 kal_bool ims_emergency_support;
655} nr_cell_struct;
656
657typedef union {
658 gsm_cell_struct gsm_cell;
659 umts_cell_struct umts_cell;
660 lte_cell_struct lte_cell;
661 nr_cell_struct nr_cell;
662} cell_info_union;
663
664typedef struct {
665 rat_enum rat;
666 cell_info_union cell_info;
667
668 kal_bool is_csg_cell;
669 csg_info_struct csg_info;
670
671 rat_duplex_type_enum duplex_type;
672
673 plmn_id_struct plmn_id;
674 kal_bool is_on_hplmn;
675 kal_bool is_home_country; //AT&T requirement CDR-WiFi-1560: WiFi need to know domestic roaming and international roaming
676} cell_info_and_rat_struct;
677
678typedef struct
679{
680 integ_protect_status_enum is_integ_protected;
681 kal_uint8 invalid_cs_sim_counter;
682 kal_uint8 invalid_ps_sim_counter;
683 kal_bool is_dos_enhance_enable;
684}dos_enhance_info_struct;
685
686typedef enum
687{
688 MS_NULL_STATE = 0,
689 MS_READY_STATE,
690 MS_STANDBY_STATE,
691 MS_FORCED_TO_STANDBY_STATE
692}gmm_ms_state_enum;
693
694typedef enum {
695 CELL_CONNECTION_NONE = 0, // Cell is not a serving cell.
696 CELL_CONNECTION_PRIMARY_SERVING, // UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
697 CELL_CONNECTION_SECONDARY_SERVING, // UE has connection to cell for data (3GPP 36.331, 25.331).
698} cell_connection_status_enum;
699
700/*5G Part*/
701typedef struct
702{
703 /* Cell Identity NR */
704 kal_uint16 pci; // PCID
705
706 /**
707 * NR Cell Identity in range [0, 68719476735] (36 bits) described in 3GPP TS 38.331, which
708 * unambiguously identifies a cell within a PLMN. This value must be valid for registered or
709 * camped cells; LONG_MAX (2^63-1) means invalid/unreported.
710 */
711 kal_uint8 cell_id[5]; //CI
712 kal_bool reg_status; // 0 for non-serving cell; 1 for serving cell
713 cell_connection_status_enum cell_connection_status;
714 NRARFCN ssb_arfcn;
715
716 /* Signal Strength NR */
717 kal_int16 ss_rsrp_in_qdbm; // RSRP, 0x8000 for invalid
718 kal_int16 ss_rsrq_in_qdb; // RSRQ, 0x8000 for invalid
719 kal_int16 ss_sinr_in_qdb; // SINR, 0x8000 for invalid
720
721 kal_int16 csi_rsrp_in_qdbm; // not support, 0x8000
722 kal_int16 csi_rsrq_in_qdb; // not support, 0x8000
723 kal_int16 csi_sinr_in_qdb; // not support, 0x8000
724} cell_info_5g_output_struct;
725
726/*4G Part*/
727typedef struct
728{
729 /* Cell Identity LTE */
730 kal_uint16 pci; // PCID
731 kal_uint32 cell_id; // CI
732 kal_bool reg_status; // 0 for non-serving cell; 1 for seving cell
733 cell_connection_status_enum cell_connection_status;
734 EARFCN dl_arfcn;
735 EARFCN ul_arfcn;
736 /* Signal Strength LTE */
737 kal_int16 rssi; // RSSI
738 kal_int16 rsrp; // RSRP
739 kal_int16 rsrq; // RSRQ
740 kal_int16 snr; // SNR
741} cell_info_4g_output_struct;
742
743/*3G Part*/
744typedef struct
745{
746 /* Cell Identity UMTS*/
747 kal_uint16 psc; // PSC
748 kal_uint32 cell_id; // CI
749 kal_bool reg_status; // Registration Status (Serving Cell/Non Serving cell)
750 cell_connection_status_enum cell_connection_status;
751 umts_duplex_mode_type umts_duplex_mode; // Duplex mode(UMTS_WCDMA_DUPLEX_MODE)
752 EARFCN dl_arfcn;
753 EARFCN ul_arfcn;
754 /* Signal Strength UMTS*/
755 kal_int16 rscp; // rscp
756 kal_int16 ecno; // EcNO
757 kal_int32 rssi; // RSSI
758
759} cell_info_3g_output_struct;
760
761/* 2G Part*/
762typedef struct
763{
764 /* Cell Identity 2G*/
765 kal_uint16 cell_id; // CI
766 kal_uint16 gsm_bsic;
767 kal_uint16 gsm_arfcn;
768 cell_connection_status_enum cell_connection_status;
769 /* Signal Strength 2G */
770 kal_int16 rssi; //RSSI
771 kal_bool reg_status; // 0: non-Serving cell; 1: Serving cell
772
773} cell_info_2g_output_struct;
774
775typedef union
776{
777 cell_info_2g_output_struct plmn_list_2g_output;
778 cell_info_3g_output_struct plmn_list_3g_output;
779 cell_info_4g_output_struct plmn_list_4g_output;
780 cell_info_5g_output_struct plmn_list_5g_output;
781} cell_info_output_union_type;
782
783/* UAS/GAS <-> RATCM begin */
784typedef struct {
785 plmn_id_struct plmn_id;
786 kal_uint8 la_or_ta_code[3];
787 kal_int16 power_level;
788 kal_bool may_suitable_cell_exist;
789 //TRUE(1) for suitable cell may exist;
790 //FALSE(0) for no suitable cell exist.
791 kal_bool may_suitable_cell_exist_higher_pri;
792 lte_duplex_type_enum lte_type;
793#ifdef __VOLTE_SUPPORT__
794 kal_bool ims_emergency_support;
795#endif
796#ifdef __NG_ECALL_SUPPORT__
797 kal_bool ecall_over_ims_support;
798#endif /* __NG_ECALL_SUPPORT__ */
799 kal_bool not_suitable_for_select;
800 // AS will report this flag according to SBP_DISPLAY_NOT_SELECTABLE_PLMN and cell status
801 kal_uint32 time_scan_start;
802 kal_uint32 time_scan_end;
803 kal_uint16 band_ind;
804 endc_sib_status_enum endc_sib_status; /* upperLayerIndication-r15 in SIB2 */
805 cell_info_output_union_type plmn_list_output;
806} available_plmn_struct;
807
808typedef struct {
809 kal_uint8 plmn_count;
810 plmn_id_rat_struct plmn_id_rat[RAC_MAX_NUM_LISTED_PLMNS];
811 kal_uint8 la_code[RAC_MAX_NUM_LISTED_PLMNS][3];
812 nwsel_plmn_list_status_enum status[RAC_MAX_NUM_LISTED_PLMNS];
813 endc_sib_status_enum endc_sib_status[RAC_MAX_NUM_LISTED_PLMNS]; /* upperLayerIndication-r15 in SIB2 */
814 kal_bool may_suitable_cell_exist[RAC_MAX_NUM_LISTED_PLMNS];
815 available_plmn_struct available_list[RAC_MAX_NUM_LISTED_PLMNS];
816} rac_plmn_list_struct;
817
818typedef struct {
819 kal_uint8 plmn_count;
820 kal_uint8 high_quality_plmn_count;
821 available_plmn_struct available_plmn[MAX_NUM_PLMN_PER_RAT];
822} as_plmn_list_struct;
823
824typedef struct {
825 plmn_id_rat_struct plmn_id_rat;
826 kal_uint8 csg_count;
827 csg_info_struct *csg_info_list;
828} available_plmn_csg_struct;
829
830typedef struct {
831 kal_uint8 plmn_count;
832 available_plmn_csg_struct available_plmn_csg[MAX_NUM_PLMN_PER_RAT];
833} as_csg_list_struct;
834
835typedef struct
836{
837 kal_uint8 plmn_count;
838 available_plmn_csg_struct available_plmn_csg[MAX_NUM_PLMN_PER_RAT];
839 kal_uint8 sorted_csg_count;
840 available_plmn_csg_struct sorted_plmn_csg[MAX_CSG_NUM];
841} rac_csg_list_struct;
842
843typedef struct{
844 kal_uint8 ref_count;
845 kal_uint16 msg_len;
846 kal_bool is_cs_cipher_key_info_present; /* if GSM CS cipher key present */
847 kal_uint8 cs_cipher_key_info[KC_LEN]; /* GSM CS domain cipher key (Kc) */
848 kal_bool is_cs_cipher_key128_info_present; /* if GSM CS cipher key128 present */
849 kal_uint8 cs_cipher_key128_info[KC128_LEN]; /* GSM CS domain cipher key128 (Kc128) */
850 kal_uint8 cksn; /* cipher key sequence number */
851}ratcm_gas_security_mode_req_struct;
852
853typedef struct{
854 domain_id_enum domain_id; //The domain of security context
855 kal_uint8 umts_ciphering_key[CK_LEN]; //UMTS ciphering key
856 kal_uint8 umts_integrity_key[IK_LEN]; //UMTS integrity key
857}uas_security_context_struct;
858
859/* UAS/GAS <-> RATCM end */
860
861typedef struct {
862 domain_id_enum pag_resp_rest_ind;
863 domain_id_enum loc_reg_rest_ind;
864 kal_uint16 loc_reg_ppacr;
865} ppacr_info_struct ;
866
867/* L4C <-> ENAS/EAS begin */
868
869/* Cell restriction related definitions */
870#define REST_CELL_ARRAY_SIZE 8
871#define REST_FREQ_ARRAY_SIZE 8
872
873typedef enum {
874 REST_MODE_NULL,
875 REST_MODE_RESTRICTED_LIST,
876 REST_MODE_PERMITTED_LIST
877} rest_mode_enum;
878
879typedef struct {
880 EARFCN earfcn; /* EARFCN */
881 kal_uint16 lower_cell_id; /* Lower Physical Cell Identity */
882 kal_uint16 higher_cell_id; /* Higher Physical Cell Identity */
883} rest_cell_range_struct;
884
885typedef struct{
886 kal_uint16 lower_earfcn; /* Lower EARFCN */
887 kal_uint16 higher_earfcn; /* Higher EARFCN */
888} rest_freq_range_struct;
889
890typedef struct{
891 rest_mode_enum mode; /* Restricted list mode */
892 kal_uint8 rest_cell_range_num; /* Number of restricted cell list */
893 kal_uint8 rest_freq_range_num; /* Number of restricted frequency list */
894 rest_cell_range_struct rest_cell_range_list[REST_CELL_ARRAY_SIZE]; /* Restricted cell list */
895 rest_freq_range_struct rest_freq_range_list[REST_FREQ_ARRAY_SIZE]; /* Restricted frequency list */
896 kal_bool is_umts_rest; /* If all umts cells are restricted */
897 kal_bool is_gsm_rest; /* If all gsm cells are restricted */
898 kal_bool is_c2k_rest; /* If all c2k cells are restricted */
899} rest_command_struct;
900
901/* Monitor mode struct */
902typedef struct{
903 kal_bool is_monitor_mode_set; /* Is monitor mode is switched on or off */
904} monitor_mode_command_struct;
905
906/* L4C <-> ENAS/EAS end */
907
908/* ETCM <-> ENAS/EAS begin */
909#define MIN_APN_LEN 1
910
911typedef struct
912{
913 kal_uint8 length;
914 kal_uint8 data[MAX_APN_LEN];
915
916} apn_struct;
917
yu.dongc279f972024-06-18 02:22:06 -0700918typedef struct
919{
920 kal_uint8 psi;
921
922 pdus_qos_flow_struct qos_flow;
923} pdu_session_info_struct;
924
rjw6c1fd8f2022-11-30 14:33:01 +0800925/* ETCM <-> ENAS/EAS end */
926
927/* NWSEL <-> ENAS/EAS begin */
928typedef struct
929{
930kal_uint8 addr_length;
931kal_uint8 addr_bcd[MAX_NW_ECC_NUM_LENGTH];
932} l3_addr_bcd_struct;
933
934typedef struct {
935 kal_uint8 category;
936 l3_addr_bcd_struct tel_number;
937} ecc_number_struct;
938
939/* RATCM -> MM -> NWSEL */
940typedef struct {
941 LOCAL_PARA_HDR
942 rat_enum rat;
943 kal_uint32 cell_id;
944 kal_bool is_la_valid;
945 kal_uint8 la_code[2];
946 kal_bool is_ra_valid;
947 kal_uint8 ra_code;
948 kal_uint8 multi_plmn_count;
949 plmn_id_struct multi_plmn_id[MAX_NUM_MULTI_PLMN];
950} mm_cell_global_identity_info_ind_struct;
951
952/* RATCM -> MM -> NWSEL */
953typedef struct
954{
955 kal_uint16 band;
956 plmn_id_struct plmn_id; /* chann */
957} cell_band_info_struct;
958
959typedef struct {
960 LOCAL_PARA_HDR
961 kal_uint16 gibi_tag;
962 rat_enum rat;
963 kal_bool is_data_pending;
964 kal_bool is_sys_info_present;
965#if defined(__UMTS_FDD_MODE__) || defined(__TD_NETWORK_SHARING__) || defined (UNIT_TEST)
966 kal_uint8 multi_plmn_count;
967 plmn_id_struct multi_plmn_id[MAX_NUM_MULTI_PLMN];
968 as_cell_type_enum multi_plmn_cell_type[MAX_NUM_MULTI_PLMN];
969#endif
970 plmn_id_struct plmn_id;
971 kal_uint8 la_code[2];
972 kal_uint8 ra_code;
973 kal_uint32 cell_id; //mtk02475: extended cell id in UMTS
974 kal_bool cell_support_cs;
975 kal_bool cell_support_ps; /* if FALSE, nmo and ra_code should not refer. */
976 kal_bool is_acc_class_present;
977 kal_uint16 acc_class;
978 kal_uint8 extra_info_bitmask; /* mtk02475: for DSAC/data_speed_support update in connected mode*/
979#if defined (__R6_DSAC__) || defined (UNIT_TEST)
980 kal_uint8 dsac_plmn_bitmask;
981 kal_uint16 cs_dsac[MAX_NUM_MULTI_PLMN];
982 kal_uint16 ps_dsac[MAX_NUM_MULTI_PLMN];
983#endif
984 kal_uint8 t3212_timer_val;
985 network_mode_enum nmo;
986 as_cell_type_enum cell_type;
987 att_flag_enum att_flag;
988 kal_bool mscr;
989 rr_mm_sgsnr_flag_enum sgsnr;
990#if defined (__PS_SERVICE__) || defined (UNIT_TEST)
991 data_speed_support_enum cell_data_speed_support; /* MAUI_02361221: for egprs and hspa */
992#endif
993
994#if defined (__PPACR_SUPPORT__) || defined (UNIT_TEST)
995 kal_uint8 ppacr_plmn_bitmask;
996 ppacr_info_struct ppacr_info_plmn_list[MAX_NUM_MULTI_PLMN];
997#endif
998
999 csg_access_mode_enum csg_access_mode;
1000 csg_info_struct csg_info;
1001
1002#ifdef __LTE_RAT__
1003 kal_bool is_gprs_info_in_si13_deferred;
1004#endif
1005 kal_uint8 band;
1006} mm_sys_info_ind_struct;
1007
1008typedef struct
1009{
1010 capability_switch_enum s1_cap;
1011 capability_switch_enum n1_cap;
1012
1013 /* gsm/umts not yet implement, put here for extension. Always set to ENABLE */
1014 capability_switch_enum gsm_cap;
1015 capability_switch_enum umts_cap;
1016
1017 vg_option_enum vg_option;
1018} ue_capability_struct;
1019
1020typedef struct
1021{
1022 ue_capability_struct ue_cap;
1023 kal_bool is_mrs_endc_supported; // query result of "mrs_nras_is_endc_support()"
1024 kal_bool is_nw_endc_disabled; // is EN-DC disabled for specific SIM/network
1025} nas_sv_ue_capability_struct;
1026
1027typedef struct
1028{
1029 kal_bool wait_emc_pdn_status;
1030 plmn_id_struct rplmn;
1031 kal_uint8 eq_plmn_byte_count;
1032 kal_uint8 eq_plmn_id[MAX_NUM_EQ_PLMN*3];
1033} update_eplmn_struct;
1034
1035/* NWSEL <-> ENAS/EAS end */
1036
1037typedef struct
1038{
1039 vg_ims_3gpp_ind_enum vg_ims_3gpp_ind;
1040 vg_ims_n3gpp_ind_enum vg_ims_n3gpp_ind;
1041 vg_emergency_service_ind_enum vg_emergency_service_ind;
1042 vg_emergency_fallback_ind_enum vg_emergency_fallback_ind;
1043 iwk_n26_enum iwk_n26_ind;
1044 mps_ind_enum mps_ind;
1045 vg_emergency_service_n3gpp_ind_enum vg_emergency_service_n3gpp_ind;
1046 mcs_ind_enum mcs_ind;
1047} vgmm_nw_feature_support_struct;
1048
1049typedef struct {
1050 kal_uint8 ie_content[MAX_LEN_OF_OPT_IE_MULTI];
1051} vgmm_payload_opt_ie_struct;
1052
1053typedef struct
1054{
1055 ims_ind_enum ims_ind;
1056 emergency_service_ind_enum emergency_service_ind;
1057 location_service_epc_ind_enum location_service_epc_ind;
1058 location_service_cs_ind_enum location_service_cs_ind;
1059 ext_service_request_for_ps_enum ext_service_request_for_ps_ind;
1060 ext_pco_enum ext_pco_ind;
1061 restrict_dcnr_enum restrict_dcnr_ind;
1062 iwk_n26_enum iwk_n26_ind;
1063} emm_nw_feature_support_struct;
1064
1065typedef struct
1066{
1067 ug_ims_ind_enum ims_voice_over_ps_ind;
1068 ug_emergency_service_ind_enum emergency_service_ind;
1069} gmm_nw_feature_support_struct;
1070
1071
1072/* NWSEL <-> ENAS/EAS end */
1073
1074#ifdef __LTE_RAT__
1075typedef struct {
1076 LOCAL_PARA_HDR
1077 errc_sim_protect_purpose_enum purpose;
1078 kal_bool need_protect;
1079} errc_sim_protect_req_struct;
1080#endif //__LTE_RAT__
1081
1082typedef struct
1083{
1084 gmss_rat_enum rat;
1085 plmn_id_struct loc;
1086 prio_class_enum prio_class;
1087
1088} gmss_mru_info_struct;
1089
1090typedef struct {
1091 kal_uint32 num_mcc;
1092 plmn_id_struct mcc[MAX_NUM_OF_MCC];
1093} found_mcc_info_struct;
1094typedef struct
1095{
1096 kal_uint32 entry_index;
1097 irat_system_type_enum rat;
1098 kal_uint8 band;
1099 plmn_id_struct plmn_id;
1100 kal_uint16 channel; // There is no PLMN ID in C2K, only channel number
1101} vzwmru_entry_struct;
1102
1103typedef struct
1104{
1105 domain_id_enum updated_domain; /* The domain to be updated */
1106
1107 reg_state_enum cs_state;
1108 reg_state_enum ps_state;
1109
1110 cell_info_and_rat_struct cell_type;
1111 data_speed_support_enum cell_data_speed_support;
1112
1113 kal_uint8 cause_type; /* 0: defined by spec 1: internal cause, defined by manufacture */
1114 mm_cause_enum reject_cause;
1115
1116 /* Combined attach, CS/PS may register with different PLMN in NAS view
1117 Amid TMO network, if CS is in PLMN-A, PS in PLMN-B, and LTE does not support CS, that means
1118 UE cannot perform CSFB but VoLTE */
1119 lai_struct cs_lai;
1120
1121 kal_bool is_skip; /* Network display optimization (reserved) */
1122
1123 kal_bool dcnr_restricted;
1124 kal_uint8 vgmm_allowed_nssai_length; /* Number of bytes in allowed NSSAI */
1125 kal_uint8 vgmm_allowed_nssai[MAX_LEN_OF_ALL_ALLOWED_NSSAI]; /* Allowed NSSAI */
1126} reg_state_ind_struct;
1127
1128typedef struct
1129{
1130 plmn_id_struct plmn_id;
1131 kal_uint16 band;
1132} plmn_band_struct;
1133
1134#define INVALID_CAMPING_INFO_ID 0xffff
1135#define INVALID_CAMPING_INFO_MASK 0x0f
1136
1137typedef struct
1138{
1139 ue_capability_struct capability; // new capability
1140 rat_enum rat_mode;
1141} ue_capability_update_params_struct;
1142
1143/*
1144 * Structure represents the KAMF key.
1145 */
1146typedef struct {
1147 /* KAMF for deriving new KgNB and NH when required by NRRC.
1148 * MSB of key[0] is the first bit of key. */
1149 kal_uint8 key[NRRC_KAMF_LENGTH];
1150} nrrc_kamf_struct;
1151
1152
1153
1154#define D_MAX_MMEGID_SIZE 2
1155#define D_MTMSI_LEN 4
1156
1157typedef struct
1158{
1159 kal_uint8 value;
1160 kal_uint8 tsc;
1161} nas_ksi_struct;
1162
1163
1164typedef struct {
1165 kal_uint8 length_of_guti;
1166 kal_uint8 type_of_identity;
1167 plmn_id_struct plmn_id;
1168 kal_uint8 mme_gid[D_MAX_MMEGID_SIZE];
1169 kal_uint8 mme_code;
1170 kal_uint8 mtmsi[D_MTMSI_LEN];
1171} guti_struct;
1172
1173
1174#define VGNAS_TAC_LEN 3 /* 5G Tracking Area Code size */
1175#define VGNAS_MAX_TAI_LIST 16 /* Max number of entries in TA list */
1176#define MAX_LADN_INFO 8
1177#define MAX_CRLADN_LEN 808
1178#define MAX_LADN_INFO_LEN 1712
1179
1180/**
1181 * TA structure to store tracking area identity
1182 */
1183typedef struct vgnas_tai_struct {
1184 plmn_id_struct plmn_id;
1185 kal_uint8 ta_code[VGNAS_TAC_LEN];
1186} vgnas_tai_struct;
1187
1188
1189/**
1190* Structure to store different TA lists: registered TAs,
1191* allowed TA list and non-allowed TA list.
1192*/
1193typedef struct vgnas_ta_list_struct {
1194 kal_uint8 number_of_ta;
1195 vgnas_tai_struct ta_list[VGNAS_MAX_TAI_LIST];
1196
1197} vgnas_ta_list_struct;
1198
1199/**
1200* Structure to store LADN information
1201*/
1202typedef struct {
1203 apn_struct dnn;
1204 vgnas_ta_list_struct ta_list;
1205} ladn_info_struct;
1206
1207/**
1208* Structure for LADN information primitive forwarding
1209*/
1210typedef struct {
1211 LOCAL_PARA_HDR
1212 kal_uint8 num_of_ladn_info;
1213 ladn_info_struct ladn_info[MAX_LADN_INFO];
1214
1215 kal_bool is_ladn_raw_data_valid;
1216 kal_uint16 ladn_raw_data_len;
1217 kal_uint8 ladn_raw_data[MAX_LADN_INFO_LEN];
1218
1219} ladn_info_update_ind_struct;
1220
1221/*
1222 * Structure for L4 Context
1223 */
1224typedef struct
1225{
1226 kal_uint8 num_of_ladn_info;
1227 ladn_info_struct ladn_info[MAX_LADN_INFO];
1228
1229 kal_bool is_ladn_raw_data_valid;
1230 kal_uint16 ladn_raw_data_len;
1231 kal_uint8 ladn_raw_data[MAX_LADN_INFO_LEN];
1232} l4ctcm_ladn_info_list_struct;
1233
1234#endif