blob: 944ca5e13ad03919bdf9fb64a086a95dd538fac0 [file] [log] [blame]
/******************************************************************************
*(C) Copyright 2022 ASR Microelectronics
* All Rights Reserved
******************************************************************************/
/* -------------------------------------------------------------------------------------------------------------------
*
* Filename: mbim_basic_extension.h
*
* Authors: Lei yang
*
* Description: define basic connect extension CIDs
*
* HISTORY:
* Feb 15, 2022 - Initial Version
*
* Notes:
*
******************************************************************************/
#ifndef MBIM_BASIC_EXT_H
#define MBIM_BASIC_EXT_H
/******************************************************************************
* Include files
******************************************************************************/
#include <stdlib.h>
#include "mbim_types.h"
#include "mbim_protocol.h"
#include "mbim_basic.h"
/******************************************************************************
* Macros
******************************************************************************/
/******************************************************************************
* Defines
******************************************************************************/
#define BASIC_CONNECT_EXT_CID_PARAMS UINT32 cid, UINT32 transactionId, UINT32 commandType, UINT32 infoBufLen, char *infoBuf_p
#define BASIC_CONNECT_EXT_CID_PARAMS_USAGE cid, transactionId, commandType, infoBufLen, infoBuf_p
typedef int (*basicExtUuidProcessors)(BASIC_CONNECT_EXT_CID_PARAMS);
/******************************************************************************
* External variables
******************************************************************************/
/******************************************************************************
* MBIM_CID_MS_PROVISIONED_CONTEXT_V2
******************************************************************************/
typedef enum _MBIM_MS_CONTEXT_OPERATIONS
{
MbimMsContextOperationDefault = 0, //Default operation including adding or replacing an existing context in the modem.
MbimMsContextOperationDelete, //Delete operation requires the modem to delete an existing context in the modem.
MbimMsContextOperationRestoreFactory,
/*Restore factory preconfigured context for the Provider ID of currently inserted SIM.
All contexts replaced or created by OS should be removed and replaced.
If there is no default preconfigured OS context for the current inserted SIM Provider ID,
then the provisioned context in the modem should be removed.
*/
}MBIM_MS_CONTEXT_OPERATIONS;
typedef enum _MBIM_MS_CONTEXT_ROAMING_CONTROL
{
MbimMsContextRoamingControlHomeOnly = 0, //Indicates whether the context is only allowed to be used in the home network or not.
MbimMsContextRoamingControlPartnerOnly = 1, //Indicates whether the context is only allowed to be used in partner roaming networks or not.
MbimMsContextRoamingControlNonPartnerOnly = 2, //Indicates whether the context is only allowed to be used in non-partner roaming networks or not.
MbimMsContextRoamingControlHomeAndPartner = 3, //Indicates whether the context is allowed to be used in home and partner roaming networks.
MbimMsContextRoamingControlHomeAndNonPartner = 4, //Indicates whether the context is allowed to be used in home and non-partner roaming networks.
MbimMsContextRoamingControlPartnerAndNonPartner = 5, //Indicates whether the context is allowed to be used in partner and non-partner roaming networks.
MbimMsContextRoamingControlAllowAll = 6 //Indicates whether the context is allowed to be used in any roaming condition.
}MBIM_MS_CONTEXT_ROAMING_CONTROL;
typedef enum _MBIM_MS_CONTEXT_MEDIA_TYPE
{
MbimMsContextMediaTypeCellularOnly = 0, //Indicates whether the context is only allowed to be used when registered over cellular.
MbimMsContextMediaTypeWifiOnly = 1, //Indicates whether the context is only allowed to be used when registered over iWLAN (Wi-Fi offload).
MbimMsContextMediaTypeAll = 2 //Indicates whether the context is allowed to be used when registered either through Cellular or Wi-Fi.
}MBIM_MS_CONTEXT_MEDIA_TYPE;
typedef enum _MBIM_MS_CONTEXT_ENABLE
{
MbimMsContextDisabled = 0, //The provisioned context is disabled. The modem should not enable activation on this context from the OS and itself.
MbimMsContextEnabled = 1 //The provisioned context is enabled. The context can be enabled if other conditions are met; for example, if roaming is disallowed then the context should not be enabled during roaming.
}MBIM_MS_CONTEXT_ENABLE;
typedef enum _MBIM_MS_CONTEXT_SOURCE
{
MbimMsContextSourceAdmin = 0, //The context was created by an Enterprise IT admin from the OS.
MbimMsContextSourceUser = 1, //The context was created by the user through OS settings.
MbimMsContextSourceOperator = 2, //The context was created by the operator through OMA-DM or other channels.
MbimMsContextSourceModem = 3, //The context was created by the IHV or OEM that was included with the modem firmware.
MbimMsContextSourceDevice = 4 //The context was created by the OS APN database.
}MBIM_MS_CONTEXT_SOURCE;
typedef struct _MBIM_SET_MS_PROVISIONED_CONTEXT_V2
{
UINT32 Operation;
MBIM_UUID ContextType;
UINT32 IPType;
UINT32 Enable;
UINT32 Roaming;
UINT32 MediaType;
UINT32 Source;
UINT32 AccessStringOffset;
UINT32 AccessStringSize;
UINT32 UserNameOffset;
UINT32 UserNameSize;
UINT32 PasswordOffset;
UINT32 PasswordSize;
UINT32 Compression;
UINT32 AuthProtocol;
char DataBuffer[1];
}MBIM_SET_MS_PROVISIONED_CONTEXT_V2 , *P_MBIM_SET_MS_PROVISIONED_CONTEXT_V2;
typedef struct _MBIM_MS_PROVISIONED_CONTEXT_INFO_V2
{
UINT32 elementCount;
// Here goes OL_PAIR_LIST
// Then data buffer
}MBIM_MS_PROVISIONED_CONTEXT_INFO_V2 , *P_MBIM_MS_PROVISIONED_CONTEXT_INFO_V2;
typedef struct _MBIM_MS_CONTEXT_V2
{
UINT32 ContextId;
MBIM_UUID ContextType;
UINT32 IPType;
UINT32 Enable;
UINT32 Roaming;
UINT32 MediaType;
UINT32 Source;
UINT32 AccessStringOffset;
UINT32 AccessStringSize;
UINT32 UserNameOffset;
UINT32 UserNameSize;
UINT32 PasswordOffset;
UINT32 PasswordSize;
UINT32 Compression;
UINT32 AuthProtocol;
UINT32 DataBuffer[1];
}MBIM_MS_CONTEXT_V2, *P_MBIM_MS_CONTEXT_V2;
typedef enum _MBIM_MS_NETWORK_BLACKLIST_STATE
{
MbimMsNetworkBlacklistStateNotActuated = 0, //Both blackclist conditions are not met.
MbimMsNetworkBlacklistSIMProviderActuated = 1, //Inserted SIM is blacklisted as its Provider ID matches the blacklist for SIM Provider ID
MbimMsNetworkBlacklistNetworkProviderActuated = 2, //Available networks are blacklisted since their Provider IDs are all in the blacklist for network Provider ID.
}MBIM_MS_NETWORK_BLACKLIST_STATE;
typedef enum _MBIM_MS_NETWORK_BLACKLIST_TYPE
{
MbimMsNetworkBlacklistTypeSIM = 0, //The MCC/MNC pair are used for SIM provider blacklist.
MbimMsNetworkBlacklistTypeNetwork = 1, //The MCC/MNC pair are used for network provider blacklist.
}MBIM_MS_NETWORK_BLACKLIST_TYPE;
typedef struct _MBIM_MS_NETWORK_BLACKLIST_PROVIDER
{
UINT32 MCC;
UINT32 MNC;
UINT32 NetworkBlacklistType;
}MBIM_MS_NETWORK_BLACKLIST_PROVIDER, *P_MBIM_MS_NETWORK_BLACKLIST_PROVIDER;
typedef struct _MBIM_MS_NETWORK_BLACKLIST_INFO
{
UINT32 BlacklistState;
UINT32 ElementCount;
//Here go OL_PAIR_LIST
//Then data buffer, Array of MBIM_MS_NETWORK_BLACKLIST_PROVIDER structures.
}MBIM_MS_NETWORK_BLACKLIST_INFO, *P_MBIM_MS_NETWORK_BLACKLIST_INFO;
typedef struct _MBIM_VERSION_INFO
{
UINT16 bcdMBIMVersion;
UINT16 bcdMBIMExtendedVersion;
}MBIM_VERSION_INFO, *P_MBIM_VERSION_INFO;
typedef enum _MBIM_MS_ACCESS_TYPE
{
MBIMAccessTypeUnknown = 0, // AccessType is not known
MBIMAccessType3GPP = 1, // AccessType is 3GPP
MBIMAccessTypeNon3GPP = 2, // AccessType is Non-3GPP
}MBIM_MS_ACCESS_TYPE;
typedef enum _MBIM_MS_MODEM_CONFIG_STATUS
{
MBIMModemConfigStatusUnknown = 0,
MBIMModemConfigStatusStarted = 1,
MBIMModemConfigStatusCompleted = 2,
}MBIM_MS_MODEM_CONFIG_STATUS;
typedef struct _MBIM_MS_MODEM_CONFIG_INFO
{
UINT32 MBIM_MS_MODEM_CONFIG_STATUS;
//ConfigName
//Unnamed
}MBIM_MS_MODEM_CONFIG_INFO, *P_MBIM_MS_MODEM_CONFIG_INFO;
typedef struct _MBIM_MS_PRE_DFLT_NSSAI_INFO
{
UINT32 AccessType;
//PreferredNSSAI, MBIM_TLV_TYPE_DFLT_CFG_NSSAI
}MBIM_MS_PRE_DFLT_NSSAI_INFO, *P_MBIM_MS_PRE_DFLT_NSSAI_INFO;
typedef struct _MBIM_MS_SNSSAI_INFO
{
UINT8 SnssaiLength;
UINT8 SliceServiceType;
//variable
UINT8 sd[3];
//variable
UINT8 MappedSst;
//variable
UINT8 MappedSd[3];
}MBIM_MS_SNSSAI_INFO, *P_MBIM_MS_SNSSAI_INFO;
typedef enum _MBIM_MS_MICO_MODE
{
MBIMMicoModeDisabled = 0,
MBIMMicoModeEnabled = 1,
MBIMMicoModeUnsupported = 2,
MBIMMicoModeDefault = 3,
}MBIM_MS_MICO_MODE;
typedef enum _MBIM_MS_DEFAULT_PDU_HINT
{
MBIMDefaultPDUActivationUnlikely = 0,
MBIMDefaultPDUActivationLikely = 1,
}MBIM_MS_DEFAULT_PDU_HINT;
typedef enum _MBIM_MS_LADN_IND
{
MBIMLADNInfoNotNeeded = 0,
MBIMLADNInfoRequested = 1,
}MBIM_MS_LADN_IND;
typedef enum _MBIM_MS_DRX_PARAMS
{
MBIMDRXNotSpecified = 0,
MBIMDRXNotSupported = 1,
MBIMDRXCycle32 = 2,
MBIMDRXCycle64 = 3,
MBIMDRXCycle128 = 4,
MBIMDRXCycle256 = 5,
}MBIM_MS_DRX_PARAMS;
typedef struct _MBIM_MS_REGISTRATION_PARAMS_INFO
{
UINT32 MicoMode;
UINT32 DRXParams;
UINT32 LADNInfo;
UINT32 DefaultPDUHint;
UINT32 ReRegisterIfNeeded;
char *dataBuffer[1]; //Unnamed IE��s
}MBIM_MS_REGISTRATION_PARAMS_INFO, *P_MBIM_MS_REGISTRATION_PARAMS_INFO;
/******************************************************************************
Operation Set Query Notification
Command MBIM_SET_PIN_EX MBIM_PIN_APP Not applicable
Response MBIM_PIN_INFO_EX MBIM_PIN_INFO_EX Not applicable
******************************************************************************/
typedef struct _MBIM_PIN_APP
{
UINT32 Version;
UINT32 AppIdOffset;
UINT32 AppIdSize;
char *DataBuffer[1];
}MBIM_PIN_APP, *P_MBIM_PIN_APP;
typedef struct _MBIM_SET_PIN_EX
{
UINT32 PinType; //MBIM_PIN_TYPE_ENUM
UINT32 PinOperation; //MBIM_PIN_OPERATION
UINT32 PinOffset;
UINT32 PinSize;
UINT32 NewPinOffset;
UINT32 NewPinSize;
UINT32 AppIdOffset;
UINT32 AppIdSize;
char *dataBuffer[1]; //The data buffer containing the Pin, NewPin, and AppId.
}MBIM_SET_PIN_EX, *P_MBIM_SET_PIN_EX;
typedef struct _MBIM_PIN_INFO_EX
{
UINT32 PinType; //MBIM_PIN_TYPE_ENUM
UINT32 PinState; //MBIM_PIN_STATE
UINT32 RemainingAttempts;
}MBIM_PIN_INFO_EX, *P_MBIM_PIN_INFO_EX;
#endif