rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 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 | * |
| 38 | * Filename: |
| 39 | * --------- |
| 40 | * wipc_iwlan_struct.h |
| 41 | * |
| 42 | * Project: |
| 43 | * -------- |
| 44 | * UMOLYA |
| 45 | * |
| 46 | * Description: |
| 47 | * ------------ |
| 48 | * Structs be used in Interfaces of IWLAN - WIPC. |
| 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 | * |
| 61 | *---------------------------------------------------------------------------- |
| 62 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 63 | *============================================================================ |
| 64 | ****************************************************************************/ |
| 65 | |
| 66 | #ifndef _WIPC_IWLAN_STRUCT_H |
| 67 | #define _WIPC_IWLAN_STRUCT_H |
| 68 | /****************************************************************************/ |
| 69 | |
| 70 | #include "kal_general_types.h" |
| 71 | #include "kal_public_defs.h" |
| 72 | #include "iwlan_errc_struct.h" |
| 73 | |
| 74 | /****************************************************************************/ |
| 75 | |
| 76 | #define IWLAN_MEAS_CHNLUTIL_EN (1) |
| 77 | #define IWLAN_MEAS_BACKHDL_EN (2) |
| 78 | #define IWLAN_MEAS_BACHHUL_EN (4) |
| 79 | #define IWLAN_MEAS_RSSI_EN (8) |
| 80 | |
| 81 | #define LWAD_IWLAN_WLAN_MAX_MEAS_OBJ_BAND_NUM 2 |
| 82 | #define LWAD_IWLAN_WLAN_MAX_WLAN_NUM 32 |
| 83 | #define LWAD_IWLAN_WLAN_MAX_CARR_INFO_NUM 8 |
| 84 | #define LWAD_IWLAN_WLAN_MAX_CARR_INFO_CHANNEL_NUM 16 |
| 85 | #define LWAD_IWLAN_WLAN_MAX_MEAS_OBJECT_NUM 10 |
| 86 | #define LWAD_IWLAN_WLAN_MAX_MEAS_RESULT_NUM 20 |
| 87 | |
| 88 | #define LWAD_IWLAN_WLAN_RSSI_NEG_INFINITY -128 |
| 89 | #define LWAD_IWLAN_WLAN_RSSI_POS_INFINITY 127 |
| 90 | |
| 91 | /****************************************************************************/ |
| 92 | |
| 93 | typedef enum |
| 94 | { |
| 95 | ASSOCIATE, |
| 96 | DE_ASSOCIATE, |
| 97 | ABORT |
| 98 | } cs_iwlan_associate_state_enum; |
| 99 | |
| 100 | typedef enum |
| 101 | { |
| 102 | UNDEFINED, |
| 103 | NO_ASSOCIATE, |
| 104 | MEAS_CAPABILITY_ERR |
| 105 | } iwlan_wlfw_fail_cause_enum; |
| 106 | |
| 107 | typedef enum |
| 108 | { |
| 109 | STOP_MEAS, |
| 110 | START_MEAS |
| 111 | } iwlan_wlfw_start_action_enum; |
| 112 | |
| 113 | typedef enum |
| 114 | { |
| 115 | LWAD_IWLAN_CONN_TYPE_LWA, |
| 116 | LWAD_IWLAN_CONN_TYPE_RCLWI, |
| 117 | LWAD_IWLAN_CONN_TYPE_LWIP |
| 118 | } iwlan_connection_type_enum; |
| 119 | |
| 120 | typedef enum |
| 121 | { |
| 122 | LWAD_IWLAN_WLAN_BAND_2_DOT_4, |
| 123 | LWAD_IWLAN_WLAN_BAND_5 |
| 124 | } lwad_iwlan_wlan_band_enum; |
| 125 | |
| 126 | typedef enum |
| 127 | { |
| 128 | LWAD_IWLAN_WLAN_LWA_CONNECTION_SUCCESS, |
| 129 | LWAD_IWLAN_WLAN_LWA_CONNECTION_FAILURE |
| 130 | } lwad_iwlan_wlan_lwa_connect_result_enum; |
| 131 | |
| 132 | typedef enum |
| 133 | { |
| 134 | LWAD_IWLAN_WLAN_LWA_FAIL_CAUSE_RADIO_LINK_PROBLEM, |
| 135 | LWAD_IWLAN_WLAN_LWA_FAIL_CAUSE_UE_INTERNAL_PROBLEM, |
| 136 | LWAD_IWLAN_WLAN_LWA_FAIL_CAUSE_SHM_NOT_RDY_PROBLEM |
| 137 | } lwad_iwlan_wlan_lwa_failure_cause_enum; |
| 138 | |
| 139 | typedef enum |
| 140 | { |
| 141 | LWAD_IWLAN_WLAN_COUNTRY_CODE_USA, |
| 142 | LWAD_IWLAN_WLAN_COUNTRY_CODE_EUROPE, |
| 143 | LWAD_IWLAN_WLAN_COUNTRY_CODE_JAPAN, |
| 144 | LWAD_IWLAN_WLAN_COUNTRY_CODE_GLOBAL, |
| 145 | } lwad_iwlan_wlan_country_code_enum; |
| 146 | |
| 147 | typedef struct |
| 148 | { |
| 149 | /* Length 0 means that ssid is not present. */ |
| 150 | kal_uint8 opt_ssid_r12; |
| 151 | struct cs_ssid_r12_struct { |
| 152 | kal_uint8 oct_len; |
| 153 | kal_uint8 octs[32]; |
| 154 | } ssid_r12; |
| 155 | |
| 156 | kal_uint8 opt_bssid_r12; |
| 157 | kal_uint8 bssid_r12[6]; |
| 158 | |
| 159 | kal_uint8 opt_hessid_r12; |
| 160 | kal_uint8 hessid_r12[6]; |
| 161 | } cs_iwlan_wlanidlist_r12_struct; |
| 162 | |
| 163 | /* MSG_ID_CS_IWLAN_ASSOCIATE_REQ */ |
| 164 | typedef struct |
| 165 | { |
| 166 | LOCAL_PARA_HDR |
| 167 | kal_uint8 action; |
| 168 | kal_uint8 status; |
| 169 | cs_iwlan_wlanidlist_r12_struct identifier; |
| 170 | kal_uint8 measurement; |
| 171 | } cs_iwlan_associate_req_struct; |
| 172 | |
| 173 | typedef struct |
| 174 | { |
| 175 | /* Length 0 means that ssid is not present. */ |
| 176 | kal_uint8 ssid_len; |
| 177 | kal_uint8 ssid[32]; |
| 178 | |
| 179 | kal_bool bssid_valid; |
| 180 | kal_uint8 bssid[6]; |
| 181 | |
| 182 | kal_bool hessid_valid; |
| 183 | kal_uint8 hessid[6]; |
| 184 | } lwad_iwlan_wlan_id_struct; |
| 185 | |
| 186 | typedef struct |
| 187 | { |
| 188 | kal_bool operating_class_valid; |
| 189 | kal_uint8 operating_class; |
| 190 | |
| 191 | kal_bool country_code_valid; |
| 192 | lwad_iwlan_wlan_country_code_enum country_code; |
| 193 | |
| 194 | /* Length 0 means that the list is not present. */ |
| 195 | kal_uint8 wlan_channel_list_len; |
| 196 | kal_uint8 wlan_channel_list[LWAD_IWLAN_WLAN_MAX_CARR_INFO_CHANNEL_NUM]; |
| 197 | } lwad_iwlan_wlan_carrier_info_struct; |
| 198 | |
| 199 | typedef struct |
| 200 | { |
| 201 | kal_bool report_carrier_info; |
| 202 | kal_bool report_available_admission_capacity; |
| 203 | kal_bool report_backhaul_dl_bw; |
| 204 | kal_bool report_backhaul_ul_bw; |
| 205 | kal_bool report_channel_utilization; |
| 206 | kal_bool report_station_count; |
| 207 | } lwad_iwlan_wlan_report_quantity_struct; |
| 208 | |
| 209 | typedef struct |
| 210 | { |
| 211 | kal_uint8 meas_object_id; |
| 212 | |
| 213 | kal_uint8 wlan_list_len; |
| 214 | lwad_iwlan_wlan_id_struct wlan_list[LWAD_IWLAN_WLAN_MAX_WLAN_NUM]; |
| 215 | |
| 216 | /* Length 0 means that the list is not present. */ |
| 217 | kal_uint8 wlan_band_list_len; |
| 218 | lwad_iwlan_wlan_band_enum wlan_band_list[LWAD_IWLAN_WLAN_MAX_MEAS_OBJ_BAND_NUM]; |
| 219 | |
| 220 | /* Length 0 means that the list is not present. */ |
| 221 | kal_uint8 carrier_info_list_len; |
| 222 | lwad_iwlan_wlan_carrier_info_struct carrier_info_list[LWAD_IWLAN_WLAN_MAX_CARR_INFO_NUM]; |
| 223 | |
| 224 | lwad_iwlan_wlan_report_quantity_struct report_quantities; |
| 225 | } lwad_iwlan_wlan_meas_object_struct; |
| 226 | |
| 227 | typedef struct |
| 228 | { |
| 229 | lwad_iwlan_wlan_id_struct wlan_id; |
| 230 | /* RSSI has two special values: negative infinity (-128) and positive infinity (127). |
| 231 | Otherwise value range is [-100, 39] */ |
| 232 | kal_int8 rssi; |
| 233 | lwad_iwlan_wlan_band_enum band; |
| 234 | kal_bool connected; |
| 235 | |
| 236 | kal_bool carrier_info_valid; |
| 237 | lwad_iwlan_wlan_carrier_info_struct carrier_info; |
| 238 | |
| 239 | kal_bool available_admission_capacity_valid; |
| 240 | kal_uint16 available_admission_capacity; |
| 241 | |
| 242 | kal_bool backhaul_dl_bw_valid; |
| 243 | kal_uint8 backhaul_dl_bw; |
| 244 | |
| 245 | kal_bool backhaul_ul_bw_valid; |
| 246 | kal_uint8 backhaul_ul_bw; |
| 247 | |
| 248 | kal_bool channel_utilization_valid; |
| 249 | kal_uint8 channel_utilization; |
| 250 | |
| 251 | kal_bool station_count_valid; |
| 252 | kal_uint16 station_count; |
| 253 | } lwad_iwlan_wlan_meas_result_struct; |
| 254 | |
| 255 | /* MSG_ID_IWLAN_WLFW_LWI_CONF_REQ */ |
| 256 | typedef struct |
| 257 | { |
| 258 | LOCAL_PARA_HDR |
| 259 | kal_uint8 version; |
| 260 | kal_uint8 transaction_id; |
| 261 | kal_uint8 measurement_switch; |
| 262 | kal_uint8 Thresh_ChUtilWLAN_High; |
| 263 | kal_uint8 Thresh_ChUtilWLAN_Low; |
| 264 | kal_uint8 Thresh_BackhRateDLWLAN_High; |
| 265 | kal_uint8 Thresh_BackhRateDLWLAN_Low; |
| 266 | kal_uint8 Thresh_BackhRateULWLAN_High; |
| 267 | kal_uint8 Thresh_BackhRateULWLAN_Low; |
| 268 | kal_uint8 Thresh_WLANRSSI_High; |
| 269 | kal_uint8 Thresh_WLANRSSI_Low; |
| 270 | kal_uint8 T_steering_WLAN; |
| 271 | kal_uint8 T_roaming; |
| 272 | } iwlan_wlfw_lwi_conf_req_struct; |
| 273 | |
| 274 | /* MSG_ID_IWLAN_WLFW_LWI_CONF_CNF */ |
| 275 | typedef struct |
| 276 | { |
| 277 | LOCAL_PARA_HDR |
| 278 | kal_uint8 version; |
| 279 | kal_uint8 transaction_id; |
| 280 | kal_uint8 result; |
| 281 | kal_uint8 cause; |
| 282 | kal_uint8 measurement_switch; |
| 283 | } iwlan_wlfw_lwi_conf_cnf_struct; |
| 284 | |
| 285 | /* MSG_ID_IWLAN_WLFW_LWI_START_STOP_REQ */ |
| 286 | typedef struct |
| 287 | { |
| 288 | LOCAL_PARA_HDR |
| 289 | kal_uint8 version; |
| 290 | kal_uint8 action; |
| 291 | cs_iwlan_wlanidlist_r12_struct identifier; |
| 292 | kal_uint8 measurement_switch; |
| 293 | } iwlan_wlfw_lwi_satrt_stop_req_struct; |
| 294 | |
| 295 | /* MSG_ID_IWLAN_WLFW_LWI_START_STOP_CNF */ |
| 296 | typedef struct |
| 297 | { |
| 298 | LOCAL_PARA_HDR |
| 299 | kal_uint8 version; |
| 300 | kal_uint8 result; |
| 301 | kal_uint8 cause; |
| 302 | kal_uint8 measurement_switch; |
| 303 | } iwlan_wlfw_lwi_satrt_stop_cnf_struct; |
| 304 | |
| 305 | /* MSG_ID_IWLAN_WLFW_LWI_MEAS_IND */ |
| 306 | typedef struct |
| 307 | { |
| 308 | LOCAL_PARA_HDR |
| 309 | kal_uint8 version; |
| 310 | kal_uint8 transaction_id; |
| 311 | kal_uint8 lwi_lte_to_wlan_status; |
| 312 | kal_uint8 lwi_wlan_to_lte_status; |
| 313 | cs_iwlan_wlanidlist_r12_struct identifier; |
| 314 | kal_uint8 ChUtilWLAN; |
| 315 | kal_uint8 BackhRateDLWLAN; |
| 316 | kal_uint8 BackhRateULWLAN; |
| 317 | kal_uint8 WLANRSSI; |
| 318 | } iwlan_wlfw_lwi_meas_ind_struct; |
| 319 | |
| 320 | /* MSG_ID_IWLAN_WLFW_MEAS_CAPA_FAIL_IND */ |
| 321 | typedef struct |
| 322 | { |
| 323 | LOCAL_PARA_HDR |
| 324 | kal_uint8 version; |
| 325 | kal_uint8 transaction_id; |
| 326 | cs_iwlan_wlanidlist_r12_struct identifier; |
| 327 | kal_uint8 cause; |
| 328 | kal_uint8 measurement_switch; |
| 329 | } iwlan_wlfw_meas_capa_fail_ind_struct; |
| 330 | |
| 331 | /* MSG_ID_WIPC_IWLAN_WLAN_MEASUREMENT_IND */ |
| 332 | typedef struct |
| 333 | { |
| 334 | LOCAL_PARA_HDR |
| 335 | kal_uint8 filter_coefficient; |
| 336 | |
| 337 | kal_uint8 meas_object_list_index; |
| 338 | kal_uint8 meas_object_list_len; |
| 339 | iwlan_errc_wlan_meas_object_struct meas_object; |
| 340 | } wipc_iwlan_wlan_measurement_ind_struct; |
| 341 | |
| 342 | #if 0 |
| 343 | /* under construction !*/ |
| 344 | /* under construction !*/ |
| 345 | /* under construction !*/ |
| 346 | /* under construction !*/ |
| 347 | /* under construction !*/ |
| 348 | #endif |
| 349 | |
| 350 | /* MSG_ID_WIPC_IWLAN_WLAN_MEASUEMENT_REQ */ |
| 351 | typedef struct |
| 352 | { |
| 353 | LOCAL_PARA_HDR |
| 354 | kal_uint8 meas_object_id; |
| 355 | kal_uint8 meas_result_list_total; |
| 356 | |
| 357 | kal_uint8 meas_result_list_start_index; |
| 358 | kal_uint8 meas_result_list_len; |
| 359 | lwad_iwlan_wlan_meas_result_struct meas_result_list[LWAD_IWLAN_WLAN_MAX_MEAS_RESULT_NUM]; |
| 360 | } wipc_iwlan_wlan_measurement_req_struct; |
| 361 | |
| 362 | /* MSG_ID_WIPC_IWLAN_WLAN_LWA_CONNECT_IND */ |
| 363 | typedef struct |
| 364 | { |
| 365 | LOCAL_PARA_HDR |
| 366 | kal_uint8 connect_type; |
| 367 | kal_uint8 wlan_mobility_set_list_len; |
| 368 | lwad_iwlan_wlan_id_struct wlan_mobility_set_list[LWAD_IWLAN_WLAN_MAX_WLAN_NUM]; |
| 369 | |
| 370 | /* S-Kwt encoding: |
| 371 | bits 0..7 encoded in s_kwt[0] |
| 372 | bits 8..15 encoded in s_kwt[1] |
| 373 | ... |
| 374 | First bit of S-Kwt is the MSB of s_kwt[0]. */ |
| 375 | kal_bool s_kwt_valid; |
| 376 | kal_uint8 s_kwt[32]; |
| 377 | } wipc_iwlan_wlan_lwa_connect_ind_struct; |
| 378 | |
| 379 | /* MSG_ID_WIPC_IWLAN_WLAN_LWA_CONNECT_RSP */ |
| 380 | typedef struct |
| 381 | { |
| 382 | LOCAL_PARA_HDR |
| 383 | lwad_iwlan_wlan_lwa_connect_result_enum result; |
| 384 | lwad_iwlan_wlan_lwa_failure_cause_enum failure_cause; |
| 385 | lwad_iwlan_wlan_id_struct wlan_id; |
| 386 | } wipc_iwlan_wlan_lwa_connect_rsp_struct; |
| 387 | |
| 388 | /* MSG_ID_WIPC_IWLAN_WLAN_LWA_DISCONNECT_IND */ |
| 389 | #if 0 |
| 390 | /* under construction !*/ |
| 391 | /* under construction !*/ |
| 392 | /* under construction !*/ |
| 393 | /* under construction !*/ |
| 394 | #endif |
| 395 | |
| 396 | /* MSG_ID_WIPC_IWLAN_WLAN_LWA_DISCONNECT_RSP */ |
| 397 | #if 0 |
| 398 | /* under construction !*/ |
| 399 | /* under construction !*/ |
| 400 | /* under construction !*/ |
| 401 | /* under construction !*/ |
| 402 | #endif |
| 403 | |
| 404 | /* MSG_ID_WIPC_IWLAN_WLAN_LWA_LOST_REQ */ |
| 405 | typedef struct |
| 406 | { |
| 407 | LOCAL_PARA_HDR |
| 408 | lwad_iwlan_wlan_lwa_failure_cause_enum cause; |
| 409 | } wipc_iwlan_wlan_lwa_lost_req_struct; |
| 410 | |
| 411 | /****************************************************************************/ |
| 412 | #endif /* _WIPC_IWLAN_STRUCT_H */ |