; Copyright (c) 2010,2011 Huawei Incorporated
; Manufacturer: Huawei Incorporated
;
; CDC ECM driver
;

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

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

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

[SourceDisksFiles]
ew_jucdcecm.sys  = 1,,

; For Win2K
[DeviceList]

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_07
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_11
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_37

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\COMPAT
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C06&MI_03
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C07&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C09&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0A&MI_02
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0C&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0F&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C14&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C15&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C16&MI_01
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C17&MI_00
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C18&MI_00

; ==================Icera Generic PIDs==================
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1444&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1445&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144F&MI_01

; ==================Icera VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AE&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AF&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B0&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B1&MI_01

; ==================Balong VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A5&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A6&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A7&MI_01

; For WinXP and later
[DeviceList.NTx86]

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_07
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_11
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_37

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\COMPAT
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C06&MI_03
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C07&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C09&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0A&MI_02
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0C&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0F&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C14&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C15&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C16&MI_01
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C17&MI_00
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C18&MI_00

; ==================Icera Generic PIDs==================
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1444&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1445&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144F&MI_01

; ==================Icera VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AE&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AF&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B0&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B1&MI_01

; ==================Balong VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A5&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A6&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A7&MI_01

; For XP and later x64
[DeviceList.NTamd64]

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_07
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_11
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&Subclass_02&Prot_37

%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\COMPAT
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C06&MI_03
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C07&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C09&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0A&MI_02
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0C&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C0F&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C14&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C15&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C16&MI_01
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C17&MI_00
%TDECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1C18&MI_00

; ==================Icera Generic PIDs==================
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1444&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_1445&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144E&MI_01
%ECMDeviceDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_144F&MI_01

; ==================Icera VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AE&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14AF&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B0&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14B1&MI_01

; ==================Balong VDF PIDs==================
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A5&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A6&MI_01
%VDFECMDesc% = ew_jucdcecm.ndi, USBCDCECM\VID_12D1&PID_14A7&MI_01

;-------------------------------------------------------------------------------
; Virtual Ethernet Adapter
;
[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
CopyFiles       = ew_jucdcecm.CopyFiles

[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, "huawei_cdcecm"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"

[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%

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

[ew_jucdcecm.CopyFiles]
ew_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%\ew_jucdcecm.sys
LoadOrderGroup  = NDIS
AddReg          = ew_jucdcecm.Service.Reg

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

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

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

;
;--- ew_jucdcecm.ndi WDF Coinstaller installation ------
;
[DestinationDirs]
cdcecm_CoInstaller_CopyFiles = 11

[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_jucdcecm.ndi.Wdf]
KmdfService = %ServiceName%, cdcecm_wdfsect

[cdcecm_wdfsect]
KmdfLibraryVersion = 1.7

;-----------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
Mfg = "HUAWEI"
ECMDeviceDesc = "HUAWEI Mobile Connect - Network Adapter"
VDFECMDesc    = "Vodafone Mobile Broadband Network Adapter (Huawei)"
TDECMDeviceDesc = "HUAWEI Mobile CMCC Connect - Network Adapter"
ew_jucdcecm.DiskName = "DriverCore Installation Disk"
Promiscuous = "Set the physical NIC to promiscuous mode"
Promiscuous_Disable = "Disable"
ServiceName = "huawei_cdcecm"
Promiscuous_Enable  = "Enable"
