;****************************************************************************************
;
; NETR28X.INF
;
;   This installation script supports Windows 8 for D-Link Wireless LAN Card.
;
;   D-Link Inc. (C)2014. All rights reserved.
;
;****************************************************************************************

[Version]
Signature       = "$Windows NT$"
Class           = Net
ClassGUID       = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider        = %D-Link%
CatalogFile     = Dnetr28x.cat
DriverVer       = 11/25/2014,5.00.52.0000

[ControlFlags]
ExcludeFromSelect = *

[Manufacturer]
%D-Link%        = D-Link, NTAMD64.6.2

;*******************************************************************************************
; Win7 specific entries
;*******************************************************************************************
[D-Link.NTAMD64.6.2]
; DisplayName                  Section                         DeviceID
; -----------                  -------                         --------
%D-Link_3C04.DeviceDesc%       = NDIS61_RT3900P_C1.ndi,        PCI\VEN_1814&DEV_3060&SUBSYS_3C041186
%D-Link_3C06.DeviceDesc%       = NDIS61_RT3900E3.ndi,          PCI\VEN_1814&DEV_5392&SUBSYS_3C061186
%D-Link_3C05.DeviceDesc%       = NDIS61_RT3900P_C1.ndi,        PCI\VEN_1814&DEV_5360&SUBSYS_3C051186

;*******************************************************************************************
; Win7 specific entries
;*******************************************************************************************
[NDIS61_RT3900E3.ndi.NT]
Include=netvwifibus.inf
Needs=VWiFiBus.CopyFiles
AddReg                  = RT2860_NDIS61.reg, RT2860.reg, SingleBand.reg, AdhocNMode.reg, PowerContrl_F2.reg, FastRoaming5range.reg, PM4Beacon.reg, SmartScan.reg
DelReg                  = RegRemove.delReg
Characteristics         = 0x84                      ; NCF_REMOVABLE | NCF_HAS_UI | NCF_PHYSICAL
BusType                 = 5
CopyFiles               = NT.CopyFiles
*IfType                 = 71                        ; IF_TYPE_IEEE80211
*MediaType              = 16                        ; NdisMediumNative802_11
*PhysicalMediaType      = 9                         ; NdisPhysicalMediumNative802_11

[NDIS61_RT3900P_C1.ndi.NT]
Include=netvwifibus.inf
Needs=VWiFiBus.CopyFiles
AddReg                  = RT2860_NDIS61.reg, RT2860.reg, SingleBand.reg, AdhocNMode.reg, Customer2.reg
DelReg                  = RegRemove.delReg
Characteristics         = 0x84                      ; NCF_REMOVABLE | NCF_HAS_UI | NCF_PHYSICAL
BusType                 = 5
CopyFiles               = NT.CopyFiles
*IfType                 = 71                        ; IF_TYPE_IEEE80211
*MediaType              = 16                        ; NdisMediumNative802_11
*PhysicalMediaType      = 9                         ; NdisPhysicalMediumNative802_11

[NDIS61_RT3900E3.ndi.NT.Hw]
Include=netvwifibus.inf
Needs=VWiFiBus.PnPFilterRegistration
AddReg                  = MSI.Reg

[NDIS61_RT3900E3.ndi.NT.Services]
Include=netvwifibus.inf
Needs=VWiFiBus.Services
AddService              = netr28x, 2, Generic.Service, common.EventLog

[NDIS61_RT3900E3.ndi.NT.CoInstallers]
CopyFiles = CoInstaller.CopyFiles
AddReg = CoInstaller_AddReg

[NDIS61_RT3900P_C1.ndi.NT.Hw]
Include=netvwifibus.inf
Needs=VWiFiBus.PnPFilterRegistration

[NDIS61_RT3900P_C1.ndi.NT.Services]
Include=netvwifibus.inf
Needs=VWiFiBus.Services
AddService              = netr28x, 2, Generic.Service, common.EventLog

[NDIS61_RT3900P_C1.ndi.NT.CoInstallers]
CopyFiles = CoInstaller.CopyFiles
AddReg = CoInstaller_AddReg 

;*******************************************************************************************
; Registry for Win7
;*******************************************************************************************
[RT2860_NDIS61.reg]
HKR, Ndi,                       Service,    0, "netr28x"

HKR, Ndi\Interfaces,            UpperRange, 0, "ndis5"
HKR, Ndi\Interfaces,            LowerRange, 0, "wlan,ethernet,vwifi"

;*******************************************************************************************
; Registry for both Vista & Win7
;*******************************************************************************************
[RT2860.reg]

;
; CCX drastic roaming use
;
HKR, ,                            CCXPktLossLimitTime, 0, "30"

;
; CCX Dbm offset
;
HKR, ,                            CCXDbmOffset,    0, "4"

;
; CCX VO/VI Drop Period, 3 or 5 is recommanded
;
HKR, ,                            CACDropPeriod,   0, "0"

;
; CCX VO/VI Drop Criteria
;
HKR, ,                            CACDropCriteria, 0, "1700"

;
; WirelessMode
;
HKR, ,                            WirelessMode,    0, "5"

;
; Channel
;
HKR, ,                            Channel,         0, %CHANNEL%
HKR, Default,                     Channel,         0, %CHANNEL%

;
; Channel list
; 
HKR, ,                            CountryRegion,   0, "0"
HKR, ,                            CountryRegionABand, 0, "0"

;
; Radio On/Off
;
HKR, ,                            Radio,           0, "0"
HKR, NDI\params\Radio,            ParamDesc,       0, %RadioOnOff%
HKR, NDI\params\Radio,            type,            0, "enum"
HKR, NDI\params\Radio,            default,         0, "0"
HKR, NDI\params\Radio\enum,       1,               0, %Disable%
HKR, NDI\params\Radio\enum,       0,               0, %Enable%

;
; WMMCapable
;
HKR, ,                            WMMCapable,      0, "1"

;
; FrameAggregation
;
HKR, ,                            FrameAggregation,0, "0"

;
; IEEE80211H
;
HKR, ,                            IEEE80211H,      0, "0"

;
; CarrierDetect
;
HKR, ,                            CarrierDetect,   0, "0"

;
; WPS Device Name
;
HKR, ,                            WPSDevName,      0, %WPS_DEVNAME_DEF_STR%
HKR, Default,                     WPSDevName,      0, %WPS_DEVNAME_DEF_STR%

;
; OpMode
;
HKR, ,                            OpMode,          0, "0"

;
; Enable TX Burst
;
HKR, ,                            TXBurst,         0, "1"

;
; Use Short Slot Time
;
HKR, ,                            ShortSlot,       0, "1"

;
; Block ACK settings
;
HKR, ,                            BACapability,    0x10001, "0x0b034040"
HKR, Default,                     BACapability,    0x10001, "0x0b034040"

;
; Wifi Direct settings
;
HKR, ,                            WifiDirectControl, 0x10001, "0x04308078"
HKR, Default,                     WifiDirectControl, 0x10001, "0x04308078"

;
; Win8 WFD WFA
;
HKR, ,                            Win8WfdWfaControl,    0x10001, "0x40000000"
HKR, Default,                     Win8WfdWfaControl,    0x10001, "0x40000000"

;
; Enable P2P Video Boost within P2P Group
;
HKR, ,                            P2PVideoBoost,   0, "0"

;
; Transmit Rate setting
;
HKR, ,                            TransmitSetting,      0x10001, "0x22CA15"
HKR, Default,                     TransmitSetting,      0x10001, "0x22CA15"

;
; RDG
;
HKR, ,                            RDG,             0, "1"

;
; Network Type
;
HKR, ,                            NetworkType,     0, "1"
HKR, Default,                     NetworkType,     0, "1"

;
; Disable 5GHz adhoc mode
;
HKR, ,                            Adhoc5GDisable,  0, "0"

;
; SmartScan
;
HKR, ,                            SmartScan,       0, "0"
HKR, NDI\params\SmartScan,        ParamDesc,       0, %SmartScan%
HKR, NDI\params\SmartScan,        type,            0, "enum"
HKR, NDI\params\SmartScan,        default,         0, "0"
HKR, NDI\params\SmartScan\enum,   0,               0, %Disable%
HKR, NDI\params\SmartScan\enum,   1,               0, %Enable%

;
; Power Save control
;
HKR, ,                            PSControl,       0x00010001, 0x00000000

;
; ProhibitTKIPonHT
;
HKR, ,                            ProhibitTKIPonHT, 0, "1"

;
; Link Speed Status
;
HKR, ,                            LinkSpeedStatus,  0, "0"

;
; AdhocN40MHzAllowed
;
HKR, ,                            AdhocN40MHzAllowed, 0, "0"

;
; WSC Version2 
HKR, ,                            WSCVersion2,     0x00010001, 0x00000020

;
; WSC 2.0 Testbed for some test items. 
HKR, ,                            WSC20Testbed,    0x00010001, 0x00000008

;
; PMF On/Off
;
HKR, ,                            MFPC,            0, "1"

;
; Test WHCK Usage
;
HKR, ,				OnTestingWHQL,		0,	"0"
HKR, ,				OnTestingCPUUtil,	0,	"0"

;
; Enable InBoxMode
;
HKR, ,				InBoxMode,		0, 	"0"

;
; FWupdated check
;
HKR, ,              FWUpdated,    0x00010001, 0x0

;*******************************************************************************************
[SingleBand.reg]
;
; 2.4G Band
;
HKR, ,                                 CountryRegion,      0, "0"
HKR, NDI\params\CountryRegion,         ParamDesc,          0, %CountryRegion24G%
HKR, NDI\params\CountryRegion,         type,               0, "enum"
HKR, NDI\params\CountryRegion,         default,            0, "0"
HKR, NDI\params\CountryRegion\enum,    0,                  0, %CountryRegion24G_0%
HKR, NDI\params\CountryRegion\enum,    1,                  0, %CountryRegion24G_1%
HKR, NDI\params\CountryRegion\enum,    2,                  0, %CountryRegion24G_2%
HKR, NDI\params\CountryRegion\enum,    3,                  0, %CountryRegion24G_3%
HKR, NDI\params\CountryRegion\enum,    4,                  0, %CountryRegion24G_4%
HKR, NDI\params\CountryRegion\enum,    5,                  0, %CountryRegion24G_5%
HKR, NDI\params\CountryRegion\enum,    6,                  0, %CountryRegion24G_6%
HKR, NDI\params\CountryRegion\enum,    7,                  0, %CountryRegion24G_7%

[AdhocNMode.reg]
;
; AdhocNMode
;
HKR, ,                            AdhocNMode,      0, "0"
HKR, NDI\params\AdhocNMode,       ParamDesc,       0, %AdhocNMode%
HKR, NDI\params\AdhocNMode,       type,            0, "enum"
HKR, NDI\params\AdhocNMode,       default,         0, "0"
HKR, NDI\params\AdhocNMode\enum,  0,               0, %Disable%
HKR, NDI\params\AdhocNMode\enum,  1,               0, %Enable%

[PowerContrl_F2.reg]
HKR, ,               PSControl, 0x00010001, 0x000000df

[FastRoaming5range.reg]
HKR, ,                                 FastRoamingSensitivity, 0, "0"
HKR, NDI\params\FastRoamingSensitivity,    ParamDesc,          0, %FAST_ROAMING_SENSITIVITY_STR%
HKR, NDI\params\FastRoamingSensitivity,    type,               0, "enum"
HKR, NDI\params\FastRoamingSensitivity,    default,            0, "0"
HKR, NDI\params\FastRoamingSensitivity\enum,         "0",      0, %DISABLE_STR%
HKR, NDI\params\FastRoamingSensitivity\enum,         "1",      0, %LOWEST_STR%
HKR, NDI\params\FastRoamingSensitivity\enum,         "2",      0, %MEDIUM_LOW_STR%
HKR, NDI\params\FastRoamingSensitivity\enum,         "3",      0, %MEDIUM_STR%
HKR, NDI\params\FastRoamingSensitivity\enum,         "4",      0, %MEDIUM_HIGH_STR%
HKR, NDI\params\FastRoamingSensitivity\enum,         "5",      0, %HIGHEST_STR% 

[PM4Beacon.reg]
;
; PM4 Power Check
;
HKR, ,                            PM4BeaconListen,    0, "3"

[SmartScan.reg]                   
HKR, ,                            SmartScan,       0, "1"

; Remove registry
;
[RegRemove.delReg]
; Remove CountryRegion
HKR, NDI\params\CountryRegion
HKR, NDI\params\CountryRegionABand

; Remove IEEE80211H
HKR, NDI\params\IEEE80211H

[Customer2.reg]
; D-Link Request
; WMMCapable
HKR, ,                            WMMCapable,      0, "1"
; Enable TX Burst
HKR, ,                            TXBurst,         0, "1"
; FrameAggregation
HKR, ,                            FrameAggregation,0, "1"
; DLSCapable
HKR, ,                            DLSCapable,      0, "1"
; DirectMode
HKR, ,                            DirectMode,      0, "0"

[MSI.Reg]
HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1

[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "RaCoInstx.dll,ClassCoInstaller"

;*******************************************************************************************
; DestinationDirs
;*******************************************************************************************

[NT.CopyFiles]
Dnetr28x.sys,,,2

[CoInstaller.CopyFiles]
RaCoInstx.dll,,,2
RaCoInst.dat,,,2

[SourceDisksNames]
1 = %INSTALL_DISK_STR%,,,

[SourceDisksFiles]
Dnetr28x.sys                = 1,,
RaCoInstx.dll              = 1,,
RaCoInst.dat              = 1,,

[DestinationDirs]
NT.CopyFiles     = 12     ; system32\drivers subdirectory on NT
DefaultDestDir   = 11
CoInstaller.CopyFiles = 11

;*******************************************************************************************
; NT specific
;*******************************************************************************************

[Generic.Service]
DisplayName                 = %Generic.Service.DispName%
ServiceType                 = 1                             ;%SERVICE_KERNEL_DRIVER%
StartType                   = 3                             ;%SERVICE_AUTO_START%
ErrorControl                = 1                             ;%SERVICE_ERROR_NORMAL%
ServiceBinary               = %12%\Dnetr28x.sys
LoadOrderGroup              = NDIS


[common.EventLog]
AddReg = common.AddEventLog.reg

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

;*******************************************************************************************
; Strings
;*******************************************************************************************
[Strings]
D-Link                      = "D-Link Corporation"
;*******************************************************************************************
; Device description
;*******************************************************************************************
Generic.DeviceDesc          = "802.11n Wireless LAN Card"
D-Link_3C04.DeviceDesc      = "D-Link DWA-525 Wireless N 150 Desktop Adapter"
D-Link_3C05.DeviceDesc      = "D-Link DWA-525 Wireless N 150 Desktop Adapter(rev.A2)"
D-Link_3C06.DeviceDesc      = "D-Link DWA-548 Wireless N PCIe Desktop Adapter"
INSTALL_DISK_STR            = "D-Link 802.11n Wireless LAN Installation Disk"
Generic.Service.DispName    = "D-Link 802.11n Extensible Wireless Driver"
;
; Parameters
;
RadioOnOff                  = "Radio On/Off"
Disable                     = "Disable"
Enable                      = "Enable"
CountryRegion24G            = "Country Region (2.4GHz)"
CountryRegion24G_0          = "#0 (1 - 11)"
CountryRegion24G_1          = "#1 (1 - 13)"
CountryRegion24G_2          = "#2 (10 - 11)"
CountryRegion24G_3          = "#3 (10 - 13)"
CountryRegion24G_4          = "#4 (14)"
CountryRegion24G_5          = "#5 (1 - 14)"
CountryRegion24G_6          = "#6 (3 - 9)"
CountryRegion24G_7          = "#7 (5 - 13)"
IEEE802_11h                 = "IEEE802.11h"
SmartScan                   = "Multimedia/Gaming Environment"
PSMode                      = "Power Saving Mode"
CAM                         = "CAM"
MAXPSP                      = "Max_PSP"
AdhocNMode                  = "Adhoc support 802.11n"

CHANNEL                     = "6"
WPS_DEVNAME_DEF_STR         = "D-Link Client"
WMMCapable		    = "WMM Capable"
APSDCapable                 = "APSD Capable"
APSDAC_BE                   = "AC_BE support APSD"
APSDAC_BK                   = "AC_BK support APSD"
APSDAC_VI                   = "AC_VI support APSD"
APSDAC_VO                   = "AC_VO support APSD"

FAST_ROAMING_SENSITIVITY_STR = "Roaming Sensitivity"
DISABLE_STR                 = "6.Disable"
LOWEST_STR                  = "5.Lowest"
MEDIUM_LOW_STR              = "4.Low"
MEDIUM_STR                  = "3.Medium"
MEDIUM_HIGH_STR             = "2.High"
HIGHEST_STR                 = "1.Highest"