yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [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) 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 | * Filename: |
| 38 | * --------- |
| 39 | * mbim_defs.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * MT6280 |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * This file is intends for MBCI implementation. |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | *============================================================================== |
| 54 | * HISTORY |
| 55 | * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 56 | *------------------------------------------------------------------------------ |
| 57 | * removed! |
| 58 | * |
| 59 | * removed! |
| 60 | * removed! |
| 61 | * removed! |
| 62 | * |
| 63 | * removed! |
| 64 | * removed! |
| 65 | * removed! |
| 66 | * |
| 67 | * removed! |
| 68 | * removed! |
| 69 | * removed! |
| 70 | * |
| 71 | * removed! |
| 72 | * removed! |
| 73 | * removed! |
| 74 | * removed! |
| 75 | * |
| 76 | * removed! |
| 77 | * removed! |
| 78 | * removed! |
| 79 | * |
| 80 | * removed! |
| 81 | * removed! |
| 82 | * removed! |
| 83 | * |
| 84 | * removed! |
| 85 | * removed! |
| 86 | * removed! |
| 87 | * removed! |
| 88 | * removed! |
| 89 | * removed! |
| 90 | * removed! |
| 91 | * removed! |
| 92 | * removed! |
| 93 | * removed! |
| 94 | * removed! |
| 95 | * removed! |
| 96 | * removed! |
| 97 | * removed! |
| 98 | * removed! |
| 99 | * removed! |
| 100 | * removed! |
| 101 | * removed! |
| 102 | * removed! |
| 103 | * removed! |
| 104 | * removed! |
| 105 | * removed! |
| 106 | * removed! |
| 107 | * removed! |
| 108 | * removed! |
| 109 | * removed! |
| 110 | * |
| 111 | *------------------------------------------------------------------------------ |
| 112 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 113 | *============================================================================== |
| 114 | *******************************************************************************/ |
| 115 | |
| 116 | /******************************************************************************** |
| 117 | * Copyright Statement: |
| 118 | * -------------------- |
| 119 | * |
| 120 | * This product has been developed using a protocol stack |
| 121 | * developed by Sasken Communication Technologies Limited. |
| 122 | * |
| 123 | ********************************************************************************/ |
| 124 | |
| 125 | |
| 126 | #ifndef _MBIM_DEFS_H |
| 127 | #define _MBIM_DEFS_H |
| 128 | |
| 129 | #define MBIM_MAX_SUPPORT_TRANSACTION 40 |
| 130 | |
| 131 | #define MBIM_MAX_SESSION (GPRS_MAX_PDP_SUPPORT >> 1) |
| 132 | |
| 133 | #define MBIM_MESSAGE_INDEX_NONE 0 |
| 134 | |
| 135 | #define MBIM_CONTEXT_ID_APPEND 0xFFFFFFFF |
| 136 | |
| 137 | #define MBIM_RSSI_DEFAULT 0 |
| 138 | |
| 139 | #define MBIM_ERROR_RATE_DEFAULT 0 |
| 140 | |
| 141 | #define MBIM_SIGNAL_STRENGTH_INTERVAL_DEFAULT 0 |
| 142 | |
| 143 | #define MBIM_RSSI_DISABLE 0xFFFFFFFF |
| 144 | |
| 145 | typedef enum { |
| 146 | MBIM_UUID_BASIC_CONNECT = 0, |
| 147 | MBIM_UUID_SMS, |
| 148 | MBIM_UUID_USSD, |
| 149 | MBIM_UUID_PHONEBOOK, |
| 150 | MBIM_UUID_STK, |
| 151 | MBIM_UUID_AUTH, |
| 152 | MBIM_UUID_DSS, |
| 153 | MBIM_UUID_MS_HOSTSHUTDOWN, |
| 154 | MBIM_UUID_MTK_VENDOR_CMD, |
| 155 | // Add new UUID in here |
| 156 | MBIM_UUID_MAX, |
| 157 | MBIM_UUID_UNKNOW = 0xFF |
| 158 | } mbim_uuid_enum; |
| 159 | |
| 160 | //extern const kal_uint8 *mbim_uuid_tbl[MBIM_UUID_MAX]; |
| 161 | extern const kal_uint8 mbim_uuid_tbl[MBIM_UUID_MAX][16]; |
| 162 | |
| 163 | typedef enum { |
| 164 | MBIM_CONTEXT_TYPE_NONE = 0, |
| 165 | MBIM_CONTEXT_TYPE_INTERNET, |
| 166 | MBIM_CONTEXT_TYPE_VPN, |
| 167 | MBIM_CONTEXT_TYPE_VOICE, |
| 168 | MBIM_CONTEXT_TYPE_VIDEO_SHARE, |
| 169 | MBIM_CONTEXT_TYPE_PURCHASE, |
| 170 | MBIM_CONTEXT_TYPE_IMS, |
| 171 | MBIM_CONTEXT_TYPE_MMS, |
| 172 | MBIM_CONTEXT_TYPE_LOCAL, |
| 173 | MBIM_CONTEXT_TYPE_MAX, |
| 174 | MBIM_CONTEXT_TYPE_UNKNOW = 0xFF |
| 175 | } mbim_context_type_enum; |
| 176 | |
| 177 | extern const kal_uint8 mbim_context_type_tbl[MBIM_CONTEXT_TYPE_MAX][16]; |
| 178 | |
| 179 | /*------------------MBIM CID BEGIN--------------------------*/ |
| 180 | #define MBIM_CID_RESERVE_0 0 |
| 181 | |
| 182 | // BASIC_CONNECT |
| 183 | typedef enum { |
| 184 | MBIM_CID_DEVICE_CAPS = 1, |
| 185 | MBIM_CID_SUBSCRIBER_READY_STATUS = 2, |
| 186 | MBIM_CID_RADIO_STATE = 3, |
| 187 | MBIM_CID_PIN = 4, |
| 188 | MBIM_CID_PIN_LIST = 5, |
| 189 | MBIM_CID_HOME_PROVIDER = 6, |
| 190 | MBIM_CID_PREFERRED_PROVIDER = 7, |
| 191 | MBIM_CID_VISIBLE_PROVIDER = 8, |
| 192 | MBIM_CID_REGISTER_STATE = 9, |
| 193 | MBIM_CID_PACKET_SERVICE = 10, |
| 194 | MBIM_CID_SIGNAL_STATE = 11, |
| 195 | MBIM_CID_CONNECT = 12, |
| 196 | MBIM_CID_PROVISIONED_CONTEXTS = 13, |
| 197 | MBIM_CID_SEVICE_ACTIVATION = 14, |
| 198 | MBIM_CID_IP_CONFIGURATION = 15, |
| 199 | MBIM_CID_DEVICE_SERVICE = 16, |
| 200 | MBIM_CID_RESERVE_17 = 17, |
| 201 | MBIM_CID_RESERVE_18 = 18, |
| 202 | MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST = 19, |
| 203 | MBIM_CID_PACKET_STATISTIC = 20, |
| 204 | MBIM_CID_NETWORK_IDLE_HINT = 21, |
| 205 | MBIM_CID_EMERGENCY_MODE = 22, |
| 206 | MBIM_CID_IP_PACKET_FILTERS = 23, |
| 207 | MBIM_CID_MULTICARRIER_PROVIDERS = 24, |
| 208 | MBIM_CID_BASIC_CONNECT_MAX |
| 209 | } mbim_cid_basic_connect_enum; |
| 210 | |
| 211 | // SMS |
| 212 | typedef enum { |
| 213 | MBIM_CID_SMS_CONFIGURATION = 1, |
| 214 | MBIM_CID_SMS_READ = 2, |
| 215 | MBIM_CID_SMS_SEND = 3, |
| 216 | MBIM_CID_SMS_DELETE = 4, |
| 217 | MBIM_CID_SMS_MESSAGE_STORE_STATUS = 5, |
| 218 | MBIM_CID_SMS_MAX |
| 219 | } mbim_cid_sms_enum; |
| 220 | |
| 221 | // USSD |
| 222 | typedef enum { |
| 223 | MBIM_CID_USSD = 1, |
| 224 | MBIM_CID_USSD_MAX |
| 225 | } mbim_cid_ussd_enum; |
| 226 | |
| 227 | // PHONEBOOK |
| 228 | typedef enum { |
| 229 | MBIM_CID_PHONEBOOK_CONFIGURATION = 1, |
| 230 | MBIM_CID_PHONEBOOK_READ = 2, |
| 231 | MBIM_CID_PHONEBOOK_DELETE = 3, |
| 232 | MBIM_CID_PHONEBOOK_WRITE = 4, |
| 233 | MBIM_CID_PHONEBOOK_MAX |
| 234 | } mbim_cid_phonebook_enum; |
| 235 | |
| 236 | // STK |
| 237 | typedef enum { |
| 238 | MBIM_CID_STK_PAC = 1, |
| 239 | MBIM_CID_STK_TERMINAL_RESPONSE = 2, |
| 240 | MBIM_CID_STK_ENVELOPE = 3, |
| 241 | MBIM_CID_STK_MAX |
| 242 | } mbim_cid_stk_enum; |
| 243 | |
| 244 | // AUTH |
| 245 | typedef enum { |
| 246 | MBIM_CID_AKA_AUTH = 1, |
| 247 | MBIM_CID_AKAP_AUTH = 2, |
| 248 | MBIM_CID_SIM_AUTH = 3, |
| 249 | MBIM_CID_AUTH_MAX |
| 250 | } mbim_cid_auth_enum; |
| 251 | |
| 252 | // DSS |
| 253 | typedef enum { |
| 254 | MBIM_CID_DSS_CONNECT = 1, |
| 255 | MBIM_CID_DSS_MAX |
| 256 | } mbim_cid_dss_enum; |
| 257 | |
| 258 | // MS_HOSTSHUTDOWN |
| 259 | typedef enum { |
| 260 | MBIM_CID_MS_HOSTSHUTDOWN = 1, |
| 261 | MBIM_CID_MS_HOSTSHUTDOWN_MAX |
| 262 | } mbim_cid_ms_hostshutdown_enum; |
| 263 | |
| 264 | // MTK_VENDOR_CMD |
| 265 | typedef enum { |
| 266 | MBIM_CID_MTK_VENDOR_CMD = 1, |
| 267 | MBIM_CID_MTK_VENDOR_CMD_MAX |
| 268 | } mbim_cid_mtk_vendor_cmd_enum; |
| 269 | |
| 270 | /*------------------MBIM CID END--------------------------*/ |
| 271 | |
| 272 | /*------------------MBIM CID STRUCT ENUM BEGIN------------------------*/ |
| 273 | typedef enum { |
| 274 | MBIMCellularClassGsm = 1, |
| 275 | MBIMCellularClassCdma = 2 |
| 276 | } mbim_cellular_class_enum; |
| 277 | |
| 278 | typedef enum { |
| 279 | MBIMSubscriberReadyStateNotInitialized, |
| 280 | MBIMSubscriberReadyStateInitialized, |
| 281 | MBIMSubscriberReadyStateSimNotInserted, |
| 282 | MBIMSubscriberReadyStateBadSim, |
| 283 | MBIMSubscriberReadyStateFailure, |
| 284 | MBIMSubscriberReadyStateNotActivated, |
| 285 | MBIMSubscriberReadyStateDeviceLocked |
| 286 | } mbim_subscriber_ready_state_enum; |
| 287 | |
| 288 | typedef enum { |
| 289 | MBIMRadioOff, |
| 290 | MBIMRadioOn |
| 291 | } mbim_radio_switch_state_enum; |
| 292 | |
| 293 | typedef enum { |
| 294 | MBIMPinTypeNone, |
| 295 | MBIMPinTypeCustom, |
| 296 | MBIMPinTypePin1, |
| 297 | MBIMPinTypePin2, |
| 298 | MBIMPinTypeDeviceSimPin, |
| 299 | MBIMPinTypeDeviceFirstSimPin, |
| 300 | MBIMPinTypeNetworkPin, |
| 301 | MBIMPinTypeNetworkSubsetPin, |
| 302 | MBIMPinTypeServiceProviderPin, |
| 303 | MBIMPinTypeCorporatePin, |
| 304 | MBIMPinTypeSubsidyLock, |
| 305 | MBIMPinTypePuk1, |
| 306 | MBIMPinTypePuk2, |
| 307 | MBIMPinTypeDeviceFirstSimPuk, |
| 308 | MBIMPinTypeNetworkPuk, |
| 309 | MBIMPinTypeNetworkSubsetPuk, |
| 310 | MBIMPinTypeServiceProviderPuk, |
| 311 | MBIMPinTypeCorporatePuk |
| 312 | } mbim_pin_type_enum; |
| 313 | |
| 314 | typedef enum { |
| 315 | MBIMPinOperationEnter, |
| 316 | MBIMPinOperationEnable, |
| 317 | MBIMPinOperationDisable, |
| 318 | MBIMPinOperationChange |
| 319 | } mbim_pin_operation_enum; |
| 320 | |
| 321 | typedef enum { |
| 322 | MBIMPinModeNotSupported, |
| 323 | MBIMPinModeEnable, |
| 324 | MBIMPinModeDisable |
| 325 | } mbim_pin_mode_enum; |
| 326 | |
| 327 | typedef enum { |
| 328 | MBIMPinFormatUnknown, |
| 329 | MBIMPinFormatNumeric, |
| 330 | MBIMPinFormatAlphaNumeric |
| 331 | } mbim_pin_format_enum; |
| 332 | |
| 333 | typedef enum { |
| 334 | MBIM_PROVIDER_STATE_UNKNOWN = 0x00, |
| 335 | MBIM_PROVIDER_STATE_HOME = 0x01, |
| 336 | MBIM_PROVIDER_STATE_FORBIDDEN = 0x02, |
| 337 | MBIM_PROVIDER_STATE_PREFERRED = 0x04, |
| 338 | MBIM_PROVIDER_STATE_VISIBLE = 0x08, |
| 339 | MBIM_PROVIDER_STATE_REGISTERED = 0x10, |
| 340 | MBIM_PROVIDER_STATE_PREFERRED_MULTICARRIER = 0x20 |
| 341 | } mbim_provider_state_enum; |
| 342 | |
| 343 | typedef enum { |
| 344 | MBIMRegisterStateUnknown, |
| 345 | MBIMRegisterStateDeregistered, |
| 346 | MBIMRegisterStateSearching, |
| 347 | MBIMRegisterStateHome, |
| 348 | MBIMRegisterStateRoaming, |
| 349 | MBIMRegisterStatePartner, |
| 350 | MBIMRegisterStateDenied |
| 351 | } mbim_register_state_enum; |
| 352 | |
| 353 | typedef enum { |
| 354 | MBIMPacketServiceStateUnknown, |
| 355 | MBIMPacketServiceStateAttaching, |
| 356 | MBIMPacketServiceStateAttached, |
| 357 | MBIMPacketServiceStateDetaching, |
| 358 | MBIMPacketServiceStateDetached |
| 359 | } mbim_packet_service_state_enum; |
| 360 | |
| 361 | typedef enum { |
| 362 | MBIMPacketServiceActionAttach, |
| 363 | MBIMPacketServiceActionDetach |
| 364 | } mbim_packet_service_action_enum; |
| 365 | |
| 366 | typedef enum { |
| 367 | MBIMRegisterActionAutomatic, |
| 368 | MBIMRegisterActionManual |
| 369 | } mbim_register_action_enum; |
| 370 | |
| 371 | typedef enum { |
| 372 | MBIMRegisterModeUnknown, |
| 373 | MBIMRegisterModeAutomatic, |
| 374 | MBIMRegisterModeManual |
| 375 | } mbim_register_mode_enum; |
| 376 | |
| 377 | typedef enum { |
| 378 | MBIM_REGISTRATION_NONE = 0x00, |
| 379 | MBIM_REGISTRATION_MANUAL_SELECTION_NOT_AVALIABLE = 0x01, |
| 380 | MBIM_REGISTRATION_PACKET_SERVICE_AUTOMATIC_ATTACH = 0x02, |
| 381 | } mbim_registration_flags_enum; |
| 382 | |
| 383 | typedef enum { |
| 384 | MBIMDataClassNone = 0x00, |
| 385 | MBIMDataClassGPRS = 0x01, |
| 386 | MBIMDataClassEDGE = 0x02, |
| 387 | MBIMDataClassUMTS = 0x04, |
| 388 | MBIMDataClassHSDPA = 0x08, |
| 389 | MBIMDataClassHSUPA = 0x10, |
| 390 | MBIMDataClassLTE = 0x20 |
| 391 | // MBIMDataClassCustom = 0x80000000 |
| 392 | } mbim_data_class_enum; |
| 393 | |
| 394 | typedef enum { |
| 395 | MBIMActivationCommandDeactivate, |
| 396 | MBIMActivationCommandActivate |
| 397 | } mbim_activation_command_enum; |
| 398 | |
| 399 | typedef enum { |
| 400 | MBIMCompressionNone, |
| 401 | MBIMCompressionEnable |
| 402 | } mbim_compression_enum; |
| 403 | |
| 404 | typedef enum { |
| 405 | MBIMAuthProtocolNone, |
| 406 | MBIMAuthProtocolPap, |
| 407 | MBIMAuthProtocolChap, |
| 408 | MBIMAuthProtocolMsChapV2 |
| 409 | } mbim_auth_protocol_type_enum; |
| 410 | |
| 411 | typedef enum { |
| 412 | MBIMContextIPTypeDefault, |
| 413 | MBIMContextIPTypeIPv4, |
| 414 | MBIMContextIPTypeIPv6, |
| 415 | MBIMContextIPTypeIPv4v6, |
| 416 | MBIMContextIPTypeIPIPv4AndIPv6 |
| 417 | } mbim_context_ip_type_enum; |
| 418 | |
| 419 | typedef enum { |
| 420 | MBIMActivationStateUnknown, |
| 421 | MBIMActivationStateActivated, |
| 422 | MBIMActivationStateActivating, |
| 423 | MBIMActivationStateDeactivated, |
| 424 | MBIMActivationStateDeactivating |
| 425 | } mbim_activation_state_enum; |
| 426 | |
| 427 | typedef enum { |
| 428 | MBIMVoiceCallStateNone, |
| 429 | MBIMVoiceCallStateInProgress, |
| 430 | MBIMVoiceCallStateHangup |
| 431 | } mbim_voice_call_state_enum; |
| 432 | |
| 433 | typedef enum { |
| 434 | MBIMNetworkIdleHintDisabled, |
| 435 | MBIMNetworkIdleHintEnable |
| 436 | } mbim_network_idle_hint_states_enum; |
| 437 | |
| 438 | typedef enum { |
| 439 | MBIMEmergencyModeOff, |
| 440 | MBIMEmergencyModeOn |
| 441 | } mbim_mergency_mode_state_enum; |
| 442 | |
| 443 | typedef enum { |
| 444 | MBIMSmsStorageNotInitialized, |
| 445 | MBIMSmsStorageInitialized |
| 446 | } mbim_sms_storage_state_enum; |
| 447 | |
| 448 | typedef enum { |
| 449 | MBIMSmsFormatPdu, |
| 450 | MBIMSmsFormatCdma |
| 451 | } mbim_sms_format_enum; |
| 452 | |
| 453 | typedef enum { |
| 454 | MBIMSmsFlagAll, |
| 455 | MBIMSmsFlagIndex, |
| 456 | MBIMSmsFlagNew, |
| 457 | MBIMSmsFlagOld, |
| 458 | MBIMSmsFlagSent, |
| 459 | MBIMSmsFlagDraft |
| 460 | } mbim_sms_flag_enum; |
| 461 | |
| 462 | typedef enum { |
| 463 | MBIMSmsStatusNew, |
| 464 | MBIMSmsStatusOld, |
| 465 | MBIMSmsStatusDraft, |
| 466 | MBIMSmsStatusSent |
| 467 | } mbim_sms_message_status_enum; |
| 468 | |
| 469 | typedef enum { |
| 470 | MBIM_SMS_FLAG_NONE, |
| 471 | MBIM_SMS_FLAG_MESSAGE_STORE_FULL, |
| 472 | MBIM_SMS_FLAG_NEW_MESSAGE |
| 473 | } mbim_sms_status_flags_enum; |
| 474 | |
| 475 | typedef enum { |
| 476 | MBIMUSSDInitiate, |
| 477 | MBIMUSSDContinue, |
| 478 | MBIMUSSDCancel |
| 479 | } mbim_ussd_action_enum; |
| 480 | |
| 481 | typedef enum { |
| 482 | MBIMUSSDNoActionRequired, |
| 483 | MBIMUSSDActionRequired, |
| 484 | MBIMUSSDTerminatedByNW, |
| 485 | MBIMUSSDOtherLocalClient, |
| 486 | MBIMUSSDOperationNotSupported, |
| 487 | MBIMUSSDNetworkTimeOut |
| 488 | } mbim_ussd_response_enum; |
| 489 | |
| 490 | typedef enum { |
| 491 | MBIMUSSDNewSession, |
| 492 | MBIMUSSDExistingSession |
| 493 | } mbim_ussd_session_state_enum; |
| 494 | |
| 495 | typedef enum { |
| 496 | MBIM_MTK_VENDOR_CMD_TYPE_NONE // add cmd type by Vendor |
| 497 | } mbim_mtk_vendor_cmd_type_enum; |
| 498 | |
| 499 | /*------------------MBIM CID STRUCT ENUM END------------------------*/ |
| 500 | |
| 501 | /*------------------MBIM CID STRUCT BEGIN------------------------*/ |
| 502 | typedef struct { |
| 503 | kal_uint32 offset; |
| 504 | kal_uint32 size; |
| 505 | } MBIM_OL_PAIR_LIST; |
| 506 | |
| 507 | typedef struct { |
| 508 | kal_uint32 DeviceType; |
| 509 | kal_uint32 CellularClass; |
| 510 | kal_uint32 VoiceClass; |
| 511 | kal_uint32 SimClass; |
| 512 | kal_uint32 DataClass; |
| 513 | kal_uint32 SmsCaps; |
| 514 | kal_uint32 ControlCaps; |
| 515 | kal_uint32 MaxSessions; |
| 516 | kal_uint32 CustomDataClassOffset; |
| 517 | kal_uint32 CustomDataClassSize; |
| 518 | kal_uint32 DeviceIdOffset; |
| 519 | kal_uint32 DeviceIdSize; |
| 520 | kal_uint32 FirmwareInfoOffset; |
| 521 | kal_uint32 FirmwareInfoSize; |
| 522 | kal_uint32 HardwareInfoOffset; |
| 523 | kal_uint32 HardwareInfoSize; |
| 524 | } mbim_device_caps_info_struct; |
| 525 | |
| 526 | typedef struct { |
| 527 | kal_uint32 ReadyState; |
| 528 | kal_uint32 SubscriberIdOffset; |
| 529 | kal_uint32 SubscriberIdSize; |
| 530 | kal_uint32 SimIccIdOffset; |
| 531 | kal_uint32 SimIccIdSize; |
| 532 | kal_uint32 ReadyInfo; |
| 533 | kal_uint32 ElementCount; |
| 534 | MBIM_OL_PAIR_LIST TelephoneNumbersRefList[2]; |
| 535 | } mbim_subscriber_ready_info_struct; |
| 536 | |
| 537 | typedef struct { |
| 538 | kal_uint8 DataBuffer[32+40+64]; // SubscriberId, SimIccid, TelephoneNumber |
| 539 | } mbim_subscriber_ready_info_databuffer_struct; |
| 540 | |
| 541 | |
| 542 | typedef struct { |
| 543 | kal_uint32 RadioState; |
| 544 | } mbim_set_radio_state_struct; |
| 545 | |
| 546 | typedef struct { |
| 547 | kal_uint32 HwRadioState; |
| 548 | kal_uint32 SwRadioState; |
| 549 | } mbim_radio_state_info_struct; |
| 550 | |
| 551 | typedef struct { |
| 552 | kal_uint32 PinType; |
| 553 | kal_uint32 PinOperation; |
| 554 | kal_uint32 PinOffset; |
| 555 | kal_uint32 PinSize; |
| 556 | kal_uint32 NewPinOffset; |
| 557 | kal_uint32 NewPinSize; |
| 558 | } mbim_set_pin_struct; |
| 559 | |
| 560 | typedef struct { |
| 561 | kal_uint32 PinType; |
| 562 | kal_uint32 PinState; |
| 563 | kal_uint32 RemainAttempts; |
| 564 | } mbim_pin_info_struct; |
| 565 | |
| 566 | typedef struct { |
| 567 | kal_uint32 PinMode; |
| 568 | kal_uint32 PinFormat; |
| 569 | kal_uint32 PinLengthMin; |
| 570 | kal_uint32 PinLengthMax; |
| 571 | } mbim_pin_desc_struct; |
| 572 | |
| 573 | typedef struct { |
| 574 | mbim_pin_desc_struct PinDescPin1; |
| 575 | mbim_pin_desc_struct PinDescPin2; |
| 576 | mbim_pin_desc_struct PinDescDeviceSimPin; |
| 577 | mbim_pin_desc_struct PinDescDeviceFirstSimPin; |
| 578 | mbim_pin_desc_struct PinDescNetworkPin; |
| 579 | mbim_pin_desc_struct PinDescNetworkSubsetPin; |
| 580 | mbim_pin_desc_struct PinDescServiceProviderPin; |
| 581 | mbim_pin_desc_struct PinDescCorporatePin; |
| 582 | mbim_pin_desc_struct PinDescSubsidyLock; |
| 583 | mbim_pin_desc_struct PinDescCustom; |
| 584 | } mbim_pin_list_info_struct; |
| 585 | |
| 586 | typedef struct { |
| 587 | kal_uint32 ProviderIdOffset; |
| 588 | kal_uint32 ProviderIdSize; |
| 589 | kal_uint32 ProviderState; |
| 590 | kal_uint32 ProviderNameOffset; |
| 591 | kal_uint32 ProviderNameSize; |
| 592 | kal_uint32 CellularClass; |
| 593 | kal_uint32 Rssi; |
| 594 | kal_uint32 ErrorRate; |
| 595 | } mbim_provider_struct; |
| 596 | |
| 597 | typedef struct { |
| 598 | kal_uint32 Action; |
| 599 | } mbim_visible_providers_req_struct; |
| 600 | |
| 601 | typedef struct { |
| 602 | kal_uint32 ProviderIdOffset; |
| 603 | kal_uint32 ProviderIdSize; |
| 604 | kal_uint32 RegisterAction; |
| 605 | kal_uint32 DataClass; |
| 606 | } mbim_set_registration_state_struct; |
| 607 | |
| 608 | typedef struct { |
| 609 | kal_uint32 NwError; |
| 610 | kal_uint32 RegisterState; |
| 611 | kal_uint32 RegisterMode; |
| 612 | kal_uint32 AvaliableDataClasses; |
| 613 | kal_uint32 CurrentCellulrClass; |
| 614 | kal_uint32 ProviderIdOffset; |
| 615 | kal_uint32 ProviderIdSize; |
| 616 | kal_uint32 ProviderNameOffset; |
| 617 | kal_uint32 ProviderNameSize; |
| 618 | kal_uint32 RoamingTextOffset; |
| 619 | kal_uint32 RoamingTextSize; |
| 620 | kal_uint32 RegistrationFlag; |
| 621 | } mbim_registration_state_info_struct; |
| 622 | |
| 623 | typedef struct { |
| 624 | kal_uint32 PacketServiceAction; |
| 625 | } mbim_set_packet_service_struct; |
| 626 | |
| 627 | typedef struct { |
| 628 | kal_uint32 NwError; |
| 629 | kal_uint32 PacketServiceState; |
| 630 | kal_uint32 HighestAvaliableDataClasses; |
| 631 | kal_uint64 UplinkSpeed; |
| 632 | kal_uint64 DownlinkSpeed; |
| 633 | } mbim_packet_service_info_struct; |
| 634 | |
| 635 | typedef struct { |
| 636 | kal_uint32 SignalStrengthInterval; |
| 637 | kal_uint32 RssiThreshold; |
| 638 | kal_uint32 ErrorRateThreshold; |
| 639 | } mbim_set_signal_state_struct; |
| 640 | |
| 641 | typedef struct { |
| 642 | kal_uint32 Rssi; |
| 643 | kal_uint32 ErrorRate; |
| 644 | kal_uint32 SignalStrengthInterval; |
| 645 | kal_uint32 RssiThreshold; |
| 646 | kal_uint32 ErrorRateThreshold; |
| 647 | } mbim_signal_state_info_struct; |
| 648 | |
| 649 | typedef struct { |
| 650 | kal_uint32 SessionId; |
| 651 | kal_uint32 ActivationCommand; |
| 652 | kal_uint32 AccessStringOffset; |
| 653 | kal_uint32 AccessStringSize; |
| 654 | kal_uint32 UserNameOffset; |
| 655 | kal_uint32 UserNameSize; |
| 656 | kal_uint32 PasswordOffset; |
| 657 | kal_uint32 PasswordSize; |
| 658 | kal_uint32 Compression; |
| 659 | kal_uint32 AuthProtocol; |
| 660 | kal_uint32 IPType; |
| 661 | kal_uint8 ContextType[16]; |
| 662 | } mbim_set_connect_struct; |
| 663 | |
| 664 | typedef struct { |
| 665 | kal_uint32 SessionId; |
| 666 | kal_uint32 ActivationState; |
| 667 | kal_uint32 VoiceCallState; |
| 668 | kal_uint32 IPType; |
| 669 | kal_uint8 ContextType[16]; |
| 670 | kal_uint32 NwError; |
| 671 | } mbim_connect_info_struct; |
| 672 | |
| 673 | typedef struct { |
| 674 | kal_uint32 ContextId; |
| 675 | kal_uint8 ContextType[16]; |
| 676 | kal_uint32 AccssStringOffset; |
| 677 | kal_uint32 AccssStringSize; |
| 678 | kal_uint32 UserNmeOffset; |
| 679 | kal_uint32 UserNameSize; |
| 680 | kal_uint32 PasswordOffset; |
| 681 | kal_uint32 PasswordSize; |
| 682 | kal_uint32 Compression; |
| 683 | kal_uint32 AuthProtocol; |
| 684 | kal_uint8 DataBuffer[200+64+64]; // APN + Username + Password |
| 685 | } mbim_context_struct; |
| 686 | |
| 687 | typedef struct { |
| 688 | kal_uint32 ElementCount; |
| 689 | MBIM_OL_PAIR_LIST ProvisionedContextRefList[10]; |
| 690 | } mbim_provisioned_contexts_info_struct; |
| 691 | |
| 692 | typedef struct { |
| 693 | kal_uint32 ContextId; |
| 694 | kal_uint8 ContextType[16]; |
| 695 | kal_uint32 AccssStringOffset; |
| 696 | kal_uint32 AccssStringSize; |
| 697 | kal_uint32 UserNmeOffset; |
| 698 | kal_uint32 UserNameSize; |
| 699 | kal_uint32 PasswordOffset; |
| 700 | kal_uint32 PasswordSize; |
| 701 | kal_uint32 Compression; |
| 702 | kal_uint32 AuthProtocol; |
| 703 | kal_uint32 ProviderIdOffset; |
| 704 | kal_uint32 ProviderIdSize; |
| 705 | } mbim_set_provisioned_context_struct; |
| 706 | |
| 707 | typedef struct { |
| 708 | kal_uint8 IPv4Address[4]; |
| 709 | } mbim_ipv4_address_struct; |
| 710 | |
| 711 | typedef struct { |
| 712 | kal_uint32 OnLinkPrefixLength; |
| 713 | mbim_ipv4_address_struct IPv4Address; |
| 714 | } mbim_ipv4_element_struct; |
| 715 | |
| 716 | typedef struct { |
| 717 | kal_uint8 IPv6Address[16]; |
| 718 | } mbim_ipv6_address_struct; |
| 719 | |
| 720 | typedef struct { |
| 721 | kal_uint32 OnLinkPrefixLength; |
| 722 | mbim_ipv6_address_struct IPv6Address; |
| 723 | } mbim_ipv6_element_struct; |
| 724 | |
| 725 | typedef struct { |
| 726 | kal_uint32 SessionId; |
| 727 | kal_uint32 IPv4ConfigurationAvaliable; |
| 728 | kal_uint32 IPv6ConfigurationAvaliable; |
| 729 | kal_uint32 IPv4AddressCount; |
| 730 | kal_uint32 IPv4AddressOffset; |
| 731 | kal_uint32 IPv6AddressCount; |
| 732 | kal_uint32 IPv6AddressOffset; |
| 733 | kal_uint32 IPv4GatewayOffset; |
| 734 | kal_uint32 IPv6GatewayOffset; |
| 735 | kal_uint32 IPv4DnsServerCount; |
| 736 | kal_uint32 IPv4DnsServerOffset; |
| 737 | kal_uint32 IPv6DnsServerCount; |
| 738 | kal_uint32 IPv6DnsServerOffset; |
| 739 | kal_uint32 IPv4Mtu; |
| 740 | kal_uint32 IPv6Mtu; |
| 741 | kal_uint8 DataBuffer[88]; |
| 742 | } mbim_ip_configuration_struct; |
| 743 | |
| 744 | typedef struct { |
| 745 | kal_uint8 DeviceServiceId[16]; |
| 746 | kal_uint32 DssPayload; |
| 747 | kal_uint32 MaxDssInstances; |
| 748 | kal_uint32 CidCount; |
| 749 | kal_uint32 Cid[MBIM_CID_BASIC_CONNECT_MAX]; // IMPORTTANT: Assume basic connect always has the most CIDs |
| 750 | } mbim_device_service_element_struct; |
| 751 | |
| 752 | typedef struct { |
| 753 | kal_uint32 DeviceServiceCount; |
| 754 | kal_uint32 MaxDssSessions; |
| 755 | MBIM_OL_PAIR_LIST DeviceServiceRefList[MBIM_UUID_MAX]; |
| 756 | // MBIM_OL_PAIR_LIST DeviceServiceRefList[2]; |
| 757 | mbim_device_service_element_struct DeviceService[MBIM_UUID_MAX]; |
| 758 | // mbim_device_service_element_struct DeviceService[2]; |
| 759 | } mbim_device_service_info_struct; |
| 760 | |
| 761 | typedef struct { |
| 762 | kal_uint32 NetworkIdleHintState; |
| 763 | } mbim_network_idle_hint_struct; |
| 764 | |
| 765 | typedef struct { |
| 766 | kal_uint32 EmergencyMode; |
| 767 | } mbim_emergency_mode_info_struct; |
| 768 | |
| 769 | typedef struct { |
| 770 | kal_uint32 ElementCount; |
| 771 | } mbim_device_service_subscribe_list_struct; |
| 772 | |
| 773 | typedef struct { |
| 774 | kal_uint8 DeviceServiceId[16]; |
| 775 | kal_uint32 CidCount; |
| 776 | } mbim_event_entry_struct; |
| 777 | |
| 778 | typedef struct { |
| 779 | kal_uint32 Format; |
| 780 | kal_uint32 ScAddressOffset; |
| 781 | kal_uint32 ScAddressSize; |
| 782 | } mbim_set_sms_configuration_struct; |
| 783 | |
| 784 | typedef struct { |
| 785 | kal_uint32 SmsStorageState; |
| 786 | kal_uint32 Format; |
| 787 | kal_uint32 MaxMessages; |
| 788 | kal_uint32 CdmaShortMessageSize; |
| 789 | kal_uint32 ScAddressOffset; |
| 790 | kal_uint32 ScAddressSize; |
| 791 | kal_uint8 DataBuffer[40]; |
| 792 | } mbim_sms_configuration_info_struct; |
| 793 | |
| 794 | typedef struct { |
| 795 | kal_uint32 SmsFormat; |
| 796 | kal_uint32 Flag; |
| 797 | kal_uint32 MessageIndex; |
| 798 | } mbim_sms_read_req_struct; |
| 799 | |
| 800 | typedef struct { |
| 801 | kal_uint32 Format; |
| 802 | kal_uint32 ElementCount; |
| 803 | } mbim_sms_read_info_struct; |
| 804 | |
| 805 | typedef struct { |
| 806 | kal_uint32 MessageIndex; |
| 807 | kal_uint32 MessageStatus; |
| 808 | kal_uint32 PduDataOffset; |
| 809 | kal_uint32 PduDataSize; |
| 810 | kal_uint8 DataBuffer[184]; // Spec: 183, align to 184 |
| 811 | } mbim_sms_pdu_record_struct; |
| 812 | |
| 813 | typedef struct { |
| 814 | kal_uint32 PduDataOffset; |
| 815 | kal_uint32 PduDataSize; |
| 816 | } mbim_sms_send_pdu_struct; |
| 817 | |
| 818 | typedef struct { |
| 819 | kal_uint32 SmsFormat; |
| 820 | } mbim_sms_send_struct; |
| 821 | |
| 822 | typedef struct { |
| 823 | kal_uint32 MessageReference; |
| 824 | } mbim_sms_send_info_struct; |
| 825 | |
| 826 | typedef struct { |
| 827 | kal_uint32 Flag; |
| 828 | kal_uint32 MessageIndex; |
| 829 | } mbim_set_sms_delete_struct; |
| 830 | |
| 831 | typedef struct { |
| 832 | kal_uint32 Flag; |
| 833 | kal_uint32 MessageIndex; |
| 834 | } mbim_sms_status_info_struct; |
| 835 | |
| 836 | typedef struct { |
| 837 | kal_uint32 USSDAction; |
| 838 | kal_uint32 USSDDataCodingScheme; |
| 839 | kal_uint32 USSDPayloadOffset; |
| 840 | kal_uint32 USSDPayloadLength; |
| 841 | } mbim_set_ussd_struct; |
| 842 | |
| 843 | typedef struct { |
| 844 | kal_uint32 USSDResponse; |
| 845 | kal_uint32 USSDSessionState; |
| 846 | kal_uint32 USSDDataCodingScheme; |
| 847 | kal_uint32 USSDPayloadOffset; |
| 848 | kal_uint32 USSDPayloadLength; |
| 849 | kal_uint8 DataBuffer[160]; |
| 850 | } mbim_ussd_info_struct; |
| 851 | |
| 852 | typedef struct { |
| 853 | kal_uint32 VendorCmdType; // mbim_mtk_vendor_cmd_type_enum |
| 854 | kal_uint32 VendorCmdOffset; |
| 855 | kal_uint32 VendorCmdSize; |
| 856 | } mbim_mtk_vendor_cmd_info_struct; |
| 857 | |
| 858 | /*------------------MBIM CID STRUCT END--------------------------*/ |
| 859 | |
| 860 | typedef enum { |
| 861 | MBIM_STATUS_SUCCESS = 0, |
| 862 | MBIM_STATUS_BUSY = 1, |
| 863 | MBIM_STATUS_FAILURE = 2, |
| 864 | MBIM_STATUS_SIM_NOT_INSERTED = 3, |
| 865 | MBIM_STATUS_BAD_SIM = 4, |
| 866 | MBIM_STATUS_PIN_REQUIRED = 5, |
| 867 | MBIM_STATUS_PIN_DISABLED = 6, |
| 868 | MBIM_STATUS_NOT_REGISTERED = 7, |
| 869 | MBIM_STATUS_PROVIDERS_NOT_FOUND = 8, |
| 870 | MBIM_STATUS_NO_DEVICE_SUPPORT = 9, |
| 871 | MBIM_STATUS_PROVIDER_NOT_VISIBLE = 10, |
| 872 | MBIM_STATUS_DATA_CLASS_NOT_AVAILABLE = 11, |
| 873 | MBIM_STATUS_PACKET_SERVICE_DETACHED = 12, |
| 874 | MBIM_STATUS_MAX_ACTIVATED_CONTEXTS = 13, |
| 875 | MBIM_STATUS_NOT_INITIALIZED = 14, |
| 876 | MBIM_STATUS_VOICE_CALL_IN_PROGRESS = 15, |
| 877 | MBIM_STATUS_CONTEXT_NOT_ACTIVATED = 16, |
| 878 | MBIM_STATUS_SERVICE_NOT_ACTIVATED = 17, |
| 879 | MBIM_STATUS_INVALID_ACCESS_STRING = 18, |
| 880 | MBIM_STATUS_INVALID_USER_NAME_PWD = 19, |
| 881 | MBIM_STATUS_RADIO_POWER_OFF = 20, |
| 882 | MBIM_STATUS_INVALID_PARAMETERS = 21, |
| 883 | MBIM_STATUS_READ_FAILURE = 22, |
| 884 | MBIM_STATUS_WRITE_FAILURE = 23, |
| 885 | // MBIM_STATUS_ Reserved = 24, |
| 886 | MBIM_STATUS_NO_PHONEBOOK = 25, |
| 887 | MBIM_STATUS_PARAMETER_TOO_LONG = 26, |
| 888 | MBIM_STATUS_STK_BUSY = 27, |
| 889 | MBIM_STATUS_OPERATION_NOT_ALLOWED = 28, |
| 890 | MBIM_STATUS_MEMORY_FAILURE = 29, |
| 891 | MBIM_STATUS_INVALID_MEMORY_INDEX = 30, |
| 892 | MBIM_STATUS_MEMORY_FULL = 31, |
| 893 | MBIM_STATUS_FILTER_NOT_SUPPORTED = 32, |
| 894 | MBIM_STATUS_DSS_INSTANCE_LIMIT = 33, |
| 895 | MBIM_STATUS_INVALID_DEVICE_SERVICE_OPERATION = 34, |
| 896 | MBIM_STATUS_AUTH_INCORRECT_AUTN = 35, |
| 897 | MBIM_STATUS_AUTH_SYNC_FAILURE = 36, |
| 898 | MBIM_STATUS_AUTH_AMF_NOT_SET = 37, |
| 899 | |
| 900 | MBIM_STATUS_SMS_UNKNOWN_SMSC_ADDRESS = 100, |
| 901 | MBIM_STATUS_SMS_NETWORK_TIMEOUT = 101, |
| 902 | MBIM_STATUS_SMS_LANG_NOT_SUPPORTED = 102, |
| 903 | MBIM_STATUS_SMS_ENCODING_NOT_SUPPORTED = 103, |
| 904 | MBIM_STATUS_SMS_FORMAT_NOT_SUPPORTED = 104, |
| 905 | |
| 906 | MBIM_STATUS_END = 0xFF |
| 907 | } mbim_status_code_enum; |
| 908 | |
| 909 | typedef enum { |
| 910 | MBIM_OP_CLOSE = 0, |
| 911 | MBIM_OP_OPEN = 1, |
| 912 | MBIM_OP_COMMAND = 2, |
| 913 | MBIM_OP_ERROR_CANCEL = 3, |
| 914 | MBIM_OP_REOPEN = 4, |
| 915 | } mbim_op_enum; |
| 916 | |
| 917 | typedef enum { |
| 918 | MBIM_COMMAND_QUERY, |
| 919 | MBIM_COMMAND_SET |
| 920 | } mbim_command_type_enum; |
| 921 | |
| 922 | #endif /* _MBIM_DEFS_H */ |
| 923 | |