blob: b01ab4c8e842d3fa248b7fff9bcbbc1bc36a2316 [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) 2016
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_errc_struct.h
40 *
41 * Project:
42 * --------
43 * UMOLY
44 *
45 * Description:
46 * ------------
47 * Messages and common definitions for L4C-ERRC interface
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 * ==========================================================================
54 ****************************************************************************/
55
56
57#ifndef _L4C_ERRC_STRUCT_H_
58#define _L4C_ERRC_STRUCT_H_
59
60#include "kal_general_types.h"
61#include "kal_public_defs.h"
62#include "mcd_l3_inc_struct.h"
63#include "vdm_l4c_struct.h"
64
65#define L4C_ERRC_WLAN_MAX_MEAS_OBJ_BAND_NUM 2
66#define L4C_ERRC_WLAN_MAX_WLAN_NUM 32
67#define L4C_ERRC_WLAN_MAX_CARR_INFO_NUM 8
68#define L4C_ERRC_WLAN_MAX_CARR_INFO_CHANNEL_NUM 16
69#define L4C_ERRC_WLAN_MAX_MEAS_OBJECT_NUM 32
70#define L4C_ERRC_WLAN_MAX_MEAS_RESULT_NUM 33
71
72#define L4C_ERRC_WLAN_RSSI_NEG_INFINITY -128
73#define L4C_ERRC_WLAN_RSSI_POS_INFINITY 127
74
75typedef enum
76{
77 L4C_ERRC_WLAN_BAND_2_DOT_4,
78 L4C_ERRC_WLAN_BAND_5
79} l4c_errc_wlan_band_enum;
80
81typedef enum
82{
83 L4C_ERRC_WLAN_LWA_CONNECTION_SUCCESS,
84 L4C_ERRC_WLAN_LWA_CONNECTION_FAILURE
85} l4c_errc_wlan_lwa_connect_result_enum;
86
87typedef enum
88{
89 L4C_ERRC_WLAN_LWA_FAIL_CAUSE_RADIO_LINK_PROBLEM,
90 L4C_ERRC_WLAN_LWA_FAIL_CAUSE_UE_INTERNAL_PROBLEM
91} l4c_errc_wlan_lwa_failure_cause_enum;
92
93typedef enum
94{
95 L4C_ERRC_WLAN_COUNTRY_CODE_USA,
96 L4C_ERRC_WLAN_COUNTRY_CODE_EUROPE,
97 L4C_ERRC_WLAN_COUNTRY_CODE_JAPAN,
98 L4C_ERRC_WLAN_COUNTRY_CODE_GLOBAL,
99} l4c_errc_wlan_country_code_enum;
100
101typedef struct
102{
103 /* Length 0 means that ssid is not present. */
104 kal_uint8 ssid_len;
105 kal_uint8 ssid[32];
106
107 kal_bool bssid_valid;
108 kal_uint8 bssid[6];
109
110 kal_bool hessid_valid;
111 kal_uint8 hessid[6];
112} l4c_errc_wlan_id_struct;
113
114typedef struct
115{
116 kal_bool operating_class_valid;
117 kal_uint8 operating_class;
118
119 kal_bool country_code_valid;
120 l4c_errc_wlan_country_code_enum country_code;
121
122 /* Length 0 means that the list is not present. */
123 kal_uint8 wlan_channel_list_len;
124 kal_uint8 wlan_channel_list[L4C_ERRC_WLAN_MAX_CARR_INFO_CHANNEL_NUM];
125} l4c_errc_wlan_carrier_info_struct;
126
127typedef struct
128{
129 kal_bool report_carrier_info;
130 kal_bool report_available_admission_capacity;
131 kal_bool report_backhaul_dl_bw;
132 kal_bool report_backhaul_ul_bw;
133 kal_bool report_channel_utilization;
134 kal_bool report_station_count;
135} l4c_errc_wlan_report_quantity_struct;
136
137typedef struct
138{
139 kal_uint8 meas_object_id;
140
141 kal_uint8 wlan_list_len;
142 l4c_errc_wlan_id_struct wlan_list[L4C_ERRC_WLAN_MAX_WLAN_NUM];
143
144 /* Length 0 means that the list is not present. */
145 kal_uint8 wlan_band_list_len;
146 l4c_errc_wlan_band_enum wlan_band_list[L4C_ERRC_WLAN_MAX_MEAS_OBJ_BAND_NUM];
147
148 /* Length 0 means that the list is not present. */
149 kal_uint8 carrier_info_list_len;
150 l4c_errc_wlan_carrier_info_struct carrier_info_list[L4C_ERRC_WLAN_MAX_CARR_INFO_NUM];
151
152 l4c_errc_wlan_report_quantity_struct report_quantities;
153} l4c_errc_wlan_meas_object_struct;
154
155typedef struct
156{
157 l4c_errc_wlan_id_struct wlan_id;
158 /* RSSI has two special values: negative infinity (-128) and positive infinity (127).
159 Otherwise value range is [-100, 39] */
160 kal_int8 rssi;
161 l4c_errc_wlan_band_enum band;
162 kal_bool connected;
163
164 kal_bool carrier_info_valid;
165 l4c_errc_wlan_carrier_info_struct carrier_info;
166
167 kal_bool available_admission_capacity_valid;
168 kal_uint16 available_admission_capacity;
169
170 kal_bool backhaul_dl_bw_valid;
171 kal_uint64 backhaul_dl_bw;
172
173 kal_bool backhaul_ul_bw_valid;
174 kal_uint64 backhaul_ul_bw;
175
176 kal_bool channel_utilization_valid;
177 kal_uint8 channel_utilization;
178
179 kal_bool station_count_valid;
180 kal_uint16 station_count;
181} l4c_errc_wlan_meas_result_struct;
182
183/* MSG_ID_L4C_ERRC_WLAN_CAPABILITY_IND */
184typedef struct
185{
186 LOCAL_PARA_HDR
187 kal_uint8 wlan_mac_address[6];
188 kal_bool band_2_dot_4_supported;
189 kal_bool band_5_supported;
190} l4c_errc_wlan_capability_ind_struct;
191
192/* MSG_ID_L4C_ERRC_WLAN_LWA_CONNECT_REQ */
193typedef struct
194{
195 LOCAL_PARA_HDR
196 kal_uint8 wlan_mobility_set_list_len;
197 l4c_errc_wlan_id_struct wlan_mobility_set_list[L4C_ERRC_WLAN_MAX_WLAN_NUM];
198
199 /* S-Kwt encoding:
200 bits 0..7 encoded in s_kwt[0]
201 bits 8..15 encoded in s_kwt[1]
202 ...
203 First bit of S-Kwt is the MSB of s_kwt[0]. */
204 kal_bool s_kwt_valid;
205 kal_uint8 s_kwt[32];
206} l4c_errc_wlan_lwa_connect_req_struct;
207
208/* MSG_ID_L4C_ERRC_WLAN_LWA_CONNECT_CNF */
209typedef struct
210{
211 LOCAL_PARA_HDR
212 l4c_errc_wlan_lwa_connect_result_enum result;
213 l4c_errc_wlan_lwa_failure_cause_enum failure_cause;
214} l4c_errc_wlan_lwa_connect_cnf_struct;
215
216/* MSG_ID_L4C_ERRC_WLAN_LWA_LOST_IND */
217typedef struct
218{
219 LOCAL_PARA_HDR
220 l4c_errc_wlan_lwa_failure_cause_enum cause;
221} l4c_errc_wlan_lwa_lost_ind_struct;
222
223/* MSG_ID_L4C_ERRC_WLAN_MEASUREMENT_REQ */
224typedef struct
225{
226 LOCAL_PARA_HDR
227 kal_uint8 filter_coefficient;
228
229 kal_uint8 meas_object_list_len;
230 l4c_errc_wlan_meas_object_struct meas_object_list[L4C_ERRC_WLAN_MAX_MEAS_OBJECT_NUM];
231} l4c_errc_wlan_measurement_req_struct;
232
233/* MSG_ID_L4C_ERRC_WLAN_MEASUREMENT_IND */
234typedef struct
235{
236 LOCAL_PARA_HDR
237 kal_uint8 meas_object_id;
238
239 kal_uint8 meas_result_list_len;
240 l4c_errc_wlan_meas_result_struct meas_result_list[L4C_ERRC_WLAN_MAX_MEAS_RESULT_NUM];
241} l4c_errc_wlan_measurement_ind_struct;
242
243typedef struct{
244 LOCAL_PARA_HDR
245 set_plmn_freq_operation_enum operation;
246 plmn_id_struct plmn_id;
247 kal_uint8 num_of_freq;
248 EARFCN freq[MAX_LTE_SET_STORED_NUM];
249} l4c_errc_set_plmn_stored_freq_req_struct;
250
251/* MSG_ID_L4C_ERRC_IMS_CC_CALL_PROGRESS_IND */
252typedef struct
253{
254 LOCAL_PARA_HDR
255 /* Must sync with vdm_l4c_ims_cc_call_progress_ind_struct */
256 kal_uint8 call_id;
257 kal_uint8 msg_type;
258 l4c_ecpi_info_struct ecpi_info;
259} l4c_errc_ims_cc_call_progress_ind_struct;
260
261#endif /* _L4C_ERRC_STRUCT_H_ */