;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; File:        QcNetAdapter.inf
;  
; Description: INF file for installing the Qualcomm GPS QcNetAdapter Driver
;    
; Copyright (c) 2018 by Qualcomm Technologies, Inc. All Rights Reserved.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Version]
Signature="$WINDOWS NT$"
Class=Net
ClassGUID={4d36e972-e325-11ce-bfc1-08002be10318}
Provider=%ProviderName%
CatalogFile=surface_mbbnetadapter.cat
DriverVer = 08/29/2024,0.0.434.0
PnpLockdown=1

[DestinationDirs]
DefaultDestDir = 13
NetAdapter_Device_CoInstaller_CopyFiles = 11

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

[SourceDisksFiles]
qcmbbnetadapter.sys  = 1
qcmbbnetadapterfilter.sys=1
;


[Manufacturer]
;%ManufacturerName%=Standard,NT$ARCH$
%ManufacturerName%=Standard, NTamd64.10.0...19041

[Standard.NTamd64.10.0...19041]
%QcMbbNetAdapter.DeviceDesc%=QcMbbNetAdapter_Device, {05C9354C-AFD7-40BE-8B68-323EC7FFF97D}\QcMbbNetAdapter_MSFT_DE

[ndi.reg]
; TODO: Update these if your device is not Ethernet.
; Note that "ndis5" simply means to bind to TCPIP; it is not a version number.
HKR, Ndi\Interfaces, 					UpperRange, 0, "flpp4, flpp6"
HKR, Ndi\Interfaces, 					LowerRange, 0, "ppip"
HKR, Ndi,               				Service,    0, %QcMbbNetAdapter.SVCDESC%

[ReceiveSideScaling.reg]
HKR, Ndi\Params\*RSS,					ParamDesc,	0, "Receive Side Scaling"
HKR, Ndi\Params\*RSS,					default,	0, "0"
HKR, Ndi\Params\*RSS,					type,		0, "enum"
HKR, Ndi\Params\*RSS\enum,				"0",		0, "Disabled"
HKR, Ndi\Params\*RSS\enum,				"1",		0, "Enabled"
; *RssBaseProcNumber
HKR, Ndi\params\*RssBaseProcNumber,		ParamDesc,	0, "Base Processor Number"
HKR, Ndi\params\*RssBaseProcNumber,		Default,	0, "0"
HKR, Ndi\params\*RssBaseProcNumber,		type,		0, "edit"

[SelectiveSuspend.reg]
HKR,Ndi\params\*SelectiveSuspend,		ParamDesc,	 , %SelectiveSuspend%
HKR,Ndi\params\*SelectiveSuspend,		default,	 , "1"
HKR,Ndi\params\*SelectiveSuspend,		type,		 , "enum"
HKR,Ndi\params\*SelectiveSuspend\enum,	0,  		 , %Disabled%
HKR,Ndi\params\*SelectiveSuspend\enum,	1,			 , %Enabled%

[ReceiveSegmentCoalescingV4.reg]
HKR, Ndi\Params\*RscIPv4,                            ParamDesc,      0, "Receive Segment Coalescing IPv4"
HKR, Ndi\Params\*RscIPv4,                            default,        0, "1"
HKR, Ndi\Params\*RscIPv4,                            type,           0, "enum"
HKR, Ndi\Params\*RscIPv4\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*RscIPv4\enum,                       "1",            0, "Enabled"

[ReceiveSegmentCoalescingV6.reg]
HKR, Ndi\Params\*RscIPv6,                            ParamDesc,      0, "Receive Segment Coalescing IPv6"
HKR, Ndi\Params\*RscIPv6,                            default,        0, "1"
HKR, Ndi\Params\*RscIPv6,                            type,           0, "enum"
HKR, Ndi\Params\*RscIPv6\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*RscIPv6\enum,                       "1",            0, "Enabled"

[IPChecksumOffloadIPv4.reg]
HKR, Ndi\Params\*IPChecksumOffloadIPv4,                            ParamDesc,      0, "IPv4 Checksum Offload"
HKR, Ndi\Params\*IPChecksumOffloadIPv4,                            default,        0, "0"
HKR, Ndi\Params\*IPChecksumOffloadIPv4,                            type,           0, "enum"
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,                       "1",            0, "Tx Enabled"
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,                       "2",            0, "Rx Enabled"
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,                       "3",            0, "Rx & Tx Enabled"

[TCPChecksumOffloadIPv4.reg]
HKR, Ndi\Params\*TCPChecksumOffloadIPv4,                            ParamDesc,      0, "TCP Checksum Offload (IPv4)"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4,                            default,        0, "3"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4,                            type,           0, "enum"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,                       "1",            0, "Tx Enabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,                       "2",            0, "Rx Enabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,                       "3",            0, "Rx & Tx Enabled"

[TCPChecksumOffloadIPv6.reg]
HKR, Ndi\Params\*TCPChecksumOffloadIPv6,                            ParamDesc,      0, "TCP Checksum Offload (IPv6)"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6,                            default,        0, "3"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6,                            type,           0, "enum"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,                       "1",            0, "Tx Enabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,                       "2",            0, "Rx Enabled"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,                       "3",            0, "Rx & Tx Enabled"

[UDPChecksumOffloadIPv4.reg]
HKR, Ndi\Params\*UDPChecksumOffloadIPv4,                            ParamDesc,      0, "UDP Checksum Offload (IPv4)"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4,                            default,        0, "3"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4,                            type,           0, "enum"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,                       "1",            0, "Tx Enabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,                       "2",            0, "Rx Enabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,                       "3",            0, "Rx & Tx Enabled"

[UDPChecksumOffloadIPv6.reg]
HKR, Ndi\Params\*UDPChecksumOffloadIPv6,                            ParamDesc,      0, "UDP Checksum Offload (IPv6)"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6,                            default,        0, "3"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6,                            type,           0, "enum"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,                       "0",            0, "Disabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,                       "1",            0, "Tx Enabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,                       "2",            0, "Rx Enabled"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,                       "3",            0, "Rx & Tx Enabled"

[DFx.reg]
HKR,"WDF","WdfDirectedPowerTransitionEnable",%REG_DWORD%,1

[QmapDfc.reg]
HKR, "Parameters", "QmapDfc_disable", %REG_DWORD%, 0x00000000
HKR, "Parameters", "DFCCacheSize", %REG_DWORD%, 0x00004000

[QcMbb.Config.reg]
HKR,Parameters,			CancelTimeout,		%REG_DWORD%,						5

[QcMbbNetAdapter.reg]
HKR, ,					"LowerFilters",		%REG_MULTI_SZ_FLG_ADDREG_APPEND%,	QcMbbNetAdapterFilter

[QcMbbNetAdapter_Device.NT.HW]
AddReg= QcMbbNetAdapter.reg
AddReg=DFx.reg
;AddReg=QmapDfc.reg

[QcMbbNetAdapter_Device.NT.Services]
AddService = QcMbbNetAdapter,%SPSVCINST_ASSOCSERVICE%,QcMbbNetAdapter.Service
AddService = QcMbbNetAdapterFilter,,QcMbbNetAdapterFilter.Service

[QcMbbNetAdapter_Device.NT.Wdf]
KmdfService =  QcMbbNetAdapter, QcMbbNetAdapter_Install
KmdfService=QcMbbNetAdapterFilter,QcMbbNetAdapterFilter_Install

[QcMbbNetAdapter_Install]
KmdfLibraryVersion = 1.15

[QcMbbNetAdapterFilter_Install]
KmdfLibraryVersion = 1.15

[QcMbbNetAdapter_Device.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[CoInstallers_AddReg]
;


[QcMbbNetAdapter.Service]
DisplayName    = %QcMbbNetAdapter.SVCDESC%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %13%\qcmbbnetadapter.sys
AddReg         = NetAdapter.Service.Reg
;AddReg         = DFx.reg
AddReg         = QmapDfc.reg
AddReg         = QcMbb.Config.reg
LoadOrderGroup = NDIS


[QcMbbNetAdapterFilter.Service]
DisplayName     = %QcMbbNetAdapterFilter.SVCDESC%
ServiceType     = %SERVICE_KERNEL_DRIVER%
StartType       = %SERVICE_DEMAND_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %13%\qcmbbnetadapterFilter.sys
AddReg          = QcMbbNetAdapterFilter.Reg
LoadOrderGroup	= NDIS

[QcMbbNetAdapterFilter.Reg]
HKR,Parameters,			CancelTimeout,		%REG_DWORD%,						5


[NetAdapter.Service.Reg]
HKR,, BootFlags, %REG_DWORD%, 1 ; CM_SERVICE_NETWORK_BOOT_LOAD


[QcMbbNetAdapter_Device.NT]
FeatureScore            	= 0xFE
Characteristics         	= %NCF_PHYSICAL%
; TODO: Update with the type of bus (PCI, USB, or custom) your device uses.
BusType                 	= %PNPBus%
; TODO: Update these next 3 values based on your device's media type.
*IfType                 	= %IF_TYPE_WWANPP2%
*MediaType              	= %NdisMediumWirelessWan%
*PhysicalMediaType      	= %NdisPhysicalMediumWirelessWan%
; TODO: Set this to 0 if your device is not a physical device.
*IfConnectorPresent     	= %TRUE%
EnableDhcp              	= %FALSE%
; In most cases, you can keep these at their default values.
*ConnectionType         	= %NET_IF_CONNECTION_DEDICATED%
*DirectionType          	= %NET_IF_DIRECTION_SENDRECEIVE%
*AccessType             	= %NET_IF_ACCESS_BROADCAST%
*HardwareLoopback       	= %FALSE%
NumberOfNetworkInterfaces 	= %MAX_ADAPTER%
CopyFiles=Drivers_Dir
AddReg= ndi.reg
AddReg= ReceiveSideScaling.reg
AddReg= SelectiveSuspend.reg
AddReg= ReceiveSegmentCoalescingV4.reg
AddReg= ReceiveSegmentCoalescingV6.reg
AddReg= IPChecksumOffloadIPv4.reg
AddReg= TCPChecksumOffloadIPv4.reg
AddReg= TCPChecksumOffloadIPv6.reg
AddReg= UDPChecksumOffloadIPv4.reg
AddReg= UDPChecksumOffloadIPv6.reg

[Drivers_Dir]
qcmbbnetadapter.sys
qcmbbnetadapterfilter.sys


[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ProviderName					= "Surface"
ManufacturerName				= "Microsoft" 
ClassName						= "QcMbbNetAdapter"
DiskName						= "QcMbbNetAdapter Installation Disk"
QcMbbNetAdapter.DeviceDesc		= "Surface 5G Mobile Broadband"
QcMbbNetAdapter.SVCDESC			= "Surface 5G Mobile Broadband Service"
QcMbbNetAdapterFilter.SVCDESC	= "Surface 5G Mobile Broadband Filter Service"
SelectiveSuspend				= "Selective Suspend"
Disabled						= "Disabled"
Enabled							= "Enabled"
ARCH							="$ARCH$"

REG_SZ							= 0x00000000
REG_DWORD						= 0x00010001
REG_MULTI_SZ_FLG_ADDREG_APPEND	= 0x00010008

SERVICE_KERNEL_DRIVER			= 1
SERVICE_DEMAND_START			= 3
SERVICE_ERROR_NORMAL			= 1

TRUE							= 1
FALSE							= 0

NCF_PHYSICAL 					= 0x4
PNPBus							= 15
IF_TYPE_WWANPP2					= 243
NdisMediumWirelessWan			= 9
NdisPhysicalMediumWirelessWan	= 8
NET_IF_CONNECTION_DEDICATED		= 1
NET_IF_DIRECTION_SENDRECEIVE	= 0
NET_IF_ACCESS_BROADCAST			= 2
MAX_ADAPTER						= 11

BusPdoGuid						="{05C9354C-AFD7-40BE-8B68-323EC7FFF97D}"
GnssPdo							="QcGnss_MSFT_DE"
FilterConfiguration				="Filter"
