; Copyright (c) 2010-2014 Huawei Incorporated
; Manufacturer: Huawei Incorporated
;
; CDC ECM & NCM driver
;

[Version]
Signature="$WINDOWS NT$"
Class=Net
ClassGUID={4d36e972-e325-11ce-bfc1-08002be10318}
Provider= %Mfg%
DriverVer=07/08/2014,2.6.2.3159
CatalogFile=mod_jucdcecm.cat

[Manufacturer]
%Mfg% = DeviceList,NTx86,NTamd64

[SourceDisksNames]
1 = %mod_jucdcecm.DiskName%,,,""

[SourceDisksFiles]
mod_jucdcecm.sys  = 1,,

; For Win2K
[DeviceList]

%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_16
%PNP21_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_76

%PNP21_HW_3G_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_07
%PNP21_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_67
%PNP21_HW_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_11
%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&PID_15E5&MI_00

%HP931DNetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_16
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_07
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_11

%HP4114NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_16
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_07
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_11

; Windows XP and later
[DeviceList.NTx86]

%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_16
%PNP21_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_76



%PNP21_HW_3G_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_07
%PNP21_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_67
%PNP21_HW_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_11
%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&PID_15E5&MI_00

%HP931DNetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_16
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_07
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_11

%HP4114NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_16
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_07
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_11

; For XP and later x64
[DeviceList.NTamd64]

%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_16
%PNP21_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&Subclass_05&Prot_76


%PNP21_HW_3G_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_07
%PNP21_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_67
%PNP21_HW_NetworkDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_05&Prot_11
%PNP21_HW_NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_12D1&PID_15E5&MI_00

%HP931DNetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_16
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_07
%HP931DNetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_931D&Subclass_05&Prot_11

%HP4114NetworkDesc% = ew_jucdcncm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_16
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_07
%HP4114NetworkDesc% = ew_jucdcecm.ndi, USBCDCNCM\VID_03F0&PID_9A1D&Subclass_05&Prot_11

;-------------------------------------------------------------------------------
; Virtual Ethernet Adapter
;

[ew_jucdcncm.ndi]
*IfType         = 6 ; IF_TYPE_USB
*MediaType      = NdisMedium802_3;
*PhysicalMediaType = NdisPhysicalMediumUnspecified; 
Characteristics = 0x84 ; NCF_HAS_UI | NCF_PHYSICAL
BusType         = 15 ; if you specify NCF_PHYSICAL, you must specify bustype
AddReg          = ew_jucdcecm.Reg, ParamsPromiscuous, NcmFlag, ParamsPacketsAccumulationTimeout, ParamsMaxNumOfDatagramsInNTB,FlowControlTimeOut
CopyFiles       = ew_jucdcecm.CopyFiles


[ew_jucdcecm.ndi]
*IfType         = 6 ; IF_TYPE_USB
*MediaType      = NdisMedium802_3;
*PhysicalMediaType = NdisPhysicalMediumUnspecified; 
Characteristics = 0x84 ; NCF_HAS_UI | NCF_PHYSICAL
BusType         = 15 ; if you specify NCF_PHYSICAL, you must specify bustype
AddReg          = ew_jucdcecm.Reg, ParamsPromiscuous, EcmFlag, FlowControlTimeOut
CopyFiles       = ew_jucdcecm.CopyFiles


[ew_jucdcncm.ndi.HW]
AddReg = ECM_AddReg

[ew_jucdcncm.ndi.Services]
AddService      = %ServiceName%, 2, ew_jucdcecm.Service, ew_jucdcecm.EventLog

[ew_jucdcecm.ndi.HW]
AddReg = ECM_AddReg

[ECM_AddReg]
HKR,,"Platform",0x00010001,0x1 
HKR,,"WWAN",0x00010001,0x0

[ew_jucdcecm.ndi.Services]
AddService      = %ServiceName%, 2, ew_jucdcecm.Service, ew_jucdcecm.EventLog

;-----------------------------------------------------------------------------
;
[ew_jucdcecm.Reg]
HKR,    ,                         BusNumber,           0, "0"
HKR, Ndi,                         Service,             0, "mod_cdcecm"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"
HKR,    ,                         TcpAckFrqEnable,           0x00010001, 0   
;DWORD reg to control TcpAckFreqency 

[ParamsPromiscuous]
;
;    Should the physical NIC be set to Promiscuous mode
;
HKR, Ndi\Params\Promiscuous,     ParamDesc, , %Promiscuous%
HKR, Ndi\Params\Promiscuous,     Default,  ,"0"
HKR, Ndi\Params\Promiscuous,     type, ,      enum
HKR, Ndi\Params\Promiscuous\enum,"1",  ,     %Promiscuous_Enable%
HKR, Ndi\Params\Promiscuous\enum,"0",  ,     %Promiscuous_Disable%

[ParamsIsNtb32]
HKR, Ndi\Params\IsNtb32,      ParamDesc, , %IsNtb32%
HKR, Ndi\Params\IsNtb32,      Default, , "1"
HKR, Ndi\Params\IsNtb32,      type, , enum
HKR, Ndi\Params\IsNtb32\enum, "1", , "Yes"
HKR, Ndi\Params\IsNtb32\enum, "0", , "No"

[ParamsNTBInputSize]
HKR, Ndi\Params\NTBInputSize,     ParamDesc, , %NTBInputSize%
; If the following size is larger than the maximum allowed by the device, the
; maximum value is used. 0 means to use the maximum allowed value of the device.
HKR, Ndi\Params\NTBInputSize,     Default, , "0"
HKR, Ndi\Params\NTBInputSize,     type, , dword

[ParamsPacketsAccumulationTimeout]
HKR, Ndi\Params\PacketsAccumulationTimeout,     ParamDesc, , %PacketsAccumulationTimeout%
; Unit of PacketsAccumulationTimeout is usecs. Default value is 20 us.
HKR, Ndi\Params\PacketsAccumulationTimeout,     Default, , "20"
HKR, Ndi\Params\PacketsAccumulationTimeout,     type, , dword

[ParamsMaxNumOfDatagramsInNTB]
HKR, Ndi\Params\MaxNumOfDatagramsInNTB,     ParamDesc, , %MaxNumOfDatagramsInNTB%
HKR, Ndi\Params\MaxNumOfDatagramsInNTB,     Default, , "64"
HKR, Ndi\Params\MaxNumOfDatagramsInNTB,     type, , dword

[FlowControlTimeOut]
HKR, Ndi\Params\FlowControlTimeOut,     ParamDesc, , %FlowControlTimeout%
HKR, Ndi\Params\FlowControlTimeOut,     Default, , "2800"
HKR, Ndi\Params\FlowControlTimeOut,     type, , dword

[NcmFlag]
HKR, Ndi\Params\NcmFlag,     ParamDesc, , %NcmFlagDesc%
HKR, Ndi\Params\NcmFlag,     Default, , "1"
HKR, Ndi\Params\NcmFlag,     type, , dword

[EcmFlag]
HKR, Ndi\Params\NcmFlag,     ParamDesc, , %NcmFlagDesc%
HKR, Ndi\Params\NcmFlag,     Default, , "0"
HKR, Ndi\Params\NcmFlag,     type, , dword

;-----------------------------------------------------------------------------
; DestinationDirs
;
[DestinationDirs]
ew_jucdcecm.CopyFiles = 12

[ew_jucdcecm.CopyFiles]
mod_jucdcecm.sys,,,0x6  ;COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
;-----------------------------------------------------------------------------
; Driver and Service Section
;

[ew_jucdcecm.Service]
ServiceType     = 1 ;%SERVICE_KERNEL_DRIVER%
StartType       = 3 ;%SERVICE_DEMAND_START%
ErrorControl    = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\mod_jucdcecm.sys
LoadOrderGroup  = NDIS
AddReg          = ew_jucdcecm.Service.Reg

[ew_jucdcecm.Service.Reg]
HKR, , TextModeFlags,    0x00010001, 0x0001
HKR, Parameters, DebugLevel, 0x00010001, 1
HKR, Parameters, ndisLogoTestOn, 0x00010001, 0

[ew_jucdcecm.EventLog]
AddReg = ew_jucdcecm.AddEventLog.Reg

[ew_jucdcecm.AddEventLog.Reg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported,   0x00010001, 7

;
;--- WDF Coinstaller installation ------
;
[DestinationDirs]
cdcecm_CoInstaller_CopyFiles = 11

[ew_jucdcncm.ndi.CoInstallers]
AddReg=cdcecm_CoInstaller_AddReg
CopyFiles=cdcecm_CoInstaller_CopyFiles

[ew_jucdcecm.ndi.CoInstallers]
AddReg=cdcecm_CoInstaller_AddReg
CopyFiles=cdcecm_CoInstaller_CopyFiles

[cdcecm_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01007.dll,WdfCoInstaller"

[cdcecm_CoInstaller_CopyFiles]
wdfcoinstaller01007.dll

[SourceDisksFiles]
wdfcoinstaller01007.dll=1 ; make sure the number matches with SourceDisksNames

[ew_jucdcncm.ndi.Wdf]
KmdfService = %ServiceName%, cdcecm_wdfsect

[ew_jucdcecm.ndi.Wdf]
KmdfService = %ServiceName%, cdcecm_wdfsect

[cdcecm_wdfsect]
KmdfLibraryVersion = 1.7

;-----------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
Mfg = "HUAWEI"
ECMDeviceDesc = "HUAWEI Mobile Connect - Network Adapter"
NewECMDeviceDesc = "Mobile Connect - Network Adapter"
TDECMDeviceDesc = "HUAWEI Mobile CMCC Connect - Network Adapter"
NCMDeviceDesc = "HUAWEI Mobile Connect - Network Adapter"
NewNCMDeviceDesc = "Mobile Connect - Network Adapter"
TDNCMDeviceDesc = "HUAWEI Mobile CMCC Connect - Network Adapter"

;PNP2.1 Device descriptor
PNP21_HW_3G_NetworkDesc = "HUAWEI Mobile Connect - 3G Network Card"
PNP21_HW_NetworkDesc = "HUAWEI Mobile Connect - Network Card"
PNP21_NetworkDesc = "Mobile Connect - Network Card"
HP931DNetworkDesc = "HP lt4110 LTE/HSPA+ 4G Module Network Device"
HP4114NetworkDesc = "HP lt4114 LTE 4G Module Network Device"
mod_jucdcecm.DiskName = "DriverCore Installation Disk"

Promiscuous = "Set the physical NIC to promiscuous mode"
Promiscuous_Disable = "Disable"
ServiceName = "mod_cdcecm"
Promiscuous_Enable  = "Enable"
PacketsAccumulationTimeout = "Packets Accumulation Timeout [usec]"
MaxNumOfDatagramsInNTB = "Maximum number of datagrams in NTB"
FlowControlTimeout = "Flow Control timeout interval in ms"
NcmFlagDesc = "Flag use to distinguish NCM or ECM"
