blob: 6d02f8bd19268e94d11eddb94638547b54fa933a [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) 2018
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 * l4c_nrrc_struct.h
40 *
41 * Project:
42 * --------
43 *
44 *
45 * Description:
46 * ------------
47 * Messages and common definitions for L4C-NRRC interface
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 ****************************************************************************/
54
55#ifndef _L4C_NRRC_STRUCT_H_
56#define _L4C_NRRC_STRUCT_H_
57
58#include "kal_general_types.h"
59#include "kal_public_defs.h"
60#include "ps_public_enum.h"
61#include "ps_public_struct.h"
62#include "mcd_l3_inc_struct.h"
63#include "l3_inc_enums.h"
64#include "nrrc_nvram_def.h"
65#include "l4c_common_enum.h"
66#include "l4c_as_inter_core_def.h"
67
68#ifdef __NR_RAT__
69#define MAX_CUSTOM_NR_COMB_LIST_MAX_LENGTH NVRAM_EF_NRRC_CUSTOM_ENDC_COMB_WHITE_LIST_MAX_LENGTH
70#else
71#define MAX_CUSTOM_NR_COMB_LIST_MAX_LENGTH 2048
72#endif
73
74typedef struct
75{
76 LOCAL_PARA_HDR
77
78 kal_int32 ssRssi_in_qdbm;
79 kal_int32 ssRsrp_in_qdbm;
80 kal_int32 ssRsrq_in_qdb;
81 kal_int32 ssSinr_in_qdb;
82
83 kal_int32 csiRsrp_in_qdbm;
84 kal_int32 csiRsrq_in_qdb;
85 kal_int32 csiSinr_in_qdb;
86
87 kal_uint16 serv_nr_band;
88 l4c_signal_reporting_type_enum signal_report_type;
89 kal_uint8 thres_cross_signal_type; /* Applicable only if is_thres_cross is TRUE.
90 1 - ssRSRP, 2 - ssRSRQ, 3 - ssRSRP + ssRSRQ, 4 - ssSINR, 5 - RSRP + ssSINR, 6 - ssRSRQ + ssSINR, 7 - All three*/
91 kal_int16 ssSrxlev_in_qdb; /* range -32768 ~ 32767, invalid value:0x7fff */
92 kal_int16 ssSqual_in_qdb; /* range -32768 ~ 32767, invalid value:0x7fff */
93} l4c_nrrc_cell_power_level_ind_struct;
94
95
96
97typedef l4c_4g5g_etws_setting_req_struct l4c_nrrc_etws_setting_req_struct;
98
99typedef l4c_4g5g_etws_information_ind_struct l4c_nrrc_etws_information_ind_struct;
100
101
102typedef struct {
103 LOCAL_PARA_HDR
104 kal_uint32 rcv_tick; /* The time tick when SIB9 is received by NRRC */
105 kal_uint64 timeinfo_utc; /* 0~549755813887 */
106 kal_bool is_day_light_saving_time_valid;
107 kal_uint8 day_light_saving_time; /* 2 bits */
108 kal_bool is_leap_seconds_valid;
109 kal_int16 leap_seconds; /* -127~128 */
110 kal_bool is_localtime_offset_valid;
111 kal_int8 localtime_offset; /* -63~64 */
112} l4c_nrrc_time_info_ind_struct;
113
114
115typedef struct
116{
117 kal_bool enable;
118 kal_uint32 t1; // The period to count number of SCG failure event (seconds)
119 kal_uint8 p1; // The specified number of SCG failure event
120 kal_uint32 t2; // Expired time - when to activate SCG after deactivation (seconds)
121} scg_event_failure_config_struct;
122
123typedef struct
124{
125 kal_bool enable;
126 kal_uint32 t1; // The period to count number of SCG release event (seconds)
127 kal_uint8 p1; // The specified number of SCG release event
128 kal_uint32 t2; // Expired time - when to activate SCG after deactivation (seconds)
129} scg_event_release_config_struct;
130
131typedef union {
132 scg_event_failure_config_struct scg_event_failure_config;
133 scg_event_release_config_struct scg_event_release_config;
134} scg_event_config_union;
135
136
137typedef struct {
138 LOCAL_PARA_HDR
139 kal_bool allow_scg_add;
140} l4c_nrrc_endc_deactivate_req_struct;
141
142typedef struct {
143 LOCAL_PARA_HDR
144 scg_event_enum scg_event;
145 scg_event_config_union scg_event_config;
146} l4c_nrrc_scg_event_config_req_struct;
147
148
149typedef struct {
150 LOCAL_PARA_HDR
151 scg_event_enum scg_event;
152 kal_bool endc_deactivate;
153 kal_bool allow_scg_add;
154} l4c_nrrc_scg_event_ind_struct;
155
156typedef struct{
157 LOCAL_PARA_HDR
158 set_plmn_freq_operation_enum operation;
159 plmn_id_struct plmn_id;
160 kal_uint8 num_of_freq;
161 NRARFCN freq[MAX_LTE_SET_STORED_NUM];
162} l4c_nrrc_set_plmn_stored_freq_req_struct;
163
164typedef struct
165{
166 LOCAL_PARA_HDR
167 kal_bool vonr_enabled;
168} l4c_nrrc_ims_config_req_struct;
169
170typedef struct
171{
172 LOCAL_PARA_HDR
173 kal_bool is_voice_over_ims_ongoing;
174} l4c_nrrc_ims_call_status_req_struct;
175
176typedef struct
177{
178 LOCAL_PARA_HDR
179 l4c_source_id_enum src_id;
180 kal_bool is_last;
181 ca_band_comb_list_cmd_type_enum cmd;
182 ca_band_comb_list_type_enum type;
183 kal_char ca_comb_list[MAX_CUSTOM_NR_COMB_LIST_MAX_LENGTH];
184} l4c_nrrc_ca_band_comb_list_req_struct;
185
186typedef struct
187{
188 LOCAL_PARA_HDR
189 l4c_source_id_enum src_id;
190 ca_band_comb_list_cmd_type_enum cmd;
191 kal_bool result;
192 ca_band_comb_list_type_enum type;
193 kal_char ca_comb_list[MAX_CUSTOM_NR_COMB_LIST_MAX_LENGTH];
194} l4c_nrrc_ca_band_comb_list_cnf_struct;
195
196typedef enum
197{
198 NRRC_L4C_CUSTOM_BAR_LIST_ACTION_ADD = 0,
199 NRRC_L4C_CUSTOM_BAR_LIST_ACTION_DELETE,
200 NRRC_L4C_CUSTOM_BAR_LIST_ACTION_QUERY,
201 NRRC_L4C_CUSTOM_BAR_LIST_ACTION_INVALID = 0xff
202} nrrc_l4c_custom_bar_list_action_enum;
203
204typedef enum
205{
206 NRRC_L4C_CUSTOM_BAR_CAUSE_IDLE_CONNECTED,
207 NRRC_L4C_CUSTOM_BAR_CAUSE_CHECK_NEIGHBOR_SIGNAL
208} nrrc_l4c_custom_bar_cause_enum;
209
210typedef struct
211{
212 kal_uint32 narfcn;
213 kal_uint16 bar_time; // Unit: sec
214} nrrc_l4c_bar_freq_info_struct;
215
216typedef struct
217{
218 kal_uint32 narfcn;
219 kal_uint16 pci;
220 kal_uint16 bar_time; // Unit: sec
221} nrrc_l4c_bar_cell_info_struct;
222
223/* MSG_ID_L4C_NRRC_CUSTOM_BAR_LIST_REQ */
224typedef struct
225{
226 LOCAL_PARA_HDR
227 nrrc_l4c_custom_bar_list_action_enum action;
228 nrrc_l4c_custom_bar_cause_enum bar_cause;
229 kal_uint8 bar_freq_num;
230 nrrc_l4c_bar_freq_info_struct bar_freq_info[MAX_L4C_CUSTOM_BAR_FREQ_NUM];
231 kal_uint8 bar_cell_num;
232 nrrc_l4c_bar_cell_info_struct bar_cell_info[MAX_L4C_CUSTOM_BAR_CELL_NUM];
233} l4c_nrrc_custom_bar_list_req_struct;
234
235/* MSG_ID_L4C_NRRC_CUSTOM_BAR_LIST_CNF */
236typedef struct
237{
238 LOCAL_PARA_HDR
239 nrrc_l4c_custom_bar_list_action_enum action;
240 nrrc_l4c_custom_bar_cause_enum bar_cause;
241 kal_uint8 bar_freq_num;
242 nrrc_l4c_bar_freq_info_struct bar_freq_info[MAX_L4C_CUSTOM_BAR_FREQ_NUM];
243 kal_uint8 bar_cell_num;
244 nrrc_l4c_bar_cell_info_struct bar_cell_info[MAX_L4C_CUSTOM_BAR_CELL_NUM];
245} l4c_nrrc_custom_bar_list_cnf_struct;
246
247typedef struct
248{
249 LOCAL_PARA_HDR
250 kal_bool is_endc_drb_existent;
251 kal_bool is_nr_sa_drb_existent;
252} l4c_nrrc_drb_info_ind_struct;
253
254#endif /* _L4C_NRRC_STRUCT_H_ */