;-------------------------------------------------------------------------------
; net7500-x86-n51f.inf
;
; SMSC LAN7500 USB to Ethernet Adapter installation script for x86.
;
; Copyright (c) SMSC.  All rights reserved.

[version]
Signature   = "$Windows NT$"
ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}
Class       = Net
Provider    = %V_SMSC%
DriverPackageDisplayName = %LAN7500.PackageDesc.ntx86%
CatalogFile = lan7500-x86-n51f.cat
DriverVer   = 04/08/2013,2.2.2.2

[ControlFlags]
ExcludeFromSelect = USB\VID_0424&PID_7500
ExcludeFromSelect = USB\VID_0424&PID_7505
ExcludeFromSelect = USB\VID_03F0&PID_0547

[Manufacturer]
%V_SMSC%=SMSC,ntx86

[SMSC.ntx86]
%LAN7500.DeviceDesc%    = LAN7500.ndi.ntx86, USB\VID_0424&PID_7500
%LAN7505.DeviceDesc%    = LAN7500.ndi.ntx86, USB\VID_0424&PID_7505
%L2311c.DeviceDesc%     = LAN7500.ndi.ntx86, USB\VID_03F0&PID_0547


;-------------------------------------------------------------------------------
; SMSC LAN7500 USB 2.0 to Ethernet 10/100/1000 Adapter
;
[LAN7500.ndi.ntx86]
Characteristics = 0x84  ; NCF_HAS_UI | NCF_PHYSICAL
BusType         = 15
AddReg          = LAN7500.ndi.reg, LAN7500.params.reg
CopyFiles       = LAN7500.CopyFiles.ntx86

[LAN7500.ndi.ntx86.Services]
AddService      = LAN7500, 2, LAN7500.Service.ntx86, LAN7500.EventLog.ntx86

;-----------------------------------------------------------------------------
; Miniport Common
;
[LAN7500.ndi.reg]
HKR,    ,                         BusNumber,           0, "0" 
HKR, Ndi,                         Service,             0, "LAN7500"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"

HKLM, SYSTEM\CurrentControlSet\Control\usbflags\042475000100, DisableOnSoftRemove, 1, 01, 00
HKLM, SYSTEM\CurrentControlSet\Control\usbflags\042475050100, DisableOnSoftRemove, 1, 01, 00

[LAN7500.params.reg]

HKR,Ndi\Params\FlowControl,ParamDesc,       ,%FlowControl%
HKR,Ndi\Params\FlowControl,type,            ,"enum"
HKR,Ndi\Params\FlowControl,default,         ,"1"
HKR,Ndi\Params\FlowControl\enum,"0",        ,%Disabled%
HKR,Ndi\Params\FlowControl\enum,"1",        ,%Symmetric%
HKR,Ndi\Params\FlowControl\enum,"2",        ,%AsymGenerate%
HKR,Ndi\Params\FlowControl\enum,"3",        ,%AsymRespond%
HKR,Ndi\Params\FlowControl,flag,1,20,00,00,00

HKR,Ndi\Params\MediaType,ParamDesc,         ,%MediaType%
HKR,Ndi\Params\MediaType,type,              ,enum
HKR,Ndi\Params\MediaType,default,           ,0
HKR,Ndi\Params\MediaType\enum,0,            ,%Auto_All%
HKR,Ndi\Params\MediaType\enum,1,            ,%Auto_10HD%
HKR,Ndi\Params\MediaType\enum,2,            ,%Auto_10FD%
HKR,Ndi\Params\MediaType\enum,3,            ,%Auto_100HD%
HKR,Ndi\Params\MediaType\enum,4,            ,%Auto_100FD%
HKR,Ndi\Params\MediaType\enum,5,            ,%Auto_1000FD%
HKR,Ndi\Params\MediaType\enum,6,            ,%Force_10HD%
HKR,Ndi\Params\MediaType\enum,7,            ,%Force_10FD%
HKR,Ndi\Params\MediaType\enum,8,            ,%Force_100HD%
HKR,Ndi\Params\MediaType\enum,9,            ,%Force_100FD%
HKR,Ndi\Params\MediaType\enum,10,           ,%Force_1000FD_Master%
HKR,Ndi\Params\MediaType\enum,11,           ,%Force_1000FD_Slave%
HKR,Ndi\Params\MediaType,flag,1,20,00,00,00

HKR,Ndi\Params\NetworkAddress,ParamDesc,    ,%NetAddr%
HKR,Ndi\Params\NetworkAddress,type,         ,edit
HKR,Ndi\Params\NetworkAddress,LimitText,    ,17
HKR,Ndi\Params\NetworkAddress,UpperCase,    ,1
HKR,Ndi\Params\NetworkAddress,default,      ,""
HKR,Ndi\Params\NetworkAddress,optional,     ,1
HKR,Ndi\Params\NetworkAddress,flag,1,20,00,00,00

HKR,Ndi\Params\PriorityVLANTag,ParamDesc,   ,%PriorityAndVlan%
HKR,Ndi\Params\PriorityVLANTag,type,        ,"enum"
HKR,Ndi\Params\PriorityVLANTag,default,     ,"3"
HKR,Ndi\Params\PriorityVLANTag\enum,"3",    ,%Enabled%
HKR,Ndi\Params\PriorityVLANTag\enum,"0",    ,%Disabled%
HKR,Ndi\Params\PriorityVLANTag,flag,1,20,00,00,00

HKR,Ndi\Params\VlanID,ParamDesc,            ,%VlanID%
HKR,Ndi\Params\VlanID,type,                 ,"word"
HKR,Ndi\Params\VlanID,default,              ,"0"
HKR,Ndi\Params\VlanID,min,                  ,"0"
HKR,Ndi\Params\VlanID,max,                  ,"4095"
HKR,Ndi\Params\VlanID,step,                 ,"1"
HKR,Ndi\Params\VlanID,base,                 ,"10"

HKR,Ndi\Params\USBBandwidthMode,ParamDesc,  ,%USBBwMode%
HKR,Ndi\Params\USBBandwidthMode,type,       ,"enum"
HKR,Ndi\Params\USBBandwidthMode,default,    ,"0"
HKR,Ndi\Params\USBBandwidthMode\enum,"0",   ,%USBBwMaxTput%
HKR,Ndi\Params\USBBandwidthMode\enum,"1",   ,%USBBwFriendly%
HKR,Ndi\Params\USBBandwidthMode\enum,"2",   ,%USBBwAutomatic%
HKR,Ndi\Params\USBBandwidthMode,flag,1,20,00,00,00

HKR,Ndi\Params\*LsoV1IPv4,ParamDesc,        ,%LSOCap%
HKR,Ndi\Params\*LsoV1IPv4,type,             ,"enum"
HKR,Ndi\Params\*LsoV1IPv4,default,          ,"1"
HKR,Ndi\Params\*LsoV1IPv4\enum,"1",         ,%Enabled%
HKR,Ndi\Params\*LsoV1IPv4\enum,"0",         ,%Disabled%
HKR,Ndi\Params\*LsoV1IPv4,flag,1,20,00,00,00

HKR, , *IPChecksumOffloadIPv4,              0,"3"
HKR, , *TCPChecksumOffloadIPv4,             0,"3"
HKR, , *TCPChecksumOffloadIPv6,             0,"3"
HKR, , *UDPChecksumOffloadIPv4,             0,"3"
HKR, , *UDPChecksumOffloadIPv6,             0,"3"

HKR,Ndi\Params\IpCsoCap,ParamDesc,          ,%IpCsoCap%
HKR,Ndi\Params\IpCsoCap,type,               ,"enum"
HKR,Ndi\Params\IpCsoCap,default,            ,"3"
HKR,Ndi\Params\IpCsoCap\enum,"0",           ,%Disabled%
HKR,Ndi\Params\IpCsoCap\enum,"1",           ,%TxEnabled%
HKR,Ndi\Params\IpCsoCap\enum,"2",           ,%RxEnabled%
HKR,Ndi\Params\IpCsoCap\enum,"3",           ,%TxRxEnabled%
HKR,Ndi\Params\IpCsoCap,flag,1,20,00,00,00

HKR,Ndi\Params\TcpCsoCap,ParamDesc,         ,%TcpCsoCap%
HKR,Ndi\Params\TcpCsoCap,type,              ,"enum"
HKR,Ndi\Params\TcpCsoCap,default,           ,"3"
HKR,Ndi\Params\TcpCsoCap\enum,"0",          ,%Disabled%
HKR,Ndi\Params\TcpCsoCap\enum,"1",          ,%TxEnabled%
HKR,Ndi\Params\TcpCsoCap\enum,"2",          ,%RxEnabled%
HKR,Ndi\Params\TcpCsoCap\enum,"3",          ,%TxRxEnabled%
HKR,Ndi\Params\TcpCsoCap,flag,1,20,00,00,00

HKR,Ndi\Params\UdpCsoCap,ParamDesc,         ,%UdpCsoCap%
HKR,Ndi\Params\UdpCsoCap,type,              ,"enum"
HKR,Ndi\Params\UdpCsoCap,default,           ,"3"
HKR,Ndi\Params\UdpCsoCap\enum,"0",          ,%Disabled%
HKR,Ndi\Params\UdpCsoCap\enum,"1",          ,%TxEnabled%
HKR,Ndi\Params\UdpCsoCap\enum,"2",          ,%RxEnabled%
HKR,Ndi\Params\UdpCsoCap\enum,"3",          ,%TxRxEnabled%
HKR,Ndi\Params\UdpCsoCap,flag,1,20,00,00,00

HKR,Ndi\Params\*JumboPacket,ParamDesc,      ,%JumboMtu%
HKR,Ndi\Params\*JumboPacket,default,        ,"1514"
HKR,Ndi\Params\*JumboPacket,type,           ,"int"
HKR,Ndi\Params\*JumboPacket,min,            ,"1514"
HKR,Ndi\Params\*JumboPacket,max,            ,"9230"
HKR,Ndi\Params\*JumboPacket,step,           ,"1"
HKR,Ndi\Params\*JumboPacket,base,           ,"10"

HKR,Ndi\Params\SleepPhyOnLinkDown,ParamDesc,     ,%EDPD%
HKR,Ndi\Params\SleepPhyOnLinkDown,type,          ,"enum"
HKR,Ndi\Params\SleepPhyOnLinkDown,default,       ,"0"
HKR,Ndi\Params\SleepPhyOnLinkDown\enum,"0",      ,%EDPDOFF%
HKR,Ndi\Params\SleepPhyOnLinkDown\enum,"1",      ,%EDPDON%
HKR,Ndi\Params\SleepPhyOnLinkDown,flag,1,20,00,00,00

HKR,Ndi\Params\NetDetach,ParamDesc,              ,%NetDetach%
HKR,Ndi\Params\NetDetach,type,                   ,"enum"
HKR,Ndi\Params\NetDetach,default,                ,"2"
HKR,Ndi\Params\NetDetach\enum,"0",               ,%NDModeOFF%
HKR,Ndi\Params\NetDetach\enum,"1",               ,%NDModeON%
HKR,Ndi\Params\NetDetach\enum,"2",               ,%NDModeAuto%
HKR,Ndi\Params\NetDetach,flag,1,20,00,00,00

HKR,,DrvCmdMode, 0, "2"

;-----------------------------------------------------------------------------
; Driver and Service Section
;
[LAN7500.CopyFiles.ntx86]
lan7500-x86-n51f.sys,,,2

[LAN7500.Service.ntx86]
DisplayName     = %LAN7500.Service.DispName%
ServiceType     = 1 ;%SERVICE_KERNEL_DRIVER%
StartType       = 3 ;%SERVICE_DEMAND_START%
ErrorControl    = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\lan7500-x86-n51f.sys
LoadOrderGroup  = NDIS

[LAN7500.EventLog.ntx86]
AddReg = LAN7500.AddEventLog.Reg.ntx86

[LAN7500.AddEventLog.Reg.ntx86]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll;%%SystemRoot%%\System32\Drivers\lan7500-x86-n51f.sys"
HKR, , TypesSupported,   0x00010001, 7

;-----------------------------------------------------------------------------
; WDF Coinstaller installation section
;
[LAN7500.ndi.ntx86.CoInstallers]
AddReg=LAN7500.CoInstaller.AddReg
CopyFiles=LAN7500.CoInstaller.CopyFiles

[LAN7500.CoInstaller.AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

[LAN7500.CoInstaller.CopyFiles]
WdfCoInstaller01009.dll

[LAN7500.ndi.ntx86.Wdf]
KmdfService = LAN7500, LAN7500.wdfsect

[LAN7500.wdfsect]
KmdfLibraryVersion = 1.7

;-----------------------------------------------------------------------------
; Files
;
[SourceDisksNames]
1 = %SMSC_DISK_NAME%,,,""

[SourceDisksFiles]
lan7500-x86-n51f.sys                       = 1,,
WdfCoInstaller01009.dll = 1

;-----------------------------------------------------------------------------
; DestinationDirs
;
[DestinationDirs]
LAN7500.CopyFiles.ntx86 = 12
LAN7500.CoInstaller.CopyFiles = 11

;-----------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
V_SMSC="SMSC"
LAN7500.DeviceDesc    	    = "LAN7500 USB 2.0 to Ethernet 10/100/1000 Adapter"
LAN7505.DeviceDesc    	    = "LAN7505 USB 2.0 to Ethernet 10/100/1000 Adapter"
L2311c.DeviceDesc    	    = "HP L2311c LAN7500 Ethernet Adapter"

LAN7500.PackageDesc.ntx86   = "LAN7500 USB 2.0 to Ethernet 10/100/1000 Adapter x86 Driver"
LAN7500.Service.DispName    = "LAN7500 USB 2.0 to Ethernet 10/100/1000 Adapter Service"
SMSC_DISK_NAME="LAN7500 USB to Ethernet Driver Files"

;Parameters and values
FlowControl     = "Flow Control"
Disabled        = "Disabled"
Symmetric       = "Generate and Respond"
AsymGenerate    = "Generate only"
AsymRespond     = "Respond only"

MediaType           = "Media Type"
Auto_All            = "All Modes Autodetected"
Auto_10HD           = "Autodetect 10HD"
Auto_10FD           = "Autodetect 10FD"
Auto_100HD          = "Autodetect 100HD"
Auto_100FD          = "Autodetect 100FD"
Auto_1000FD         = "Autodetect 1000FD"
Force_10HD          = "Force 10HD"
Force_10FD          = "Force 10FD"
Force_100HD         = "Force 100HD"
Force_100FD         = "Force 100FD"
Force_1000FD_Master = "Force 1000FD Master"
Force_1000FD_Slave  = "Force 1000FD Slave"

NetAddr         = "Network Address"

PriorityAndVlan = "Priority & VLAN"
VlanID          = "VLAN ID"

USBBwMode       = "USB Bandwidth Usage Mode"
USBBwMaxTput    = "Maximum Throughput"
USBBwFriendly   = "Sharing Friendly"
USBBwAutomatic  = "Automatic"

LSOCap          = "Large Send Offload (IPv4)"
IpCsoCap        = "IP Checksum Offload (IPv4)"
TcpCsoCap       = "TCP Checksum Offload (IPv4/IPv6)"
UdpCsoCap       = "UDP Checksum Offload (IPv4/IPv6)"

Enabled         = "Enabled"

TxEnabled       = "Tx Enabled"
RxEnabled       = "Rx Enabled"
TxRxEnabled     = "Rx & Tx Enabled"

JumboMtu        = "Jumbo Frame Size"

NetDetach       = "NetDetach"
NDModeOFF       = "Disabled"
NDModeON        = "Enabled"
NDModeAuto      = "Automatic"

EDPD            = "Energy Detect Power Down"
EDPDOFF         = "Disabled"
EDPDON          = "Enabled"
